veli
July 18, 2024, 10:43am
84
what does the link say:
http://homeassistant.local:8123/local/emoji/moon/full_moon.svg - check the file location and folder permissions, the “www” is mapped to “local” and should be public.
Forecast was met.no default, but the Home Assistant or integration code has yet again changed, so it does not work for me either. Check, test and change in http://homeassistant.local:8123/developer-tools/template for what should it be: {{ states.weather.home.attributes }}
ALeXXBody
(Bogdan Turlea)
July 18, 2024, 10:45am
85
is showing full moon image
is showing:
veli
July 18, 2024, 12:28pm
86
I should charge you for one-on-one consultation
Use a weather service call .
Add to template:
- trigger:
- platform: time_pattern
hours: "/1"
action:
- service: weather.get_forecasts
data:
type: hourly
target:
entity_id: weather.home
response_variable: hourlyforecast
sensor:
- name: "Weather Forecast Hourly"
unique_id: weather_forecast_hourly
icon: mdi:weather-cloudy-clock
state: "{{ now().isoformat() }}"
attributes:
forecast: >-
{{ hourlyforecast['weather.home']['forecast'] }}
- platform: time_pattern
days: "/1"
action:
- service: weather.get_forecasts
data:
type: daily
target:
entity_id: weather.home
response_variable: dailyforecast
sensor:
- name: "Weather Forecast Daily"
unique_id: weather_forecast_daily
icon: mdi:weather-cloudy-clock
state: "{{ now().isoformat() }}"
attributes:
forecast: >-
{{ dailyforecast['weather.home']['forecast'] }}
- sensor:
- unique_id: weather_forecast
name: Weather Forecast
icon: >-
mdi:weather-{{ states('weather.home') }}
state: >-
{{ states('weather.home') | replace('_',' ') | capitalize }}
attributes:
forecast_high: >-
{{ state_attr('sensor.forecast_home_hourly','forecast')[0].temperature | int(0) }}
# {{ state_attr('sensor.weather_forecast_daily','temperature') | int(0) | default(0) }}
forecast_low: >-
{{ state_attr('sensor.forecast_home_hourly','forecast')[6].temperature | int(0) }}
# {{ state_attr('sensor.weather_forecast_daily','temperature') | int(0) | default(0) }}
entity_picture: >-
{%- set elevation = state_attr('sun.sun', 'elevation') | int -%}
{%- set rising = state_attr('sun.sun', 'rising') -%}
{%- set azimuth = state_attr('sun.sun', 'azimuth') | int -%}
{% set weather = states('weather.hernes') %}
{% if weather == 'sunny' and elevation <= 0 %}
{{ state_attr('sensor.moon_phase','entity_picture') }}
{% else %}
{% if weather in ['unknown','unavailable'] %}
/local/emoji/weather/{{ ['unicorn','sparkles','rainbow'] | random }}.svg
{% else %}
/local/emoji/weather/{{weather}}.svg
{% endif %}
{% endif %}
emoji: >-
{%- set elevation = state_attr('sun.sun', 'elevation') | int -%}
{%- set rising = state_attr('sun.sun', 'rising') -%}
{%- set azimuth = state_attr('sun.sun', 'azimuth') | int -%}
{% set values = {'cloudy':'☁️','fog':'🌁','lightning-rainy':'⛈️','lightning':'🌩️','partlycloudy':'⛅','rainy':'🌧️','snowy':'❄️','snowy-rainy':'🌨️','sunny':'☀️','windy':'🌬️'} %}
{% set value = states('weather.hernes') %}
{% if values[value] == '☀️' and elevation <= 0 %}
{{ state_attr('sensor.moon_phase','emoji') }}
{% else %}
{{ values[value] if value in values.keys() else '🦄' }}
{% endif %}
ALeXXBody
(Bogdan Turlea)
July 18, 2024, 1:49pm
87
I’m not sure it is ok or not but using this code:
is showing the temperature:
“Forecast low” is not that important to me
Woody1
July 31, 2024, 11:00pm
88
can you provide a copy of your templates.yaml file with the sensors in.
loic69
August 1, 2024, 1:16pm
89
Hi
Do you have information of my last post including high latency on the lovelace GUI ?
radial
(Piotr)
September 27, 2024, 11:34am
90
Hello, I have a problem with screensaver. I tried steps for debug and I checked all post in a thread, other code works very well but unfortunately code of screen saver won’t work for me
stban1983
(stban1983)
November 19, 2024, 8:57am
91
Old post but i’m interesting to see the yaml!