I have a fob access system which has two RFID readers (one outside and one inside), and two states, Entry and Exit.
When I enter the house it triggers lights to turn on, and the alarm is disarmed .
On exit, everything turns off and the alarm is armed.
If this gets out of sync the automation obviously fails.
For example: the exit fob is tapped and then I realise I’ve forgotten something, I manually cancel the alarm, then tap to exit again.
In this situation the state has been set to Exit twice and the automation doesn’t trigger.
Is there any way to monitor an event going from Exit to Exit (I understand nothing is changing, and thefore the state has not changed). Frustratingly, I can see the Exit event triggering twice, there just doesn’t seem to be a way to use that in an automation.
Can you paste the code for one of your automations, using the preformatted text </> option in the composer? It will help people understand exactly how you’re triggering the software using the RFID reader and what the Entry and Exit states mean precisely.
One way to approach this might be to create an input_boolean helper that gets set to true on, say, an Exit event. Then the actual automations that arm/disarm, etc., would trigger based on the state of the input_boolean.
I second this.
An input Boolean that get’s set the first time you exit.
If you hit the exit a second time then reset the input Boolean.
Ultimately then use the state of this input Boolean to arm your system.
Forgive my inexperience. If the state of the event welocme_access is already set to unifi_access_exit, what triggers the input_boolean the second time its set to unifi_access_exit?
As a final test, restart Home Assistant and see how the automation behaves.
On startup, an entity’s state can be momentarily unavailable before it is set to a known value. That brief moment in time when it switches state from unavailable to something known is sufficient to trigger this State Trigger.
- trigger: state
entity_id:
- event.welcome_access
The usual way to prevent it from triggering on such a state-change is like this:
- trigger: state
entity_id:
- event.welcome_access
not_from: unavailable