diff --git a/node-red/projects/NerdFlows b/node-red/projects/NerdFlows index e59f26b..4415933 160000 --- a/node-red/projects/NerdFlows +++ b/node-red/projects/NerdFlows @@ -1 +1 @@ -Subproject commit e59f26b30877272017dfbd86637e104a1211aaba +Subproject commit 4415933c6969594f5ae31ebbb9d02a30088a4760 diff --git a/packages/lighting_and_scenes.yaml b/packages/lighting_and_scenes.yaml index e7c7b7a..4af7a03 100644 --- a/packages/lighting_and_scenes.yaml +++ b/packages/lighting_and_scenes.yaml @@ -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 diff --git a/packages/presence.yaml b/packages/presence.yaml index e27e6c6..2967885 100644 --- a/packages/presence.yaml +++ b/packages/presence.yaml @@ -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: