From 3e39d26c156fdbf2b3c342cdd915c8d0871a0383 Mon Sep 17 00:00:00 2001 From: Willow Maccagnoni Date: Fri, 7 Jul 2023 23:03:49 +0200 Subject: [PATCH] shutter: better handling of updated status --- pycalaos/item/io.py | 5 ++++- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pycalaos/item/io.py b/pycalaos/item/io.py index 0541eea..c16292d 100644 --- a/pycalaos/item/io.py +++ b/pycalaos/item/io.py @@ -244,9 +244,11 @@ def toggle(self): def impulse_up(self, duration): self._send(f"impulse up {duration}") + self._update_state() def impulse_down(self, duration): self._send(f"impulse down {duration}") + self._update_state() def set(self, value): if value < 1: @@ -254,7 +256,7 @@ def set(self, value): elif value > 100: value = 100 self._send(f"set {value}") - self._state = value + self._update_state() def up(self, value=0): if value == 0: @@ -282,6 +284,7 @@ def down(self, value=0): def calibrate(self): self._send(f"calibrate") + self._update_state() class Scenario(Item): diff --git a/pyproject.toml b/pyproject.toml index 4ea229f..301cfef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pycalaos" -version = "0.0.24" +version = "0.0.25" authors = [ { name = "Willow Maccagnoni", email = "willow.maccagnoni@gmail.com" }, ]