Home assistant should also work in case of power, network or other outages. There are several components which poll external services in the local network or internet.
In a case of a power outage maybe all of my network components are offline but the rpi running hass (with ups and umts stick). Home assistant would still try to fetch the status of media players, hue lights and so on. This creates a lot of error messages in home assistant and slows everything down.
I think it would be cool to have dependencies for example
media_player xy depends on binary_sensor_internal_network_available
yahoo_weather depends on binary_sensor_external_network_available
speedtest depends on binary_sensor_external_network_available
If the network is not available the component should be suspended.
I believe this can’t be done generically. Components work differently, so instead each component that could benefit from this would implement their own service which could be called to suspend the component. This would still require some support in the core that would know how to handle a suspended component. So I guess there would need to be some deeper thoughts on how to do this efficiently.
I think each component should have a suspend and resume method. The update method can check if a suspend variable is set and can decide to do nothing or use the last values.
We would need a new service to suspend or resume a specific component. It should also provide a status like running or suspended for each component.
For each component we would need a option like suspend_template which allows to suspend a component dynamically.