Do not reload Shelly TRV config entry (#92000)

pull/92032/head
Maciej Bieniek 2023-04-25 20:20:59 +00:00 committed by GitHub
parent ee3cebe37b
commit 5244f5731e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 10 deletions

View File

@ -195,17 +195,10 @@ class ShellyBlockCoordinator(ShellyCoordinatorBase[BlockDevice]):
if block.type == "device":
cfg_changed = block.cfgChanged
# Shelly TRV sends information about changing the configuration for no
# reason, reloading the config entry is not needed for it.
if self.model == "SHTRV-01":
# Reloading the entry is not needed when the target temperature changes
if "targetTemp" in block.sensor_ids:
if self._last_target_temp != block.targetTemp:
self._last_cfg_changed = None
self._last_target_temp = block.targetTemp
# Reloading the entry is not needed when the mode changes
if "mode" in block.sensor_ids:
if self._last_mode != block.mode:
self._last_cfg_changed = None
self._last_mode = block.mode
self._last_cfg_changed = None
# For dual mode bulbs ignore change if it is due to mode/effect change
if self.model in DUAL_MODE_LIGHT_MODELS: