question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Addons with `schema: false` are broken in 2021.02.5

See original GitHub issue

Describe the issue

Home Assistant addons that does not specify configuration schema seems to be broken. All provided settings are filtered out.

https://developers.home-assistant.io/docs/add-ons/configuration/ documentation tells:

Key Type Required Description
schema dict no Schema for options value of the add-on. It can be false to disable schema validation and use custom options.

If addon uses schema: false it will not be able to read any configuration from options.json Example config here: https://github.com/ParadoxAlarmInterface/hassio-repository/blob/master/paradox_alarm_interface/config.json

Supervisor just strips all configuration options out.

I think bug was introduced with this change: https://github.com/home-assistant/supervisor/pull/2510/files

Steps to reproduce

  1. Update HA OS from 5.10 to 5.11
  2. Some plugins stop accepting configuration: https://github.com/ParadoxAlarmInterface/pai/issues/199

Enviroment details

  • Operating System:: RPI4 HA OS
  • Supervisor version:: 2021.02.5
  • Home Assistant version: 2021.2.1

Supervisor logs

Supervisor logs
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options LOGGING_FILE
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options LOGGING_LEVEL_CONSOLE
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options LOGGING_LEVEL_FILE
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options LOGGING_DUMP_PACKETS
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options LOGGING_DUMP_MESSAGES
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options LOGGING_DUMP_STATUS
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options LOGGING_DUMP_EVENTS
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options CONNECTION_TYPE
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options SERIAL_PORT
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options SERIAL_BAUD
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options IP_CONNECTION_HOST
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options IP_CONNECTION_PORT
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options IP_CONNECTION_PASSWORD
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options IP_CONNECTION_SITEID
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options IP_CONNECTION_EMAIL
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options IP_CONNECTION_PANEL_SERIAL
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options IP_CONNECTION_BARE
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options LIMITS
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options SYNC_TIME
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options PASSWORD
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options MQTT_ENABLE
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options MQTT_HOST
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options MQTT_PORT
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options MQTT_USERNAME
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options MQTT_PASSWORD
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options MQTT_RETAIN
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options MQTT_BIND_ADDRESS
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options MQTT_BIND_PORT
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options MQTT_HOMEASSISTANT_AUTODISCOVERY_ENABLE
21-02-08 20:36:01 WARNING (MainThread) [supervisor.addons.options] Unknown options MQTT_PUBLISH_STATUS
21-02-08 20:36:03 WARNING (MainThread) [supervisor.addons.options] Unknown options port

System Information

System Information
arch: aarch64
channel: stable
docker: 19.03.13
features:
- reboot
- shutdown
- services
- network
- hostname
- hassos
hassos: "5.11"
homeassistant: 2021.2.2
hostname: homeassistant
logging: info
machine: raspberrypi4-64
operating_system: Home Assistant OS 5.11
state: running
supervisor: 2021.02.6
supported: true
supported_arch:
- aarch64
- armv7
- armhf
timezone: Europe/Brussels

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:30 (14 by maintainers)

github_iconTop GitHub Comments

10reactions
mKeRixcommented, Feb 9, 2021

I would lobby for bringing the old behavior back as well - this change has broken the room-assistant add-on for a lot of users without warning (or at least I didn’t read anything about this before my users approached me on GitHub with the issue). Bringing the complex option tree under schema validation is quite difficult. Last time I tried I failed to depict the YAML tree using the schema correctly, which is the whole reason I disabled it.

I would be interested to hear more about the reasoning for this change.

EDIT:

Only nested arrays and dictionaries are supported with a deep of two size

This alone makes it impossible for me to write a schema for the room-assistant config. Only way to make it work is by making the application config YAML an inline document, which is a breaking change and isn’t great from a UX point of view imo.

EDIT 2:

According to a conversation on Discord this limitation doesn’t really exist and was more meant as a recommendation. That would make some parts of my previous arguments void, but it still doesn’t allow for some flexibility features such as polytypes. Writing a schema is also still a time consuming task for projects with bigger configs.

8reactions
yozik04commented, Feb 9, 2021

I really doubt if I will be able to create a valid json schema that would cover all the options I have in my addon. JSON schema format is so limited.

Read more comments on GitHub >

github_iconTop Results From Across the Web

@kickstartds/storybook-addon-jsonschema - npm
Displays associated JSON Schema documentation using a rich JSON Schema Explorer interface, and adds a validating JSON Code Editor with semantic ...
Read more >
Icecast metadata json - N.20 Sala e Tabacchi
Feb 05, 2021 · For feedback and patches, please contact us through the #raku IRC ... After the sources were shown, the json...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found