That suggests that something should have changed at that point, probably sensor.fib_flood_sensor1_alarm_level
and/or sensor.fib_flood_sensor1_alarm_type
When triggering the Water Sensor two states changes:
sensor.fib_flood_sensor1_alarm_type: 0 -> 5
sensor.fib_flood_sensor1_flood: 254 -> 0
How do I use this in my alert-code?
Use can use either platform: state
or platform: numeric_state
on either of those, for example:
automation:
alias: Water water everywhere
initial_state: 'on'
trigger:
platform: numeric_state
entity_id: sensor.fib_flood_sensor1_alarm_type
above: 0
action:
<some action here>
Very nice. It works. All smiles!
- alias: Water water everywhere
initial_state: 'on'
trigger:
platform: numeric_state
entity_id: sensor.fib_flood_sensor1_alarm_type
above: 0
action:
- service: notify.ios_Tomahawk_iphone_6
data:
message: 'You are drowning!'
One thing I noticed. After the first notification, after triggering the water sensor once more. No messages was received. Do I ave to reset some pararamerts?
Turns out, when restarting Hassio, I got my second notification.
How do I call the Alert component(?), so I can add to buttons on the message, so I can turn the sensor alarm off with one of them? - Thats what I am trying achiev.
My goal with my Hassio is just to get two water sensors and three smoke sensor working. If I can get one to work, I think can manage the restā¦
Alerts are explained here. You can turn any off from the web interface, but to turn it off from a notification would require that the notification method supports actions. Not all do.
I have the same sensor, but it is paired with my Vera Plus controller. I can see the alarm in the Vera app, but the binary sensor in Home Assistant always reports off. Any ideas on how I can fix this?
In case anyone needs, this is what worked for me -
Only the ā¦alarm_level changed values that meant something for me:
0 - all is OK
2 - flooding
3 - movement
so my adaption to @Tinkerer code above is:
binary_sensor:
- platform: template
sensors:
flood:
friendly_name: 'Flood sensor'
value_template: >-
{%- if states("sensor.flood_sensor_alarm_level") | int > 0 -%}
true
{%- else -%}
false
{%- endif -%}
(I donāt distinguish between movement and flooding as I assume that if a movement has occurred, I need to verify anywayā¦).
Cheers
@sjn37 - Did you get this figured out? Iām having the same problem with a First Aid Z-Wave smoke/CO detector. I see the alerts in Vera but the binary sensor in HA stays off.
No, I did not solve it. I think it requires changes in the VERA interface code. The flood sensor shows up as a binary sensor and the template method will not work.
Thanks for the quick reply. For whatever itās worth - I found a work around. Since the arm switch works correctly, I created a scene on the Vera that arms the smoke detector with smoke and disarms it with smoke off and based my HA automations on the status of arm/disarm, same for the CO detector. This renders the arm switch useless for itās original purpose but I didnāt really plan to use it anyway - I want to be notified no matter what if smoke is detected so Iām okay with it. Not optimal but it gets the functionality that Iām looking for on the HA side so Iāll take it.