various tidyups
This commit is contained in:
@@ -1,75 +1,85 @@
|
||||
##########################################################################################
|
||||
# Bedroom 3 Morning Climate
|
||||
##########################################################################################
|
||||
# PACKAGE: Bedroom 3 Climate Controls
|
||||
#
|
||||
# Turns on the Bedroom 3 heat pump at the selected morning time without
|
||||
# changing its current HVAC mode, temperature, or other settings, then turns
|
||||
# it off at 08:30.
|
||||
# Purpose: Configurable automatic heat-pump schedule for Mollie's bedroom.
|
||||
# Notes: The schedule runs only on enabled weekday and/or weekend day types.
|
||||
# Version: 2.0.0
|
||||
#
|
||||
##########################################################################################
|
||||
#:########################################################################################:#
|
||||
|
||||
---
|
||||
input_boolean:
|
||||
bedroom_3_morning_climate_enabled:
|
||||
name: Bedroom 3 Morning Climate
|
||||
icon: mdi:weather-sunny
|
||||
initial: true
|
||||
name: "Bedroom 3 Heat Pump Auto Control"
|
||||
icon: mdi:hvac
|
||||
|
||||
input_select:
|
||||
bedroom_3_morning_climate_time:
|
||||
name: Bedroom 3 Morning Climate Time
|
||||
bedroom_3_morning_climate_weekdays:
|
||||
name: "Bedroom 3 Heat Pump Weekdays"
|
||||
icon: mdi:calendar-week
|
||||
|
||||
bedroom_3_morning_climate_weekends:
|
||||
name: "Bedroom 3 Heat Pump Weekends"
|
||||
icon: mdi:calendar-weekend
|
||||
|
||||
input_datetime:
|
||||
bedroom_3_morning_climate_start_time:
|
||||
name: "Bedroom 3 Heat Pump On Time"
|
||||
icon: mdi:clock-start
|
||||
initial: "06:45"
|
||||
options:
|
||||
- "04:30"
|
||||
- "04:45"
|
||||
- "05:00"
|
||||
- "05:15"
|
||||
- "05:30"
|
||||
- "05:45"
|
||||
- "06:00"
|
||||
- "06:15"
|
||||
- "06:30"
|
||||
- "06:45"
|
||||
- "07:00"
|
||||
- "07:15"
|
||||
- "07:30"
|
||||
- "07:45"
|
||||
- "08:00"
|
||||
- "08:15"
|
||||
- "08:30"
|
||||
- "08:45"
|
||||
- "09:00"
|
||||
- "09:15"
|
||||
- "09:30"
|
||||
- "09:45"
|
||||
- "10:00"
|
||||
has_date: false
|
||||
has_time: true
|
||||
|
||||
bedroom_3_morning_climate_stop_time:
|
||||
name: "Bedroom 3 Heat Pump Off Time"
|
||||
icon: mdi:clock-end
|
||||
has_date: false
|
||||
has_time: true
|
||||
|
||||
#:########################################################################################:#
|
||||
# Automations
|
||||
#:########################################################################################:#
|
||||
|
||||
automation:
|
||||
- id: bedroom_3_morning_climate_start
|
||||
alias: Bedroom 3 Morning Climate Start
|
||||
description: >-
|
||||
Turns on the Bedroom 3 heat pump at the selected time when enabled, then
|
||||
turns it off at 08:30.
|
||||
trigger:
|
||||
alias: "Bedroom 3 Heat Pump Auto Start"
|
||||
description: "Starts the heat pump at the selected time on enabled day types."
|
||||
triggers:
|
||||
- trigger: time_pattern
|
||||
minutes: "/15"
|
||||
condition:
|
||||
minutes: "/1"
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bedroom_3_morning_climate_enabled
|
||||
state: "on"
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{{ now().strftime('%H:%M') ==
|
||||
states('input_select.bedroom_3_morning_climate_time') }}
|
||||
action:
|
||||
states('input_datetime.bedroom_3_morning_climate_start_time')[:5] }}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{{ (now().weekday() < 5 and
|
||||
is_state('input_boolean.bedroom_3_morning_climate_weekdays', 'on')) or
|
||||
(now().weekday() >= 5 and
|
||||
is_state('input_boolean.bedroom_3_morning_climate_weekends', 'on')) }}
|
||||
actions:
|
||||
- action: climate.turn_on
|
||||
target:
|
||||
entity_id: climate.mollie_s_room
|
||||
|
||||
- wait_template: >-
|
||||
{{ now().hour > 8 or (now().hour == 8 and now().minute >= 30) }}
|
||||
|
||||
- id: bedroom_3_morning_climate_stop
|
||||
alias: "Bedroom 3 Heat Pump Auto Stop"
|
||||
description: "Stops the heat pump at the selected time on enabled day types."
|
||||
triggers:
|
||||
- trigger: time_pattern
|
||||
minutes: "/1"
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{{ now().strftime('%H:%M') ==
|
||||
states('input_datetime.bedroom_3_morning_climate_stop_time')[:5] }}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{{ (now().weekday() < 5 and
|
||||
is_state('input_boolean.bedroom_3_morning_climate_weekdays', 'on')) or
|
||||
(now().weekday() >= 5 and
|
||||
is_state('input_boolean.bedroom_3_morning_climate_weekends', 'on')) }}
|
||||
actions:
|
||||
- action: climate.turn_off
|
||||
target:
|
||||
entity_id: climate.mollie_s_room
|
||||
|
||||
Reference in New Issue
Block a user