diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2023-01-01 18:48:28 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2023-01-01 18:48:28 +0300 |
commit | e49fdedb40e0ea7dc1d67ff081b5c19718d92565 (patch) | |
tree | a6231cb1edc9732e9d1d08eae937a92edfbc554a /src/home/mqtt/relay.py | |
parent | 1162a9cc5393cf614654ba763ccfd0298df0765f (diff) |
mqtt relay: rename home_id to device_id here and there
Diffstat (limited to 'src/home/mqtt/relay.py')
-rw-r--r-- | src/home/mqtt/relay.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/home/mqtt/relay.py b/src/home/mqtt/relay.py index 2094b10..0e1725d 100644 --- a/src/home/mqtt/relay.py +++ b/src/home/mqtt/relay.py @@ -86,8 +86,8 @@ class MQTTRelay(MQTTBase): except Exception as e: self._logger.exception(str(e)) - def set_power(self, home_id, enable: bool): - device = next(d for d in self._devices if d.id == home_id) + def set_power(self, device_id, enable: bool): + device = next(d for d in self._devices if d.id == device_id) assert device.secret is not None, 'device secret not specified' payload = PowerPayload(secret=device.secret, @@ -98,11 +98,11 @@ class MQTTRelay(MQTTBase): self._client.loop_write() def push_ota(self, - home_id, + device_id, filename: str, publish_callback: callable, qos: int): - device = next(d for d in self._devices if d.id == home_id) + device = next(d for d in self._devices if d.id == device_id) assert device.secret is not None, 'device secret not specified' self._ota_publish_callback = publish_callback |