Hello.
I completed my HomeAlarm automation but I have one issue.
- alias: 'Armed alarm'
trigger:
- platform: state
entity_id: alarm_control_panel.ha_alarm
to: "armed_home"
action:
- service: scene.create
data:
scene_id: armed_home_leds
snapshot_entities: light.alarm_lights
- service: light.turn_on
data:
entity_id: light.alarm_lights
rgb_color: [0,255,0]
brightness_pct: 100
effect: "Blink"
- service: input_number.set_value
data:
entity_id: number.hallway_wled_speed
value: 146
- service: input_number.set_value
data:
entity_id: number.hallway_wled_intensity
value: 172
- delay: 00:00:05
- service: scene.turn_on
data:
entity_id: scene.armed_home_leds
when I arm the house, I want for some lights to flash for 5 seconds, and that part woeks perfectly.
But here in my second automation, where I defined which entities I want to “listen” there are also those lights that I triggered in my upper automation.
- alias: 'Trigger alarm while armed away'
trigger:
- platform: state
entity_id:
- binary_sensor.front_door
- binary_sensor.bedroom_bed_right_motion_occupancy
- binary_sensor.bedroom_bed_left_motion_occupancy
- binary_sensor.office_wardrobe_left_door
- binary_sensor.office_wardrobe_right_door
- binary_sensor.office_closet
- binary_sensor.bedroom_wardrobe_left_door
- binary_sensor.bedroom_wardrobe_right_door
to: "on"
- platform: state
entity_id:
- light.hallway_bedroom_all_lights
- light.livingroom_all_lights
- light.office_all_lights
- light.bedroom_all_lights
- light.bathroom_all_lights
- light.terace_all_lights
condition:
- condition: and
conditions:
- condition: state
entity_id: alarm_control_panel.ha_alarm
state: armed_home
- condition: state
entity_id: input_boolean.guest_mode
state: "off"
- condition: template
value_template: "{{trigger.to_state.state not in ['unavailable','unknown']}}"
action:
- service: alarm_control_panel.alarm_trigger
target:
entity_id: alarm_control_panel.ha_alarm
So, logically, my alarm will be triggered, when I put my lights on for 5 seconds. How can escape this behavior? I want to arm the house 5 seconds later…in order to not to catch this “armed effect”