I have two automations that are triggered almost with the same triggers and i would like to know if it is possible to combine the two in only one.
The first automation is:
- alias: Nessuno a Casa Spegni Luci
trigger:
- platform: state
entity_id: group.presenze
from: 'home'
to: 'not_home'
condition:
- condition: state
entity_id: group.presenze
state: 'not_home'
action:
- service: homeassistant.turn_off
entity_id: group.all_lights
- service: notify.telegram
data:
message: Nessuno a casa
and the second is:
- alias: Nessuno a Casa Spegni Sky
trigger:
- platform: state
entity_id: group.presenze
from: 'home'
to: 'not_home'
condition:
- condition: state
entity_id: group.presenze
state: 'not_home'
- condition: state
entity_id: switch.sky
state: 'on'
action:
- service: script.turn_on
entity_id: script.satellite_off
- delay: 00:00:10
- service: notify.telegram
data:
message: Nessuno a casa. Spengo satellite.
Who can help me ?