No much more yet , but it won’t theme entities anymore and _stateDisplay is gone also. Some other niceties too… even in regular Ha. Theming does still work in regular Ha though.
Cool! So what I have is these default badges from Nest integration.
No extra code, except default customisation:
sensor.entryway_nest_protect_boven_co_status:
friendly_name: CO2 Boven
sensor.entryway_nest_protect_boven_smoke_status:
friendly_name: Rook Boven
sensor.hallway_nest_protect_beneden_co_status:
friendly_name: CO2 Beneden
sensor.hallway_nest_protect_beneden_smoke_status:
friendly_name: Rook Beneden
ok, for the text boxes below the badge, you need to set the unit_of_measurement of these sensors
for the coloring of the badges you can use the themes, but you’d need to think about the template first: when to use which colors. Have anything in mind?
green_badge:
label-badge-red: green
label-badge-background-color: white
label-badge-color: grey
label-badge-text-color: green
red_badge:
label-badge-red: grey
label-badge-background-color: white
label-badge-text-color: red
device_tracker.iphone_martin:
entity_picture: /local/martin.jpg
friendly_name: Martin
templates:
theme: >
if (state === 'home') return 'green_badge';
return 'red_badge';
I have put this in yo my themes.yaml:
green_badge:
label-badge-red: green
label-badge-background-color: white
label-badge-color: grey
label-badge-text-color: green
red_badge:
label-badge-red: grey
label-badge-background-color: white
label-badge-text-color: red
you should set the entity_picture and friendly_name in known devices.yaml (that is to say, if you don’t want them to change based on state).
use customize for the templates only in this case. Also, always check, if the state is exact. It will be in this case, but the templates need exact and case sensitive state/attributes to evaluate.
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: !secret home_latitude
longitude: !secret home_longitude
elevation: !secret home_elevation
unit_system: metric
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: Europe/London
customize: !include customize.yaml
customize_glob: !include customize_glob.yaml