StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
620 stars 111 forks source link

[BUG] HA Beta: [discovery] is an invalid option for [shelly] #563

Closed SeraphimSerapis closed 3 years ago

SeraphimSerapis commented 3 years ago

Environment

Describe the bug

My config validation displays the following issue for my yaml-based ShellyForHASS configuration:

- Invalid config for [shelly]: [discovery] is an invalid option for [shelly]. Check: shelly->shelly->discovery. (See ?, line ?).

The same configuration works fine in 2021.5.X

Steps to Reproduce

I use the following configuration:

shelly:
  discovery: true
  version: true
  upgrade_switch: true
  sensors:
    - all
  devices:
    - id: !secret shelly_3em
      name: "3EM"
    - id: !secret shelly_gas
      name: "Basement Gas"

Expected behavior

No error message.

Screenshots

Traceback/Error logs

- Invalid config for [shelly]: [discovery] is an invalid option for [shelly]. Check: shelly->shelly->discovery. (See ?, line ?). 

Additional context

SeraphimSerapis commented 3 years ago

Okay, when removing discovery (since it defaults to true anyway) the validator starts to complain about Invalid config for [shelly]: [version] is an invalid option for [shelly]. Check: shelly->shelly->version. (See ?, line ?).. It seems like there is a change in 2021.6 that makes the config break when a custom component overwrites the domain of an existing integration.

SeraphimSerapis commented 3 years ago

Nevermind. I also commited the custom_components/shelly folder to my repo and now the errors are gone. Thanks for this great integration!