From 0508a6bf2ef96bc267e19b139bdc42e9dfe7e841 Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 28 Aug 2017 18:04:21 +0300 Subject: [PATCH] Add customization config panel (#413) --- .../config/core/ha-config-section-themes.html | 2 +- .../config/customize/ha-config-customize.html | 89 ++++++ .../customize/ha-customize-attribute.html | 82 ++++++ .../ha-form-customize-attributes.html | 36 +++ .../config/customize/ha-form-customize.html | 277 ++++++++++++++++++ .../customize/types/ha-customize-array.html | 69 +++++ .../customize/types/ha-customize-boolean.html | 30 ++ .../customize/types/ha-customize-icon.html | 43 +++ .../types/ha-customize-key-value.html | 46 +++ .../customize/types/ha-customize-string.html | 33 +++ .../dashboard/ha-config-navigation.html | 6 + panels/config/ha-form-style.html | 2 +- panels/config/ha-panel-config.html | 7 + src/components/ha-attributes.html | 4 +- src/util/hass-attributes-util.js | 50 ++++ src/util/hass-util.html | 7 - 16 files changed, 772 insertions(+), 11 deletions(-) create mode 100644 panels/config/customize/ha-config-customize.html create mode 100644 panels/config/customize/ha-customize-attribute.html create mode 100644 panels/config/customize/ha-form-customize-attributes.html create mode 100644 panels/config/customize/ha-form-customize.html create mode 100644 panels/config/customize/types/ha-customize-array.html create mode 100644 panels/config/customize/types/ha-customize-boolean.html create mode 100644 panels/config/customize/types/ha-customize-icon.html create mode 100644 panels/config/customize/types/ha-customize-key-value.html create mode 100644 panels/config/customize/types/ha-customize-string.html create mode 100644 src/util/hass-attributes-util.js diff --git a/panels/config/core/ha-config-section-themes.html b/panels/config/core/ha-config-section-themes.html index 4735d32566..62995c0bc3 100644 --- a/panels/config/core/ha-config-section-themes.html +++ b/panels/config/core/ha-config-section-themes.html @@ -11,7 +11,7 @@ Set a theme - Choose 'default' to use whatever theme the backend chooses or pick a theme for this device. + Choose 'Backend-selected' to use whatever theme the backend chooses or pick a theme for this device. diff --git a/panels/config/customize/ha-config-customize.html b/panels/config/customize/ha-config-customize.html new file mode 100644 index 0000000000..b6e2472741 --- /dev/null +++ b/panels/config/customize/ha-config-customize.html @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + diff --git a/panels/config/customize/ha-customize-attribute.html b/panels/config/customize/ha-customize-attribute.html new file mode 100644 index 0000000000..b2d6e10763 --- /dev/null +++ b/panels/config/customize/ha-customize-attribute.html @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + diff --git a/panels/config/customize/ha-form-customize-attributes.html b/panels/config/customize/ha-form-customize-attributes.html new file mode 100644 index 0000000000..6076e774c2 --- /dev/null +++ b/panels/config/customize/ha-form-customize-attributes.html @@ -0,0 +1,36 @@ + + + + + + + + + diff --git a/panels/config/customize/ha-form-customize.html b/panels/config/customize/ha-form-customize.html new file mode 100644 index 0000000000..3773bee6ee --- /dev/null +++ b/panels/config/customize/ha-form-customize.html @@ -0,0 +1,277 @@ + + + + + + + + + + + + + + + diff --git a/panels/config/customize/types/ha-customize-array.html b/panels/config/customize/types/ha-customize-array.html new file mode 100644 index 0000000000..f92c6a633e --- /dev/null +++ b/panels/config/customize/types/ha-customize-array.html @@ -0,0 +1,69 @@ + + + + + + + + + + + diff --git a/panels/config/customize/types/ha-customize-boolean.html b/panels/config/customize/types/ha-customize-boolean.html new file mode 100644 index 0000000000..094ffd61da --- /dev/null +++ b/panels/config/customize/types/ha-customize-boolean.html @@ -0,0 +1,30 @@ + + + + + + + + diff --git a/panels/config/customize/types/ha-customize-icon.html b/panels/config/customize/types/ha-customize-icon.html new file mode 100644 index 0000000000..4a35c7aa4e --- /dev/null +++ b/panels/config/customize/types/ha-customize-icon.html @@ -0,0 +1,43 @@ + + + + + + + + + diff --git a/panels/config/customize/types/ha-customize-key-value.html b/panels/config/customize/types/ha-customize-key-value.html new file mode 100644 index 0000000000..8da1eaf5b5 --- /dev/null +++ b/panels/config/customize/types/ha-customize-key-value.html @@ -0,0 +1,46 @@ + + + + + + + + diff --git a/panels/config/customize/types/ha-customize-string.html b/panels/config/customize/types/ha-customize-string.html new file mode 100644 index 0000000000..de243aaf6f --- /dev/null +++ b/panels/config/customize/types/ha-customize-string.html @@ -0,0 +1,33 @@ + + + + + + + + diff --git a/panels/config/dashboard/ha-config-navigation.html b/panels/config/dashboard/ha-config-navigation.html index fab9232e7c..a02bc9eeaa 100644 --- a/panels/config/dashboard/ha-config-navigation.html +++ b/panels/config/dashboard/ha-config-navigation.html @@ -48,6 +48,12 @@ Polymer({ description: 'Validate your configuration file and control the server.', loaded: true, }, + { + domain: 'customize', + caption: 'Customization', + description: 'Customize you entities.', + loaded: true, + }, { domain: 'automation', caption: 'Automation', diff --git a/panels/config/ha-form-style.html b/panels/config/ha-form-style.html index b4bf334aed..db104ca8f1 100644 --- a/panels/config/ha-form-style.html +++ b/panels/config/ha-form-style.html @@ -12,7 +12,7 @@ } .form-group .form-control { - @apply(--layout-flex-1); + @apply(--layout-flex); } .form-group.vertical { diff --git a/panels/config/ha-panel-config.html b/panels/config/ha-panel-config.html index d6d2b876c6..676a43d0d7 100644 --- a/panels/config/ha-panel-config.html +++ b/panels/config/ha-panel-config.html @@ -12,6 +12,7 @@ +