Blackymas / NSPanel_HA_Blueprint

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

`Bug` How can I stop the Blackymass blueprint from updating to latest version when I do a update for ESPhome (QUESTION) #2152

Closed smarthomefamilyverrips closed 3 months ago

smarthomefamilyverrips commented 3 months ago

TFT Version

4.3.7

ESPHome Version

4.3.7

Blueprint Version

4.3.7

Panel Model

None

What is the bug?

As the subject says, now every time when I update ESPhome it also updates my NSpanel to the latest version of the Blackymass Blueprint, how do I prevent this from happening? Do I need to comment out something in the code?

Thanks Upfront!

Steps to Reproduce

N/A

Your Panel's YAML

substitutions:

###### CHANGE ME START ######

  device_name: "nsbathroom" 
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password

  nextion_update_url: "http://192.168.0.168:8123/local/nspanel_eu.tft" # URL to local tft File
#  nextion_update_url: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/nspanel_eu.tft" # URL to Github

  ##### addon-configuration #####
  ## addon_climate ##
  # addon_climate_heater_relay: "1" # possible values: 1/2

#  baud_rate: "115200" # requires 115200 if tft is installed but can be changed to 9600 if tft upload fails and nextion switches to 9600

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

##### DO NOT CHANGE ANYTHING! #####

packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Core package
      # - 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

##### DO NOT CHANGE ANYTHING! #####

##### My customization - Start #####

# Set IP address manually
wifi:
  networks:
    - id: !extend wifi_default
      manual_ip:
        static_ip: 192.168.0.102
        gateway: 192.168.0.1
        dns1: 8.8.8.8
        dns2: 8.8.4.4
        subnet: 255.255.255.0

# Custom Arduino framework enforcement 
esp32:
  framework:
    type: arduino      

##### My customization - End #####

ESPHome Logs

N/A

Home Assistant Logs

N/A

edwardtfn commented 3 months ago

On the remote_package, change from ref: main to ref: v4.3.7 (or any version you want to use). ref: main always points to the latest.

smarthomefamilyverrips commented 3 months ago

On the remote_package, change from ref: main to ref: v4.3.7 (or any version you want to use). ref: main always points to the latest.

Thank you @edwardtfn now you say it it makes total sense :) ....... Thanks again!

smarthomefamilyverrips commented 3 months ago

@edwardtfn after I update ESPhome to 2024.6.1 the "fix" you gave me for staying on v4.3.7 gives me the following error in logs when i try to read logs or validate the code

INFO ESPHome 2024.6.1 INFO Reading configuration /config/esphome/nsbathroom.yaml... ERROR Unexpected exception while reading configuration: Traceback (most recent call last): File "/usr/local/bin/esphome", line 8, in sys.exit(main()) ^^^^^^ File "/esphome/esphome/main.py", line 1079, in main return run_esphome(sys.argv) ^^^^^^^^^^^^^^^^^^^^^ File "/esphome/esphome/main.py", line 1057, in run_esphome config = read_config(dict(args.substitution) if args.substitution else {}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/esphome/esphome/config.py", line 1093, in read_config res = load_config(command_line_substitutions) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/esphome/esphome/config.py", line 947, in load_config return _load_config(command_line_substitutions) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/esphome/esphome/config.py", line 937, in _load_config return validate_config(config, command_line_substitutions) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/esphome/esphome/config.py", line 774, in validate_config config = do_packages_pass(config) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/esphome/esphome/components/packages/init.py", line 179, in do_packages_pass recursive_package = do_packages_pass(package_config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/esphome/esphome/components/packages/init.py", line 179, in do_packages_pass recursive_package = do_packages_pass(package_config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/esphome/esphome/components/packages/init.py", line 180, in do_packages_pass config = merge_config(recursive_package, config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/esphome/esphome/config_helpers.py", line 101, in merge_config return merge(full_old, full_new) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/esphome/esphome/config_helpers.py", line 52, in merge res[k] = merge(old[k], v) if k in old else v ^^^^^^^^^^^^^^^^ File "/esphome/esphome/config_helpers.py", line 52, in merge res[k] = merge(old[k], v) if k in old else v ^^^^^^^^^^^^^^^^ File "/esphome/esphome/config_helpers.py", line 52, in merge res[k] = merge(old[k], v) if k in old else v ^^^^^^^^^^^^^^^^ File "/esphome/esphome/config_helpers.py", line 58, in merge ids = { ^ File "/esphome/esphome/config_helpers.py", line 61, in if (v_id := v.get(CONF_ID)) and isinstance(v_id, str) ^^^^^ AttributeError: 'EStr' object has no attribute 'get'

So it means it also not let me update the device to latest ESPhome version, I did see there is a fix for this in v4.3.9 but for that I need to be on HA 2024.6.x and I not updated to this as it have some issues that will affect my installation. So how I can still access logs and do ESPhome update while staying on version v4.3.7 ?

edwardtfn commented 3 months ago

You can update the ESPHome part to v4.3.9 and stay with Blueprint v4.3.7. That should work just fine.

Or you can wait for ESPHome v2024.6.2 where a fix for that issue will probability be included.

smarthomefamilyverrips commented 3 months ago

thanks @edwardtfn !!! 🥇