Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precipitation (rainfall) information or mode #142

Closed
jeremysherriff opened this issue Sep 11, 2022 · 5 comments · Fixed by #184
Closed

Precipitation (rainfall) information or mode #142

jeremysherriff opened this issue Sep 11, 2022 · 5 comments · Fixed by #184
Labels
enhancement New feature or request

Comments

@jeremysherriff
Copy link

Is your feature request related to a problem? Please describe.
I'd really like to display upcoming rainfall forecast.

Describe the solution you'd like
In my head, rainfall would be displayed underneath the temperature figures.
It would be enabled/disabled with a toggle or show_rainfall: true (or more correctly, show_precipitation: true) yaml value.

Describe alternatives you've considered
I currently use a series of template sensors to obtain the expected rainfall per hour for the next 24 hours, and use a series of custom:button-card cards to display the data directly under my weather card. This is ugly but functional.

Additional context
Not all weather providers provide precipitation data - you may need to handle situations where the data is not available without throwing front-end errors.

@decompil3d
Copy link
Owner

Good idea. Could also show precipitation probability. I can try to add when I have time or someone else can contribute.

@jeremysherriff
Copy link
Author

Not working for me. Using met.no hourly forecast, which includes precipitation:
image

Enabled in card GUI:
image

Confirmed via YAML view:

type: custom:hourly-weather
entity: weather.home_hourly
icons: true
label_spacing: '2'
num_segments: '10'
offset: '0'
name: >-
  {{ states('weather.home_hourly')|title }} {{
  state_attr('weather.home_hourly','temperature') }}{{
  state_attr('weather.home_hourly','temperature_unit') }}
show_wind: false
show_precipitation_amounts: true

But the card shows as:
image

Could it be because all precipitation values for the next 24 hours are all 0?

@decompil3d
Copy link
Owner

Yup, it doesn't show if there is no precip expected. Same as other similar forecast UIs I've seen. I had the same initial thought when I tested this out, but I've confirmed this is by design in the code.

@Sku4l
Copy link

Sku4l commented Dec 13, 2022

@jeremysherriff @decompil3d
I absolutely love this card and have been trying to tweak with it. My goal is as well to know how much precipitations will be at every hour -> take an umbrella or not :)

My issue is that the card shows precipitations only every "label_spacing" hour. Therefore, in the following card

image

If you have rain at 19:00, 20:00 and 21:00, you will only know how much rain will fall at 20:00. But let's say you have 3mm at 19:00, 0,2mm at 20:00 and 4mm at 21:00... you will think it is a small rain but actually isn't.

Is there anyway to force the card to show every hour?

@decompil3d
Copy link
Owner

Hi @Sku4l -- the way that the DOM is structured, it is hard to show labels in non-even multiples (i.e. odd numbers). If you click/tap the card, it will load your weather entity more-info modal, and that will show full hour-by-hour forecasts. You could also build out a Markdown card with template content to show forecast precipitation per hour for next N hours if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants