weather_icon:
entity_id: sensor.dark_sky_icon, weather.home_darksky, weather.woensdrecht
friendly_name_template: >
{{states('sensor.weather_icon').split('weather-')[1]|title}}
value_template: >
{% set mapper_icon =
{'partly-cloudy-night':'night-partly-cloudy'} %}
{% set mapper_br =
{'pouring':'pouring',
'lightning-rainy':'lightning-rainy',
'snowy-rainy':'snowy-rainy'} %}
{% set mapper_ds =
{'clear-night':'night',
'partlycloudy':'partly-cloudy'} %}
{% set icon = states('sensor.dark_sky_icon') %}
{% set woensdrecht = states('weather.woensdrecht') %}
{% set dark = states('weather.home_darksky') %}
{% set weather = mapper_icon[icon] if icon in mapper_icon else
mapper_br[woensdrecht] if woensdrecht in mapper_br else
mapper_ds[dark] if dark in mapper_ds else
dark if dark in
['sunny','rainy','snowy','snowy-rainy','windy','fog','cloudy','hail','lightning']
else 'sunny-alert' %}
mdi:weather-{{weather}}
Thanks, but why what i posted is not working?
I checked it into test_template and i got the right icon⌠so why it works in test_template and not in tab_icons?
and what does the full sensor in CH have for output? it should only be in the form of
mdi:weather-sunny
while it now has
<ha-icon icon='mdi:weather-sunny'></ha-icon>
try:
mdi:weather-{{'night-partly-cloudy' if is_state('weather.meteo_darksky', 'partlycloudy') else
states('weather.meteo_darksky') }}
you are mixing template styles, either use the %if%, %else%, %endif% or the shorthand style with âifâ âelseâ in the 1 line, like I posted now above
Good evening everyone,
really well done for everything! I use custom header especially for kiosk_mode and compact_mode .
I have 3 dashboards (2 for the tablet and one for the smartphone using the home assistant application).
I wanted to know if it was possible to customize the text in a state-label in the picture elements according to the user.
As you can see in the photo, I have a personalized message:
Thanks a lot for the quick reply!
But I didnât understand what {{user}} can do.
The Name is a sensor template obtained from person.fabrizio.
This is the sensor:
I only use the markdown card for stuff like this. So I have no idea how you would do this using the state-label (I donât use that card myself in my syetup). Most likely this involves even more sensors and templates.
Maybe I missed something but does anyone else have to reload twice after editing ui-lovelace.yaml? First refresh doesnât activate kiosk mode but second refresh does. Been happening since 0.107 I believe.
Yes, I have this issue since 107, on both my smartphone UI (footer mode) and tablet UI (kiosk mode). Custom Header doesnât seem to properly load after reloading resources. Unfortunately I also have cases where I have to reload it 7-8 times for it finally to work.
If you edit your yaml files for lovelace (doesnât matter which file), you have to reload the sources in lovelace. I would suspect you both do it the âwrong wayâ.
F5 or âreloadâ in your browser only refreshes the page data. If you want to refresh the config, you need to reload lovelace (three dots in the right corner -> refresh).
Btw thatâs not only valid for Custom Header, it works with all changes regarding lovelace files like ui-lovelace.yaml.
EDIT: in my case I mostly have to refresh the page (lovelace refresh) and afterwards one reload via Browser.