various packages

This commit is contained in:
zorruno
2026-07-06 19:43:30 +12:00
parent 1e56919e16
commit 7208b95e93
656 changed files with 1168 additions and 211 deletions
@@ -109,7 +109,7 @@ automation:
am_appliances:
- appliance_id: washing_machine
appliance_name: "Washing Machine"
appliance_action: "washing2"
appliance_action: "washing"
power_entity: "sensor.esp_laundrywashpow_load_power"
icon: "mdi:washing-machine"
short_announcement: "/s/sWashing complete"
@@ -123,7 +123,7 @@ automation:
- appliance_id: dryer
appliance_name: "Dryer"
appliance_action: "drying2"
appliance_action: "drying"
power_entity: "sensor.esp_laundrydrypow_load_power"
icon: "mdi:tumble-dryer"
short_announcement: "/s/sDryer complete"
@@ -137,16 +137,33 @@ automation:
- appliance_id: main_dishwasher
appliance_name: "Main Dishwasher"
appliance_action: "dishwashing2"
appliance_action: "dishwashing"
power_entity: "sensor.esp_maindishwasherpower_power"
icon: "mdi:dishwasher"
short_announcement: "/sDishwasher complete"
# long_announcement: # Created by the processor
matrix_indicator: "dish,1,15,10,6,5,1,0"
resolution: 5
standby_power: 3
operating_power_min: 30
announcement_channels: "pushover_zorruno"
- appliance_id: downstairs_dishwasher
appliance_name: "Downstairs Dishwasher"
appliance_action: "dishwashing"
power_entity: "sensor.esp_downstdishwasher_power"
icon: "mdi:dishwasher"
short_announcement: "/sDownstairs Dishwasher complete"
# long_announcement: # Created by the processor
matrix_indicator: "dish2,1,15,10,6,5,1,0"
resolution: 5
standby_power: 3
operating_power_min: 30
announcement_channels: "pushover_zorruno"
- appliance_id: evcharger_32a
appliance_name: "EV Charger (32A)"
appliance_action: "EV charging (32A)"
appliance_action: "charging"
power_entity: "sensor.main_house_3_phase_power_monitor_32a_wallcharger_power"
monitor_sensor: "sensor.appliance_monitor_ev_charger_32a_monitor"
icon: "mdi:ev-plug-type2"
@@ -155,7 +172,77 @@ automation:
matrix_indicator: "ev32a,1,15,10,6,5,1,0"
resolution: 6
standby_power: 3
operating_power_min: 50
operating_power_min: 100
announcement_channels: "pushover_zorruno"
- appliance_id: evcharger_16a
appliance_name: "EV Charger (16A)"
appliance_action: "charging"
power_entity: "sensor.main_house_3_phase_power_monitor_32a_wallcharger_power"
monitor_sensor: "sensor.garage_db_control_16a_wallcharger_power"
icon: "mdi:ev-plug-type1"
short_announcement: "/s/s16A EV Charging complete"
# long_announcement: # Created by the processor
matrix_indicator: "ev16a,1,15,10,6,5,1,0"
resolution: 6
standby_power: 3
operating_power_min: 100
announcement_channels: "pushover_zorruno"
- appliance_id: ryobicharger_left
appliance_name: "Ryobi Charger Left"
appliance_action: "charging"
power_entity: "sensor.ryobi_charger_left_power_monitor_x17pp_power"
#monitor_sensor: "sensor.ryobi_charger_left_power_monitor_x17pp_power"
icon: "mdi:battery-charging-medium"
short_announcement: "/s/sRyobi Charging Left"
# long_announcement: # Created by the processor
matrix_indicator: "ryo1,1,15,10,6,5,1,0"
resolution: 4
standby_power: 1
operating_power_min: 20
announcement_channels: "pushover_zorruno"
- appliance_id: ryobicharger_right
appliance_name: "Ryobi Charger Right"
appliance_action: "charging"
power_entity: "sensor.ryobi_charger_right_power_monitor_x16pp_power"
#monitor_sensor: "sensor.ryobi_charger_right_power_monitor_x16pp_power"
icon: "mdi:battery-charging-medium"
short_announcement: "/s/sRyobi Charging Right"
# long_announcement: # Created by the processor
matrix_indicator: "ryo2,1,15,10,6,5,1,0"
resolution: 4
standby_power: 1
operating_power_min: 20
announcement_channels: "pushover_zorruno"
- appliance_id: pool_pump
appliance_name: "Pool Pump"
appliance_action: "pumping"
power_entity: "sensor.esp_poolpumppower_power"
#monitor_sensor: "sensor.ryobi_charger_right_power_monitor_x16pp_power"
icon: "mdi:pool"
short_announcement: "Pool Pump Off"
# long_announcement: # Created by the processor
matrix_indicator: "pump,1,15,10,6,5,1,0"
resolution: 4
standby_power: 5
operating_power_min: 20
announcement_channels: "pushover_zorruno"
- appliance_id: 3d_printer
appliance_name: "3D Printer"
appliance_action: "printing"
power_entity: "sensor.esp_3dprinterpow_load_power"
#monitor_sensor: "sensor.ryobi_charger_right_power_monitor_x16pp_power"
icon: "mdi:printer-3d"
short_announcement: "3D printer finished"
# long_announcement: # Created by the processor
matrix_indicator: "pump,1,15,10,6,5,1,0"
resolution: 4
standby_power: 2
operating_power_min: 20
announcement_channels: "pushover_zorruno"
action:
@@ -0,0 +1,178 @@
#:########################################################################################:#
# Pool Light Operation Package #
#:########################################################################################:#
#
# TITLE:
# Pool Light Operation
#
# FILE:
# packages/pool_light_boost_switch.yaml
#
# VERSION:
# V1.1 2026-06-29
#
# VERSION HISTORY:
# V1.1 2026-06-29
# - Tidied layout, comments, naming and automation IDs.
# - Added structured package header and section comments.
# - Fixed likely MQTT topic typo in midnight TIMER automation:
# viewroad-commands/poollights-timer/operation
# changed to:
# viewroad-commands/poollight-timer/operation
#
# V1.0
# - Initial package.
# - Provides a Home Assistant UI switch for pool light BOOST / OFF behaviour.
# - Sends TIMER mode again at midnight when required.
#
# PURPOSE:
# Provides a Home Assistant UI switch for controlling the pool light timer mode.
#
# Behaviour:
# - Turning the UI switch ON sends BOOST if the real pool light output is currently OFF.
# - Turning the UI switch OFF sends OFF if the real pool light output is currently ON.
# - If OFF was requested, TIMER mode is sent again at midnight.
# - The UI switch follows the real ESPHome output state without sending MQTT.
#
# MQTT:
# Operation topic:
# viewroad-commands/poollight-timer/operation
#
# NOTES:
# The input_boolean.timer_light_midnight_pending helper is internal to this package.
#
#:########################################################################################:#
#:########################################################################################:#
# Home Assistant Customisation #
#:########################################################################################:#
homeassistant:
customize:
input_boolean.poollights_mode_switch:
icon: mdi:light-flood-up
#:########################################################################################:#
# Input Booleans #
#:########################################################################################:#
input_boolean:
poollights_mode_switch:
name: "Pool Light Operation"
initial: false
timer_light_midnight_pending:
name: "Pool Light - Send TIMER at Midnight"
initial: false
#:########################################################################################:#
# Automations #
#:########################################################################################:#
automation:
- id: pool_light_send_boost_when_ui_switch_on
alias: "Pool Light - Send BOOST When UI Switch Turns ON"
description: "Sends BOOST to the pool light timer when the UI switch is turned on and the real pool light output is off."
mode: single
trigger:
- platform: state
entity_id: input_boolean.poollights_mode_switch
to: "on"
condition:
- condition: state
entity_id: switch.esp_poollightpower2_switch
state: "off"
action:
- service: mqtt.publish
data:
topic: "viewroad-commands/poollight-timer/operation"
payload: "BOOST"
- id: pool_light_send_off_and_schedule_timer_when_ui_switch_off
alias: "Pool Light - Send OFF And Schedule TIMER When UI Switch Turns OFF"
description: "Sends OFF to the pool light timer and schedules TIMER mode to be restored at midnight."
mode: single
trigger:
- platform: state
entity_id: input_boolean.poollights_mode_switch
to: "off"
condition:
- condition: state
entity_id: switch.esp_poollightpower2_switch
state: "on"
action:
- service: mqtt.publish
data:
topic: "viewroad-commands/poollight-timer/operation"
payload: "OFF"
- service: input_boolean.turn_on
target:
entity_id: input_boolean.timer_light_midnight_pending
- id: pool_light_send_timer_at_midnight
alias: "Pool Light - Send TIMER At Midnight"
description: "Restores TIMER mode at midnight if the pool light was manually turned off earlier."
mode: single
trigger:
- platform: time
at: "00:00:00"
condition:
- condition: state
entity_id: input_boolean.timer_light_midnight_pending
state: "on"
action:
- service: mqtt.publish
data:
topic: "viewroad-commands/poollight-timer/operation"
payload: "TIMER"
- service: input_boolean.turn_off
target:
entity_id: input_boolean.timer_light_midnight_pending
- id: pool_light_sync_ui_switch_with_real_output
alias: "Pool Light - Sync UI Switch With Real Output"
description: "Keeps the UI switch aligned with the real ESPHome pool light output without sending MQTT commands."
mode: restart
trigger:
- platform: state
entity_id: switch.esp_poollightpower2_switch
action:
- choose:
- conditions:
- condition: state
entity_id: switch.esp_poollightpower2_switch
state: "on"
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.poollights_mode_switch
- service: input_boolean.turn_off
target:
entity_id: input_boolean.timer_light_midnight_pending
- conditions:
- condition: state
entity_id: switch.esp_poollightpower2_switch
state: "off"
sequence:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.poollights_mode_switch
- service: input_boolean.turn_on
target:
entity_id: input_boolean.timer_light_midnight_pending
@@ -0,0 +1,389 @@
#:########################################################################################:#
# Pool Timer Selection Package #
#:########################################################################################:#
#
# TITLE:
# Pool Timer Selection
#
# FILE:
# pool_timer_selection.yaml
#
# VERSION:
# V1.0 2026-06-29
#
# VERSION HISTORY:
# V1.0 2026-06-29
# - Initial package.
# - Adds Home Assistant input_select helpers for Pool Pump and Pool Light timer times.
# - Publishes selected times to the ESPHome MQTT timer command topics.
# - "Default" publishes the matching ESPHome default time for that selector.
#
# PURPOSE:
# Provides Home Assistant dropdown selectors for the Pool Pump and Pool Light
# morning/evening ON/OFF timer settings.
#
# MQTT NOTES:
# ESPHome devices subscribe to:
# viewroad-commands/poolpump-timer/morning-on
# viewroad-commands/poolpump-timer/morning-off
# viewroad-commands/poolpump-timer/evening-on
# viewroad-commands/poolpump-timer/evening-off
#
# viewroad-commands/poollight-timer/morning-on
# viewroad-commands/poollight-timer/morning-off
# viewroad-commands/poollight-timer/evening-on
# viewroad-commands/poollight-timer/evening-off
#
# Payload format is HH:MM.
#
# IMPORTANT:
# The current ESPHome timer logic only handles same-day timer windows:
# current_mins >= on_time AND current_mins < off_time
#
# Because of this, after-midnight evening selections such as 00:30 or 01:00
# are intentionally not included here.
#
# 24:00 is included for OFF selectors as "run until midnight".
#
#:########################################################################################:#
input_select:
#:######################################################################################:#
# Pool Pump Timer Selectors #
#:######################################################################################:#
pool_pump_morning_on_time:
name: "Pool Pump Morning On Time"
icon: "mdi:timer-play-outline"
options: &pool_timer_options_0730
- "Default"
- "03:30"
- "04:00"
- "04:30"
- "05:00"
- "05:30"
- "06:00"
- "06:30"
- "07:00"
- "07:30"
- "08:00"
- "08:30"
- "09:00"
- "09:30"
- "10:00"
- "10:30"
- "11:00"
- "11:30"
pool_pump_morning_off_time:
name: "Pool Pump Morning Off Time"
icon: "mdi:timer-stop-outline"
options: *pool_timer_options_0730
pool_pump_evening_on_time:
name: "Pool Pump Evening On Time"
icon: "mdi:timer-play-outline"
options: &pool_timer_options_2100_same_day
- "Default"
- "17:00"
- "17:30"
- "18:00"
- "18:30"
- "19:00"
- "19:30"
- "20:00"
- "20:30"
- "21:00"
- "21:30"
- "22:00"
- "22:30"
- "23:00"
- "23:30"
pool_pump_evening_off_time:
name: "Pool Pump Evening Off Time"
icon: "mdi:timer-stop-outline"
options: &pool_timer_options_2230_same_day
- "Default"
- "18:30"
- "19:00"
- "19:30"
- "20:00"
- "20:30"
- "21:00"
- "21:30"
- "22:00"
- "22:30"
- "23:00"
- "23:30"
- "24:00"
#:######################################################################################:#
# Pool Light Timer Selectors #
#:######################################################################################:#
pool_light_morning_on_time:
name: "Pool Light Morning On Time"
icon: "mdi:timer-play-outline"
options: *pool_timer_options_0730
pool_light_morning_off_time:
name: "Pool Light Morning Off Time"
icon: "mdi:timer-stop-outline"
options: *pool_timer_options_0730
pool_light_evening_on_time:
name: "Pool Light Evening On Time"
icon: "mdi:timer-play-outline"
options: &pool_timer_options_1900
- "Default"
- "15:00"
- "15:30"
- "16:00"
- "16:30"
- "17:00"
- "17:30"
- "18:00"
- "18:30"
- "19:00"
- "19:30"
- "20:00"
- "20:30"
- "21:00"
- "21:30"
- "22:00"
- "22:30"
- "23:00"
pool_light_evening_off_time:
name: "Pool Light Evening Off Time"
icon: "mdi:timer-stop-outline"
options: *pool_timer_options_2230_same_day
script:
#:######################################################################################:#
# MQTT Publish Script #
#:######################################################################################:#
pool_timer_publish_mqtt_time:
alias: "Pool Timer - Publish MQTT Time"
description: "Publishes one selected pool timer HH:MM value to MQTT."
mode: queued
max: 20
fields:
mqtt_timer_topic:
name: "MQTT timer topic"
example: "viewroad-commands/poolpump-timer"
timer_command:
name: "Timer command"
example: "morning-on"
selected_value:
name: "Selected value"
example: "Default"
default_time:
name: "Default time"
example: "07:30"
variables:
#:##################################################################################:#
# Editable MQTT Publish Settings #
#:##################################################################################:#
default_label: "Default"
mqtt_retain_timer_commands: true
mqtt_qos: 0
payload_to_send: >-
{% set selected = selected_value | string %}
{% if selected == default_label %}
{{ default_time }}
{% else %}
{{ selected }}
{% endif %}
sequence:
- condition: template
value_template: "{{ (selected_value | string) not in ['unknown', 'unavailable', 'none', 'None', ''] }}"
- action: mqtt.publish
data:
topic: "{{ mqtt_timer_topic }}/{{ timer_command }}"
payload: "{{ payload_to_send }}"
qos: "{{ mqtt_qos | int }}"
retain: "{{ mqtt_retain_timer_commands | bool }}"
automation:
#:######################################################################################:#
# Publish Timer Selector Changes #
#:######################################################################################:#
- id: pool_timer_selection_publish_mqtt
alias: "Pool Timer Selection - Publish MQTT"
description: "Publishes pool timer selector changes to the matching ESPHome MQTT topic."
mode: queued
max: 20
variables:
#:##################################################################################:#
# Editable MQTT Topic Settings #
#:##################################################################################:#
# No leading slash, to match the ESPHome mqtt_timer_topic substitutions.
mqtt_command_root: "viewroad-commands"
pool_pump_timer_topic_suffix: "poolpump-timer"
pool_light_timer_topic_suffix: "poollight-timer"
#:##################################################################################:#
# Editable ESPHome Default Timer Values #
#:##################################################################################:#
# Pool Pump ESPHome defaults
pool_pump_morning_on_default: "07:30"
pool_pump_morning_off_default: "07:30"
pool_pump_evening_on_default: "21:00"
pool_pump_evening_off_default: "22:30"
# Pool Light ESPHome defaults
pool_light_morning_on_default: "07:30"
pool_light_morning_off_default: "07:30"
pool_light_evening_on_default: "19:00"
pool_light_evening_off_default: "22:30"
triggers:
- trigger: state
entity_id: input_select.pool_pump_morning_on_time
id: pool_pump_morning_on
- trigger: state
entity_id: input_select.pool_pump_morning_off_time
id: pool_pump_morning_off
- trigger: state
entity_id: input_select.pool_pump_evening_on_time
id: pool_pump_evening_on
- trigger: state
entity_id: input_select.pool_pump_evening_off_time
id: pool_pump_evening_off
- trigger: state
entity_id: input_select.pool_light_morning_on_time
id: pool_light_morning_on
- trigger: state
entity_id: input_select.pool_light_morning_off_time
id: pool_light_morning_off
- trigger: state
entity_id: input_select.pool_light_evening_on_time
id: pool_light_evening_on
- trigger: state
entity_id: input_select.pool_light_evening_off_time
id: pool_light_evening_off
conditions:
- condition: template
value_template: "{{ trigger.from_state is not none and trigger.to_state is not none }}"
- condition: template
value_template: "{{ trigger.to_state.state not in ['unknown', 'unavailable'] }}"
- condition: template
value_template: "{{ trigger.to_state.state != trigger.from_state.state }}"
actions:
- choose:
#:################################################################################:#
# Pool Pump MQTT Publishes #
#:################################################################################:#
- conditions:
- condition: template
value_template: "{{ trigger.id == 'pool_pump_morning_on' }}"
sequence:
- action: script.pool_timer_publish_mqtt_time
data:
mqtt_timer_topic: "{{ mqtt_command_root }}/{{ pool_pump_timer_topic_suffix }}"
timer_command: "morning-on"
selected_value: "{{ trigger.to_state.state }}"
default_time: "{{ pool_pump_morning_on_default }}"
- conditions:
- condition: template
value_template: "{{ trigger.id == 'pool_pump_morning_off' }}"
sequence:
- action: script.pool_timer_publish_mqtt_time
data:
mqtt_timer_topic: "{{ mqtt_command_root }}/{{ pool_pump_timer_topic_suffix }}"
timer_command: "morning-off"
selected_value: "{{ trigger.to_state.state }}"
default_time: "{{ pool_pump_morning_off_default }}"
- conditions:
- condition: template
value_template: "{{ trigger.id == 'pool_pump_evening_on' }}"
sequence:
- action: script.pool_timer_publish_mqtt_time
data:
mqtt_timer_topic: "{{ mqtt_command_root }}/{{ pool_pump_timer_topic_suffix }}"
timer_command: "evening-on"
selected_value: "{{ trigger.to_state.state }}"
default_time: "{{ pool_pump_evening_on_default }}"
- conditions:
- condition: template
value_template: "{{ trigger.id == 'pool_pump_evening_off' }}"
sequence:
- action: script.pool_timer_publish_mqtt_time
data:
mqtt_timer_topic: "{{ mqtt_command_root }}/{{ pool_pump_timer_topic_suffix }}"
timer_command: "evening-off"
selected_value: "{{ trigger.to_state.state }}"
default_time: "{{ pool_pump_evening_off_default }}"
#:################################################################################:#
# Pool Light MQTT Publishes #
#:################################################################################:#
- conditions:
- condition: template
value_template: "{{ trigger.id == 'pool_light_morning_on' }}"
sequence:
- action: script.pool_timer_publish_mqtt_time
data:
mqtt_timer_topic: "{{ mqtt_command_root }}/{{ pool_light_timer_topic_suffix }}"
timer_command: "morning-on"
selected_value: "{{ trigger.to_state.state }}"
default_time: "{{ pool_light_morning_on_default }}"
- conditions:
- condition: template
value_template: "{{ trigger.id == 'pool_light_morning_off' }}"
sequence:
- action: script.pool_timer_publish_mqtt_time
data:
mqtt_timer_topic: "{{ mqtt_command_root }}/{{ pool_light_timer_topic_suffix }}"
timer_command: "morning-off"
selected_value: "{{ trigger.to_state.state }}"
default_time: "{{ pool_light_morning_off_default }}"
- conditions:
- condition: template
value_template: "{{ trigger.id == 'pool_light_evening_on' }}"
sequence:
- action: script.pool_timer_publish_mqtt_time
data:
mqtt_timer_topic: "{{ mqtt_command_root }}/{{ pool_light_timer_topic_suffix }}"
timer_command: "evening-on"
selected_value: "{{ trigger.to_state.state }}"
default_time: "{{ pool_light_evening_on_default }}"
- conditions:
- condition: template
value_template: "{{ trigger.id == 'pool_light_evening_off' }}"
sequence:
- action: script.pool_timer_publish_mqtt_time
data:
mqtt_timer_topic: "{{ mqtt_command_root }}/{{ pool_light_timer_topic_suffix }}"
timer_command: "evening-off"
selected_value: "{{ trigger.to_state.state }}"
default_time: "{{ pool_light_evening_off_default }}"
@@ -0,0 +1,123 @@
#:########################################################################################:#
# Garage Corner Light CCTV Motion Package #
#:########################################################################################:#
#
# TITLE:
# Garage Corner Light CCTV Motion
#
# FILE:
# packages/garage_corner_light_cctv_motion.yaml
#
# VERSION:
# V1.0 2026-06-29
#
# VERSION HISTORY:
# V1.0 2026-06-29
# - Initial package.
# - Turns the garage external corner light on when CCTV motion MQTT payload "1" is received.
# - Uses a configurable timer, default 6 minutes.
# - Any new CCTV motion restarts the timer.
# - Adds a Home Assistant enable switch for CCTV movement triggers.
#
# PURPOSE:
# Turns on the garage external corner light from selected CCTV motion MQTT triggers.
#
# NOTES:
# - The light is:
# switch.esp_garageextcornerlight_garage_external_light
#
# - CCTV movement MQTT payload is expected to be:
# "1"
#
# - Turning OFF "Garage corner light movement triggers" prevents new CCTV triggers.
# - If a timer is already running, it will still finish and turn the light off.
#
#:########################################################################################:#
# User Configuration #
#:########################################################################################:#
input_number:
garage_corner_light_motion_timer_minutes:
name: "Garage Corner Light Motion Timer"
icon: mdi:timer-outline
min: 1
max: 30
step: 1
mode: box
unit_of_measurement: "min"
initial: 6
input_boolean:
garage_corner_light_movement_triggers:
name: "Garage corner light movement triggers"
icon: mdi:cctv
initial: true
timer:
garage_corner_light_motion_timer:
name: "Garage Corner Light Motion Timer"
icon: mdi:timer-outline
duration: "00:06:00"
#:########################################################################################:#
# Automations #
#:########################################################################################:#
automation:
- id: garage_corner_light_cctv_motion_turn_on
alias: "Garage Corner Light → CCTV motion turns light on"
description: >
Turns the garage corner light on when any configured CCTV motion MQTT topic
receives payload "1". Each new movement restarts the timer.
mode: restart
trigger:
- platform: mqtt
topic: "viewroad-status/cctv/garage_camera_motion"
payload: "1"
id: garage_camera
- platform: mqtt
topic: "viewroad-status/cctv/caravan_camera_motion"
payload: "1"
id: caravan_camera
- platform: mqtt
topic: "viewroad-status/cctv/driveway_camera_motion"
payload: "1"
id: driveway_camera
condition:
- condition: state
entity_id: input_boolean.garage_corner_light_movement_triggers
state: "on"
action:
- service: switch.turn_on
target:
entity_id: switch.esp_garageextcornerlight_garage_external_light
- service: timer.start
target:
entity_id: timer.garage_corner_light_motion_timer
data:
duration: >
{% set total_minutes = states('input_number.garage_corner_light_motion_timer_minutes') | int(6) %}
{% set hours = total_minutes // 60 %}
{% set minutes = total_minutes % 60 %}
{{ '%02d:%02d:00' | format(hours, minutes) }}
- id: garage_corner_light_cctv_motion_timer_finished
alias: "Garage Corner Light → CCTV motion timer finished"
description: >
Turns the garage corner light off when the CCTV motion timer finishes.
mode: single
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.garage_corner_light_motion_timer
action:
- service: switch.turn_off
target:
entity_id: switch.esp_garageextcornerlight_garage_external_light
-95
View File
@@ -1,95 +0,0 @@
# packages/pool_light_boost_switch.yaml
homeassistant:
customize:
input_boolean.poollights_mode_switch:
icon: mdi:light-flood-up
input_boolean:
poollights_mode_switch:
name: "Pool Light Operation"
initial: false
timer_light_midnight_pending:
name: "Send TIMER at Midnight"
initial: false
automation:
- alias: "Pool Lights → send BOOST when user turns UI switch ON"
trigger:
platform: state
entity_id: input_boolean.poollights_mode_switch
to: "on"
condition:
condition: state
entity_id: switch.esp_poollightpower2_switch
state: "off"
action:
- service: mqtt.publish
data:
topic: "viewroad-commands/poollight-timer/operation"
payload: "BOOST"
- alias: "Pool Lights → send OFF & schedule TIMER when user turns UI switch OFF"
trigger:
platform: state
entity_id: input_boolean.poollights_mode_switch
to: "off"
condition:
condition: state
entity_id: switch.esp_poollightpower2_switch
state: "on"
action:
- service: mqtt.publish
data:
topic: "viewroad-commands/poollight-timer/operation"
payload: "OFF"
- service: input_boolean.turn_on
data:
entity_id: input_boolean.timer_light_midnight_pending
- alias: "Pool Lights → send TIMER at midnight"
trigger:
platform: time
at: "00:00:00"
condition:
condition: state
entity_id: input_boolean.timer_light_midnight_pending
state: "on"
action:
- service: mqtt.publish
data:
topic: "viewroad-commands/poollights-timer/operation"
payload: "TIMER"
- service: input_boolean.turn_off
data:
entity_id: input_boolean.timer_light_midnight_pending
- alias: "Pool Lights → sync UI switch with real output (no MQTT)"
trigger:
platform: state
entity_id: switch.esp_poollightpower2_switch
action:
- choose:
- conditions:
- condition: state
entity_id: switch.esp_poollightpower2_switch
state: "on"
sequence:
- service: input_boolean.turn_on
data:
entity_id: input_boolean.poollights_mode_switch
- service: input_boolean.turn_off
data:
entity_id: input_boolean.timer_light_midnight_pending
- conditions:
- condition: state
entity_id: switch.esp_poollightpower2_switch
state: "off"
sequence:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.poollights_mode_switch
- service: input_boolean.turn_on
data:
entity_id: input_boolean.timer_light_midnight_pending