diff --git a/homeassistant/components/modbus/binary_sensor.py b/homeassistant/components/modbus/binary_sensor.py index 3dabeee081c..39174ae8931 100644 --- a/homeassistant/components/modbus/binary_sensor.py +++ b/homeassistant/components/modbus/binary_sensor.py @@ -122,10 +122,7 @@ class ModbusBinarySensor(BasePlatform, RestoreEntity, BinarySensorEntity): self._result = result.bits else: self._result = result.registers - if len(self._result) >= 1: - self._attr_is_on = bool(self._result[0] & 1) - else: - self._attr_available = False + self._attr_is_on = bool(self._result[0] & 1) self.async_write_ha_state() if self._coordinator: diff --git a/homeassistant/components/modbus/climate.py b/homeassistant/components/modbus/climate.py index 3acf8d7ac29..df2983e9070 100644 --- a/homeassistant/components/modbus/climate.py +++ b/homeassistant/components/modbus/climate.py @@ -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( diff --git a/homeassistant/components/modbus/cover.py b/homeassistant/components/modbus/cover.py index 3c4247c61fb..27f9cb1fc18 100644 --- a/homeassistant/components/modbus/cover.py +++ b/homeassistant/components/modbus/cover.py @@ -138,14 +138,9 @@ class ModbusCover(BasePlatform, CoverEntity, RestoreEntity): """Update the state of the cover.""" # 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 result = await self._hub.async_pb_call( self._slave, self._address, 1, self._input_type ) - self._call_active = False if result is None: if self._lazy_errors: self._lazy_errors -= 1 diff --git a/homeassistant/components/modbus/modbus.py b/homeassistant/components/modbus/modbus.py index 31179a23583..db8a4d47fdc 100644 --- a/homeassistant/components/modbus/modbus.py +++ b/homeassistant/components/modbus/modbus.py @@ -261,7 +261,7 @@ class ModbusHub: """Initialize the Modbus hub.""" if CONF_CLOSE_COMM_ON_ERROR in client_config: - async_create_issue( # pragma: no cover + async_create_issue( hass, DOMAIN, "deprecated_close_comm_config",