From c9cc841d58ca45dac8557576913249ed807fef2c Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Sat, 25 Nov 2023 02:17:57 -0600 Subject: [PATCH] ref entity --- button.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/button.py b/button.py index b52fbb8..4f7005e 100644 --- a/button.py +++ b/button.py @@ -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)