Pirate-Weather / pirate-weather-ha

Replacement for the default Dark Sky Home Assistant integration using Pirate Weather
https://pirateweather.net/
Apache License 2.0
363 stars 24 forks source link

daily forecast and custom:weather-card #13

Closed oddboy closed 3 years ago

oddboy commented 3 years ago

Hi all,

FIrst, thank you Alexander for this awesome work! I used to use DarkSky and I was very sad when Apple bought it. This is a fantastic alternative!

I'm trying to use this integration with the 'custom:weather-card' (https://github.com/bramkragten/weather-card), but the forecast shows 7 days of the current day. Please take a look at the images attached.

One shows the card using PirateWeather, the other shows the card using the Env. Canada weather integration.

I'm not really sure what to do. Are there more options to add to configuration.yaml to extend the forecast?

all the best!

Joel Screenshot 2021-09-16 02 26 09

oddboy commented 3 years ago

just adding a couple other screen grabs that show the difference between the weather.home (Env. Canada) and weather.pirateweather...

Screenshot 2021-09-16 02 54 25 Screenshot 2021-09-16 02 54 07

alexander0042 commented 3 years ago

Thanks posting this! Something definitely isn't looking quite right here (getting real groundhog Day vibes), so it's worth digging into this problem!

It's looking like the main issue is that it's using hourly values instead of daily, which gives us the never ending Thursday. According to the docs for that custom card (which looks really cool!), if you're using Dark Sky as a data source, it needs to be put in daily mode (https://github.com/bramkragten/weather-card#dark-sky). Since the PirateWeather integration aims to be drop-in compatible with Dark Sky, then my hunch was that we need to follow this, and it seems to have worked! My config now looks like:

weather:
  - platform: pirateweather
    api_key: <apiKey>
    mode: daily

and the custom card uses weather.pirateweather as the source entity.

image

Give this a go, and let me know if it fixes things!

rgabrielson11 commented 3 years ago

Same issue here. And, tried the fix above and it corrected the issue.

oddboy commented 3 years ago

Thank you! I can confirm that solved the problem for me too!