Documentation for new customize format. (#1791)

* Documentation for new customize format.

* Fix bad paste

* glob support moved to entity_id key

* Bring back mention of the old customize format
This commit is contained in:
andrey-git 2017-01-29 01:30:22 +02:00 committed by Paulus Schoutsen
parent c693f7425a
commit 92853fa5c2

View File

@ -11,6 +11,8 @@ footer: true
By default, all of your devices will be visible and have a default icon determined by their domain. You can customize the look and feel of your front page by altering some of these parameters. This can be done by overriding attributes of specific entities. By default, all of your devices will be visible and have a default icon determined by their domain. You can customize the look and feel of your front page by altering some of these parameters. This can be done by overriding attributes of specific entities.
`customize` consists of a list of attribute customization blocks
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
homeassistant: homeassistant:
@ -18,6 +20,60 @@ homeassistant:
unit_system: metric unit_system: metric
# etc # etc
customize:
# Only the 'entity_id' is required. All other options are optional.
- entity_id: sensor.living_room_motion
hidden: true
- entity_id: thermostat.family_roomfamily_room
entity_picture: https://example.com/images/nest.jpg
friendly_name: Nest
- entity_id: switch.wemo_switch_1
friendly_name: Toaster
entity_picture: /local/toaster.jpg
- entity_id: switch.wemo_switch_2
friendly_name: Kitchen kettle
icon: mdi:kettle
- entity_id: switch.rfxtrx_switch
assumed_state: false
```
### {% linkable_title Possible values %}
| Attribute | Description |
| --------- | ----------- |
| `friendly_name` | Name of the entity
| `hidden` | Set to `true` to hide the entity.
| `entity_picture` | Url to use as picture for entity
| `icon` | Any icon from [MaterialDesignIcons.com](http://MaterialDesignIcons.com). Prefix name with `mdi:`, ie `mdi:home`.
| `assumed_state` | For switches with an assumed state two buttons are shown (turn off, turn on) instead of a switch. By setting `assumed_state` to `false` you will get the default switch icon.
| `sensor_class` | Sets the [class of the sensor](/components/binary_sensor/), changing the device state and icon that is displayed on the UI (see below).
### {% linkable_title Advanced example %}
You can also specify attributes for all devices in a domain, use wildcards, use several entity IDs as a list or comma separated list.
```yaml
homeassistant:
customize:
- entity_id: sensor
icon: mdi:kettle # Give all sensor the kettle icon
- entity_id: light.family*
hidden: true # Hide all lights that have an ID starting with 'family'
- entity_id: switch.wemo_switch_1,switch.wemo_switch_2,switch.wemo_switch_3
entity_picture: /local/toaster.jpg # Set picture on multiple devices
```
Either `entity_id` must be present in each customization block.
### {% linkable_title Older format %}
In the previous version of customize format the keys were the IDs:
```yaml
homeassistant:
name: Home
unit_system: metric
# etc
customize: customize:
# Only the 'entity_id' is required. All other options are optional. # Only the 'entity_id' is required. All other options are optional.
sensor.living_room_motion: sensor.living_room_motion:
@ -31,24 +87,23 @@ homeassistant:
switch.wemo_switch_2: switch.wemo_switch_2:
friendly_name: Kitchen kettle friendly_name: Kitchen kettle
icon: mdi:kettle icon: mdi:kettle
switch.rfxtrx_switch: - entity_id: switch.rfxtrx_switch:
assumed_state: false assumed_state: false
``` ```
This format doesn't support comma-separated IDs, wildcards or domain matching.
### {% linkable_title Possible values %} The formats can't be mixed
```yaml
| Attribute | Description | # NOT A VALID CONFIGURATION
| --------- | ----------- | customize:
| `friendly_name` | Name of the entity sensor.living_room_motion:
| `hidden` | Set to `true` to hide the entity. hidden: true
| `entity_picture` | Url to use as picture for entity - entity_id: thermostat.family_roomfamily_room
| `icon` | Any icon from [MaterialDesignIcons.com](http://MaterialDesignIcons.com). Prefix name with `mdi:`, ie `mdi:home`. friendly_name: Nest
| `assumed_state` | For switches with an assumed state two buttons are shown (turn off, turn on) instead of a switch. By setting `assumed_state` to `false` you will get the default switch icon. ```
| `sensor_class` | Sets the [class of the sensor](/components/binary_sensor/), changing the device state and icon that is displayed on the UI (see below).
### {% linkable_title Reloading customize %} ### {% linkable_title Reloading customize %}
Home Assistant offers a service to reload the core configuration while Home Assistant is running called `homeassistant/reload_core_config`. This allows you to change your customize section and see it being applied without having to restart Home Assistant. To call this service, go to the <img src='/images/screenshots/developer-tool-services-icon.png' alt='service developer tool icon' class="no-shadow" height="38" /> service developer tools, select the service `homeassistant/reload_core_config` and click "Call Service". Home Assistant offers a service to reload the core configuration while Home Assistant is running called `homeassistant/reload_core_config`. This allows you to change your customize section and see it being applied without having to restart Home Assistant. To call this service, go to the <img src='/images/screenshots/developer-tool-services-icon.png' alt='service developer tool icon' class="no-shadow" height="38" /> service developer tools, select the service `homeassistant/reload_core_config` and click "Call Service".
<p class='note warning'> <p class='note warning'>