Skip to content

Commit

Permalink
invert states of armed/disarmed output
Browse files Browse the repository at this point in the history
  • Loading branch information
heythisisnate committed Sep 1, 2024
1 parent 6b74057 commit 753e2f8
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions examples/esp32-s3-devkit-c-interface-paradox-evo192.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,32 @@ alarm_control_panel:
or:
- and:
- lambda: 'return id(acp1)->get_state() == ACP_STATE_DISARMED;'
- binary_sensor.is_on: zone12
- binary_sensor.is_off: zone12
- and:
- lambda: 'return id(acp1)->get_state() == ACP_STATE_ARMED_AWAY;'
- binary_sensor.is_off: zone12
- binary_sensor.is_on: zone12
then:
- button.press:
id: alarm_keyswitch
on_armed_away:
then:
- light.turn_on:
id: esp32s3_rgb_led
red: 100%
blue: 25%
green: 25%
brightness: 30%
effect: pulse
on_disarmed:
then:
- light.turn_on:
id: esp32s3_rgb_led
red: 0%
blue: 0%
green: 60%
brightness: 30%
effect: pulse


binary_sensor:
- id: !extend zone9
Expand Down Expand Up @@ -126,11 +145,6 @@ binary_sensor:
lambda: 'id(acp1).publish_state(ACP_STATE_TRIGGERED);'
else:
lambda: 'id(acp1).publish_state(ACP_STATE_DISARMED);'
- if:
condition:
lambda: return id(blink_on_state);
then:
- script.execute: blink_status_led

# Monitor the alarm armed/disarmed state of the physical panel
# and update the virtual alarm panel accordingly
Expand All @@ -145,14 +159,9 @@ binary_sensor:
condition:
binary_sensor.is_on: zone12
then:
lambda: 'id(acp1).publish_state(ACP_STATE_ARMED_AWAY);'
else:
lambda: 'id(acp1).publish_state(ACP_STATE_DISARMED);'
- if:
condition:
lambda: return id(blink_on_state);
then:
- script.execute: blink_status_led
else:
lambda: 'id(acp1).publish_state(ACP_STATE_ARMED_AWAY);'

output:
- id: alarm_keyswitch_output
Expand Down

0 comments on commit 753e2f8

Please sign in to comment.