The URL is rather unstable and it flips between returning a value and being unavailable which results in returning of 0. Why can’'t we set an attribute on the sensor so that if the sensor becomes unavailable, it will retain its status until it tries again? I’ve had automatons not run because of the issue with the URL in question.
Most people would like to know if their reliable sensors go offline which is why it is not done. You can do it by including logic for what you want in the template. e.g. {% if value = 'unavailable'…
Hence why I would like to set an attribute on the sensor so that when it is set, when the sensor does go offline, it retains it status. I really would prefer not to go the template route.
Sadly that didn’t solve the problem. This is where I wish HA had variables that I could store the last status in and only update this status if the sensor is not unavailable.