This is my automation:
# AVVISO CALDAIA ON
- alias: "Avviso caldaia ON"
trigger:
- platform: state
entity_id: switch.plug_158d0001axxxxx
from: 'off'
to: 'on'
action:
- service: notify.telegram
data:
message: 'Caldaia ON'
- service: script.turn_on
entity_id: script.suoneria_caldaia_on
# AVVISO CALDAIA OFF
- alias: "Avviso caldaia OFF"
trigger:
- platform: state
entity_id: switch.plug_158d0001axxxxx
from: 'on'
to: 'off'
action:
- service: notify.telegram
data:
message: 'Caldaia OFF'
- service: script.turn_off
entity_id: script.suoneria_caldaia_off
sequence:
service: xiaomi_aqara.play_ringtone
data:
gw_mac: xxxxxxxxxxxx
ringtone_id: 10096
ringtone_vol: 10
suoneria_caldaia_off:
sequence:
service: xiaomi_aqara.play_ringtone
data:
gw_mac: xxxxxxxxxxxx
ringtone_id: 10097
ringtone_vol: 10
When script turn on, gateway plays ringtone but at the beginning is soon interrupted.
Same ringtone used in other script sounds normally
Where is the problem?