New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move yaml configuration to integration key for command_line #92824
Move yaml configuration to integration key for command_line #92824
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks great @gjohansson-ST 👍
One comment though, I'm not sure the configuration format you propose here is preferred over a simple list as used by for example the template integration:
- sensor:
... a sensor
- binary_sensor:
... a binary sensor
- sensor:
... another sensor
covers = [] | ||
if discovery_info: | ||
devices: dict[str, Any] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not keep using "devices" here, either call the dict "entities" or "covers"
@@ -1,7 +1,7 @@ | |||
{ | |||
"domain": "command_line", | |||
"name": "Command Line", | |||
"codeowners": [], | |||
"codeowners": ["@gjohansson-ST"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@frenck @MartinHjelmare Could we document a best practice for entity configuration in https://github.com/home-assistant/architecture/blob/master/adr/0007-integration-config-yaml-structure.md ? |
I wasn't sure but for |
I opened an architecture issue to discuss documenting a preferred YAML format for entities: home-assistant/architecture#906 |
Yes, but we don't need to be 100% compatible with the old format. It's also confusing because most of the platforms ignore the dictionary key, it's not used for either name fallback or as input for entity_id as I understand it? |
Agree, I think maybe it came before |
I'm setting this PR to draft, please mark it as ready for review when you've updated the schema @gjohansson-ST 👍 |
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Breaking change
Proposed change
Move yaml configuration to integration key for command_line
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: