Add error handling for all zwave_js service calls (#93846)
* Add error handling for all service calls * Switch siren to use internal function * Remove failing checks * Revert change to poll service, add comments, and add additional error handling * Add error handling for ping and refresh + review comment + add tests * Add test for statistics entity refresh
This commit is contained in:
parent
927b59fe5a
commit
bd8c88f51b
18 changed files with 191 additions and 69 deletions
|
@ -175,7 +175,7 @@ class ZWaveHumidifier(ZWaveBaseEntity, HumidifierEntity):
|
|||
else:
|
||||
return
|
||||
|
||||
await self.info.node.async_set_value(self._current_mode, new_mode)
|
||||
await self._async_set_value(self._current_mode, new_mode)
|
||||
|
||||
async def async_turn_off(self, **kwargs: Any) -> None:
|
||||
"""Turn off device."""
|
||||
|
@ -192,7 +192,7 @@ class ZWaveHumidifier(ZWaveBaseEntity, HumidifierEntity):
|
|||
else:
|
||||
return
|
||||
|
||||
await self.info.node.async_set_value(self._current_mode, new_mode)
|
||||
await self._async_set_value(self._current_mode, new_mode)
|
||||
|
||||
@property
|
||||
def target_humidity(self) -> int | None:
|
||||
|
@ -204,7 +204,7 @@ class ZWaveHumidifier(ZWaveBaseEntity, HumidifierEntity):
|
|||
async def async_set_humidity(self, humidity: int) -> None:
|
||||
"""Set new target humidity."""
|
||||
if self._setpoint:
|
||||
await self.info.node.async_set_value(self._setpoint, humidity)
|
||||
await self._async_set_value(self._setpoint, humidity)
|
||||
|
||||
@property
|
||||
def min_humidity(self) -> int:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue