Blackymas / NSPanel_HA_Blueprint

This allows you to configure your complete NSPanel via Blueprint with UI and without changing anything in the code
1.35k stars 252 forks source link

Climate Add-On: UI Not Functional (Celsius), Fahrenheit Not Working #1627

Closed JS1Dev closed 7 months ago

JS1Dev commented 7 months ago

TFT Version

4.21

ESPHome Version

4.21

Blueprint Version

4.21

Panel Model

NSPanel US Model (Landscape)

What is the bug?

Climate Add-On: UI Not Functional (Celsius), Fahrenheit Not Working

Steps to Reproduce

In "Your panel's YAML" I provided 2 .yaml configurations, one configured with Celsius and one was a failed attempt to configure for Fahrenheit as described below. Ultimately, I just want Fahrenheit to work but even as a fallback, Celsius isn't working for me

The following is the behavior I'm seeing updating Blueprint, ESPHome and the TFT (per How To - Update)

image

Celsius Issues

Fahrenheit Issues

Your panel's YAML

---------------------
Celsius Configuration
---------------------
substitutions:
  ###### CHANGE ME START ######
  device_name: "nspkitchen" 
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password

  nextion_update_url: "http://homeassistant.local:8123/local/nspanel_us_land.tft"
  nextion_blank_url: "http://homeassistant.local:8123/local/nspanel_blank.tft.tft"

  ##### addon-configuration #####
  ## addon_climate ##
  heater_relay: "1" #Use relay 1
  temp_units: "°C" #Temperatures in Fahrenheit
  temp_min: "4.44" #Min supported temperature is 40°F
  temp_max: "26.66" #Max supported temperature is 80°F
  temp_step: ".5" #Temperature granularity is 1°F
  min_off_time: "1"
  min_run_time: "1"
  min_idle_time: "0"
  #addon_climate_heater_relay: "1" 
  # possible values: 1/2

  ##### CHANGE ME END #####

packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Core package
      #- advanced/esphome/nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
      #- nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
      - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
    refresh: 300s #300s #1s

esp32:
  framework:
    type: esp-idf

##### My customization - Start #####
# Encrypt the communication between ESPHome and Home Assistant
#api:
#  encryption:
#    key: !secret api_encryption_key_nspkitchen
# More detailed log (for troubleshooting only)
#logger:
#  level: VERBOSE
climate:
  - id: !extend thermostat_embedded
    default_preset: eco
    on_boot_restore_from: memory #default_preset
    heat_deadband: .5 # turn on differential (.5 °C; 1 °F)
    heat_overrun: .5 # turn off differential / idle (.5 °C; 1 °F)
    preset:
      - name: sleep
        default_target_temperature_low: 12.7 °C #55 °F
        mode: "heat"
      - name: eco
        default_target_temperature_low: 15.5 °C #60 °F
        mode: "heat" #heat_cool
      - name: comfort
        default_target_temperature_low: 17.7 °C #64 °F
        mode: "heat"
      - name: away
        default_target_temperature_low: 12.7 °C #55 °F
        mode: "heat"
      - name: "off"
        default_target_temperature_low: 18.3 °C #65 °F
        mode: "off"
##### My customization - End #####

-----------------------------------
Attempt at Fahrenheit Configuration
-----------------------------------
substitutions:
  ###### CHANGE ME START ######
  device_name: "nspkitchen" 
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password

  nextion_update_url: "http://homeassistant.local:8123/local/nspanel_us_land.tft"
  nextion_blank_url: "http://homeassistant.local:8123/local/nspanel_blank.tft.tft"

  ##### addon-configuration #####
  ## addon_climate ##
  heater_relay: "1" #Use relay 1
  temp_units: "°F" #Temperatures in Fahrenheit "°C"
  temp_min: "40" #Min supported temperature is 40°F
  temp_max: "80" #Max supported temperature is 80°F
  temp_step: "1" #Temperature granularity is 1°F
  min_off_time: "1"
  min_run_time: "1"
  min_idle_time: "0"
  #addon_climate_heater_relay: "1" 
  # possible values: 1/2

  ##### CHANGE ME END #####

packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Core package
      #- advanced/esphome/nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
      #- nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
      - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
    refresh: 300s #300s #1s

esp32:
  framework:
    type: esp-idf

##### My customization - Start #####
# Encrypt the communication between ESPHome and Home Assistant
#api:
#  encryption:
#    key: !secret api_encryption_key_nspkitchen
# More detailed log (for troubleshooting only)
#logger:
#  level: VERBOSE
climate:
  - id: !extend thermostat_embedded
    default_preset: eco
    on_boot_restore_from: memory #default_preset
    heat_deadband: 1 # turn on differential (.5 °C; 1 °F)
    heat_overrun: 1 # turn off differential / idle (.5 °C; 1 °F)
    preset:
      - name: sleep
        default_target_temperature_low: 55 °F #55 °F; 12.7 °C
        mode: "heat"
      - name: eco
        default_target_temperature_low: 60 °F #60 °F; 15.5 °C
        mode: "heat" #heat_cool
      - name: comfort
        default_target_temperature_low: 64 °F #64 °F; 17.7 °C
        mode: "heat"
      - name: away
        default_target_temperature_low: 55 °F #55 °F; 12.7 °C
        mode: "heat"
      - name: "off"
        default_target_temperature_low: 40 °F #40 °F; 4.44 °C
        mode: "off"
##### My customization - End #####

ESPHome logs

INFO ESPHome 2023.12.5
INFO Reading configuration /config/esphome/nspkitchen.yaml...
INFO Updating https://github.com/Blackymas/NSPanel_HA_Blueprint@main
INFO Updating https://github.com/esphome/esphome.git@pull/6051/head
INFO Detected timezone 'America/New_York'
Failed config

climate.thermostat: [source <unicode string>:36]

  default_target_temperature_low for Off is set to -7.777777777777779 which is less than the visual minimum temperature of 4.444444444444445.
  platform: thermostat
  name: nspkitchen Thermostat
  id: thermostat_embedded
  sensor: temp_nspanel
  min_idle_time: 0s
  visual: 
    min_temperature: 40 °F
    max_temperature: 80 °F
    temperature_step: 
      target_temperature: 0.5
      current_temperature: 0.1
  idle_action: 
    - switch.turn_off: relay_1
  default_preset: eco
  on_boot_restore_from: memory
  internal: False
  on_state: 
    - lambda: |-
        static const char *const TAG = "addon_climate_base.climate.thermostat_embedded.on_state";
        ESP_LOGD(TAG, "Starting");
        page_climate->execute();
        page_home->execute();
        ESP_LOGD(TAG, "Finished");
  min_heating_off_time: 1s
  min_heating_run_time: 1s
  heat_deadband: 1
  heat_overrun: 1
  heat_action: 
    - switch.turn_on: relay_1
  preset: 
    - name: Off
      default_target_temperature_low: 18 °F
      mode: off
    - name: Home
      default_target_temperature_low: 18 °F
      mode: heat
    - name: sleep
      default_target_temperature_low: 55 °F
      mode: heat
    - name: eco
      default_target_temperature_low: 60 °F
      mode: heat
    - name: comfort
      default_target_temperature_low: 64 °F
      mode: heat
    - name: away
      default_target_temperature_low: 55 °F
      mode: heat
    - name: off
      default_target_temperature_low: 40 °F
      mode: off

Home Assistant logs

No response

edwardtfn commented 7 months ago

Please try adding target_low: "60" to your substitutions, like this:

substitutions:
  ###### CHANGE ME START ######
  device_name: "nspkitchen" 
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password

  nextion_update_url: "http://homeassistant.local:8123/local/nspanel_us_land.tft"
  nextion_blank_url: "http://homeassistant.local:8123/local/nspanel_blank.tft.tft"

  ##### addon-configuration #####
  ## addon_climate ##
  heater_relay: "1" #Use relay 1
  temp_units: "°F" #Temperatures in Fahrenheit "°C"
  temp_min: "40" #Min supported temperature is 40°F
  temp_max: "80" #Max supported temperature is 80°F
  temp_step: "1" #Temperature granularity is 1°F
  min_off_time: "1"
  min_run_time: "1"
  min_idle_time: "0"
  target_low: "60"
  #addon_climate_heater_relay: "1" 
  # possible values: 1/2

  ##### CHANGE ME END #####

packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Core package
      #- advanced/esphome/nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
      #- nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
      - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
    refresh: 300s #300s #1s

esp32:
  framework:
    type: esp-idf

##### My customization - Start #####
# Encrypt the communication between ESPHome and Home Assistant
#api:
#  encryption:
#    key: !secret api_encryption_key_nspkitchen
# More detailed log (for troubleshooting only)
#logger:
#  level: VERBOSE
climate:
  - id: !extend thermostat_embedded
    default_preset: eco
    on_boot_restore_from: memory #default_preset
    heat_deadband: 1 # turn on differential (.5 °C; 1 °F)
    heat_overrun: 1 # turn off differential / idle (.5 °C; 1 °F)
    preset:
      - name: sleep
        default_target_temperature_low: 55 °F #55 °F; 12.7 °C
        mode: "heat"
      - name: eco
        default_target_temperature_low: 60 °F #60 °F; 15.5 °C
        mode: "heat" #heat_cool
      - name: comfort
        default_target_temperature_low: 64 °F #64 °F; 17.7 °C
        mode: "heat"
      - name: away
        default_target_temperature_low: 55 °F #55 °F; 12.7 °C
        mode: "heat"
      - name: "off"
        default_target_temperature_low: 40 °F #40 °F; 4.44 °C
        mode: "off"
##### My customization - End #####
JS1Dev commented 7 months ago

Thanks @edwardtfn, that allowed it to compile with Fahrenheit, but the only impact is that

edwardtfn commented 7 months ago

Ok, I will working on those. But I've split in different issues to keep it in under control: