Skip to content

Commit

Permalink
Update entities default event listener + lib
Browse files Browse the repository at this point in the history
  • Loading branch information
ekutner committed Jun 21, 2022
1 parent 6c0009a commit 1e72f58
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions custom_components/home_connect_alt/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ def program_option_available(self) -> bool:

async def async_added_to_hass(self):
"""Run when this Entity has been added to HA."""
events = [Events.CONNECTION_CHANGED, Events.DATA_CHANGED]
events = [Events.CONNECTION_CHANGED, Events.DATA_CHANGED, Events.PROGRAM_SELECTED]
if self._key:
events.append(self._key)
self._appliance.register_callback(self.async_on_update, events)

async def async_will_remove_from_hass(self):
"""Entity being removed from hass."""
events = [Events.CONNECTION_CHANGED, Events.DATA_CHANGED]
events = [Events.CONNECTION_CHANGED, Events.DATA_CHANGED, Events.PROGRAM_SELECTED]
if self._key:
events.append(self._key)
self._appliance.deregister_callback(self.async_on_update, events)
Expand Down
1 change: 0 additions & 1 deletion custom_components/home_connect_alt/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
]

TRIGGERS_CONFIG = {
#"program_started": { "key": "BSH.Common.Event.ProgramFinished" },
"program_started": { "key": "BSH.Common.Status.OperationState", "value": "BSH.Common.EnumType.OperationState.Run" },
"program_finished": { "key": "BSH.Common.Status.OperationState", "value": "BSH.Common.EnumType.OperationState.Finished" }
}
Expand Down
4 changes: 2 additions & 2 deletions custom_components/home_connect_alt/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"domain": "home_connect_alt",
"name": "Home Connect Alt",
"version": "0.5.0-b10",
"version": "0.5.0-b11",
"config_flow": true,
"documentation": "https://github.com/ekutner/home-connect-hass",
"issue_tracker": "https://github.com/ekutner/home-connect-hass/issues",
"requirements": ["home-connect-async==0.7.0-b10"],
"requirements": ["home-connect-async==0.7.0-b11"],
"ssdp": [],
"zeroconf": [],
"homekit": {},
Expand Down

0 comments on commit 1e72f58

Please sign in to comment.