damianeickhoff / HaCasa

Custom theme and cards for Home Assistant
https://damianeickhoff.github.io/HaCasa/
MIT License
135 stars 9 forks source link

sensor.weather_forcast_1 #9

Closed off112a closed 10 months ago

off112a commented 10 months ago

Hi,

Love your dashboard 🙂

But I wonder if you could share your code for sensor.weather_forcast_1? So I can get the weekdays on the weather card forecast.

damianeickhoff commented 10 months ago

Hé,

You can find the code here in the repo. It's under dashboard/HaCasa/templates/custom_card_weather/custom_card_weather_forecast.yaml

Just remember that this template is not really ready so let me know if you find some issues or improvements!

off112a commented 10 months ago

Hi,

I have the template.

I wonder if you have the code for this specific sensor, sensor.weather_forcast_1, that you use in the template? 🙂

damianeickhoff commented 10 months ago

I use Buienradar which is a Dutch weather integration which expose the forecast in the weather.buienradar entity.

With that, I just created a helper template for each day. This is the template code for that:

{{ as_timestamp(strptime(states.weather.buienradar.attributes.forecast[0].datetime, '%Y-%m-%dT%H:%M:%S%z')) | timestamp_custom("%a") }}
off112a commented 10 months ago

Perfect. Thank you 🙂