TIP: Put documentation links in config files

When editing my config files I might need to refer to the documentation to refresh my memory about a component’s many options. A simple convenience is to put the documentation link in a comment. Here’s an example of a doc link for recorder (on line 96).

Link%20to%20doc%20page%20as%20comment%20in%20config%20file

I use Visual Studio Code so I can just CTRL+Click the link to quickly view the documentation.

2 Likes

I do this too, helps me and with my config on github hopefully points people back to the docs rather than just copy/pasting and not knowing why it works.

https://github.com/SilvrrGIT/HomeAssistant/blob/master/device_tracker.yaml#L9

This is a good tip but I only see this as perhaps a feature request for the default items that ship with Home Assistant.

How would that work for “http” though? The security pieces could refer to letsencrypt, duckdns, or something else.

It crossed my mind that this could be a Feature request (add links to the default config file created upon installation). However, users need not wait for its implementation and can easily add doc links wherever they feel it may serve as a convenience. Most (but not all) of Home Assistant’s doc links take the form of https://www.home-assistant.io/components/<TOPIC>/

1 Like