Add some occupancy stuff to use with #159
This commit is contained in:
@ -2642,7 +2642,8 @@
|
|||||||
state: 'off'
|
state: 'off'
|
||||||
alias: We are not on vacation
|
alias: We are not on vacation
|
||||||
action:
|
action:
|
||||||
- choose:
|
- alias: Choose briefing
|
||||||
|
choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: and
|
- condition: and
|
||||||
conditions:
|
conditions:
|
||||||
@ -2653,7 +2654,8 @@
|
|||||||
state: 'off'
|
state: 'off'
|
||||||
alias: Morning Briefing
|
alias: Morning Briefing
|
||||||
sequence:
|
sequence:
|
||||||
- if:
|
- alias: Skip if Kallen has school but stayed overnight elsewhere
|
||||||
|
if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{% if is_state('input_boolean.kallen_school_today','on')
|
value_template: "{% if is_state('input_boolean.kallen_school_today','on')
|
||||||
and is_state('input_boolean.kallen_overnight','on') %}\n false\n{% else
|
and is_state('input_boolean.kallen_overnight','on') %}\n false\n{% else
|
||||||
@ -2661,9 +2663,12 @@
|
|||||||
alias: If Kallen was not elsewhere overnight on a school morning
|
alias: If Kallen was not elsewhere overnight on a school morning
|
||||||
then:
|
then:
|
||||||
- service: script.morning_briefing
|
- service: script.morning_briefing
|
||||||
data: {}
|
data:
|
||||||
|
who: '{{ ''alexa_everywhere'' if is_state(''binary_sensor.master_bedroom_occupied'',''on'')
|
||||||
|
else ''common'' }}
|
||||||
|
|
||||||
|
'
|
||||||
alias: Run morning briefing script
|
alias: Run morning briefing script
|
||||||
alias: Skip if Kallen has school but stayed overnight elsewhere
|
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: and
|
- condition: and
|
||||||
conditions:
|
conditions:
|
||||||
@ -2675,7 +2680,10 @@
|
|||||||
alias: Daily Briefing
|
alias: Daily Briefing
|
||||||
sequence:
|
sequence:
|
||||||
- service: script.daily_briefing
|
- service: script.daily_briefing
|
||||||
data: {}
|
data: '{{ ''alexa_everywhere'' if is_state(''binary_sensor.master_bedroom_occupied'',''on'')
|
||||||
|
else ''common'' }}
|
||||||
|
|
||||||
|
'
|
||||||
alias: Run daily briefing script
|
alias: Run daily briefing script
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: and
|
- condition: and
|
||||||
@ -2688,9 +2696,11 @@
|
|||||||
alias: Nightly Briefing
|
alias: Nightly Briefing
|
||||||
sequence:
|
sequence:
|
||||||
- service: script.nightly_briefing
|
- service: script.nightly_briefing
|
||||||
data: {}
|
data: '{{ ''alexa_everywhere'' if is_state(''binary_sensor.master_bedroom_occupied'',''on'')
|
||||||
|
else ''common'' }}
|
||||||
|
|
||||||
|
'
|
||||||
alias: Run nightly briefing script
|
alias: Run nightly briefing script
|
||||||
alias: Choose briefing
|
|
||||||
mode: single
|
mode: single
|
||||||
- id: '1696362140540'
|
- id: '1696362140540'
|
||||||
alias: Kallen Briefing Location Change
|
alias: Kallen Briefing Location Change
|
||||||
|
@ -198,6 +198,17 @@ template:
|
|||||||
{% else %}
|
{% else %}
|
||||||
true
|
true
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
- name: "Tina Desk Occupied"
|
||||||
|
unique_id: 09969610-28ed-4f06-87c7-eabe5412d954
|
||||||
|
device_class: occupancy
|
||||||
|
state: >
|
||||||
|
{% if is_state('binary_sensor.tina_desktop_on','off') %}
|
||||||
|
false
|
||||||
|
{% elif is_state('binary_sensor.tina_desktop_idle','on') or states('sensor.xia_desktop_current_username') in ['unavailable','unknown','NotPresent'] %}
|
||||||
|
false
|
||||||
|
{% else %}
|
||||||
|
true
|
||||||
|
{% endif %}
|
||||||
- name: "Upstairs Bathroom Occupied"
|
- name: "Upstairs Bathroom Occupied"
|
||||||
unique_id: 7ec69a26-1013-4b0d-8662-a91ab9f040ca
|
unique_id: 7ec69a26-1013-4b0d-8662-a91ab9f040ca
|
||||||
device_class: occupancy
|
device_class: occupancy
|
||||||
@ -206,6 +217,37 @@ template:
|
|||||||
unique_id: 3f0a1504-fd01-4967-a6fb-0309813d31e3
|
unique_id: 3f0a1504-fd01-4967-a6fb-0309813d31e3
|
||||||
state: "{{ is_state('input_boolean.emma_sleeping','on') or is_state('input_boolean.kallen_sleeping','on') or is_state('input_boolean.master_bedroom_sleeping','on') }}"
|
state: "{{ is_state('input_boolean.emma_sleeping','on') or is_state('input_boolean.kallen_sleeping','on') or is_state('input_boolean.master_bedroom_sleeping','on') }}"
|
||||||
icon: mdi:sleep
|
icon: mdi:sleep
|
||||||
|
- name: "Master Bedroom Occupied"
|
||||||
|
unique_id: 407911c0-f2d3-41f5-8f1c-09fbfb10a49d
|
||||||
|
device_class: occupancy
|
||||||
|
state: >
|
||||||
|
{{ is_state('light.master_bedroom_lights','on') or
|
||||||
|
is_state('light.master_bedroom_closet','on') or
|
||||||
|
is_state('input_boolean.master_bedroom_sleeping','on') or
|
||||||
|
not is_state('media_player.master_bedroom_firetv','off') }}
|
||||||
|
- name: "Kallen Bedroom Occupied"
|
||||||
|
unique_id: d3fdbaee-48bd-44df-820e-6cbfd3d24c11
|
||||||
|
device_class: occupancy
|
||||||
|
state: >
|
||||||
|
{{ is_state('light.kallen_bedroom_lights','on') or
|
||||||
|
is_state('input_boolean.kallen_sleeping','on') }}
|
||||||
|
- name: "Emma Bedroom Occupied"
|
||||||
|
unique_id: d775db9a-187d-4c4b-a49d-f0e5a1e6ce3b
|
||||||
|
device_class: occupancy
|
||||||
|
state: >
|
||||||
|
{{ is_state('light.emma_bedroom_light','on') or
|
||||||
|
is_state('input_boolean.emma_sleeping','on') }}
|
||||||
|
- name: "Living Room Occupied"
|
||||||
|
unique_id: 25623e3d-d74f-471e-8c2d-abce16646282
|
||||||
|
device_class: occupancy
|
||||||
|
state: >
|
||||||
|
{{ is_state('binary_sensor.living_room_motion','on') }}
|
||||||
|
delay_off: "00:30:00"
|
||||||
|
- name: "Downstairs Bathroom Occupied"
|
||||||
|
unique_id: fad33281-1c1a-4362-93e6-398334358027
|
||||||
|
device_class: occupancy
|
||||||
|
state: >
|
||||||
|
{{ is_state('light.downstairs_bathroom_lights','on') }}
|
||||||
- sensor:
|
- sensor:
|
||||||
- unique_id: people_at_home
|
- unique_id: people_at_home
|
||||||
name: People at Home
|
name: People at Home
|
||||||
|
Reference in New Issue
Block a user