Skip to content

Update emulated_hue configuration variable style #6429

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

Merged
merged 1 commit into from
Oct 2, 2018
Merged

Update emulated_hue configuration variable style #6429

merged 1 commit into from
Oct 2, 2018

Conversation

fredrikbaberg
Copy link
Contributor

@fredrikbaberg fredrikbaberg commented Oct 1, 2018

Description:
Update style of emulated_hue documentation to follow new configuration variables description.

Related to #6385.

Pull request in home-assistant (if applicable): home-assistant/home-assistant#

Checklist:

  • Branch: next is for changes and new documentation that will go public with the next home-assistant release. Fixes, changes and adjustments for the current release should be created against current.
  • The documentation follow the standards.

@ghost ghost added the to-do label Oct 1, 2018
type: list
default: [script, scene]
expose_by_default:
description: "Whether or not entities should be exposed via the bridge by default instead of explicitly (see the ‘emulated_hue’ customization below). Warning: If you have a lot of devices (more than 49 total across all exposed domains), you should be careful with this option. Exposing more devices than Alexa supports can result in it not seeing any of them. If you are having trouble getting any devices to show up, try disabling this, and explicitly exposing just a few devices at a time to see if that fixes it."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to quote this due to special character in text ("Warning:")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My apologies, @fredrikbaberg . I thought the quotes were going to be shown at the resulting page. Sorry you had to do unnecessary work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understood the documentation as both being possible, but the quotes are required when there are control characters (https://developers.home-assistant.io/docs/en/documentation_standards.html). The example I started to look at used quotes for everything (and of course I can't find that now, so either I misread or it's been updated).
After your comment regarding quotes I'm only using them where required, and this is my interpretation of "add a note" (see above link to documentation standards).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the paragraph you provided only covers the immediate user's YAML config files, not the descriptions for internal use (like this). "Add a note" implies informing a user that if he does not quote particular values in his config, it may be invalid.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Learning lot of new things this week, then I'll use quotes when needed in documentation.
You think the PR is OK as it is? Anything I should correct?

@fredrikbaberg fredrikbaberg changed the title Use updated configuration variable style Update emulated_hue configuration variable style Oct 2, 2018
Copy link
Contributor

@WofWca WofWca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I still find documentation a little fuzzy.
Maybe content starting from line 123 may be embedded in the main part as it's done here. On the other hand, there it says that variable sensors is a map with keys such as friendly_name, friendly_name_template, etc, which, in YAML representation, would look like this (or am I missing something?):

sensors:
  friendly_name: "Sun angle"
  friendly_name_template: "{{ states.sun.sun.attributes.elevation }}"

But it doesn't:

sensors:
  solar_angle:
    friendly_name: "Sun angle"
    unit_of_measurement: 'degrees'
    value_template: "{{ states.sun.sun.attributes.elevation }}"

Also the standard says (since home-assistant/developers.home-assistant#105) that

If you use map/list then you need to define keys:

But what if we use just a list of strings, like here (off_maps_to_on_domains variable)?

emulated_hue:
  host_ip: 192.168.1.186
  listen_port: 8300
  advertise_ip: 10.0.0.10
  advertise_port: 8080
  off_maps_to_on_domains:
    - script
    - scene

We don't need to specify any keys in that case.

WofWca referenced this pull request in home-assistant/developers.home-assistant Oct 2, 2018
@frenck frenck added enhancement current This PR goes into the current branch ready-for-review This PR needs to be reviewed Hacktoberfest An PR on this issue (or the PR itself) is eligible towards Hacktoberfest! and removed to-do labels Oct 2, 2018
@frenck
Copy link
Member

frenck commented Oct 2, 2018

@WofWca We have updated the documentation a little, to make it a little more consistent.
Would you be so kind to create an issue or PR with suggestions on the home-assitant/developers.home-assistant repo with your suggestions?

This allows us to keep the PR's flowing. Thx 👍

@frenck frenck self-assigned this Oct 2, 2018
@frenck
Copy link
Member

frenck commented Oct 2, 2018

@fredrikbaberg Thank you for this 👍

While there are some discussions on specific formatting (as discussed above), this is now "in-line" with the current documentation and therefore a step forward.

Whatever the discussion changes to the "standards", we would have to update a large part of our documentation anyways.

Happy Hacktoberfest 🎉

../Frenck

@frenck frenck merged commit cf8e4ae into home-assistant:current Oct 2, 2018
@ghost ghost removed the ready-for-review This PR needs to be reviewed label Oct 2, 2018
@fredrikbaberg fredrikbaberg deleted the update_emulated_hue_syntax branch October 4, 2018 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
current This PR goes into the current branch Hacktoberfest An PR on this issue (or the PR itself) is eligible towards Hacktoberfest!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants