Skip to content

Commit

Permalink
Fix enum/switch and start button events listening
Browse files Browse the repository at this point in the history
  • Loading branch information
ekutner committed Jun 18, 2022
1 parent 1a89178 commit 0ea5f94
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/home_connect_alt/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ async def async_added_to_hass(self):

async def async_will_remove_from_hass(self):
"""Entity being removed from hass."""
events = [Events.CONNECTION_CHANGED, Events.DATA_CHANGED, "BSH.Common.Status.RemoteControlStartAllowed"]
events = [Events.CONNECTION_CHANGED, Events.DATA_CHANGED, Events.PROGRAM_SELECTED, "BSH.Common.Status.RemoteControlStartAllowed"]
self._appliance.deregister_callback(self.async_on_update, events)

async def async_on_update(self, appliance:Appliance, key:str, value) -> None:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/home_connect_alt/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

def is_boolean_enum(values:list[str]) -> bool:
""" Check if the list of enum values represents a boolean on/off option"""
if len(values) != 2:
if not values or len(values) != 2:
return False

for v in values:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/home_connect_alt/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "home_connect_alt",
"name": "Home Connect Alt",
"version": "0.5.0-b8",
"version": "0.5.0-b9",
"config_flow": true,
"documentation": "https://github.com/ekutner/home-connect-hass",
"issue_tracker": "https://github.com/ekutner/home-connect-hass/issues",
Expand Down

0 comments on commit 0ea5f94

Please sign in to comment.