I have these two animations fro notify me when someone is at home or nobody at home, but maybe for my errors it is not working as expected…
Can somebody help me to find where is the problem?
- alias: 'Set non a Casa'
condition:
condition: state
entity_id: input_boolean.mauhome
state: 'on'
trigger:
platform: state
entity_id: group.famiglia
to: 'not_home'
for:
minutes: 2
action:
- service: homeassistant.turn_off
entity_id: input_boolean.mauhome
- service: telegram_bot.send_message
data_template:
target: "{{ trigger.event.data.user_id }}"
message: "Nessuno a casa."
- alias: 'Set a Casa'
condition:
condition: state
entity_id: input_boolean.mauhome
state: 'off'
trigger:
platform: state
entity_id: group.famiglia
to: 'home'
action:
- service: homeassistant.turn_on
entity_id: input_boolean.mauhome
- service: telegram_bot.send_message
data_template:
target: "{{ trigger.event.data.user_id }}"
message: "Qualcuno a casa."