I have a sensor set up for my battery attribute of my yale zwave lock
On HASSIO restart I get an error in the log because the zwave entity isn’t ready and the sensor gets a “none” value and it expects a numeric value.
Is there any way to delay the sensor or have the sensor ignore the none value ?
Thanks
I assume it’s a template sensor? Maybe this helps:
1 Like
Thanks didn’t spot that bit ! Works a treat.
I read the template sensor instructions…but am confused. Everytime I restart homeassistant I get errors on my smoke detector template (copied from another users forum post)…so I assume my issue is similar to the original poster. Here is my template any suggestions on how to edit it?
- platform: template
sensors:
smoke_boys_status:
friendly_name: 'Boys Room Smoke Detector Status'
value_template: >-
{% if is_state("sensor.alarm_level", "255") and is_state("sensor.alarm_type", "1")%}
Smoke
{% elif is_state("sensor.alarm_level", "255") and is_state("sensor.alarm_type", "2")%}
CO
{% else %}
Idle
{% endif %}
icon_template: >-
{% if is_state("sensor.alarm_level", "255") and is_state("sensor.alarm_type", "1")%}
mdi:fire
{% elif is_state("sensor.alarm_level", "255") and is_state("sensor.alarm_type", "2")%}
mdi:cloud-outline
{% else %}
mdi:smoke-detector
{% endif %}