Hello
I have purchased an Aeotec Water Sensor 6 and added it successfully into my Z-Wave. I am using the standard Z-Wave with HA Core and I am on 0.116.2. I have an automation that works when the sensor gets wet. Here is that automation:
# Automation
alias: Laundry Room Leak
description: 'Notify if water detected in Laundry Room'
trigger:
- platform: state
entity_id: sensor.laundry_water_flood
from: '0'
to: '2'
condition: []
action:
- service: notify.mobile_app_mytelephone
data:
message: Laundry Room Leaking!
mode: single
However, I cannot get a binary sensor to work and show me the status. I have tried several different methods, combed through here, and cannot get it to update. I am assuming I am missing a syntax or something. Here is my Binary Sensor:
# Binary Sensor
- platform: template
sensors:
laundry_water_leak_status:
friendly_name: 'Laundry Water Leak'
unique_id: leakl001
device_class: moisture
value_template: >-
{% if is_state('sensor.laundry_water_flood', '2')%}
Wet!
{% elif is_state('sensor.laundry_water_flood', '0')%}
Dry
{% endif %}
If anyone could advise me on how to set this Binary Sensor up so that I can see the status of the water sensor I would appreciate it.