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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 48 additions & 31 deletions source/_components/emulated_hue.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -49,37 +49,54 @@ emulated_hue:
emulated_hue:
```

Configuration variables:

- **type** (*Optional*): The type of assistant which we are emulating. Either `alexa` or `google_home`, defaults to `google_home`. **This configuration option is deprecated and will be removed in a future release. It is no longer necessary to define type.**
- **host_ip** (*Optional*): The IP address that your Home Assistant installation is running on. If you do not specify this option, the component will attempt to determine the IP address on its own.
- **listen_port** (*Optional*): The port the Hue bridge API web server will run on. If not specified, this defaults to 8300. This can be any free port on your system.

- **advertise_ip** (*Optional*): If you need to override the IP address used for UPnP discovery. (For example, using network isolation in Docker)
- **advertise_port** (*Optional*): If you need to specifically override the advertised UPnP port.

- **upnp_bind_multicast** (*Optional*): Whether or not to bind the UPnP (SSDP) listener to the multicast address (239.255.255.250) or instead to the (unicast) host_ip address specified above (or automatically determined). The default is true, which will work for most situations. In special circumstances, like running in a FreeBSD or FreeNAS jail, you may need to disable this.

- **off_maps_to_on_domains** (*Optional*): The domains that maps an "off" command to an "on" command.

For example, if `script` is included in the list, and you ask Alexa to "turn off the *water plants* script," the command will be handled as if you asked her to turn on the script.

If not specified, this defaults to the following list:

- `script`
- `scene`

- **expose_by_default** (*Optional*): Whether or not entities should be exposed via the bridge by default instead of explicitly (see the 'emulated_hue' customization below). If not specified, this defaults to true. 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.

- **exposed_domains** (*Optional*): The domains that are exposed by default if `expose_by_default` is set to true. If not specified, this defaults to the following list:
- `switch`
- `light`
- `group`
- `input_boolean`
- `media_player`
- `fan`

- **entities** (*Optional*): Customization for entities.
{% configuration %}
type:
description: The type of assistant which we are emulating. Either `alexa` or `google_home`. **This configuration option is deprecated and will be removed in a future release. It is no longer necessary to define type.**
required: false
type: string
default: google_home
host_ip:
description: The IP address that your Home Assistant installation is running on. If you do not specify this option, the component will attempt to determine the IP address on its own.
required: false
type: string
listen_port:
description: The port the Hue bridge API web server will run on. This can be any free port on your system.
required: false
type: integer
default: 8300
advertise_ip:
description: If you need to override the IP address used for UPnP discovery. (For example, using network isolation in Docker)
required: false
type: string
advertise_port:
description: If you need to specifically override the advertised UPnP port.
required: false
type: integer
upnp_bind_multicast:
description: Whether or not to bind the UPnP (SSDP) listener to the multicast address (239.255.255.250) or instead to the (unicast) host_ip address specified above (or automatically determined). In special circumstances, like running in a FreeBSD or FreeNAS jail, you may need to disable this.
required: false
type: boolean
default: true
off_maps_to_on_domains:
description: The domains that maps an "off" command to an "on" command. For example, if `script` is included in the list, and you ask Alexa to "turn off the *water plants* script," the command will be handled as if you asked her to turn on the script.
required: false
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?

required: false
type: boolean
default: true
exposed_domains:
description: The domains that are exposed by default if `expose_by_default` is set to true.
required: false
type: list
default: [switch, light, group, input_boolean, media_player, fan]
entities:
description: Customization for entities.
required: false
type: list
{% endconfiguration %}

A full configuration sample looks like the one below.

Expand Down