Hi All,
Looking for some pointers as to why a couple of sensors aren’t “customized” with icons specified.
First off, the sensors are created through an ESPHome project:
binary_sensor:
- platform: template
name: "inBed_1"
lambda: |-
if (id(upperleft).state &&
id(lowerleft).state) {
return true;
} else {
return false;
}
- platform: template
name: "inBed_2"
lambda: |-
if (id(upperright).state &&
id(lowerright).state) {
return true;
} else {
return false;
}
Then, in my customize.yaml file I’ve got this:
binary_sensor.inbed_1:
icon_template: >-
{%- if states('binary_sensor.inbed_1') == on -%}
'mdi:bed'
{% else %}
'mdi:bed-empty'
{% endif %}
Is the issue with the fact that the sensor is created in a ESPHome .yaml file and not through config.yaml? Or is there just something plain wrong with my coding?