From cff3bad4192a2657dc12cc70e3dce0b8c03343d0 Mon Sep 17 00:00:00 2001 From: Benjamin Braatz Date: Sun, 7 Mar 2021 01:26:33 +0100 Subject: [PATCH] State answers to 'set state' also if unchanged --- controlpi-plugins/util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controlpi-plugins/util.py b/controlpi-plugins/util.py index ae49071..c51e81e 100644 --- a/controlpi-plugins/util.py +++ b/controlpi-plugins/util.py @@ -84,6 +84,9 @@ class State(BasePlugin): event = {'sender': self._name, 'event': 'changed', 'state': self._state} await self._bus.send(event) + else: + answer = {'sender': self._name, 'state': self._state} + await self._bus.send(answer) def _process_conf(self, conf: PluginConfiguration) -> None: self._state = False -- 2.34.1