Not so smart Alarm proximity and door contacts.
I am hoping someone can steer me in the right direction.
I have an alarm system that uses 315 Mhz wireless devices. I have successfully put together an Arduino and RF-link receiver to capture the “Opened” state transmission (each device produces a unique seven digit number). Unfortunately, this system does not transmit a “closed” state. The same with the proximity sensors, they only transmit one number at the initial movement. Turns out this non-intelligent alarm system never actually knows whether the door is opened or closed when armed. It will allow the system to be ARMED with all the doors opened, only triggering when the sensor passes by the magnet.
So where I am having my problem is, … How do I create an automation that, starting from a “Closed” position, when the door is first opened, HA automatically records the door as opened, then once the door contact is closed (or the sensor no longer sees movement) , HA can resets the sensors AS CLOSED, so the automation can run again. Currently, once the door is opened, the only to reset to “Closed” is to reset the sensor manually or restart HA.
I guess I am not grasping the differences between Service, script, automation, and scene
The line in question is how do I reset the proxy sensor?
- alias: Turn on Ceiling Fan Light when there is movement
trigger:- platform: state
entity_id: binary_sensor.prox_sensor_1
to: ‘on’
action:
service: script.turn_on
entity_id: script.office_timed_lamp
- platform: state
sequence:
Cancel ev. old timers
- event: LOGBOOK_ENTRY
- service: homeassistant.turn_off
data:
entity_id: script.office_timer_off - service: homeassistant.turn_on
data:
entity_id: group.office_fan_lights - service: homeassistant.turn_off
data:
entity_id: binary_sensor.prox_sensor_1
Set new timer
- service: homeassistant.turn_on
data:
entity_id: script.office_timer_off
alias: “Turn office light off after 10 minutes”
sequence:
- event: LOGBOOK_ENTRY
- delay:
minutes: 10 - service: homeassistant.turn_off
data:
entity_id: group.office_fan_lights
Thank You for any assistant
Dave L.