diff --git a/README.md b/README.md index fd846a92..c62d7290 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Elatko devices are exemplarily mentioned. You can find [here](https://www.eltako * A5-04-01 (Temperature and Humidity Sensor) * A5-04-02 (Temperature and Humidity Sensor e.g.: FLGTF, FLT58, FFT60) * A5-04-03 (Temperature and Humidity Sensor e.g.: FFT60) - * A5-06-01 (Light - Twilight and Illumination) + * A5-06-01 (Light - Twilight and daylight in one sensor value) * A5-07-01 (Occupancy sensor) * A5-08-01 (Light-, Temperature-, Occupancy Sensor e.g.: FABH65S, FBH65, FBH65S, FBH65TF) * A5-09-0C (Air Quality / VOCā  (Volatile Organic Compounds) e.g. [FLGTF](https://github.com/grimmpp/home-assistant-eltako/tree/main/docs/flgtf_temp_humidity_air_quality/readme.md)) diff --git a/custom_components/eltako/cover.py b/custom_components/eltako/cover.py index 93ad9e28..7657e43b 100644 --- a/custom_components/eltako/cover.py +++ b/custom_components/eltako/cover.py @@ -241,6 +241,7 @@ def value_changed(self, msg): if self.dev_eep in [G5_3F_7F]: LOGGER.debug(f"[cover {self.dev_id}] G5_3F_7F - {decoded.__dict__}") + ## is received as response when button pushed if decoded.state == 0x02: # down self._attr_is_closing = True self._attr_is_opening = False @@ -259,6 +260,8 @@ def value_changed(self, msg): self._attr_is_closing = False self._attr_is_closed = False self._attr_current_cover_position = 100 + + ## is received when cover stops at a position elif decoded.time is not None and decoded.direction is not None and self._time_closes is not None and self._time_opens is not None: time_in_seconds = decoded.time / 10.0 @@ -271,9 +274,6 @@ def value_changed(self, msg): self._attr_current_cover_position = 0 self._attr_current_cover_position = min(self._attr_current_cover_position + int(time_in_seconds / self._time_opens * 100.0), 100) - self._attr_is_opening = True - self._attr_is_closing = False - self._attr_is_closed = None else: # down # If the latest state is unknown, the cover position @@ -283,15 +283,16 @@ def value_changed(self, msg): self._attr_current_cover_position = 100 self._attr_current_cover_position = max(self._attr_current_cover_position - int(time_in_seconds / self._time_closes * 100.0), 0) - self._attr_is_opening = False - self._attr_is_closing = True - self._attr_is_closed = None if self._attr_current_cover_position == 0: self._attr_is_closed = True self._attr_is_opening = False self._attr_is_closing = False - elif self._attr_current_cover_position == 100: + # elif self._attr_current_cover_position == 100: + # self._attr_is_closed = False + # self._attr_is_opening = False + # self._attr_is_closing = False + else: self._attr_is_closed = False self._attr_is_opening = False self._attr_is_closing = False