Occasionally, I have a Z-Wave device (typically a battery powered door sensor) that for one reason or another ends-up with an incorrect state; like a door showing open when it is really closed. Is there a way to tell the device to report its current state? It is very annoying to have to physically go to that device and force it to change states to have it report correctly back to Home Assistant. I know battery devices sleep so they will not immediately respond to a request like that, but they do occasionally wake-up and I would think that there should be a way to get an accurate current state.
You should be able to create an automation that checks the state has returned to its default value, and if not then issue this command:
action: homeassistant.update_entity
data:
entity_id:
- binary_sensor.front_door_state
Obviously, you’ll need to change the entity_id to match you specific device.
Here is a chunk of code using the ‘trigger_id’ template variable so you don’t have to keep changing the entity ID as you copy/paste the code.
- id: perimeter_door_sensor_tripped
alias: Perimeter Door Sensor Tripped
initial_state: TRUE
mode: single
triggers:
- trigger: state
entity_id:
- binary_sensor.front_door_state
actions:
- action: switch.turn_on
target:
entity_id: switch.doorbell_chime
- delay: "00:00:10"
- action: ha_registry.update_entity
data:
entity_id:
- "{{ trigger.entity_id }}"
I tried the “homeassistant.update_entity” action and that didn’t work. I would think it would be some sort of ZWave command I need to send it to tell the device to re-report its status. I have tried the “zwave_js.refresh_value” action and that doesn’t work either.
Yeah, that won’t work. You can’t poll notification states and if you could the device would need to wake up before it would process it.
What door sensor is it?
There is a button entity created in the device that allows you to reset the open state. It sends a message to zwavejs asking it to clear the notfication and it clears it (in its cache) and sends the update to HA.
I’ve has this occur rarely with a Zooz door sensor and never with Aeotec.
Root causes could be
a) device never sends the message (firmware / electronics issue)
b) message gets lost
On (b) having a stronger mesh may help and a zwave network with minimal traffic (aka no sensor updates at 10 second intervals)
It is a Zooz ZSE41. I understand it only wakes up every couple of hours, but at least I would not have to physically go to the door when it is incorrect if there was some way to tell the device that its current reported value on the ZWave network was incorrect. I checked the device in HomeAssistant and do not see a button entity on the device (even expanding the “entities not shown”).
yeah, you are right, i don’t see those idle status buttons on any of my zse41; i see them on motion sensors, water sensors, smoke detectors…