Improved split of addon climate files

To make it easier to maintain
This commit is contained in:
Edward Firmo
2023-10-19 15:44:06 +02:00
parent 8bf2b9e4cc
commit ff917d663e
3 changed files with 29 additions and 38 deletions

View File

@@ -22,6 +22,33 @@ substitutions:
addon_climate_heat: "false"
##############################
climate:
- platform: thermostat
name: ${device_name} Thermostat
id: thermostat_embedded
sensor: temp_nspanel
min_idle_time: ${min_idle_time}s
visual:
min_temperature: ${temp_min} ${temp_units}
max_temperature: ${temp_max} ${temp_units}
temperature_step: ${temp_step} ${temp_units}
idle_action:
- switch.turn_off: relay_${heater_relay}
default_preset: "Off"
on_boot_restore_from: memory
preset:
- name: "Off"
default_target_temperature_low: ${temp_min} ${temp_units}
mode: "off"
- name: Home
default_target_temperature_low: 21 ${temp_units}
internal: false
on_state:
- logger.log: Climate state changed - Start
- script.execute: addon_climate_update_page_climate
- script.execute: addon_climate_update_page_home
- logger.log: Climate state changed - End
globals:
##### Is embedded thermostat visible on climate page? #####
- id: is_addon_climate_visible

View File

@@ -17,35 +17,17 @@ substitutions:
##############################
climate:
- platform: thermostat
name: ${device_name} Thermostat
id: thermostat_embedded
sensor: temp_nspanel
- id: !extend thermostat_embedded
min_cooling_off_time: ${min_off_time}s
min_cooling_run_time: ${min_run_time}s
min_idle_time: ${min_idle_time}s
visual:
min_temperature: ${temp_min} ${temp_units}
max_temperature: ${temp_max} ${temp_units}
temperature_step: ${temp_step} ${temp_units}
cool_action:
- switch.turn_on: relay_${cooler_relay}
idle_action:
- switch.turn_off: relay_${cooler_relay}
default_preset: "Off"
on_boot_restore_from: memory
preset:
- name: "Off"
default_target_temperature_high: ${temp_min} ${temp_units}
mode: "off"
- name: Home
default_target_temperature_high: 21 ${temp_units}
internal: false
on_state:
- logger.log: Climate state changed - Start
- script.execute: addon_climate_update_page_climate
- script.execute: addon_climate_update_page_home
- logger.log: Climate state changed - End
packages:
core_package: !include nspanel_esphome_addon_climate_base.yaml

View File

@@ -17,35 +17,17 @@ substitutions:
##############################
climate:
- platform: thermostat
name: ${device_name} Thermostat
id: thermostat_embedded
sensor: temp_nspanel
- id: !extend thermostat_embedded
min_heating_off_time: ${min_off_time}s
min_heating_run_time: ${min_run_time}s
min_idle_time: ${min_idle_time}s
visual:
min_temperature: ${temp_min} ${temp_units}
max_temperature: ${temp_max} ${temp_units}
temperature_step: ${temp_step} ${temp_units}
heat_action:
- switch.turn_on: relay_${heater_relay}
idle_action:
- switch.turn_off: relay_${heater_relay}
default_preset: "Off"
on_boot_restore_from: memory
preset:
- name: "Off"
default_target_temperature_low: ${temp_min} ${temp_units}
mode: "off"
- name: Home
default_target_temperature_low: 21 ${temp_units}
internal: false
on_state:
- logger.log: Climate state changed - Start
- script.execute: addon_climate_update_page_climate
- script.execute: addon_climate_update_page_home
- logger.log: Climate state changed - End
packages:
core_package: !include nspanel_esphome_addon_climate_base.yaml