Guys, I have this kind of automation …
- alias: door_bell
trigger:
- platform: state
entity_id: binary_sensor.door_window_sensor_158d0003d08258
to: 'off'
action:
service: xiaomi_aqara.play_ringtone
data:
gw_mac: 34:ce:00:88:c1:a9
ringtone_id: 10
ringtone_vol: >
{% if 0 <= now().hour <= 7 %}
5
{% else %}
90
{% endif %}
- alias: door_bell_2
trigger:
- platform: state
entity_id: binary_sensor.door_window_sensor_158d0003d08258
to: 'off'
action:
service: xiaomi_aqara.play_ringtone
data:
gw_mac: 04:cf:8c:a1:17:12
ringtone_id: 10
ringtone_vol: >
{% if 0 <= now().hour <= 7 %}
5
{% else %}
90
{% endif %}
In fact, both automations do the same thing, ring the bell, but on two different bases. Tell me if it is possible to write this more compactly, so that it is not two automation, but one. I just recently installed HA and I still can’t do everything)))