Interior door sensors and automations

This commit is contained in:
2023-02-17 23:42:48 -05:00
parent 5440dbb53a
commit 0ecb87edeb
3 changed files with 49 additions and 1 deletions

Submodule node-red/projects/NerdFlows updated: e59f26b308...4415933c69

View File

@ -539,6 +539,30 @@ automation:
seconds: 2
# The delay is to prevent the boolean from re-running the automation if the lights were turned on manually
- id: 47645bcf-a6ed-4c34-8ece-8daed4b10d9a
alias: Basement Door Handling
description: Turns on lights in basement when door is opened, if not already on
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.basement_studio_door
from: 'off'
to: 'on'
id: door-open
condition:
- condition: state
entity_id: input_boolean.studio_quiet
state: 'off'
action:
- if:
- condition: state
entity_id: light.basement_studio_lights
state: 'off'
then:
- service: light.turn_on
target:
entity_id: light.basement_studio_lights
script:
adaptive_on_first_floor:
alias: Adaptive on First Floor

View File

@ -38,6 +38,20 @@ input_number:
step: 1
unit_of_measurement: times
icon: mdi:door-open
basement_studio_door_opened_today:
name: Basement Studio Door Opened Today
min: 0
max: 200
step: 1
unit_of_measurement: times
icon: mdi:door-open
downstairs_bathroom_door_opened_today:
name: Downstairs Bathroom Door Opened Today
min: 0
max: 200
step: 1
unit_of_measurement: times
icon: mdi:door-open
proximity:
home_tony:
@ -167,6 +181,16 @@ sensor:
unit_of_measurement: 'times'
value_template: >-
{{ states('input_number.back_door_opened_today') | int }}
basement_studio_door_opened_today:
friendly_name: "Basement Studio Door Opened Today"
unit_of_measurement: 'times'
value_template: >-
{{ states('input_number.basement_studio_door_opened_today') | int }}
downstairs_bathroom_door_opened_today:
friendly_name: "Downstairs Bathroom Door Opened Today"
unit_of_measurement: 'times'
value_template: >-
{{ states('input_number.downstairs_bathroom_door_opened_today') | int }}
template:
- binary_sensor: