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
|
entity_id: input_boolean.shower_mode
|
||||||
state: 'off'
|
state: 'off'
|
||||||
then:
|
then:
|
||||||
- choose:
|
- if:
|
||||||
- conditions:
|
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.upstairs_bathroom_motion
|
entity_id: binary_sensor.upstairs_bathroom_occupied
|
||||||
state: 'on'
|
state: 'on'
|
||||||
sequence:
|
then:
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
target:
|
target:
|
||||||
entity_id: input_select.upstairs_bathroom_scenes
|
entity_id: input_select.upstairs_bathroom_scenes
|
||||||
data:
|
data:
|
||||||
option: Adaptive
|
option: Adaptive
|
||||||
- conditions:
|
else:
|
||||||
- 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:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.early_night_mode
|
entity_id: binary_sensor.early_night_mode
|
||||||
@ -1309,9 +1301,7 @@ script:
|
|||||||
entity_id: input_select.upstairs_bathroom_scenes
|
entity_id: input_select.upstairs_bathroom_scenes
|
||||||
data:
|
data:
|
||||||
option: >
|
option: >
|
||||||
{% if is_state('binary_sensor.upstairs_bathroom_motion','on') %}
|
{% if is_state('binary_sensor.upstairs_bathroom_occupied','on') %}
|
||||||
Adaptive
|
|
||||||
{% elif is_state('timer.upstairs_bathroom_motion_timer','active') %}
|
|
||||||
Adaptive
|
Adaptive
|
||||||
{% else %}
|
{% else %}
|
||||||
Nightlight
|
Nightlight
|
||||||
@ -1366,9 +1356,7 @@ script:
|
|||||||
entity_id: input_select.upstairs_bathroom_scenes
|
entity_id: input_select.upstairs_bathroom_scenes
|
||||||
data:
|
data:
|
||||||
option: >
|
option: >
|
||||||
{% if is_state('binary_sensor.upstairs_bathroom_motion','on') %}
|
{% if is_state('binary_sensor.upstairs_bathroom_occupied','on') %}
|
||||||
Adaptive
|
|
||||||
{% elif is_state('timer.upstairs_bathroom_motion_timer','active') %}
|
|
||||||
Adaptive
|
Adaptive
|
||||||
{% else %}
|
{% else %}
|
||||||
Nightlight
|
Nightlight
|
||||||
|
@ -273,6 +273,9 @@ template:
|
|||||||
{% else %}
|
{% else %}
|
||||||
false
|
false
|
||||||
{% endif %}
|
{% 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:
|
mqtt:
|
||||||
sensor:
|
sensor:
|
||||||
|
@ -302,7 +302,7 @@ going_upstairs:
|
|||||||
target:
|
target:
|
||||||
entity_id: light.basement_studio_lights
|
entity_id: light.basement_studio_lights
|
||||||
alias: Turn off the 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'') }}'
|
or is_state(''input_boolean.goodnight'',''on'') }}'
|
||||||
timeout: 00:10:00
|
timeout: 00:10:00
|
||||||
alias: Wait until I'm in the bathroom or in bed
|
alias: Wait until I'm in the bathroom or in bed
|
||||||
|
Reference in New Issue
Block a user