Trying to setup a simple greeting automation to play a custom sound on my Xiaomi Aqara Gateway when a user enters home .
Having some issues trying to setup a delay before the action takes place .
Here’s my code :
- alias: Greet user when entering Home
trigger:
- platform: state
entity_id: binary_sensor.motion_sensor_158d0001d66669
from: 'off'
to: 'on'
action:
delay: '00:00:05'
service: xiaomi_aqara.play_ringtone
data:
gw_mac: 34ce008b0000
ringtone_id: 10002
ringtone_vol: 70
From what I’ve seen in other examples it’s ok to have delay inside action but in this case I think there is some indentation error with the delay line, as it all works properly when I remove it .
What do I need to change here ? Please bear with me, just started using HASS 2 days ago