diff --git a/source/_cookbook/custom_ui_by_andrey-git.markdown b/source/_cookbook/custom_ui_by_andrey-git.markdown new file mode 100644 index 00000000000..cea9eeae1a2 --- /dev/null +++ b/source/_cookbook/custom_ui_by_andrey-git.markdown @@ -0,0 +1,12 @@ +--- +layout: page +title: "Custom UI light state-card by andrey-git" +description: "" +date: 2017-02-04 10:45 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: User Interface +ha_external_link: https://github.com/andrey-git/home-assistant-custom-ui +--- diff --git a/source/_includes/asides/developers_navigation.html b/source/_includes/asides/developers_navigation.html index e2906ef3985..d821918c437 100644 --- a/source/_includes/asides/developers_navigation.html +++ b/source/_includes/asides/developers_navigation.html @@ -58,6 +58,7 @@
  • {% active_link /developers/frontend_add_card/ Add State Card %}
  • {% active_link /developers/frontend_add_more_info/ Add More Info Dialog %}
  • {% active_link /developers/frontend_creating_custom_panels/ Add Custom Panels %}
  • +
  • {% active_link /developers/frontend_creating_custom_ui/ Add Custom UI %}
  • diff --git a/source/developers/frontend_creating_custom_ui.markdown b/source/developers/frontend_creating_custom_ui.markdown new file mode 100644 index 00000000000..b5ef37072e6 --- /dev/null +++ b/source/developers/frontend_creating_custom_ui.markdown @@ -0,0 +1,35 @@ +--- +layout: page +title: "Creating custom UI" +description: "Introduction to create custom ui for Home Assistant." +date: 2017-02-04 13:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_release: 0.38 +--- +If you would like to use your own [State card](/developers/frontend_add_card/) without merging your code into [home-assistant-polymer](https://github.com/home-assistant/home-assistant-polymer/) you can create your own implementation. + +- Put the element source file and its dependencies in `www/custom_ui/` directory under you homeassistant config. + +For example if creating a state card for the `light` domain named `my_custom_light_card` put `state-card-my_custom_light_card.html` in `www/custom_ui/`. + +That file should implement `` tag with Polymer. + +In `state-card-my_custom_light_card.html` you should use `` to import all the dependencies **not** used by Homeassistant UI. +Do not import any dependencies used by Homeassistant UI. +Importing those will work in `development: 1` mode, but will fail in production mode. + +- In the `customize:` section of `configuration.yaml` put `custom_ui_state_card: `. + +For example: +```yaml +homeassistant: + customize: + - entity_id: light + custom_ui_state_card: my_custom_light_card +``` + + +For more possibilities, see the [Custom UI section](/cookbook/#user-interface) on our Examples page.