summaryrefslogtreecommitdiff
path: root/src/home/mqtt/module/relay.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/home/mqtt/module/relay.py')
-rw-r--r--src/home/mqtt/module/relay.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/home/mqtt/module/relay.py b/src/home/mqtt/module/relay.py
index ae88ddb..5383fb6 100644
--- a/src/home/mqtt/module/relay.py
+++ b/src/home/mqtt/module/relay.py
@@ -64,9 +64,9 @@ class MqttRelayModule(MqttModule):
mqtt.subscribe_module('relay/status', self)
def switchpower(self,
- enable: bool,
- secret: str):
- payload = MqttPowerSwitchPayload(secret=secret, state=enable)
+ enable: bool):
+ payload = MqttPowerSwitchPayload(secret=self._mqtt_node_ref.secret,
+ state=enable)
self._mqtt_node_ref.publish('relay/switch', payload=payload.pack())
def handle_payload(self, mqtt: MqttNode, topic: str, payload: bytes) -> Optional[MqttPayload]: