J. Nick Koston
df82567356
Fix shelly available check when device is not initialized ( #124182 )
...
* Fix shelly available check when device is not initialized
available needs to check for device.initialized or if the device
is sleepy as calls to status will raise NotInitialized which results
in many unretrieved exceptions while writing state
fixes
```
2024-08-18 09:33:03.757 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 453, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners
update_callback()
File "/config/custom_components/shelly/entity.py", line 374, in _update_callback
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
self.__async_calculate_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py", line 293, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/shelly/binary_sensor.py", line 331, in is_on
return bool(self.attribute_value)
^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/shelly/entity.py", line 545, in attribute_value
self._last_value = self.sub_status
^^^^^^^^^^^^^^^
File "/config/custom_components/shelly/entity.py", line 534, in sub_status
return self.status[self.entity_description.sub_key]
^^^^^^^^^^^
File "/config/custom_components/shelly/entity.py", line 364, in status
return cast(dict, self.coordinator.device.status[self.key])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aioshelly/rpc_device/device.py", line 390, in status
raise NotInitialized
aioshelly.exceptions.NotInitialized
```
* tweak
* cover
* fix
* cover
* fixes
2024-08-22 16:14:45 +03:00
..
2024-08-12 13:28:09 +02:00
2024-08-16 17:07:57 +02:00
2024-08-12 13:28:09 +02:00
2024-08-13 18:44:12 +02:00
2024-07-29 22:08:46 +02:00
2024-07-29 22:08:46 +02:00
2024-08-16 17:07:57 +02:00
2024-07-30 12:34:49 +02:00
2024-07-29 22:08:46 +02:00
2024-07-29 22:08:46 +02:00
2024-07-29 22:08:46 +02:00
2024-07-29 22:08:46 +02:00
2024-08-16 17:07:57 +02:00
2024-08-16 19:00:44 +02:00
2024-08-05 17:44:14 +02:00
2024-08-14 17:59:15 +02:00
2024-08-13 11:59:48 +02:00
2024-08-16 17:07:57 +02:00
2024-07-31 13:01:48 +02:00
2024-07-31 21:00:04 +02:00
2024-08-14 16:48:52 +02:00
2024-08-14 17:59:15 +02:00
2024-08-19 16:15:27 +02:00
2024-08-17 20:45:24 +02:00
2024-08-21 22:12:20 +03:00
2024-07-29 17:13:31 +02:00
2024-08-15 11:08:40 +02:00
2024-08-18 13:21:38 -05:00
2024-08-12 13:28:09 +02:00
2024-08-16 17:07:57 +02:00
2024-07-31 14:36:53 +02:00
2024-08-14 16:48:52 +02:00
2024-08-12 13:28:09 +02:00
2024-08-12 13:28:09 +02:00
2024-08-14 17:59:15 +02:00
2024-07-31 19:17:53 +02:00
2024-08-21 17:11:01 +02:00
2024-08-14 16:48:52 +02:00
2024-08-21 12:53:40 +02:00
2024-07-29 22:08:46 +02:00
2024-07-31 08:26:57 +02:00
2024-08-13 12:55:01 +02:00
2024-08-18 15:39:26 +02:00
2024-08-14 16:48:52 +02:00
2024-07-29 12:51:12 +02:00
2024-07-29 22:08:46 +02:00
2024-08-21 22:18:33 +02:00
2024-08-18 15:39:26 +02:00
2024-08-02 12:17:51 +02:00
2024-08-10 12:28:48 +02:00
2024-08-18 15:39:26 +02:00
2024-08-12 13:28:09 +02:00
2024-08-18 15:35:31 +02:00
2024-08-19 14:05:12 +02:00
2024-08-18 15:35:31 +02:00
2024-08-22 09:38:27 +02:00
2024-08-18 15:35:31 +02:00
2024-07-29 22:08:46 +02:00
2024-08-18 15:35:31 +02:00
2024-08-12 21:35:02 +02:00
2024-08-18 15:35:31 +02:00
2024-08-19 15:00:23 -05:00
2024-08-18 15:35:31 +02:00
2024-08-18 15:35:31 +02:00
2024-08-12 13:28:09 +02:00
2024-08-14 16:48:52 +02:00
2024-08-18 18:57:29 +02:00
2024-08-18 18:57:29 +02:00
2024-08-14 16:48:52 +02:00
2024-07-29 22:08:46 +02:00
2024-07-29 22:08:46 +02:00
2024-08-08 08:56:40 +02:00
2024-08-21 21:56:59 +02:00
2024-08-13 12:18:59 +02:00
2024-07-29 22:08:46 +02:00
2024-08-18 18:57:29 +02:00
2024-08-18 18:57:29 +02:00
2024-08-18 15:34:59 +02:00
2024-08-12 09:09:51 +02:00
2024-08-13 18:01:06 +02:00
2024-08-18 15:34:59 +02:00
2024-07-29 21:57:35 +02:00
2024-07-28 16:36:36 +02:00
2024-08-16 16:54:20 +02:00
2024-08-14 16:48:52 +02:00
2024-08-03 10:41:30 +02:00
2024-08-14 16:48:52 +02:00
2024-07-29 12:51:12 +02:00
2024-08-16 21:51:58 +02:00
2024-08-14 17:59:15 +02:00
2024-08-15 18:21:07 +02:00
2024-08-14 16:48:52 +02:00
2024-08-14 17:59:15 +02:00
2024-08-16 21:51:58 +02:00
2024-08-18 13:53:59 +02:00
2024-08-14 17:59:15 +02:00
2024-08-14 17:59:15 +02:00
2024-08-14 22:53:29 +02:00
2024-08-16 21:51:58 +02:00
2024-08-19 11:04:34 +02:00
2024-08-16 21:51:58 +02:00
2024-08-16 17:46:37 +02:00
2024-07-30 16:29:59 +02:00
2024-08-19 00:29:26 -07:00
2024-08-19 00:29:26 -07:00
2024-07-29 22:08:46 +02:00
2024-08-11 19:14:43 +02:00
2024-07-29 22:08:46 +02:00
2024-08-19 00:29:26 -07:00
2024-07-29 22:08:46 +02:00
2024-08-19 00:29:26 -07:00
2024-08-19 00:29:26 -07:00
2024-08-12 13:28:09 +02:00
2024-08-13 18:01:06 +02:00
2024-08-19 00:29:26 -07:00
2024-08-12 21:31:42 +02:00
2024-08-05 11:18:34 +02:00
2024-08-19 00:29:26 -07:00
2024-07-29 22:08:46 +02:00
2024-08-02 15:28:32 +02:00
2024-08-19 12:40:56 +02:00
2024-08-22 09:07:45 +02:00
2024-08-14 17:59:15 +02:00
2024-08-14 17:59:15 +02:00
2024-08-19 12:40:56 +02:00
2024-07-31 15:08:25 +02:00
2024-08-19 15:41:09 +02:00
2024-08-14 17:59:15 +02:00
2024-08-17 12:11:32 -07:00
2024-08-19 12:40:56 +02:00
2024-08-19 12:40:56 +02:00
2024-08-19 12:40:56 +02:00
2024-08-20 12:47:41 +02:00
2024-08-20 12:47:41 +02:00
2024-08-19 11:06:50 +02:00
2024-08-21 15:36:45 +02:00
2024-07-31 10:35:05 +02:00
2024-07-31 19:17:53 +02:00
2024-08-19 12:40:56 +02:00
2024-08-19 12:40:56 +02:00
2024-07-29 11:59:13 +02:00
2024-08-15 08:29:06 +02:00
2024-07-26 17:25:56 +02:00
2024-08-14 16:48:52 +02:00
2024-08-19 12:40:17 +02:00
2024-08-19 12:40:17 +02:00
2024-08-12 13:28:09 +02:00
2024-08-19 12:40:17 +02:00
2024-08-19 12:40:17 +02:00
2024-08-19 12:40:17 +02:00
2024-08-19 12:40:17 +02:00
2024-08-19 12:40:17 +02:00
2024-08-19 15:01:35 -05:00
2024-08-02 12:17:51 +02:00
2024-08-12 13:28:09 +02:00
2024-07-29 22:08:46 +02:00
2024-08-21 14:03:40 +02:00
2024-08-05 17:44:14 +02:00
2024-08-12 13:28:09 +02:00
2024-08-19 10:37:17 +02:00
2024-08-19 12:40:17 +02:00
2024-08-02 15:28:32 +02:00
2024-08-14 17:59:15 +02:00
2024-08-15 10:52:55 +02:00
2024-08-14 17:59:15 +02:00
2024-08-08 10:09:36 +02:00
2024-07-29 22:08:46 +02:00
2024-07-29 22:08:46 +02:00
2024-08-01 13:43:09 +02:00
2024-08-22 14:50:45 +02:00
2024-08-16 16:54:20 +02:00
2024-08-19 15:36:23 +02:00
2024-08-14 17:59:15 +02:00
2024-08-19 15:36:23 +02:00
2024-07-29 22:08:46 +02:00
2024-08-19 15:36:23 +02:00
2024-08-05 17:44:14 +02:00
2024-08-12 21:55:44 +02:00
2024-08-19 15:36:23 +02:00
2024-08-19 15:36:23 +02:00
2024-08-11 22:38:20 +02:00
2024-08-19 15:36:23 +02:00
2024-08-18 21:17:10 +02:00
2024-08-13 11:59:22 +02:00
2024-08-18 21:31:44 +02:00
2024-08-13 18:01:06 +02:00
2024-08-14 12:55:59 +02:00
2024-08-20 12:10:25 +02:00
2024-08-12 13:28:09 +02:00
2024-08-12 13:28:09 +02:00
2024-08-19 15:36:37 +02:00
2024-07-29 22:08:46 +02:00
2024-08-12 13:28:09 +02:00
2024-08-12 13:28:09 +02:00
2024-08-13 11:56:55 +02:00
2024-08-13 18:01:06 +02:00
2024-08-19 15:36:37 +02:00
2024-08-13 15:19:08 +02:00
2024-08-13 11:56:18 +02:00
2024-08-14 17:59:15 +02:00
2024-08-19 15:36:37 +02:00
2024-07-30 14:07:12 -05:00
2024-08-18 17:14:05 +02:00
2024-08-22 11:03:35 +02:00
2024-08-19 15:36:37 +02:00
2024-08-19 15:36:37 +02:00
2024-08-19 15:36:37 +02:00
2024-08-12 13:28:09 +02:00
2024-08-20 12:48:06 +02:00
2024-07-29 22:08:46 +02:00
2024-08-12 13:28:09 +02:00
2024-08-12 13:28:09 +02:00
2024-08-12 13:28:09 +02:00
2024-08-19 22:09:22 +02:00
2024-08-20 12:48:06 +02:00
2024-07-29 22:08:46 +02:00
2024-08-14 17:59:15 +02:00
2024-08-14 17:59:15 +02:00
2024-08-14 16:48:52 +02:00
2024-08-20 12:48:06 +02:00
2024-08-13 14:57:24 +02:00
2024-07-29 22:16:00 +02:00
2024-08-07 11:18:48 +02:00
2024-08-19 16:16:34 +02:00
2024-08-13 16:01:24 +02:00
2024-08-13 16:08:36 +02:00
2024-08-21 16:56:57 +02:00
2024-08-13 16:07:17 +02:00
2024-08-10 17:01:26 +02:00
2024-08-14 16:48:52 +02:00
2024-08-20 14:58:34 +02:00
2024-08-19 16:16:34 +02:00
2024-08-20 12:52:33 +02:00
2024-08-14 13:00:07 +02:00
2024-07-29 22:08:46 +02:00
2024-08-14 20:39:15 +02:00
2024-08-20 12:52:33 +02:00
2024-08-12 13:28:09 +02:00
2024-08-20 12:52:33 +02:00
2024-07-31 19:17:53 +02:00
2024-08-20 12:52:33 +02:00
2024-08-20 12:52:33 +02:00
2024-08-14 17:59:15 +02:00
2024-08-18 22:11:37 +02:00
2024-08-10 13:21:01 +02:00
2024-08-14 13:05:43 +02:00
2024-08-20 12:52:33 +02:00
2024-08-14 13:05:52 +02:00
2024-08-15 19:09:21 +02:00
2024-08-14 12:58:49 +02:00
2024-08-14 12:52:09 +02:00
2024-08-14 12:51:52 +02:00
2024-08-19 15:41:09 +02:00
2024-08-14 17:59:15 +02:00
2024-08-16 12:46:51 +02:00
2024-08-19 21:38:41 +02:00
2024-07-29 12:59:57 +02:00
2024-08-19 21:38:41 +02:00
2024-08-14 12:50:51 +02:00
2024-08-19 21:38:41 +02:00
2024-08-19 21:38:41 +02:00
2024-08-19 21:09:01 -07:00
2024-08-02 12:24:03 +02:00
2024-08-19 21:38:41 +02:00
2024-08-02 15:28:32 +02:00
2024-08-14 17:59:15 +02:00
2024-08-20 12:53:29 +02:00
2024-07-29 22:08:46 +02:00
2024-07-31 14:36:53 +02:00
2024-07-29 22:09:40 +02:00
2024-08-18 22:41:31 +02:00
2024-08-21 15:36:45 +02:00
2024-08-05 17:44:14 +02:00
2024-08-14 12:50:08 +02:00
2024-08-22 16:14:45 +03:00
2024-08-14 15:08:55 +02:00
2024-07-30 23:42:10 +02:00
2024-07-29 22:08:46 +02:00
2024-08-16 10:26:12 +02:00
2024-08-14 12:49:53 +02:00
2024-08-20 12:53:29 +02:00
2024-08-20 12:53:29 +02:00
2024-08-14 16:02:47 +02:00
2024-08-12 13:28:09 +02:00
2024-08-20 10:44:06 +02:00
2024-08-16 16:57:10 -05:00
2024-08-20 12:53:29 +02:00
2024-08-20 12:53:29 +02:00
2024-08-20 18:38:04 +02:00
2024-08-08 08:59:30 +02:00
2024-08-21 21:05:09 +02:00
2024-08-14 12:48:10 +02:00
2024-08-20 12:53:29 +02:00
2024-08-02 12:24:03 +02:00
2024-08-14 15:06:33 +02:00
2024-07-29 22:03:44 +02:00
2024-08-12 16:19:36 +02:00
2024-08-20 12:53:29 +02:00
2024-08-09 20:04:11 +03:00
2024-08-15 18:18:05 +02:00
2024-08-20 12:53:29 +02:00
2024-08-20 12:53:29 +02:00
2024-08-12 09:08:40 +02:00
2024-08-06 16:21:34 +02:00
2024-07-29 22:08:46 +02:00
2024-08-20 12:55:39 +02:00
2024-08-02 15:58:41 +02:00
2024-08-14 14:56:58 +02:00
2024-08-20 12:55:39 +02:00
2024-08-20 12:55:39 +02:00
2024-08-15 11:00:07 +02:00
2024-07-31 19:17:53 +02:00
2024-08-12 13:28:09 +02:00
2024-08-14 15:03:51 +02:00
2024-08-14 15:03:38 +02:00
2024-08-05 11:24:49 +02:00
2024-08-14 17:59:15 +02:00
2024-08-12 13:28:09 +02:00
2024-08-20 12:55:39 +02:00
2024-08-20 12:55:39 +02:00
2024-08-02 15:28:32 +02:00
2024-08-20 12:55:39 +02:00
2024-08-14 15:04:51 +02:00
2024-08-20 12:55:39 +02:00
2024-08-20 12:55:39 +02:00
2024-08-11 14:15:20 +02:00
2024-08-02 12:24:03 +02:00
2024-07-29 22:08:46 +02:00
2024-08-20 07:57:03 +02:00
2024-07-29 21:50:45 +02:00
2024-08-14 17:38:30 +02:00
2024-08-20 12:53:48 +02:00
2024-08-20 12:53:48 +02:00
2024-08-12 13:28:09 +02:00
2024-07-29 22:08:46 +02:00
2024-07-31 12:31:35 +02:00
2024-08-20 12:54:15 +02:00
2024-08-20 12:54:15 +02:00
2024-08-12 21:32:28 +02:00
2024-08-20 12:54:15 +02:00
2024-08-14 17:59:15 +02:00
2024-08-21 14:42:58 +02:00
2024-08-14 17:59:15 +02:00
2024-08-13 18:01:06 +02:00
2024-08-13 18:01:06 +02:00
2024-08-20 12:54:42 +02:00
2024-08-14 15:42:53 +02:00
2024-08-21 16:16:16 +02:00
2024-08-12 13:28:09 +02:00
2024-08-20 12:54:42 +02:00
2024-07-29 22:08:46 +02:00
2024-08-20 12:54:42 +02:00
2024-08-20 12:54:42 +02:00
2024-08-20 12:54:42 +02:00
2024-07-31 19:17:53 +02:00
2024-08-14 16:48:52 +02:00
2024-08-19 20:40:23 +02:00
2024-08-20 12:54:42 +02:00
2024-08-20 12:54:42 +02:00
2024-08-13 18:01:06 +02:00
2024-07-29 21:58:03 +02:00
2024-08-14 16:48:52 +02:00
2024-08-20 12:54:57 +02:00
2024-08-18 22:41:45 +02:00
2024-08-15 10:03:03 +02:00
2024-08-20 12:55:14 +02:00
2024-08-13 18:01:06 +02:00
2024-08-14 17:59:15 +02:00
2024-08-14 15:41:15 +02:00
2024-08-12 13:28:09 +02:00
2024-08-14 15:39:52 +02:00
2024-08-22 09:07:45 +02:00