Closed andrey-yantsen closed 2 years ago
I think I've missed retry logic last time. There is some wrapped mechanism for retry in place already: https://github.com/zewelor/bt-mqtt-gateway/blob/debb5ae8544eff15ac0e4924a6eb9308b9f9a7ad/workers/thermostat.py#L200 and https://github.com/zewelor/bt-mqtt-gateway/blob/debb5ae8544eff15ac0e4924a6eb9308b9f9a7ad/workers/base.py#L95 . Maybe you want to use it.
I've added the retry()
usage and updated the config example; thanks for pointing it out!
@zewelor, just a reminder, if you missed the notification :) I've fixed all your suggestions.
Thanks for ping, missed previous notification. Looks great now thanks !
Description
In this PR, I continue to improve the AM43 worker: I made a few mistakes in the state detection logic in the last one, especially when blinds have moved since the previous update.
Also, in the previous PR, I added some magic to automatically reduce desired update interval to 3 seconds when some changes were detected — to handle the complete open/close procedure quickly: now I moved this hardcoded 3 seconds to a configuration variable, documenting both
default_update_interval
and the newrapid_update_interval
on the way.In addition, I've switched the worker to use a patched Zemismart driver, which helps to detect whether a command was successful.
Plus, now you can select a desired device class for the blinds in HASS (previously, it was hardcoded) :)
Type of change
Please delete options that are not relevant.