mmakaay / esphome-xiaomi_bslamp2

ESPHome integration for the Xiaomi Mijia Bedside Lamp v2.
Other
204 stars 49 forks source link

Fail to compile ESPHome 2023.2.1 update #110

Closed rafjog closed 1 year ago

rafjog commented 1 year ago

With the ESPHome 2023.2.1 update, it fails to compile, showing the following errors:

WARNING The selected ESP-IDF framework version is not the recommended one. If there are connectivity or build issues please remove the manual version. WARNING The selected ESP-IDF framework version is not the recommended one. If there are connectivity or build issues please remove the manual version. Failed config

api: [source /config/esphome/.esphome/packages/c1741637/packages/core.yaml:49] reboot_timeout: 0s services:

mmakaay commented 1 year ago

It looks like you have a duplicate definition of things like the light component and bslamp2 component. So my guess here is that you have copied stuff from core-behavior.yaml into your device's yaml configuration file, but left the package packages/behavior_default.yaml in the packages: section. As a result, things are now defined twice, causing the You must assign an explicit ID to the parent component you want to use errors.

mmakaay commented 1 year ago

BTW: I tried compiling on the latest ESPHome and it worked, except for MQTT, which failed with a compile error. That seems to have broken in the ESPHome mqtt implementation (probably due to framework updates). But once I deleted the mqtt component from my config, I could compile.

rafjog commented 1 year ago

Ok, thanks, I'll take a look, the strange thing is that with previous versions of ESPHome, it compiled and I was able to install on the lamp.

rafjog commented 1 year ago

My code is: substitutions: name: bedside-lamp friendly_name: Bedside Lamp light_name: ${friendly_name} RGBWW Light light_mode_text_sensor_name: ${friendly_name} Light Mode default_transition_length: 800ms

packages: bslamp2: url: https://github.com/mmakaay/esphome-xiaomi_bslamp2 ref: dev files:

wifi: networks:

api:

ota:

light:

deleting packages/behavior_default.yaml keeps giving errors

mmakaay commented 1 year ago

Can you post your configuration surrounded by

``` three backticks before and after the code ```

You can also paste the code, select it and then click the < > icon in the editor toolbar. That will keep the structuring intact and makes it easier to try out your configuration on my system.

rafjog commented 1 year ago

Thanks for the answers. I have already fixed it by copying the packages code into the main code and sorting it and now it works 100%.

mmakaay commented 1 year ago

Wonderful! Enjoy the firmware.

stepek commented 1 year ago

@rafjog can you share some info how you fix this?