Weather card.
cob94440 opened this issue · 8 comments
Hello. I have a problem with template sensor.
{{ (states.weather.forecast_home_hourly.attributes.forecast[0].precipitation|float + states.weather.forecast_home_hourly.attributes.forecast[1].precipitation|float + states.weather.forecast_home_hourly.attributes.forecast[2].precipitation|float + states.weather.forecast_home_hourly.attributes.forecast[3].precipitation|float + states.weather.forecast_home_hourly.attributes.forecast[4].precipitation|float + states.weather.forecast_home_hourly.attributes.forecast[5].precipitation|float + states.weather.forecast_home_hourly.attributes.forecast[6].precipitation|float + states.weather.forecast_home_hourly.attributes.forecast[7].precipitation|float + states.weather.forecast_home_hourly.attributes.forecast[8].precipitation|float + states.weather.forecast_home_hourly.attributes.forecast[9].precipitation|float + states.weather.forecast_home_hourly.attributes.forecast[10].precipitation|float + states.weather.forecast_home_hourly.attributes.forecast[11].precipitation|float)|round(1) }}
It gives me :'None' has no attribute 'attributes'
Have you installed met.no integration ?
I don't have hourly forecast for met.no.
Maybe i have to make a template sensor like this:
- trigger:
- platform: time_pattern
hours: /1
action:
- service: weather.get_forecast
data:
type: hourly
target:
entity_id: weather.home
response_variable: hourly
sensor:
- name: Weather Forecast Hourly
unique_id: weather_forecast_hourly
state: "{{ now().isoformat() }}"
attributes:
forecast: "{{ hourly.forecast }}"```
I haven't done any template sensor. It was already there from the begining but only was shown as disabled at the begining. Try to uninstall then reinstall met.no.
Cob did you sort it out ? Can I close it ?
Yes it's ok now. I hadn't those options. i end up using another weather integration