core: Darksky platform - incorrect day labels on Lovelace Weather Card (and others)
Home Assistant release with the issue: 0.91.2 and earlier
Last working Home Assistant release (if known): None known
Operating environment (Hass.io/Docker/Windows/etc.): Home Assistant on Fedora Linux x86-64 running in Docker. Has functioned well for more than a year.
Component/platform: platform:darksky, weather card in lovelace
Description of problem: As shown in the attached screenshots, the darksky platform is set to daily mode. However, the day labels in the official weather lovelace card (and in the custom weather-card-chart) are simply misaligned - one day off.
I’m writing this report on Wednesday, and the card starts with a weather forecast for Tuesday. The rain shown to appear on Thursday and Friday is actually, per Dark Sky, expected to arrive on Friday and Saturday. Similarly, the temperature forecasts are also a day off.

Because multiple Lovelace cards are affected, I suspect this may be an issue with the darksky platform itself.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
weather:
- platform: darksky
api_key: [arglebargle]
mode: daily
Traceback (if applicable): N/A - no log entries or errors.
Additional information:
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 23 (9 by maintainers)
i’ve found some solution: in python code we need:
pytzdatetime.fromtimestamp(entry.d.get('time')).isoformat(),todatetime.fromtimestamp(entry.d.get('time')).replace(tzinfo=pytz.timezone(TZONE)).isoformat()whereTZONEis fieldtimezonefrom darksky response.There is a similar issue reported here : https://github.com/bramkragten/custom-ui/issues/28