mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
57 lines
1.6 KiB
YAML
57 lines
1.6 KiB
YAML
alias: Clint Home
|
|
id: automation_clint_home
|
|
mode: restart
|
|
#description:
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- device_tracker.pixel_7
|
|
- person.clint
|
|
- group.person_clint
|
|
- device_tracker.pixel_7_wifi
|
|
to: "home"
|
|
|
|
- platform: state
|
|
id: car_home
|
|
entity_id:
|
|
- binary_sensor.gray_suv_east_side
|
|
- binary_sensor.gray_suv_west_side
|
|
- group.traverse
|
|
from: "off"
|
|
to: "on"
|
|
|
|
- platform: homeassistant
|
|
event: start
|
|
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: numeric_state
|
|
entity_id: group.person_clint
|
|
above: 0
|
|
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_clint', 'entity_id'))|list)|groupby('state'))['home']|count }}"
|
|
- condition: state
|
|
entity_id: sensor.pixel_7_wifi_connection
|
|
state: "DreamWeaver"
|
|
- condition: state
|
|
entity_id: sensor.pixel_7_wifi_connection
|
|
state: "DreamIoT-2G"
|
|
- condition: state
|
|
entity_id: sensor.pixel_7_wifi_connection
|
|
state: "pozfam"
|
|
- condition: state
|
|
entity_id: sensor.pixel_7_wifi_connection
|
|
state: "pozfam-2.4G"
|
|
- condition: trigger
|
|
id: "car_home"
|
|
sequence:
|
|
- action: input_boolean.turn_on
|
|
entity_id: input_boolean.clint_home
|
|
- action: automation.turn_on
|
|
entity_id: automation.clint_at_work
|
|
|
|
- delay: "00:00:30"
|