No, it flashes, but then it stays on for 5-6 seconds
I changed like this and now is ok, It flashes only.
I notices that it takes 5-6 seconds to go from MOTION to back to STANDBY … anyway to change this and make it shorter, like 1 second?
#
- alias: "Motion Office SN3- ON motion light"
initial_state: 'on'
trigger:
- platform: state
entity_id: sensor.sn3_pir
from: 'standby'
to: 'motion detected'
action:
- service: light.turn_on
entity_id: light.sn3_led
data_template:
brightness: 255
rgb_color: ['{{ (range(0, 255)|random) }}','{{ (range(0, 255)|random) }}','{{ (range(0, 255)|random) }}']
flash: 'short'
- service: light.turn_off
entity_id: light.sn3_led
- service: mqtt.publish
data:
topic: sensor/livingSN3
payload: "on"
retain: "true"
#
# Automation off
- alias: "Motion Office SN3- OFF motion light"
initial_state: 'on'
trigger:
- platform: state
entity_id: sensor.sn3_pir
state: 'standby'
for: '00:00:01'
action:
# - service: light.turn_off
# entity_id: light.sn3_led
- service: mqtt.publish
data:
topic: sensor/livingSN3
payload: "off"
retain: "true"