Simplify code, due to better error catching in modbus. (#100483)
This commit is contained in:
parent
30d604c851
commit
48dc81eff0
4 changed files with 2 additions and 15 deletions
|
@ -247,10 +247,6 @@ class ModbusThermostat(BaseStructPlatform, RestoreEntity, ClimateEntity):
|
|||
# remark "now" is a dummy parameter to avoid problems with
|
||||
# async_track_time_interval
|
||||
|
||||
# do not allow multiple active calls to the same platform
|
||||
if self._call_active:
|
||||
return
|
||||
self._call_active = True
|
||||
self._attr_target_temperature = await self._async_read_register(
|
||||
CALL_TYPE_REGISTER_HOLDING, self._target_temperature_register
|
||||
)
|
||||
|
@ -282,7 +278,6 @@ class ModbusThermostat(BaseStructPlatform, RestoreEntity, ClimateEntity):
|
|||
if onoff == 0:
|
||||
self._attr_hvac_mode = HVACMode.OFF
|
||||
|
||||
self._call_active = False
|
||||
self.async_write_ha_state()
|
||||
|
||||
async def _async_read_register(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue