home-assistant-neerslag-card icon indicating copy to clipboard operation
home-assistant-neerslag-card copied to clipboard

Configurable autozoom

Open Romkabouter opened this issue 3 years ago • 7 comments

Hi there,

I would like to opt for the autozoom to be a configuration set to on or off. Now, when there is autozoom and a light rain, in first glance it looks like heavy rain because the bar is way up. In my opinion it would be more easy to spot light or heavy rain with a fixed zoom

Romkabouter avatar Jul 25 '21 07:07 Romkabouter

I have added the option to disable autozoom (see readme file). Auto zoom can now be partially disabled by setting the autozoom configuration option to false.

aex351 avatar Jul 26 '21 01:07 aex351

That was fast :D

Romkabouter avatar Jul 26 '21 07:07 Romkabouter

Functionality has been implemented. If there is any feedback. Feel free to share.

aex351 avatar Jul 26 '21 21:07 aex351

In your documentation it says autozoom will be enable with extreme rainfail. It also seems to do so with no rainfall, is that expected behavior?

image

Romkabouter avatar Jul 27 '21 06:07 Romkabouter

Hmm, after a couple of reloads it works, it might be related to when no data is available, but I am not sure at the moment.

Romkabouter avatar Jul 27 '21 06:07 Romkabouter

No, if you disable autozoom by setting it to false, it will only autozoom when there is extreme rainfall. It won't autozoom when there is no data. This is because whenever there is extreme rainfall, the data pushes the y-axis boundary to make the data fit.

I think the underlying problem is the browser or mobile app caching mechanisme. I too experienced similar behavior in the mobile app. The graph was stuck on autozoom true (default). While the setting was autozoom false. Clearing the mobile app cache solved the issue.

The setting also doesn't get instantly reflected in the preview window of the Home Assistant card editor.

I will look in to this.

aex351 avatar Jul 27 '21 08:07 aex351

I did a reload on the integration, I thought restarting Home Assistant would help but maybe not. I was updating HA, so assumed it would reload the integration.

Thanks for the feature, I have no further issues :)

Romkabouter avatar Jul 27 '21 09:07 Romkabouter