Custom component for home-assistant
- Optionally loads CustomUI files. [HA 0.53+]
- Specify a list of attributes to hide from
more-info
window. - Hide CustomUI - related attributes in
more-info
window. [HA 0.53+] - Add services for dynamic customization.
- Set the width and number of UI columns (Requires CustomUI 20180112+)
Put customizer
dir in <ha_config_dir>/custom_components/
configuration.yaml
options (all optional):
attribute | type | description |
---|---|---|
custom_ui [HA 0.53+] | local / hosted / debug version_tag |
Whether to fetch CustomUI files.local loads it from <config_dir>/www/custom_ui/state-card-custom-ui.html .hosted loads it from https://raw.githubusercontent.com/andrey-git/home-assistant-custom-ui/master/state-card-custom-ui.htmldebug loads it from https://raw.githubusercontent.com/andrey-git/home-assistant-custom-ui/master/state-card-custom-ui-dbg.htmlversion_tag (for example 20170830) loads a tagged version from 'https://github.com/andrey-git/home-assistant-custom-ui/releases/download/20170830/state-card-custom-ui.html' |
hide_attributes | List of strings | List of attributes to hide from more-info popups. (Requires CustomUI) |
columns | List of integers | Pixel widths at which to add the next column. Default value is [300, 600, 900, 1200] |
Example HA 0.53:
customizer:
custom_ui: local
hide_attributes:
- node_id
- value_index
columns: [350, 700, 1050, 1400, 1850, 2100]
The component exposes a set_attribute
service.
It sets (or clears) persistent attribute of an entity overriding any value set in code.
Like specifying it in homeassistant -> customize
YAML section.
Note that calling homeassistant.reload_core_config
service or changing customization via Config panel will reset overrides to their yaml state.
Service fields:
name | description | example |
---|---|---|
entity_id | Entity ID to set the attribute on | light.patio |
attribute | Name of the attribute to set | friendly_name |
value | (Optional) Value to set. Leave unspecified in order to clear set value. Note that when clearing attribute it will be empty (and not set-by-code) until next entity update | My light' |
For example you can call:
customizer.set_attribute({"entity_id": "light.patio", "attribute": "friendly_name", "value": "My Light"}) to change the light name