additional esphome devices and fixes
This commit is contained in:
@@ -4,6 +4,12 @@
|
||||
#
|
||||
# VERSION HISTORY
|
||||
#
|
||||
# 2026-05-07 - v1.0.2
|
||||
# - Added binary_sensor.downstairs_flat_any_lights_on.
|
||||
# - Updated all-on/all-off script to use the new binary sensor.
|
||||
# - Kept direct entity lists instead of using a Home Assistant group, to avoid
|
||||
# package merge errors from duplicate group/name keys.
|
||||
#
|
||||
# 2026-05-07 - v1.0.1
|
||||
# - Removed group.downstairs_flat_lights from this package to avoid duplicate
|
||||
# group/name package merge errors.
|
||||
@@ -30,6 +36,11 @@
|
||||
# - downstairs_light_toggle_all_group turns all listed lights OFF if any are ON.
|
||||
# - downstairs_light_toggle_all_group turns all listed lights ON if they are all OFF.
|
||||
#
|
||||
# - binary_sensor.downstairs_flat_any_lights_on:
|
||||
# - ON when any listed downstairs light is ON.
|
||||
# - OFF when all listed downstairs lights are OFF.
|
||||
# - This replaces the need for a group.downstairs_flat_lights entity.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
@@ -41,6 +52,27 @@ input_boolean:
|
||||
name: Downstairs Guest Occupied
|
||||
icon: mdi:home-account
|
||||
|
||||
###############################################################################
|
||||
# TEMPLATE SENSORS
|
||||
###############################################################################
|
||||
|
||||
template:
|
||||
- binary_sensor:
|
||||
- name: Downstairs Flat Any Lights On
|
||||
unique_id: downstairs_flat_any_lights_on
|
||||
icon: mdi:lightbulb-group
|
||||
state: >
|
||||
{{
|
||||
is_state('switch.esp_downstloungemain_relay_1_main_lights', 'on')
|
||||
or is_state('switch.esp_downstloungemain_relay_2_back_wall_lights', 'on')
|
||||
or is_state('switch.esp_downstmasterbedrmlights_relay_1_main_lights', 'on')
|
||||
or is_state('switch.esp_downstbedrm2lights_relay_1_main_lights', 'on')
|
||||
or is_state('switch.esp_downstkitchlights_relay_2_kitchen_light', 'on')
|
||||
or is_state('switch.esp_downstkitchlights_relay_1_dining_light', 'on')
|
||||
or is_state('switch.esp_downstbathswitch_relay_1_main_lights', 'on')
|
||||
or is_state('switch.esp_downstbathswitch_relay_2_cabinet_light', 'on')
|
||||
}}
|
||||
|
||||
###############################################################################
|
||||
# SCRIPTS
|
||||
###############################################################################
|
||||
@@ -169,18 +201,9 @@ script:
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{{
|
||||
is_state('switch.esp_downstloungemain_relay_1_main_lights', 'on')
|
||||
or is_state('switch.esp_downstloungemain_relay_2_back_wall_lights', 'on')
|
||||
or is_state('switch.esp_downstmasterbedrmlights_relay_1_main_lights', 'on')
|
||||
or is_state('switch.esp_downstbedrm2lights_relay_1_main_lights', 'on')
|
||||
or is_state('switch.esp_downstkitchlights_relay_2_kitchen_light', 'on')
|
||||
or is_state('switch.esp_downstkitchlights_relay_1_dining_light', 'on')
|
||||
or is_state('switch.esp_downstbathswitch_relay_1_main_lights', 'on')
|
||||
or is_state('switch.esp_downstbathswitch_relay_2_cabinet_light', 'on')
|
||||
}}
|
||||
- condition: state
|
||||
entity_id: binary_sensor.downstairs_flat_any_lights_on
|
||||
state: "on"
|
||||
sequence:
|
||||
- action: homeassistant.turn_off
|
||||
target:
|
||||
|
||||
Reference in New Issue
Block a user