Limit log spam from rest and include reason in platform retry (#48666)
- Each retry was logging the error again - Now we set the cause of the PlatformNotReady to allow Home Assistant to log as needed
This commit is contained in:
parent
9ba66fe232
commit
30382c3dbe
5 changed files with 26 additions and 10 deletions
|
@ -50,9 +50,11 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
|||
conf = config
|
||||
coordinator = None
|
||||
rest = create_rest_data_from_config(hass, conf)
|
||||
await rest.async_update()
|
||||
await rest.async_update(log_errors=False)
|
||||
|
||||
if rest.data is None:
|
||||
if rest.last_exception:
|
||||
raise PlatformNotReady from rest.last_exception
|
||||
raise PlatformNotReady
|
||||
|
||||
name = conf.get(CONF_NAME)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue