From 73fba3b449009ef30e6f2c16dc3ac40faa910bf6 Mon Sep 17 00:00:00 2001
From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com>
Date: Wed, 27 Dec 2023 23:03:45 +0100
Subject: [PATCH] Use climate defaults from HA
---
advanced/esphome/nspanel_esphome_addon_climate_base.yaml | 4 ++--
docs/addon_climate.md | 4 ++--
nspanel_blueprint.yaml | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/advanced/esphome/nspanel_esphome_addon_climate_base.yaml b/advanced/esphome/nspanel_esphome_addon_climate_base.yaml
index f82f626..9bc0a07 100644
--- a/advanced/esphome/nspanel_esphome_addon_climate_base.yaml
+++ b/advanced/esphome/nspanel_esphome_addon_climate_base.yaml
@@ -16,8 +16,8 @@ substitutions:
min_run_time: "300"
min_idle_time: "30"
# https://esphome.io/components/climate/index.html#base-climate-configuration
- temp_min: "5"
- temp_max: "45"
+ temp_min: "7"
+ temp_max: "35"
temp_step: "0.5"
target_low: "18"
target_high: "24"
diff --git a/docs/addon_climate.md b/docs/addon_climate.md
index c183c55..2aaadfe 100644
--- a/docs/addon_climate.md
+++ b/docs/addon_climate.md
@@ -63,8 +63,8 @@ min_run_time|Optional|Positive integer representing the number of seconds|`300`|
min_idle_time|Optional|Positive integer representing the number of seconds|`30`|Minimum duration (in seconds) the idle action must be active before calling another climate action.
target_low|Optional|Number representing a temperature in the selected unit|`18`|The initial lower treshold for the target temperature.
target_high|Optional|Number representing a temperature in the selected unit|`24`|The initial higher treshold for the target temperature.
-temp_min|Optional|Number representing a temperature in the selected unit|*cool: `15`*
*heat: `5`*
*dual: `5`* |The minimum temperature the climate device can reach. Used to set the range of the frontend gauge.
-temp_max|Optional|Number representing a temperature in the selected unit|*cool: `45`*
*heat: `25`*
*dual: `45`* |The maximum temperature the climate device can reach. Used to set the range of the frontend gauge.
+temp_min|Optional|Number representing a temperature in the selected unit|*cool: `15`*
*heat: `7`*
*dual: `7`* |The minimum temperature the climate device can reach. Used to set the range of the frontend gauge.
+temp_max|Optional|Number representing a temperature in the selected unit|*cool: `45`*
*heat: `35`*
*dual: `45`* |The maximum temperature the climate device can reach. Used to set the range of the frontend gauge.
temp_step|Optional|Number representing a temperature in the selected unit|`0.5`|The granularity with which the target temperature can be controlled.
- All values must be delimited with `""`
diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml
index a9135e0..80ea1b3 100644
--- a/nspanel_blueprint.yaml
+++ b/nspanel_blueprint.yaml
@@ -8897,9 +8897,9 @@ action:
{% endif %}
{% set target_temp_step = target_temp_step | float(0.5) | abs %}
{{ ((10 * target_temp_step) | round(0) | int) if is_number(target_temp_step) and target_temp_step > 0 else 10 }}
- temp_offset_raw: '{{ (state_attr(climate_entity, "min_temp") | float(5) * 10) | round(0) | int }}'
+ temp_offset_raw: '{{ (state_attr(climate_entity, "min_temp") | float(7) * 10) | round(0) | int }}'
temp_offset: '{{ temp_offset_raw if (temp_offset_raw % temp_step) == 0 else temp_offset_raw + temp_step - (temp_offset_raw % temp_step) }}'
- max_temp_raw: '{{ (state_attr(climate_entity, "max_temp") | float(25) * 10) | round(0) | int }}'
+ max_temp_raw: '{{ (state_attr(climate_entity, "max_temp") | float(35) * 10) | round(0) | int }}'
max_temp: '{{ (max_temp_raw / temp_step) | round * temp_step }}'
total_steps: '{{ ((max_temp-temp_offset)/temp_step) | round(0) | int }}'
climate_state: '{{ states(climate_entity) | default("unavailable") if climate_entity is string else "unavailable" }}'