File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 1919 from .models import MaintConfigEntry , MaintTask
2020
2121_LOGGER = logging .getLogger (__name__ )
22+
2223EVENT_TASK_DUE = "maint_task_due"
2324
2425
@@ -118,6 +119,8 @@ def is_on(self) -> bool:
118119 def extra_state_attributes (self ) -> dict [str , Any ]:
119120 """Return extra state data."""
120121 return {
122+ "entry_id" : self ._entry .entry_id ,
123+ "task_id" : self ._task .task_id ,
121124 "description" : self ._task .description ,
122125 "last_completed" : self ._task .last_completed .isoformat (),
123126 }
@@ -152,6 +155,8 @@ def _fire_task_due_event(self) -> None:
152155 EVENT_TASK_DUE ,
153156 {
154157 "entity_id" : self .entity_id ,
158+ "entry_id" : self ._entry .entry_id ,
159+ "task_id" : self ._task .task_id ,
155160 "description" : self ._task .description ,
156161 "last_completed" : self ._task .last_completed .isoformat (),
157162 "next_scheduled" : self ._task .next_scheduled .isoformat (),
You can’t perform that action at this time.
0 commit comments