fixed 4th button
This commit is contained in:
@@ -75,5 +75,6 @@ class MoesPad(ADBase):
|
|||||||
self.adapi.call_service('light/toggle', entity_id='light.bedroom_stick')
|
self.adapi.call_service('light/toggle', entity_id='light.bedroom_stick')
|
||||||
case MoesButtons.BOTTOM_RIGHT:
|
case MoesButtons.BOTTOM_RIGHT:
|
||||||
for e in ('bedroom_stick', 'bedroom_john', 'bedroom_sydney'):
|
for e in ('bedroom_stick', 'bedroom_john', 'bedroom_sydney'):
|
||||||
if self.adapi.get_state(e) == 'on':
|
eid = f'light.{e}'
|
||||||
self.adapi.call_service('light/toggle', entity_id=e)
|
if self.adapi.get_state(eid) == 'on':
|
||||||
|
self.adapi.call_service('light/toggle', entity_id=eid)
|
||||||
|
|||||||
Reference in New Issue
Block a user