New "upstairs bathroom occupied" binary sensor
This commit is contained in:
Submodule node-red/projects/NerdFlows updated: 52ffbb42ba...21060f85e7
@ -996,25 +996,17 @@ script:
|
||||
entity_id: input_boolean.shower_mode
|
||||
state: 'off'
|
||||
then:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.upstairs_bathroom_motion
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.upstairs_bathroom_scenes
|
||||
data:
|
||||
option: Adaptive
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ is_state('binary_sensor.upstairs_bathroom_motion','off') and is_state('timer.upstairs_bathroom_motion_timer','active') }}"
|
||||
sequence:
|
||||
- service: timer.finish
|
||||
target:
|
||||
entity_id: timer.upstairs_bathroom_motion_timer
|
||||
default:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.upstairs_bathroom_occupied
|
||||
state: 'on'
|
||||
then:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.upstairs_bathroom_scenes
|
||||
data:
|
||||
option: Adaptive
|
||||
else:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.early_night_mode
|
||||
@ -1309,9 +1301,7 @@ script:
|
||||
entity_id: input_select.upstairs_bathroom_scenes
|
||||
data:
|
||||
option: >
|
||||
{% if is_state('binary_sensor.upstairs_bathroom_motion','on') %}
|
||||
Adaptive
|
||||
{% elif is_state('timer.upstairs_bathroom_motion_timer','active') %}
|
||||
{% if is_state('binary_sensor.upstairs_bathroom_occupied','on') %}
|
||||
Adaptive
|
||||
{% else %}
|
||||
Nightlight
|
||||
@ -1366,9 +1356,7 @@ script:
|
||||
entity_id: input_select.upstairs_bathroom_scenes
|
||||
data:
|
||||
option: >
|
||||
{% if is_state('binary_sensor.upstairs_bathroom_motion','on') %}
|
||||
Adaptive
|
||||
{% elif is_state('timer.upstairs_bathroom_motion_timer','active') %}
|
||||
{% if is_state('binary_sensor.upstairs_bathroom_occupied','on') %}
|
||||
Adaptive
|
||||
{% else %}
|
||||
Nightlight
|
||||
|
@ -273,6 +273,9 @@ template:
|
||||
{% else %}
|
||||
false
|
||||
{% endif %}
|
||||
- name: "Upstairs Bathroom Occupied"
|
||||
unique_id: 7ec69a26-1013-4b0d-8662-a91ab9f040ca
|
||||
state: "{{ is_state('timer.upstairs_bathroom_motion_timer','active') or is_state('binary_sensor.upstairs_bathroom_motion','on') or is_state('input_boolean.shower_mode','on') }}"
|
||||
|
||||
mqtt:
|
||||
sensor:
|
||||
|
@ -302,7 +302,7 @@ going_upstairs:
|
||||
target:
|
||||
entity_id: light.basement_studio_lights
|
||||
alias: Turn off the lights
|
||||
- wait_template: '{{ is_state(''binary_sensor.upstairs_bathroom_motion'',''on'')
|
||||
- wait_template: '{{ is_state(''binary_sensor.upstairs_bathroom_occupied'',''on'')
|
||||
or is_state(''input_boolean.goodnight'',''on'') }}'
|
||||
timeout: 00:10:00
|
||||
alias: Wait until I'm in the bathroom or in bed
|
||||
|
Reference in New Issue
Block a user