home-assistant / home-assistant.io

:blue_book: Home Assistant User documentation
https://www.home-assistant.io
Other
4.76k stars 7.18k forks source link

Use the new style for configuration variables description #6385

Closed fabaff closed 5 years ago

fabaff commented 5 years ago

A while back an advance way to describe the configuration variables was introduced.

{% configuration %}
api_key:
  description: The API key to access the service.
  required: true
  type: string
name:
  description: Name to use in the frontend.
  required: false
  default: The default name to use in the frontend.
  type: string
{% endconfiguration %}

At the moment not all platform and component documentation is ported to the new style.

This the tracking issue. Please don't close but add as a reference to your Pull request.

WofWca commented 5 years ago

Should we open individual PRs for each page changed?

fabaff commented 5 years ago

Yes, please or at least don't add 50 platforms to one Pull Request. If you want you can combine the changes for a component and its platforms.

If the Pull Requests are small it easier to spot for others which docs are in progress or already done.

WofWca commented 5 years ago

I think that the documentation, in accordance to which these changes must be done, is a bit outdated. home-assistant/developers.home-assistant#104

fabaff commented 5 years ago

@WofWca, Doc were updated. Please feel free to improve them if you think that something is not clear.. Thanks for the feedback, BTW.

WofWca commented 5 years ago

Opened a new issue home-assistant/developers.home-assistant#107

datafx commented 5 years ago

How would we handle this for something like modbus which has different required configuration variables depending whether you are using tcp or serial communication? Right now, the component actually has two different configuration variable sections.

tjorim commented 5 years ago

I'm currently checking all components. Here's a working list while I'm going through them.

Components I'm currently updating:

Components that needs to be updated:

Components that have not been checked yet. They have been checked to see if they contain {% configuration %}, which they don't. But they might just as well don't have a configuration section.

hmmbob commented 5 years ago

I tried finding some items I could help with, but it almost seems everything is done? Is there a way to find files that need help? Is there a list?

frenck commented 5 years ago

@hmmbob Configuration variables: is a good search string.

klaasnicolaas commented 5 years ago

44 files to go 😄

klaasnicolaas commented 5 years ago

After PR #7154 all the pages are done 😄

farmio commented 5 years ago

How should a configuration variable be described when it represents an enum (a string with only several acceptable values in my case)? Just type: string and all possible values listed in the description or type: string together with keys: key?

frenck commented 5 years ago

@farmio For YAML, it is still just a string...

frenck commented 5 years ago

The last PR, #7154 has been finished and merged.

Therefore, this issue can be closed! 🎉

Thank you all for your contributions. 👍 ❤️

A major shoutout to @klaasnicolaas who has done an impressive amount of PRs on this issue!🥇