Hi all,
i’ve a little ESP8266 (with ESPHome) on my Car parking where i’m using two SR04T sensors. The current configuration is this one:
- platform: template
sensors:
my_car:
friendly_name: "My Car"
device_class: occupancy
icon_template: >
{% if is_state("sensor.sensore_auto_mia", "unknown") %}
mdi:car-off
{% else %}
mdi:car
{% endif %}
value_template: >-
{{ states('sensor.sensore_auto_mia')|float < 1 }}
wife_car:
friendly_name: "Wife Car"
device_class: occupancy
icon_template: >
{% if states('sensor.sensore_auto_moglie')|float > 1 %}
mdi:car-off
{% else %}
mdi:car
{% endif %}
value_template: >-
{{ states('sensor.sensore_auto_moglie')|float < 1 }}
The problem is with the sensor sensor.sensore_auto_mia, because without the car under the sensor ESPHome report the value to Uknown instead of a real measure.
Most of the time, the reading of this sensor is false (i’ve to check the real item sensor instead of template sensor to check if car is on place or not).
Any hints?
Thanks!