Hi all, I’ve got two scenarios where fallback or placeholder values would come in handy:
- a surveillance camera (
platform: ffmpeg
) that is only turned on manually from time to time; - an external (public) REST API that sometimes returns empty payloads.
If the camera is off, HA obviously returns an error and displays a broken image. This is expected behaviour, of course, but it would be so much nicer to display a placeholder image (PNG that says “camera is off” or sth.) instead. Is this possible somehow (maybe using AppDaemon)?
Also, the REST API on some requests returns a payload without the expected value (it’s a public API, I cannot change it). I parse the JSON response in a value_template
and extract my value from a bigger object - yet if it’s not there, HA displays an empty value (or whatever I return). I would rather HA displays the former/current value instead. Is the current value available in a value_template
or in AppDaemon?
I admit these are edge cases, but the GUI looks broken if one of those errors occurs. Any ideas or hints?
Best regards
Mattsches