iammexx / home-assistant-config

Files for my Home Assistant setup
75 stars 77 forks source link

Weather card is matching temperatures to incorrect days #44

Closed cocomaddox closed 4 years ago

cocomaddox commented 4 years ago

My 5 day forecast card is showing Thursday through to Monday. Unfortunately, the temperatures are displayed under the wrong days. At the time of posting this, today is Wednesday in Australia but today's weather is actually shown under THURSDAY and so on for the next 4 days.

In the screen shot I have shared, 7/19°C is actually today's temperature (Wednesday) and 11/20°C should be under Thursday, not Friday. The state of my sensor, sensor.wupws_temp_high_1d is showing 7/19°C so I know I have them matched to the correct entities in ui-lovelace.yaml

Following is an extract from my lovelace card. My sensors are all correct when I check their states so there must be a bug in the code of the dark-sky-weather-card.js file, possibly under the getDate function.

entity_forecast_high_temp_1: sensor.wupws_temp_high_1d entity_forecast_high_temp_2: sensor.wupws_temp_high_2d entity_forecast_high_temp_3: sensor.wupws_temp_high_3d entity_forecast_high_temp_4: sensor.wupws_temp_high_4d entity_forecast_high_temp_5: sensor.wupws_temp_high_5d

Can someone help?

image

DavidFW1960 commented 4 years ago

Hey..... you should start at day_0 not day_1 If you are in Australia, I forked this repo and my card is much updated from this one here....

cocomaddox commented 4 years ago

Thank you @DavidFW1960. I believe my issue was that I was not using the darksky sensors in this card. I am using a PWS and it does not have a day_0. So what I have done is removed day_1 and have paired the entities as follows... entity_forecast_high_temp_1: sensor.wupws_temp_high_2d and so on.

I realised that as soon as I posted the issue but was unable to delete what I had posted. I'll have had a look at your bom-weather-card, looks great. Does this only work with BOM or can I use it with my PWS?