ref entity

This commit is contained in:
John Lancaster
2023-11-25 02:17:57 -06:00
parent f4364764a1
commit c9cc841d58

View File

@@ -43,7 +43,7 @@ class ButtonController(Mqtt):
return
elif action == 'single':
cause = 'button single click'
if self.app.entity_state:
if self.get_state(entity_id=self.args['ref_entity']) == 'on':
self.app.deactivate(cause=cause)
else:
self.app.activate(cause=cause)