Skip to content

Commit

Permalink
feat: Support 1/True and False/0 for expose attributes as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Wichmann committed Apr 3, 2021
1 parent 8f1d448 commit 7d98005
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions home-assistant-plugin/custom_components/xknx/expose.py
Expand Up @@ -135,9 +135,9 @@ async def _async_set_knx_value(self, value: StateType) -> None:
value = self.expose_default

if self.type == "binary":
if value == STATE_ON:
if value == STATE_ON or value == 1 or value == "True":
value = True
elif value == STATE_OFF:
elif value == STATE_OFF or value == 0 or value == "False":
value = False

await self.device.set(value)
Expand Down

0 comments on commit 7d98005

Please sign in to comment.