various package updates
This commit is contained in:
@@ -4,14 +4,21 @@
|
||||
# DESCRIPTION:
|
||||
# Replaces the Node-RED automation for the underhouse storage lights.
|
||||
# Doors, PIR sensors, a remote switch, and local relay changes can start or
|
||||
# extend a 1 hour lighting timer.
|
||||
# extend the storage lighting timer.
|
||||
#
|
||||
# VERSION:
|
||||
# V1.1 2026-06-14
|
||||
# - Door-open trigger now watches each real door contact individually.
|
||||
# - This means any door changing from closed to open turns the lights on
|
||||
# immediately, even if another door is already open.
|
||||
# - All doors closed now turns the lights off immediately.
|
||||
# - PIR occupancy can still start/restart the motion timer after that.
|
||||
#
|
||||
# V1.0 2026-05-12
|
||||
# - Initial Home Assistant package version.
|
||||
#
|
||||
# EDIT NOTES:
|
||||
# - Add future door contacts in BOTH places marked FUTURE DOOR.
|
||||
# - Add future door contacts in all places marked FUTURE DOOR.
|
||||
# - Add future PIR sensors in the PIR group marked FUTURE PIR.
|
||||
# - The generated group entities used below should be:
|
||||
# binary_sensor.underhouse_storage_door_contacts
|
||||
@@ -27,8 +34,7 @@ binary_sensor:
|
||||
entities:
|
||||
- binary_sensor.underhouse_stealth_door_x07rs_contact
|
||||
- binary_sensor.underhouse_north_door_door
|
||||
# FUTURE DOOR: add the next underhouse storage door contact here.
|
||||
# - binary_sensor.underhouse_future_door_contact
|
||||
- binary_sensor.under_house_underhouse_east_stealth_door_door
|
||||
|
||||
- platform: group
|
||||
name: Underhouse Storage PIR Presence
|
||||
@@ -38,8 +44,8 @@ binary_sensor:
|
||||
entities:
|
||||
- binary_sensor.underhouse_pir_sensor_south_occupancy
|
||||
- binary_sensor.underhouse_pir_sensor_north_occupancy
|
||||
# FUTURE PIR: uncomment this when the north PIR exists.
|
||||
# - binary_sensor.underhouse_pir_sensor_north_occupancy
|
||||
# FUTURE PIR: add any extra PIR sensors here.
|
||||
# - binary_sensor.underhouse_future_pir_occupancy
|
||||
|
||||
timer:
|
||||
underhouse_storage_lights_runtime:
|
||||
@@ -67,7 +73,7 @@ script:
|
||||
target:
|
||||
entity_id: timer.underhouse_storage_lights_runtime
|
||||
data:
|
||||
duration: "0:20:00"
|
||||
duration: "00:20:00"
|
||||
|
||||
underhouse_storage_lights_stop_runtime:
|
||||
alias: Underhouse Storage Lights - Stop Runtime
|
||||
@@ -97,19 +103,28 @@ automation:
|
||||
- id: underhouse_storage_lights_start_extend_runtime
|
||||
alias: Underhouse Storage Lights - Start Or Extend Runtime
|
||||
description: >-
|
||||
Turns the storage lights on and starts or restarts the 1 hour timer when
|
||||
a door opens, PIR detects occupancy, or the remote switch is pressed.
|
||||
Turns the storage lights on and starts or restarts the timer when
|
||||
an individual door opens, PIR detects occupancy, or the remote switch
|
||||
is pressed.
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.underhouse_storage_door_contacts
|
||||
entity_id:
|
||||
- binary_sensor.underhouse_stealth_door_x07rs_contact
|
||||
- binary_sensor.underhouse_north_door_door
|
||||
# FUTURE DOOR: replace this with the actual third underhouse storage door contact.
|
||||
#- binary_sensor.underhouse_future_door_contact
|
||||
from: "off"
|
||||
to: "on"
|
||||
|
||||
- platform: state
|
||||
entity_id: binary_sensor.underhouse_storage_pir_presence
|
||||
to: "on"
|
||||
|
||||
- platform: state
|
||||
entity_id: binary_sensor.esp_underhouselights_underhouse_storage_lights_remote_switch
|
||||
to: "on"
|
||||
|
||||
action:
|
||||
- action: script.underhouse_storage_lights_start_runtime
|
||||
|
||||
@@ -174,35 +189,32 @@ automation:
|
||||
- id: underhouse_storage_lights_all_doors_closed
|
||||
alias: Underhouse Storage Lights - All Doors Closed
|
||||
description: >-
|
||||
When all door contacts are closed, turn the lights off immediately if no
|
||||
PIR occupancy is active. If PIR is still active, the PIR clear automation
|
||||
below will turn them off after 60 seconds without occupancy.
|
||||
When all door contacts are closed, turn the lights off immediately.
|
||||
PIR occupancy can still turn the lights back on again afterwards.
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.underhouse_storage_door_contacts
|
||||
from: "on"
|
||||
to: "off"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.underhouse_storage_pir_presence
|
||||
state: "off"
|
||||
action:
|
||||
- action: script.underhouse_storage_lights_stop_runtime
|
||||
|
||||
- id: underhouse_storage_lights_individual_door_closed_check
|
||||
alias: Underhouse Storage Lights - Individual Door Closed No Motion Check
|
||||
alias: Underhouse Storage Lights - Individual Door Closed Safety Check
|
||||
description: >-
|
||||
When a real door contact closes, wait 60 seconds and then turn the relay
|
||||
off only if all doors are closed and there is no PIR occupancy.
|
||||
Safety cleanup. When a real door contact closes, wait 60 seconds and then
|
||||
ensure the relay is off only if all doors are closed and there is no PIR
|
||||
occupancy. The normal all-doors-closed automation above should usually
|
||||
turn the lights off immediately first.
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.underhouse_stealth_door_x07rs_contact
|
||||
- binary_sensor.underhouse_north_door_door
|
||||
# FUTURE DOOR: add the next underhouse storage door contact here too.
|
||||
# - binary_sensor.underhouse_future_door_contact
|
||||
# FUTURE DOOR: replace this with the actual third underhouse storage door contact.
|
||||
#- binary_sensor.underhouse_future_door_contact
|
||||
from: "on"
|
||||
to: "off"
|
||||
action:
|
||||
@@ -222,7 +234,7 @@ automation:
|
||||
alias: Underhouse Storage Lights - PIR Clear After Doors Closed
|
||||
description: >-
|
||||
If the doors are closed and PIR occupancy clears for 60 seconds, turn the
|
||||
storage lights off.
|
||||
storage lights off. This is mainly a cleanup path for PIR-triggered use.
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
|
||||
Reference in New Issue
Block a user