Trying to build my first Home assistant page. I had the weather thing working but now it’s not. It’s saying
“ Entity must be specified
type: weather-forecast entity: ‘’
Here is the code. I think it’s missing some things
type: weather-forecast
entity: weather.home
show_forecast: true
Hello, Sorry it took so long to get back.
I went to Dev tools then clicked template. I did a shearch for weather it came back with
'The temperature is 25 °C.
'The sun rose 14 hours ago.
'For loop example getting entity values in the weather domain'
.The full code is
{## Imitate available variables: ##}
{% set my_test_json = {
"temperature": 25,
"unit": "°C"
} %}
The temperature is {{ my_test_json.temperature }} {{ my_test_json.unit }}.
{% if is_state("sun.sun", "above_horizon") -%}
The sun rose {{ relative_time(states.sun.sun.last_changed) }} ago.
{%- else -%}
The sun will rise at {{ as_timestamp(strptime(state_attr("sun.sun", "next_rising"), "")) | timestamp_local }}.
{%- endif %}
For loop example getting entity values in the weather domain:
{% for state in states.weather -%}
{%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}
{{ state.name | lower }} is {{state.state_with_unit}}
{%- endfor %}.