various packages
This commit is contained in:
@@ -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,95 @@
|
||||
# packages/poolpump_operation.yaml
|
||||
|
||||
homeassistant:
|
||||
customize:
|
||||
input_boolean.poolpump_mode_switch:
|
||||
icon: mdi:pump
|
||||
|
||||
input_boolean:
|
||||
poolpump_mode_switch:
|
||||
name: "Pool Pump Operation"
|
||||
initial: false
|
||||
|
||||
timer_midnight_pending:
|
||||
name: "Send TIMER at Midnight"
|
||||
initial: false
|
||||
|
||||
automation:
|
||||
- alias: "Pool Pump → send BOOST when user turns UI switch ON"
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: input_boolean.poolpump_mode_switch
|
||||
to: "on"
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: switch.esp_poolpumppower_power_output
|
||||
state: "off"
|
||||
action:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "viewroad-commands/poolpump-timer/operation"
|
||||
payload: "BOOST"
|
||||
|
||||
- alias: "Pool Pump → send OFF & schedule TIMER when user turns UI switch OFF"
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: input_boolean.poolpump_mode_switch
|
||||
to: "off"
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: switch.esp_poolpumppower_power_output
|
||||
state: "on"
|
||||
action:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "viewroad-commands/poolpump-timer/operation"
|
||||
payload: "OFF"
|
||||
- service: input_boolean.turn_on
|
||||
data:
|
||||
entity_id: input_boolean.timer_midnight_pending
|
||||
|
||||
- alias: "Pool Pump → send TIMER at midnight"
|
||||
trigger:
|
||||
platform: time
|
||||
at: "00:00:00"
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: input_boolean.timer_midnight_pending
|
||||
state: "on"
|
||||
action:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "viewroad-commands/poolpump-timer/operation"
|
||||
payload: "TIMER"
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.timer_midnight_pending
|
||||
|
||||
- alias: "Pool Pump → sync UI switch with real output (no MQTT)"
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: switch.esp_poolpumppower_power_output
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: switch.esp_poolpumppower_power_output
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
data:
|
||||
entity_id: input_boolean.poolpump_mode_switch
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.timer_midnight_pending
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: switch.esp_poolpumppower_power_output
|
||||
state: "off"
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.poolpump_mode_switch
|
||||
- service: input_boolean.turn_on
|
||||
data:
|
||||
entity_id: input_boolean.timer_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 }}"
|
||||
Reference in New Issue
Block a user