From a5573e3565d02948efa0d9b43bc407a661e08375 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 1 Jul 2016 22:23:21 +0000 Subject: [PATCH] Site updated at 2016-07-01 22:23:20 UTC --- atom.xml | 2 +- blog/categories/community/atom.xml | 2 +- blog/categories/device-tracking/atom.xml | 2 +- blog/categories/esp8266/atom.xml | 2 +- blog/categories/how-to/atom.xml | 2 +- blog/categories/ibeacons/atom.xml | 2 +- blog/categories/internet-of-things/atom.xml | 2 +- blog/categories/mqtt/atom.xml | 2 +- blog/categories/organisation/atom.xml | 2 +- blog/categories/owntracks/atom.xml | 2 +- blog/categories/presence-detection/atom.xml | 2 +- .../public-service-announcement/atom.xml | 2 +- blog/categories/release-notes/atom.xml | 2 +- blog/categories/survey/atom.xml | 2 +- blog/categories/talks/atom.xml | 2 +- blog/categories/technology/atom.xml | 2 +- blog/categories/user-stories/atom.xml | 2 +- blog/categories/video/atom.xml | 2 +- blog/categories/website/atom.xml | 2 +- developers/add_new_platform/index.html | 13 +- developers/architecture/index.html | 13 +- developers/architecture_components/index.html | 13 +- developers/component_deps_and_reqs/index.html | 13 +- developers/component_discovery/index.html | 13 +- developers/component_events/index.html | 13 +- .../component_generic_discovery/index.html | 13 +- .../component_initialization/index.html | 13 +- developers/component_loading/index.html | 13 +- developers/component_states/index.html | 215 +++++++++++++++ developers/component_visibility/index.html | 214 +++++++++++++++ developers/creating_components/index.html | 13 +- developers/credits/index.html | 13 +- developers/development/index.html | 212 +++++++++++++++ developers/development_catching_up/index.html | 232 +++++++++++++++++ developers/development_checklist/index.html | 211 +++++++++++++++ developers/development_environment/index.html | 116 ++------- developers/development_submitting/index.html | 219 ++++++++++++++++ developers/development_testing/index.html | 245 ++++++++++++++++++ developers/frontend/index.html | 15 +- developers/frontend_add_card/index.html | 13 +- developers/frontend_add_more_info/index.html | 13 +- developers/helpers/index.html | 13 +- developers/index.html | 13 +- developers/multiple_instances/index.html | 13 +- developers/platform_example_light/index.html | 13 +- developers/platform_example_sensor/index.html | 13 +- developers/python_api/index.html | 13 +- developers/rest_api/index.html | 13 +- developers/server_sent_events/index.html | 13 +- developers/website/index.html | 13 +- sitemap.xml | 33 ++- 51 files changed, 1892 insertions(+), 144 deletions(-) create mode 100644 developers/component_states/index.html create mode 100644 developers/component_visibility/index.html create mode 100644 developers/development/index.html create mode 100644 developers/development_catching_up/index.html create mode 100644 developers/development_checklist/index.html create mode 100644 developers/development_submitting/index.html create mode 100644 developers/development_testing/index.html diff --git a/atom.xml b/atom.xml index 842a47c108..94c3ba70c3 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index e634f822df..671bbd0899 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index ac771c8eec..36777a4124 100644 --- a/blog/categories/device-tracking/atom.xml +++ b/blog/categories/device-tracking/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Device-Tracking | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index 35d2114d76..13ee5814ae 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index 58feea8742..008bf0ccb4 100644 --- a/blog/categories/how-to/atom.xml +++ b/blog/categories/how-to/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: How-To | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index 0a81f42e78..858e5116c9 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/internet-of-things/atom.xml b/blog/categories/internet-of-things/atom.xml index 4b28615b2a..270b6a9f2d 100644 --- a/blog/categories/internet-of-things/atom.xml +++ b/blog/categories/internet-of-things/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Internet-of-Things | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index 10295f874b..fc4646d31f 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index de6e354ad3..6365169329 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index 6917104086..e40d7a7ff1 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index c4c9921676..aa097a1fcf 100644 --- a/blog/categories/presence-detection/atom.xml +++ b/blog/categories/presence-detection/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Presence-Detection | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/public-service-announcement/atom.xml b/blog/categories/public-service-announcement/atom.xml index 09af8b49e4..664cd36998 100644 --- a/blog/categories/public-service-announcement/atom.xml +++ b/blog/categories/public-service-announcement/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Public-Service-Announcement | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index c9571c1b6d..bd0666cf23 100644 --- a/blog/categories/release-notes/atom.xml +++ b/blog/categories/release-notes/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Release-Notes | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index 4b1461b77b..3554343a12 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index 46c7c9b6f4..b932801ba1 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index f56150cd0a..ef370af24b 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index e270569680..e06ffe8d5e 100644 --- a/blog/categories/user-stories/atom.xml +++ b/blog/categories/user-stories/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: User-Stories | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index ba4ab19597..3a041a5a4c 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index d5789f2780..2e5ce89c99 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2016-07-01T20:20:20+00:00 + 2016-07-01T22:22:16+00:00 https://home-assistant.io/ diff --git a/developers/add_new_platform/index.html b/developers/add_new_platform/index.html index 574c3d8409..2bf5d68227 100644 --- a/developers/add_new_platform/index.html +++ b/developers/add_new_platform/index.html @@ -139,7 +139,16 @@ DEPENDENCIES = ['
  • Architecture
  • Components
  • -
  • Setup Dev Environment
  • + + +
  • + Starting with Development +
  • @@ -156,6 +165,8 @@ DEPENDENCIES = ['Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/architecture/index.html b/developers/architecture/index.html index d83ec00538..0bce7ca388 100644 --- a/developers/architecture/index.html +++ b/developers/architecture/index.html @@ -141,7 +141,16 @@ + +
  • + Starting with Development +
  • @@ -158,6 +167,8 @@
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/architecture_components/index.html b/developers/architecture_components/index.html index 7b76ef1b42..d85b3ace76 100644 --- a/developers/architecture_components/index.html +++ b/developers/architecture_components/index.html @@ -174,7 +174,16 @@ Diagram showing interaction between components and the Home Assistant core. + +
  • + Starting with Development +
  • @@ -191,6 +200,8 @@ Diagram showing interaction between components and the Home Assistant core.
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/component_deps_and_reqs/index.html b/developers/component_deps_and_reqs/index.html index 97eda5655a..dd330b6d9d 100644 --- a/developers/component_deps_and_reqs/index.html +++ b/developers/component_deps_and_reqs/index.html @@ -130,7 +130,16 @@ + +
  • + Starting with Development +
  • @@ -147,6 +156,8 @@
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/component_discovery/index.html b/developers/component_discovery/index.html index 8c968eb652..306bffd235 100644 --- a/developers/component_discovery/index.html +++ b/developers/component_discovery/index.html @@ -146,7 +146,16 @@ This option is only available to built-in components. + +
  • + Starting with Development +
  • @@ -163,6 +172,8 @@ This option is only available to built-in components.
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/component_events/index.html b/developers/component_events/index.html index 93c261bc9e..137129bc90 100644 --- a/developers/component_events/index.html +++ b/developers/component_events/index.html @@ -112,7 +112,16 @@ + +
  • + Starting with Development +
  • @@ -129,6 +138,8 @@
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/component_generic_discovery/index.html b/developers/component_generic_discovery/index.html index 2adc8e25d7..84dc7321c5 100644 --- a/developers/component_generic_discovery/index.html +++ b/developers/component_generic_discovery/index.html @@ -194,7 +194,16 @@ In the past, this was achieved by adding your component to the DISCOVERY_P + +
  • + Starting with Development +
  • @@ -211,6 +220,8 @@ In the past, this was achieved by adding your component to the DISCOVERY_P
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/component_initialization/index.html b/developers/component_initialization/index.html index 7e0d60593a..9797f37e50 100644 --- a/developers/component_initialization/index.html +++ b/developers/component_initialization/index.html @@ -158,7 +158,16 @@ + +
  • + Starting with Development +
  • @@ -175,6 +184,8 @@
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/component_loading/index.html b/developers/component_loading/index.html index e2d461a548..95d28b1b19 100644 --- a/developers/component_loading/index.html +++ b/developers/component_loading/index.html @@ -127,7 +127,16 @@ Home Assistant will use the directory that contains your config file as the dire + +
  • + Starting with Development +
  • @@ -144,6 +153,8 @@ Home Assistant will use the directory that contains your config file as the dire
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/component_states/index.html b/developers/component_states/index.html new file mode 100644 index 0000000000..b2b0722183 --- /dev/null +++ b/developers/component_states/index.html @@ -0,0 +1,215 @@ + + + + + + + + + + Handling states - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    + +
    + + +
    + + + + +
    +

    + Handling States +

    +
    +
    + + +

    It is the responsibility of the component to maintain the states of the devices in your domain. Each device should be a single state and, if possible, a group should be provided that tracks the combined state of the devices.

    + +

    A state can have several attributes that will help the frontend in displaying your state:

    + +
      +
    • friendly_name: this name will be used as the name of the device
    • +
    • entity_picture: this picture will be shown instead of the domain icon
    • +
    • unit_of_measurement: this will be appended to the state in the interface
    • +
    • hidden: This is a suggestion to the frontend on if the state should be hidden
    • +
    + +

    These attributes are defined in homeassistant.helpers.entity.

    + + + +
    + + +
    + + + + +
    +
    + + + + + + \ No newline at end of file diff --git a/developers/component_visibility/index.html b/developers/component_visibility/index.html new file mode 100644 index 0000000000..6867612723 --- /dev/null +++ b/developers/component_visibility/index.html @@ -0,0 +1,214 @@ + + + + + + + + + + Handling visibility - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    + +
    + + +
    + + + + +
    +

    + Handling Visibility +

    +
    +
    + + +

    Generally, when creating a new entity for Home Assistant you will want it to be a class that inherits the homeassistant.helpers.entity.Entity class. If this is done, visibility will be handled for you.
    +You can set a suggestion for your entity’s visibility by setting the hidden property by doing something similar to the following.

    + +
    +
    self.hidden = True
    +
    +
    +
    + +

    This will SUGGEST that the active frontend hides the entity. This requires that the active frontend support hidden cards (the default frontend does) and that the value of hidden be included in your attributes dictionary (see above). The Entity abstract class will take care of this for you.

    + +

    Remember: The suggestion set by your component’s code will always be overwritten by user settings in the configuration.yaml file. This is why you may set hidden to be False, but the property may remain True (or vice-versa).

    + + +
    + + +
    + + + + +
    +
    + + + + + + \ No newline at end of file diff --git a/developers/creating_components/index.html b/developers/creating_components/index.html index 9ad67b1b90..494ed5aa1c 100644 --- a/developers/creating_components/index.html +++ b/developers/creating_components/index.html @@ -129,7 +129,16 @@ + +
  • + Starting with Development +
  • @@ -146,6 +155,8 @@
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/credits/index.html b/developers/credits/index.html index 7d43356caa..6d866eb038 100644 --- a/developers/credits/index.html +++ b/developers/credits/index.html @@ -276,7 +276,16 @@ + +
  • + Starting with Development +
  • @@ -293,6 +302,8 @@
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/development/index.html b/developers/development/index.html new file mode 100644 index 0000000000..7c17a3355c --- /dev/null +++ b/developers/development/index.html @@ -0,0 +1,212 @@ + + + + + + + + + + Starting with Development - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    + +
    + + +
    + + + + +
    +

    + Starting With Development +

    +
    +
    + + +

    Home Assistant is built from the ground up to be easily-extensible by other developers using components. It uses Python 3 for the backend and Polymer (Web components) for the frontend.

    + +

    Home Assistant is open-source and MIT licensed. The source can be found here:

    + + + + + +
    + + +
    + + + + +
    +
    + + + + + + \ No newline at end of file diff --git a/developers/development_catching_up/index.html b/developers/development_catching_up/index.html new file mode 100644 index 0000000000..f7649d42cd --- /dev/null +++ b/developers/development_catching_up/index.html @@ -0,0 +1,232 @@ + + + + + + + + + + Catching up with Reality - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    + +
    + + +
    + + + + +
    +

    + Catching Up With Reality +

    +
    +
    + + +

    If you’re taking a while developing your feature and would like to catch up with what’s in the current Home Assistant dev branch, you can use git rebase to do so. This will pull the latest Home Assistant changes locally, rewind your commits, bring in the latest changes from Home Assistant and then replay all of your commits on top.

    + +
    +
    # Run this from your feature branch
    +$ git fetch upstream dev  # to pull the latest changes into a local dev branch
    +$ git rebase upstream/dev # to put those changes into your feature branch before your changes
    +
    +
    +
    + +

    If rebase detects conflicts, you can repeat the following process until all changes have been resolved:

    + +
      +
    1. git status will show you the file with the conflict.
    2. +
    3. Edit the file and resolving the lines between <<<< | >>>>
    4. +
    5. Add the modified file git add <file> or git add .
    6. +
    7. Continue rebase git rebase --continue
    8. +
    9. Repeat until you’ve resolved all conflicts.
    10. +
    + +

    There is other workflows that is covered in detail in the Github documentation. Add an additional remote after you clone your fork.

    + +
    +
    $ git remote add upstream https://github.com/home-assistant/home-assistant.git
    +
    +
    +
    + +

    and then simply git pull --rebase upstream dev.

    + + + +
    + + +
    + + + + +
    +
    + + + + + + \ No newline at end of file diff --git a/developers/development_checklist/index.html b/developers/development_checklist/index.html new file mode 100644 index 0000000000..cd325f6ee8 --- /dev/null +++ b/developers/development_checklist/index.html @@ -0,0 +1,211 @@ + + + + + + + + + + Checklist - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    + +
    + + +
    + + + + +
    +

    + Checklist +

    +
    +
    + + +

    After you finish your work:

    + +
      +
    • Check that all dependencies are included via the REQUIREMENTS variable in your platform/component and only imported inside functions that use them.
    • +
    • Add any new dependencies to requirements_all.txt if needed. Use script/gen_requirements_all.py.
    • +
    • Update the .coveragerc file to exclude your platform if there are no tests available or your new code uses a 3rd party library for communication with the device/service/sensor.
    • +
    • Provide some documentation for home-assistant.io. It’s OK to just add a docstring with configuration details (sample entry for configuration.yaml file and alike) to the file header as a start. Visit the website documentation for further information on contributing to home-assistant.io.
    • +
    + + + +
    + + +
    + + + + +
    +
    + + + + + + \ No newline at end of file diff --git a/developers/development_environment/index.html b/developers/development_environment/index.html index 545ed3f9ac..48002d7aa9 100644 --- a/developers/development_environment/index.html +++ b/developers/development_environment/index.html @@ -7,26 +7,26 @@ - Setup Development - Home Assistant + Setup Development Environment - Home Assistant - + - + - + - - + + @@ -83,25 +83,13 @@

    - Setup Development + Setup Development Environment


    -

    Home Assistant is built from the ground up to be easily-extensible by other developers using components. It uses Python 3 for the backend and Polymer (Web components) for the frontend.

    - -

    Home Assistant is open-source and MIT licensed. The source can be found here:

    - - - -

    Starting development

    - -

    You will need to set up a development environment if you want to start developing a new feature or component for Home Assistant. Please follow these steps to get setup.
    +

    You will need to set up a development environment if you want to start developing a new feature or component for Home Assistant. Please follow these steps to get setup.
    Visit the the Home Assistant repository first and click fork in the top right.

    We suggest that you setup a virtual environment using venv before running the setup script.

    @@ -118,81 +106,6 @@ $ script/setup

    After following these steps, running hass will invoke your local installation.

    -

    Testing your work

    - -

    Testing your work requires tox to be installed:

    - -
    -
    $ pip3 install tox
    -
    -
    -
    - -

    Prevent Linter Errors

    - -

    Home Assistant enforces strict PEP8 style compliance on all code submitted. You can save yourself the hassle of extra commits just to fix style errors by enabling the flake8 git commit hook. It will check your code when you attempt to commit to the repo. It will block the commit if there are any style issues, giving you a chance to fix it.

    - -
    -
    $ pip install flake8 flake8-docstrings
    -$ flake8 --install-hook
    -
    -
    -
    - -

    The flake8-docstrings extension will check docstrings according to PEP257 when running flake8.

    - -

    Submitting improvements

    - -

    Improvements to Home Assistant should be submitted one feature at a time using GitHub pull requests.

    - -
      -
    1. From your fork, create a new branch to hold your changes
      -git checkout -b some-feature
    2. -
    3. Make the changes you want
    4. -
    5. Test your changes and check for style violations
      -tox
    6. -
    7. Commit the changes
      -git add .
      -git commit -m "Added some-feature"
    8. -
    9. Push your committed changes back to your fork on GitHub
      -git push origin HEAD
    10. -
    11. Follow these steps to create your pull request.
    12. -
    - -

    Catching up with Reality

    - -

    If you’re taking a while developing your feature request and would like to catch up with what’s in the current Home Assistant dev branch, you can use git rebase to do so. This will pull the latest Home Assistant changes locally, rewind your commits, bring in the latest changes from Home Assistant and then replay all of your commits on top.

    - -
    -
    # Run this from your feature branch
    -$ git fetch upstream dev  # to pull the latest changes into a local dev branch
    -$ git rebase upstream/dev # to put those changes into your feature branch before your changes
    -
    -
    -
    - -

    If rebase detects conflicts, you can repeat the following process until all changes have been resolved:

    - -
      -
    1. git status will show you the file with the conflict.
    2. -
    3. Edit the file and resolving the lines between <<<< | >>>>
    4. -
    5. Add the modified file git add <file> or git add .
    6. -
    7. Continue rebase git rebase --continue
    8. -
    9. Repeat until you’ve resolved all conflicts.
    10. -
    - -

    Further reading

    - - @@ -215,7 +128,16 @@ $ git rebase upstream/dev # to put those changes into your feature branch before + +
  • + Starting with Development +
  • @@ -232,6 +154,8 @@ $ git rebase upstream/dev # to put those changes into your feature branch before
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/development_submitting/index.html b/developers/development_submitting/index.html new file mode 100644 index 0000000000..b4ab37806a --- /dev/null +++ b/developers/development_submitting/index.html @@ -0,0 +1,219 @@ + + + + + + + + + + Submit your work - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    + +
    + + +
    + + + + +
    +

    + Submit Your Work +

    +
    +
    + + +

    Improvements, fixes, and new features to Home Assistant should be submitted one feature at a time using GitHub Pull Requests.

    + +
      +
    1. From your fork, create a new branch to hold your changes
      +git checkout -b some-feature
    2. +
    3. Make the changes you want, create a new platform, develop a new component, or fix issues.
    4. +
    5. Test your changes and check for style violations
    6. +
    7. Commit the changes if all musts are covered.
      +git add .
      +git commit -m "Added some-feature"
    8. +
    9. Consider to add tests to ensure that the code works.
    10. +
    11. Push your committed changes back to your fork on GitHub
      +git push origin HEAD
    12. +
    13. Follow these steps to create your pull request.
    14. +
    15. Check for comments and suggestions on your Pull Request and keep an eye on the CI output.
    16. +
    + + + +
    + + +
    + + + + +
    +
    + + + + + + \ No newline at end of file diff --git a/developers/development_testing/index.html b/developers/development_testing/index.html new file mode 100644 index 0000000000..ed2eb21a1d --- /dev/null +++ b/developers/development_testing/index.html @@ -0,0 +1,245 @@ + + + + + + + + + + Testing your code - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    + +
    + + +
    + + + + +
    +

    + Testing Your Code +

    +
    +
    + + +

    Home Assistant enforces strict PEP8 style compliance on all code submitted. Every Pull Request is automatically tested with Coveralls and Travis CI after it is created.

    + +

    Local testing

    + +

    It’s highly recommanded to run tox before you create your Pull Request to avoid annoying fixes. Local testing requires tox to be installed.

    + +
    +
    $ pip3 install tox
    +
    +
    +
    + +

    Start the test of your code with tox.

    + +
    +
    $ tox
    +
    +
    +
    + +

    This will run unit tests against python 3.4 and 3.5 (if both are available locally), as well as run a set of tests which validate pep8 and pylint style of the code.

    + +

    You can optionally run tests on only one tox target using the -e option to select an environment.

    + +

    For instance tox -e lint will run the linters only, tox -e py34 will run unit tests only on python 3.4.

    + +

    Prevent Linter Errors

    + +

    You can save yourself the hassle of extra commits just to fix style errors by enabling the flake8 git commit hook. It will check your code when you attempt to commit to the repository. It will block the commit if there are any style issues, giving you a chance to fix it.

    + +
    +
    $ pip3 install flake8 flake8-docstrings
    +$ flake8 --install-hook
    +
    +
    +
    + +

    The flake8-docstrings extension will check docstrings according to PEP257 when running flake8.

    + +

    Notes on PyLint and PEP8 validation

    + +

    In case a PyLint warning cannot be avoided, add a comment to disable the PyLint check for that line. This can be done using the format # pylint: disable=YOUR-ERROR-NAME. Example of an unavoidable PyLint warning is if you do not use the passed in datetime if you’re listening for time change.

    + + + +
    + + +
    + + + + +
    +
    + + + + + + \ No newline at end of file diff --git a/developers/frontend/index.html b/developers/frontend/index.html index 7ef0213dad..e67124fc11 100644 --- a/developers/frontend/index.html +++ b/developers/frontend/index.html @@ -113,6 +113,8 @@ Do not use development mode in production. Home Assistant uses aggressive cachin +

    As everything is compiled into the file frontend.html you do not want to work with the compiled version but with the seperate files during development.

    +

    Next step is to get the frontend code. When you clone the Home Assistant repository, the frontend repository is not cloned by default. You can setup the frontend development environment by running:

    @@ -186,7 +188,16 @@ Polymer build architecture diagram + +
  • + Starting with Development +
  • @@ -203,6 +214,8 @@ Polymer build architecture diagram
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/frontend_add_card/index.html b/developers/frontend_add_card/index.html index ef2b61bb37..5caf981462 100644 --- a/developers/frontend_add_card/index.html +++ b/developers/frontend_add_card/index.html @@ -131,7 +131,16 @@ + +
  • + Starting with Development +
  • @@ -148,6 +157,8 @@
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/frontend_add_more_info/index.html b/developers/frontend_add_more_info/index.html index 78c6ffcd20..bad052b6a3 100644 --- a/developers/frontend_add_more_info/index.html +++ b/developers/frontend_add_more_info/index.html @@ -126,7 +126,16 @@ + +
  • + Starting with Development +
  • @@ -143,6 +152,8 @@
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/helpers/index.html b/developers/helpers/index.html index 75cfe683e2..1da2ffa278 100644 --- a/developers/helpers/index.html +++ b/developers/helpers/index.html @@ -120,7 +120,16 @@ + +
  • + Starting with Development +
  • @@ -137,6 +146,8 @@
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/index.html b/developers/index.html index e7889ce914..8905b73935 100644 --- a/developers/index.html +++ b/developers/index.html @@ -117,7 +117,16 @@ Diagram showing interaction between components and the Home Assistant core. + +
  • + Starting with Development +
  • @@ -134,6 +143,8 @@ Diagram showing interaction between components and the Home Assistant core.
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/multiple_instances/index.html b/developers/multiple_instances/index.html index 6a2b053926..080f33106b 100644 --- a/developers/multiple_instances/index.html +++ b/developers/multiple_instances/index.html @@ -145,7 +145,16 @@ Because each slave maintains its own Service Registry it is possible to have mul + +
  • + Starting with Development +
  • @@ -162,6 +171,8 @@ Because each slave maintains its own Service Registry it is possible to have mul
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/platform_example_light/index.html b/developers/platform_example_light/index.html index 6dbc6f5a21..c94d5c3ec7 100644 --- a/developers/platform_example_light/index.html +++ b/developers/platform_example_light/index.html @@ -199,7 +199,16 @@ _LOGGER = logging.getLogger(__name__) + +
  • + Starting with Development +
  • @@ -216,6 +225,8 @@ _LOGGER = logging.getLogger(__name__)
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/platform_example_sensor/index.html b/developers/platform_example_sensor/index.html index 0ef53ca2bd..94c808c88f 100644 --- a/developers/platform_example_sensor/index.html +++ b/developers/platform_example_sensor/index.html @@ -153,7 +153,16 @@ + +
  • + Starting with Development +
  • @@ -170,6 +179,8 @@
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/python_api/index.html b/developers/python_api/index.html index 78f459ce81..9b12d6b338 100644 --- a/developers/python_api/index.html +++ b/developers/python_api/index.html @@ -278,7 +278,16 @@ remote.call_service(api, domain, '< + +
  • + Starting with Development +
  • @@ -295,6 +304,8 @@ remote.call_service(api, domain, '<
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/rest_api/index.html b/developers/rest_api/index.html index 192f52f921..b47ae3843e 100644 --- a/developers/rest_api/index.html +++ b/developers/rest_api/index.html @@ -671,7 +671,16 @@ If your client does not support DELETE HTTP requests you can add an + +
  • + Starting with Development +
  • @@ -688,6 +697,8 @@ If your client does not support DELETE HTTP requests you can add an
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/server_sent_events/index.html b/developers/server_sent_events/index.html index 496af008ea..455f19e891 100644 --- a/developers/server_sent_events/index.html +++ b/developers/server_sent_events/index.html @@ -152,7 +152,16 @@ + +
  • + Starting with Development +
  • @@ -169,6 +178,8 @@
  • Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/developers/website/index.html b/developers/website/index.html index 271e05b6d0..28253749a3 100644 --- a/developers/website/index.html +++ b/developers/website/index.html @@ -176,7 +176,16 @@ That means that creating a new page is simple. The pages are written in
  • Architecture
  • Components
  • -
  • Setup Dev Environment
  • + + +
  • + Starting with Development +
  • @@ -193,6 +202,8 @@ That means that creating a new page is simple. The pages are written in Requirements & Dependencies
  • Initialization
  • Handling events
  • +
  • States
  • +
  • Visibility
  • Loading Platforms
  • Component Discovery
  • diff --git a/sitemap.xml b/sitemap.xml index 2402b331b3..769c22732f 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -351,6 +351,12 @@ https://home-assistant.io/developers/component_loading/ + + https://home-assistant.io/developers/component_states/ + + + https://home-assistant.io/developers/component_visibility/ + https://home-assistant.io/getting-started/configuration/ @@ -363,9 +369,24 @@ https://home-assistant.io/getting-started/customizing-devices/ + + https://home-assistant.io/developers/development/ + + + https://home-assistant.io/developers/development_catching_up/ + + + https://home-assistant.io/developers/development_checklist/ + https://home-assistant.io/developers/development_environment/ + + https://home-assistant.io/developers/development_submitting/ + + + https://home-assistant.io/developers/development_testing/ + https://home-assistant.io/getting-started/devices/ @@ -1880,26 +1901,26 @@ https://home-assistant.io/demo/frontend.html - 2016-07-01T20:19:42+00:00 + 2016-07-01T22:21:25+00:00 https://home-assistant.io/demo/index.html - 2016-07-01T20:19:42+00:00 + 2016-07-01T22:21:25+00:00 https://home-assistant.io/googlef4f3693c209fe788.html - 2016-07-01T20:19:42+00:00 + 2016-07-01T22:21:25+00:00 https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html - 2016-07-01T20:19:43+00:00 + 2016-07-01T22:21:25+00:00 https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html - 2016-07-01T20:19:43+00:00 + 2016-07-01T22:21:25+00:00 https://home-assistant.io/static/mdi-demo.html - 2016-07-01T20:19:43+00:00 + 2016-07-01T22:21:25+00:00