KaufHA / kauf-rgb-switch

Files for the KAUF RGB Wall Switch
21 stars 8 forks source link

unable to update 22.10.2 -> 22.11.0/22.11.1 #5

Closed ThreeFN closed 1 year ago

ThreeFN commented 1 year ago

I've been unable to update to the latest esphome version(s), and receive the following error, any guidance would be greatly appreciated:

INFO Reading configuration /config/esphome/guestshowerfan.yaml...
INFO Updating https://github.com/KaufHA/common@None
Failed config

select: [source /config/esphome/.esphome/packages/7d0de4ae/kauf-rgbs.yaml:533]

  Component select cannot be loaded via YAML (no CONFIG_SCHEMA).
  - platform: template
    name: GuestShower Fan Relay Config
    id: select_relay
    optimistic: True
    options: 
      - Switched
      - Always On
      - Always Off
    initial_option: Switched
    restore_value: True
    entity_category: config
    icon: mdi:progress-question
    forced_hash: 3803457832
    forced_addr: 8
    global_addr: global_forced_addr
    on_value: 
      then: 
        - lambda: |-
            if      ( x == "Always On"  )   { id(relay).turn_on();  }
            else if ( x == "Always Off" )   { id(relay).turn_off(); }
            else if ( id(ui_switch).state ) { id(relay).turn_on();  }
            else      /* ui_switch off */   { id(relay).turn_off(); }
        - script.execute: script_save_changes
  - platform: template
    name: GuestShower Fan Button Config
    id: select_button
    optimistic: True
    options: 
      - Toggle on Press
      - Disabled
      - Toggle on Release
      - Toggle on Single Press
      - Toggle on Double Press
      - Toggle on Hold
      - Toggle on Release Without Hold
    restore_value: True
    entity_category: config
    icon: mdi:toggle-switch-off-outline
    forced_hash: 1841528035
    forced_addr: 6
    global_addr: global_forced_addr
    on_value: 
      - script.execute: script_save_changes
bkaufx commented 1 year ago

Delete the .esphome/packages and .esphome/external_components subdirectories within the ESPHome config directory.

I removed the custom number and select components since they weren't needed. For some reason you are stuck looking for those components in the custom folder and not using the stock components. I think this is an issue with the way ESPHome handles custom components. I'll try to see if I can do a pull request in ESPHome to fix this.

bkaufx commented 1 year ago

I went ahead and added the custom number/select back in, so this should be resolved either way. I'll wait until I can figure out why this is happening before removing them again.

ThreeFN commented 1 year ago

That rectified the update issue with my 3 switches, thank you kindly. I suspected something like that was at fault but wasn't sure what build/etc data to delete and figured it was worth raising a ticket.

KaufHA commented 1 year ago

I found a workaround for this, which is to always specify a tag for the common components github repo. That way, when the common components are updated the ESPHome dashboard will always download them to a new directory and the old one won't be interfering.