From fa90b61554fe711a05ae1b4b226155d0b1f8837a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 1 Jul 2016 09:50:51 +0200 Subject: [PATCH 01/52] Add last name (as mentioned in 01a22f5) --- source/developers/credits.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/developers/credits.markdown b/source/developers/credits.markdown index 73f9fb9678a..257dd4f4cb5 100644 --- a/source/developers/credits.markdown +++ b/source/developers/credits.markdown @@ -48,7 +48,7 @@ This page contains a list of people who have contributed in one way or another t - [coteyr](https://github.com/coteyr/) - [Dale Higgs](https://github.com/dale3h) - [Dan Cinnamon](https://github.com/Cinntax) -- [Daniel](https://github.com/danielperna84) +- [Daniel Perna](https://github.com/danielperna84) - [Daniel Iversen](https://github.com/danielhiversen) - [Daniel J. Kemp](https://github.com/danieljkemp/) - [Dan Smith](https://github.com/kk7ds) From 99b9bb6efe25c7a829a6eedb1a874f066988e244 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 1 Jul 2016 15:55:44 +0200 Subject: [PATCH 02/52] Add new contributors --- source/developers/credits.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/developers/credits.markdown b/source/developers/credits.markdown index 257dd4f4cb5..fa2254bf2d9 100644 --- a/source/developers/credits.markdown +++ b/source/developers/credits.markdown @@ -24,12 +24,14 @@ This page contains a list of people who have contributed in one way or another t - [Alexander Fortin](https://github.com/shaftoe) - [Alex Harvey](https://github.com/infamy) - [Allan Glen](https://github.com/allanglen) +- [AlucardZero](https://github.com/AlucardZero) - [amorsillo](https://github.com/fignuts) - [Andrew](https://github.com/aoakeson) - [Andrew LeCody](https://github.com/aceat64) - [Andy Loughran](https://github.com/andylockran) - [andythigpen](https://github.com/andythigpen) - [Antonio Párraga Navarro](https://github.com/aparraga) +- [Ardetus](https://github.com/Ardetus) - [Ardi Mehist](https://github.com/omgapuppy) - [arsaboo](https://github.com/arsaboo/) - [Arthur Leonard Andersen](https://github.com/leoc) From 7d2a98c47bab04d6ff4944f7d682502d3ea2e647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Arnauts?= Date: Fri, 1 Jul 2016 18:59:25 +0200 Subject: [PATCH 03/52] Add effect attribute to light component (#603) --- source/_components/light.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/source/_components/light.markdown b/source/_components/light.markdown index c54acd0ebb6..747f5ab4a85 100644 --- a/source/_components/light.markdown +++ b/source/_components/light.markdown @@ -41,6 +41,7 @@ Turns one light on or multiple lights on using [groups]({{site_root}}/components | `color_name` | yes | A human readable string of a color name, such as `blue` or `goldenrod` or [`chucknorris`](http://stackoverflow.com/questions/8318911/why-does-html-think-chucknorris-is-a-color). If your browser can display it, so can Home Assistant. | `brightness` | yes | Integer between 0 and 255 for how bright the color should be. | `flash` | yes | Tell light to flash, can be either value `short` or `long`. *not supported by Wink +| `effect`| yes | Applies an effect such as `colorloop` or `random`. ### {% linkable_title Service `light.turn_off` %} From 91b24af1c6f44afb73f94c3267efe810eeec84e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Arnauts?= Date: Fri, 1 Jul 2016 19:01:09 +0200 Subject: [PATCH 04/52] Name corrections (#602) Add special character to my name, and a fellow Michael. --- source/developers/credits.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/developers/credits.markdown b/source/developers/credits.markdown index fa2254bf2d9..6ea9f724883 100644 --- a/source/developers/credits.markdown +++ b/source/developers/credits.markdown @@ -118,10 +118,10 @@ This page contains a list of people who have contributed in one way or another t - [Martin Hjelmare](https://github.com/MartinHjelmare) - [Matteo Lampugnani](https://github.com/t30) - [Matthew Treinish](https://github.com/mtreinish/) -- [Michael Arnauts](https://github.com/michaelarnauts) +- [Michaël Arnauts](https://github.com/michaelarnauts) - [Michael Auchter](https://github.com/auchter) - [Michael Gilbert](https://github.com/Zyell) -- [Michael Kuty](https://github.com/michaelkuty) +- [Michael Kutý](https://github.com/michaelkuty) - [Micha LaQua](https://github.com/milaq) - [miniconfig](https://github.com/miniconfig) - [molobrakos](https://github.com/molobrakos) From b19dd45b5bd9d3e557473a97455c0d0543bcb51b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 1 Jul 2016 19:17:26 +0200 Subject: [PATCH 05/52] Add icon --- source/_components/notify.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/notify.markdown b/source/_components/notify.markdown index 39ba50c756e..5fd4982b1f9 100644 --- a/source/_components/notify.markdown +++ b/source/_components/notify.markdown @@ -49,7 +49,7 @@ action: ### {% linkable_title Test if it works %} -A simple way to test if you have set up your notify platform correctly is to use **Call Service** from the **Developer Tools** to call your notify service. Choose your service (*notify/xyz*) from the list of **Available services:** and enter something like the sample below into the **Service Data** field and hit **CALL SERVICE**. +A simple way to test if you have set up your notify platform correctly is to use service developer tool icon **Services** from the **Developer Tools**. Choose your service (*notify/xyz*) from the list of **Available services:** and enter something like the sample below into the **Service Data** field and hit **CALL SERVICE**. ```json { From 4217e11db8dab90bdc3d716f3245ef3782c4a7a3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 1 Jul 2016 20:48:11 +0200 Subject: [PATCH 06/52] Renaming went wrong --- source/_posts/2016-07-01-tbd.markdown | 96 --------------------------- 1 file changed, 96 deletions(-) delete mode 100644 source/_posts/2016-07-01-tbd.markdown diff --git a/source/_posts/2016-07-01-tbd.markdown b/source/_posts/2016-07-01-tbd.markdown deleted file mode 100644 index 3a066b24796..00000000000 --- a/source/_posts/2016-07-01-tbd.markdown +++ /dev/null @@ -1,96 +0,0 @@ ---- -layout: post -title: "0.23: TBD (rename file too)." -description: "" -date: 2016-07-01 00:31:00 +0000 -date_formatted: "July 1, 2016" -author: Paulus Schoutsen -author_twitter: balloob -comments: true -categories: Release-Notes ---- - -It's time for Home Assistant 0.23 and it's full of goodies. It's also the release that bumps us over a 1000 tests and to 94% test coverage! Also our install issues on the Raspberry Pi and Synology have been resolved. - -This release brings support for two new ecosystems: [Envisalink] and [Homematic]. We can now also control your TV via HDMI using [HDMI-CEC] (which works on the Pi!) and another cool feature is the [persistent notifications] which allow you to add a notification to the frontend till dismissed. - -[Wink] support has been dramatically improved by migrating to the PubNub API. This allows Wink to push changes from their system to Home Assistant. This change came just in time as somehow our Wink integration was causing a lot of requests to their servers. Thanks to Wink for letting us know so we could solve it instead of blocking us. - -On the config side, you can now [store your passwords][secrets] in your OS keyring or just in a standalone file. We also got a new service to reload the core config so no reboots needed anymore after changing customize settings! - - - -- Support for [Envisalink] added ([alarm control panel][envi-alarm], [binary sensor][envi-binary-sensor], [sensor][envi-sensor]) ([@cinntax]) -- Support for [Homematic] added ([binary sensor][hm-binary-sensor], [light][hm-light], [rollershutter][hm-rollershutter], [sensor][hm-sensor], [switch][hm-switch]) ([@pvizeli], [@danielperna84]) -- New [HDMI-CEC] component ([@happyleavesaoc], [@lukas-hetzenecker]) -- Major rewrite of [Wink] which now pushes changes to Home Assistant ([@w1ll1am23]) -- Core: new add [reload core config service] ([@balloob]) -- Support for [persistent notifications] added ([@fabaff], [@balloob]) -- Garage door: [Z-Wave][zwave-garage-door] support added ([@turbokongen]) -- Rollershutter: [Z-Wave][zwave-rollershutter] support added ([@turbokongen]) -- Media Player: [Sony Bravia TV] now supported ([@aparraga]) -- Sensor: [Fixer.io] now supported ([@fabaff]) -- Garage door: Control any garage door using [Raspberry Pi GPIO pins] ([@kellerza]) -- Sensor: [OpenExchangeRates] support added ([@arsaboo]) -- Notify: [Pushover] now supports target device, sound, url and priority ([@dale3h]) -- Sensor: [Netatmo] now supports wind, battery and radio signals ([@Jypy]) -- Log successful and failed login attemps ([@fabaff]) -- Config: allow [extracting account info][secrets] into OS keyring or separate YAML file ([@kellerza]) -- Core: add option to not filter out duplicate states per entity ([@philipbl]) -- HTTP: Follow Mozilla SSL recommendations ([@danieljkemp], [@AlucardZero]) -- Light: [Z-Wave colorbulb][zwave-light] support added ([@armills]) -- Core: new elevation config option added ([@balloob]) -- Sensor: [OneWire] support extended with support for DS18S20, DS1822, DS1825 and DS28EA00 temperature sensors + support for bus masters which use fuse to mount device tree. ([@Ardetus]) -- Lock: [Vera] now supported ([@rhooper]) -- HTTP: Migrate to CherryPy WSGI server to fix install and runtime problems ([@balloob]) - -Breaking changes: - -- Homematic thermostat configuration has changed and now depends on the new [Homematic] component. - -[@AlucardZero]: https://github.com/AlucardZero/ -[@aparraga]: https://github.com/aparraga/ -[@Ardetus]: https://github.com/Ardetus/ -[@armills]: https://github.com/armills/ -[@arsaboo]: https://github.com/arsaboo/ -[@balloob]: https://github.com/balloob/ -[@cinntax]: https://github.com/cinntax/ -[@dale3h]: https://github.com/dale3h/ -[@danieljkemp]: https://github.com/danieljkemp/ -[@danielperna84]: https://github.com/danielperna84/ -[@fabaff]: https://github.com/fabaff/ -[@happyleavesaoc]: https://github.com/happyleavesaoc/ -[@Jypy]: https://github.com/Jypy/ -[@kellerza]: https://github.com/kellerza/ -[@lukas-hetzenecker]: https://github.com/lukas-hetzenecker/ -[@philipbl]: https://github.com/philipbl/ -[@pvizeli]: https://github.com/pvizeli/ -[@rhooper]: https://github.com/rhooper/ -[@turbokongen]: https://github.com/turbokongen/ -[@w1ll1am23]: https://github.com/w1ll1am23/ -[envi-alarm]: /components/alarm_control_panel.envisalink/ -[envi-binary-sensor]: /components/binary_sensor.envisalink/ -[envi-sensor]: /components/sensor.envisalink/ -[Envisalink]: /components/envisalink/ -[HDMI-CEC]: /components/hdmi_cec/ -[hm-binary-sensor]: /components/binary_sensor.homematic/ -[hm-light]: /components/light.homematic/ -[hm-rollershutter]: /components/rollershutter.homematic/ -[hm-sensor]: /components/sensor.homematic/ -[hm-switch]: /components/switch.homematic/ -[Homematic]: /components/homematic/ -[Netatmo]: /components/sensor.netatmo/ -[OneWire]: /components/sensor.onewire/ -[OpenExchangeRates]: /components/sensor.openexchangerates/ -[Pushover]: /components/notify.pushover/ -[secrets]: /topics/secrets/ -[Vera]: /components/lock.vera/ -[Wink]: /components/wink/ -[zwave-garage-door]: /components/garage_door.zwave/ -[zwave-light]: /components/light.zwave/ -[zwave-rollershutter]: /components/rollershutter.zwave/ -[Fixer.io]: /components/sensor.fixer/ -[persistent notifications]: /components/persistent_notification/ -[reload core config service]: /getting-started/customizing-devices/#reloading-customize -[Sony Bravia TV]: /components/media_player.braviatv/ -[Raspberry Pi GPIO pins]: /components/garage_door.rpi_gpio/ From 6c8ee2b04ca5950727f68e626c46880d64e8c0a7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 1 Jul 2016 20:59:00 +0200 Subject: [PATCH 07/52] Rename blog post --- ...-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename source/_posts/{2016-07-01-envisalink-homematic-hdmi-cec-and-cherrypi.markdown => 2016-07-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown} (100%) diff --git a/source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-cherrypi.markdown b/source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown similarity index 100% rename from source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-cherrypi.markdown rename to source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown From 7005f10e291a74fbe6391b89b339ea7d2c865c8d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 1 Jul 2016 20:59:40 +0200 Subject: [PATCH 08/52] Update title and description --- ...-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown b/source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown index 22efbe70ac2..2793d5c52f1 100644 --- a/source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown +++ b/source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown @@ -1,7 +1,7 @@ --- layout: post -title: "0.23: Envisalink, Homematic, HDMI-CEC and CherryPi" -description: "This new release of Home Assistant contains support for Envisalink, Homematic and HDMI-CEC. Additionaly was the Wink support improved and CherryPi is the new WSGI server." +title: "0.23: Envisalink, Homematic, HDMI-CEC and Sony Bravia TV" +description: "This new release of Home Assistant contains support for Envisalink, Homematic, Sony Bravia TV and HDMI-CEC. Additionaly was the Wink support improved and CherryPy is the new WSGI server." date: 2016-07-01 00:31:00 +0000 date_formatted: "July 1, 2016" author: Paulus Schoutsen From a407e97f7767de879ef08ec181ccbaf0f95a27c7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 1 Jul 2016 21:03:20 +0200 Subject: [PATCH 09/52] Update link --- source/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/index.html b/source/index.html index 0aabf789962..a11cc9d1077 100644 --- a/source/index.html +++ b/source/index.html @@ -19,7 +19,7 @@ hide_github_edit: true Released: July 1, 2016
From 579f2390a791f502d0dc0962ad08bd7ee0ad2331 Mon Sep 17 00:00:00 2001 From: happyleavesaoc Date: Fri, 1 Jul 2016 16:19:07 -0400 Subject: [PATCH 10/52] Update hdmi_cec.markdown (#604) --- source/_components/hdmi_cec.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/source/_components/hdmi_cec.markdown b/source/_components/hdmi_cec.markdown index 2c2603ca89d..c0cf417d70b 100644 --- a/source/_components/hdmi_cec.markdown +++ b/source/_components/hdmi_cec.markdown @@ -28,6 +28,7 @@ The computer running Home Assistant must support CEC, and of course be connected ## {% linkable_title Configuration Example %} In the following example, a Pi Zero running Home Assistant is on a TV's HDMI port 1. HDMI port 2 is attached to a AV receiver. Three devices are attached to the AV receiver on HDMI ports 1 through 3. + ```yaml hdmi_cec: devices: From d8f1e22c64ce40c8be6585d4fc0fbed3e725609c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 2 Jul 2016 00:09:50 +0200 Subject: [PATCH 11/52] Move content from CONTRIBUTING.md --- source/developers/component_states.markdown | 22 +++++++++++++++++++ .../developers/component_visibility.markdown | 21 ++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 source/developers/component_states.markdown create mode 100644 source/developers/component_visibility.markdown diff --git a/source/developers/component_states.markdown b/source/developers/component_states.markdown new file mode 100644 index 00000000000..5e3217de263 --- /dev/null +++ b/source/developers/component_states.markdown @@ -0,0 +1,22 @@ +--- +layout: page +title: "Handling states" +description: "Instructions how to handle states with your component." +date: 2016-07-01 20:00 +sidebar: true +comments: false +sharing: true +footer: true +--- + +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](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/helpers/entity.py#L180). + diff --git a/source/developers/component_visibility.markdown b/source/developers/component_visibility.markdown new file mode 100644 index 00000000000..340e54f8afd --- /dev/null +++ b/source/developers/component_visibility.markdown @@ -0,0 +1,21 @@ +--- +layout: page +title: "Handling visibility" +description: "Instructions how to handle visibility with your component." +date: 2016-07-01 20:00 +sidebar: true +comments: false +sharing: true +footer: true +--- + +Generally, when creating a new entity for Home Assistant you will want it to be a class that inherits the [homeassistant.helpers.entity.Entity](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/helpers/entity.py) 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. + +```python +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). From f4b14e456dde864d50296d117b34827111adb0c1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 2 Jul 2016 00:14:22 +0200 Subject: [PATCH 12/52] Add content from CONTRIBUTING.md --- source/developers/frontend.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/developers/frontend.markdown b/source/developers/frontend.markdown index d6c2f759c9b..5b1bd012b40 100644 --- a/source/developers/frontend.markdown +++ b/source/developers/frontend.markdown @@ -29,6 +29,8 @@ http: development: 1 ``` +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: ```bash From a5b18a0267f94fca24e4a061986538b845e73345 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 2 Jul 2016 00:18:00 +0200 Subject: [PATCH 13/52] Move content from CONTRIBUTING.md and split existing content --- .../asides/developers_navigation.html | 13 +++- source/developers/development.markdown | 19 +++++ .../development_catching_up.markdown | 35 +++++++++ .../developers/development_checklist.markdown | 19 +++++ .../development_environment.markdown | 77 +------------------ .../development_submitting.markdown | 26 +++++++ .../developers/development_testing.markdown | 48 ++++++++++++ 7 files changed, 161 insertions(+), 76 deletions(-) create mode 100644 source/developers/development.markdown create mode 100644 source/developers/development_catching_up.markdown create mode 100644 source/developers/development_checklist.markdown create mode 100644 source/developers/development_submitting.markdown create mode 100644 source/developers/development_testing.markdown diff --git a/source/_includes/asides/developers_navigation.html b/source/_includes/asides/developers_navigation.html index aec578230d7..420d3bb2b48 100644 --- a/source/_includes/asides/developers_navigation.html +++ b/source/_includes/asides/developers_navigation.html @@ -9,7 +9,16 @@
  • {% active_link /developers/architecture/ Architecture %}
  • {% active_link /developers/architecture_components/ Components %}
  • -
  • {% active_link /developers/development_environment/ Setup Dev Environment %}
  • +
+ +
  • + {% active_link /developers/development/ Starting with Development %} +
      +
    • {% active_link /developers/development_environment/ Setting up Environment %}
    • +
    • {% active_link /developers/development_submitting/ Submit your Work %}
    • +
    • {% active_link /developers/development_checklist/ Checklist %}
    • +
    • {% active_link /developers/development_testing/ Testing %}
    • +
    • {% active_link /developers/development_catching_up/ Catching up with Reality %}
  • @@ -26,6 +35,8 @@
  • {% active_link /developers/component_deps_and_reqs/ Requirements & Dependencies %}
  • {% active_link /developers/component_initialization/ Initialization %}
  • {% active_link /developers/component_events/ Handling events %}
  • +
  • {% active_link /developers/component_states/ States %}
  • +
  • {% active_link /developers/component_visibility/ Visibility %}
  • {% active_link /developers/component_generic_discovery/ Loading Platforms %}
  • {% active_link /developers/component_discovery/ Component Discovery %}
  • diff --git a/source/developers/development.markdown b/source/developers/development.markdown new file mode 100644 index 00000000000..dd073e52c3b --- /dev/null +++ b/source/developers/development.markdown @@ -0,0 +1,19 @@ +--- +layout: page +title: "Starting with Development" +description: "Everything to get you started developing for Home Assistant." +date: 2014-12-21 13:32 +sidebar: true +comments: false +sharing: true +footer: true +--- + +Home Assistant is built from the ground up to be easily-extensible by other developers using components. It uses [Python 3](https://www.python.org/) for the backend and [Polymer (Web components)](https://www.polymer-project.org/) for the frontend. + +Home Assistant is open-source and MIT licensed. The source can be found here: + + - [home-assistant](https://github.com/home-assistant/home-assistant) - Python server backend + - [home-assistant-js](https://github.com/home-assistant/home-assistant-js) - JavaScript backend powering the client + - [home-assistant-polymer](https://github.com/home-assistant/home-assistant-polymer) - Polymer UI + diff --git a/source/developers/development_catching_up.markdown b/source/developers/development_catching_up.markdown new file mode 100644 index 00000000000..cbcd959615a --- /dev/null +++ b/source/developers/development_catching_up.markdown @@ -0,0 +1,35 @@ +--- +layout: page +title: "Catching up with Reality" +description: "Update your fork with the latest commit." +date: 2016-07-01 20:00 +sidebar: true +comments: false +sharing: true +footer: true +--- + +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. + +```bash +# 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. Edit the file and resolving the lines between `<<<< | >>>>` +3. Add the modified file `git add ` or `git add .` +4. Continue rebase `git rebase --continue` +5. Repeat until you've resolved all conflicts. + +There is other workflows that is covered in detail in the [Github documentation](https://help.github.com/articles/fork-a-repo/). Add an additional `remote` after you clone your fork. + +```bash +$ git remote add upstream https://github.com/home-assistant/home-assistant.git +``` + +and then simply `git pull --rebase upstream dev`. + diff --git a/source/developers/development_checklist.markdown b/source/developers/development_checklist.markdown new file mode 100644 index 00000000000..bdbe205abc3 --- /dev/null +++ b/source/developers/development_checklist.markdown @@ -0,0 +1,19 @@ +--- +layout: page +title: "Checklist" +description: "Overview of the requirements for an improvment for Home Assistant." +date: 2016-07-01 20:00 +sidebar: true +comments: false +sharing: true +footer: true +--- + + +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](https://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](/developers/website/) for further information on contributing to [home-assistant.io](https://github.com/home-assistant/home-assistant.io). + diff --git a/source/developers/development_environment.markdown b/source/developers/development_environment.markdown index 63ed5a996d5..3dd791883ff 100644 --- a/source/developers/development_environment.markdown +++ b/source/developers/development_environment.markdown @@ -1,7 +1,7 @@ --- layout: page -title: "Setup Development" -description: "Everything to get you started developing for Home Assistant." +title: "Setup Development Environment" +description: "Setup your environment to start developing for Home Assistant." date: 2014-12-21 13:32 sidebar: true comments: false @@ -9,16 +9,6 @@ sharing: true footer: true --- -Home Assistant is built from the ground up to be easily-extensible by other developers using components. It uses [Python 3](https://www.python.org/) for the backend and [Polymer (Web components)](https://www.polymer-project.org/) for the frontend. - -Home Assistant is open-source and MIT licensed. The source can be found here: - - - [home-assistant](https://github.com/home-assistant/home-assistant) - Python server backend - - [home-assistant-js](https://github.com/home-assistant/home-assistant-js) - JavaScript backend powering the client - - [home-assistant-polymer](https://github.com/home-assistant/home-assistant-polymer) - Polymer UI - -### {% linkable_title 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. Visit the [the Home Assistant repository](https://github.com/home-assistant/home-assistant) first and click fork in the top right. @@ -34,66 +24,3 @@ On Windows you can use `python setup.py develop` instead of the setup script. After following these steps, running `hass` will invoke your local installation. -### {% linkable_title Testing your work %} - -Testing your work requires `tox` to be installed: - -```bash -$ pip3 install tox -``` - -### {% linkable_title Prevent Linter Errors %} - -Home Assistant enforces strict [PEP8 style](https://www.python.org/dev/peps/pep-0008/) 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. - -```bash -$ pip install flake8 flake8-docstrings -$ flake8 --install-hook -``` - -The flake8-docstrings extension will check docstrings according to [PEP257](https://www.python.org/dev/peps/pep-0257/) when running flake8. - -### {% linkable_title Submitting improvements %} - -Improvements to Home Assistant should be submitted one feature at a time using GitHub [pull requests](https://help.github.com/articles/using-pull-requests). - - 1. From your fork, create a new branch to hold your changes - `git checkout -b some-feature` - 2. Make the changes you want - 3. Test your changes and check for style violations - `tox` - 4. Commit the changes - `git add .` - `git commit -m "Added some-feature"` - 5. Push your committed changes back to your fork on GitHub - `git push origin HEAD` - 6. Follow [these steps](https://help.github.com/articles/creating-a-pull-request/) to create your pull request. - -### {% linkable_title 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. - -```bash -# 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. Edit the file and resolving the lines between `<<<< | >>>>` -3. Add the modified file `git add ` or `git add .` -4. Continue rebase `git rebase --continue` -5. Repeat until you've resolved all conflicts. - -### {% linkable_title Further reading %} - -- [Home Assistant Architecture](/developers/architecture/) -- [Frontend development](/developers/frontend/) -- [Creating a custom component](/developers/creating_components/) -- [Adding support for a new platform](/developers/add_new_platform/) -- [Rest API](/developers/api/) -- [Server-sent events](/developers/server_sent_events/) -- [Website](/developers/website/) -- [Home Assitant on Github - CONTRIBUTING.md](https://github.com/home-assistant/home-assistant/blob/dev/CONTRIBUTING.md) diff --git a/source/developers/development_submitting.markdown b/source/developers/development_submitting.markdown new file mode 100644 index 00000000000..8843ef45fb4 --- /dev/null +++ b/source/developers/development_submitting.markdown @@ -0,0 +1,26 @@ +--- +layout: page +title: "Submit your work" +description: "Submit your work as Pull Request for Home Assistant." +date: 2016-07-01 20:00 +sidebar: true +comments: false +sharing: true +footer: true +--- + +Improvements, fixes, and new features to Home Assistant should be submitted one feature at a time using GitHub [Pull Requests](https://help.github.com/articles/using-pull-requests). + + 1. From your fork, create a new branch to hold your changes + `git checkout -b some-feature` + 2. Make the changes you want, create a [new platform](/developers/add_new_platform/), develop a [new component](/developers/creating_components/), or fix [issues](https://github.com/home-assistant/home-assistant/issues). + 3. [Test your changes](/developers/development_testing/) and check for style violations + 4. Commit the changes if all [musts](/developers/development_checklist/) are covered. + `git add .` + `git commit -m "Added some-feature"` + 5. Consider to add tests to ensure that the code works. + 6. Push your committed changes back to your fork on GitHub + `git push origin HEAD` + 7. Follow [these steps](https://help.github.com/articles/creating-a-pull-request/) to create your pull request. + 8. Check for comments and suggestions on your Pull Request and keep an eye on the [CI output](https://travis-ci.org/home-assistant/home-assistant/). + diff --git a/source/developers/development_testing.markdown b/source/developers/development_testing.markdown new file mode 100644 index 00000000000..6845acfc617 --- /dev/null +++ b/source/developers/development_testing.markdown @@ -0,0 +1,48 @@ +--- +layout: page +title: "Testing your code" +description: "Make sure that your code passes the checks" +date: 2016-07-01 20:00 +sidebar: true +comments: false +sharing: true +footer: true +--- + +Home Assistant enforces strict [PEP8 style](https://www.python.org/dev/peps/pep-0008/) compliance on all code submitted. Every Pull Request is automatically tested with [Coveralls](https://coveralls.io/github/home-assistant/home-assistant) and [Travis CI](https://travis-ci.org/home-assistant/home-assistant) after it is created. + +### {% linkable_title 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. + +```bash +$ pip3 install tox +``` + +Start the test of your code with `tox`. + +```bash +$ 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. + +### {% linkable_title 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. + +```bash +$ pip3 install flake8 flake8-docstrings +$ flake8 --install-hook +``` + +The flake8-docstrings extension will check docstrings according to [PEP257](https://www.python.org/dev/peps/pep-0257/) when running flake8. + +### {% linkable_title 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. + From 82ae9703cd32c669efb25ac9baafdfa74dbb1a71 Mon Sep 17 00:00:00 2001 From: Mark Huson Date: Fri, 1 Jul 2016 18:50:32 -0400 Subject: [PATCH 14/52] Update basic.markdown (#605) --- source/getting-started/basic.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/source/getting-started/basic.markdown b/source/getting-started/basic.markdown index f598229c3cf..00c1aa9e488 100644 --- a/source/getting-started/basic.markdown +++ b/source/getting-started/basic.markdown @@ -18,6 +18,7 @@ homeassistant: # Location required to calculate the time the sun rises and sets latitude: 32.87336 longitude: 117.22743 + elevation: 100 # C for Celsius, F for Fahrenheit temperature_unit: C From 29d362f241d31fdb4f78bdd48ae13b5380ab99b9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 2 Jul 2016 15:18:39 +0200 Subject: [PATCH 15/52] Add surf --- source/getting-started/browsers.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/getting-started/browsers.markdown b/source/getting-started/browsers.markdown index 9993e54eceb..c0f7fbc084b 100644 --- a/source/getting-started/browsers.markdown +++ b/source/getting-started/browsers.markdown @@ -46,7 +46,7 @@ We would appreciate if you help to keep this page up-to-date and add feedback. | [elinks] | | fails | page with manifest and import | | [w3m] | 0.5.3 | fails | display the icon shown while loading HA | | [Epiphany] | 3.18.5 | works | | - +| [surf] | 0.7 | works | | ## {% linkable_title Android %} @@ -77,4 +77,5 @@ We would appreciate if you help to keep this page up-to-date and add feedback. [Lynx]: http://lynx.browser.org/ [elinks]: http://elinks.or.cz/ [w3m]: http://w3m.sourceforge.net/ -[Epiphany]: https://wiki.gnome.org/Apps/Web +[Epiphany]: https://wiki.gnome.org/Apps/Web +[surf]: http://surf.suckless.org/ From 5c611f602f5edb5bc2e988bfb224724b690426b2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 2 Jul 2016 16:51:17 +0200 Subject: [PATCH 16/52] Add comment --- source/getting-started/basic.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/getting-started/basic.markdown b/source/getting-started/basic.markdown index 00c1aa9e488..afae49f87e0 100644 --- a/source/getting-started/basic.markdown +++ b/source/getting-started/basic.markdown @@ -18,7 +18,9 @@ homeassistant: # Location required to calculate the time the sun rises and sets latitude: 32.87336 longitude: 117.22743 - elevation: 100 + + # Impacts weather/sunrise data (altitude above sea level) + elevation: 430 # C for Celsius, F for Fahrenheit temperature_unit: C From 2571eadc71a03aa6a80fb1a50f7e2c80eedaf944 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 2 Jul 2016 16:58:37 +0200 Subject: [PATCH 17/52] Add first FAQ --- ...envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown b/source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown index 2793d5c52f1..b3b95243bcd 100644 --- a/source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown +++ b/source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown @@ -48,6 +48,10 @@ Breaking changes: - Homematic thermostat configuration has changed and now depends on the new [Homematic] component. +FAQ: + +- `elevation: ` was introduced to the configuration for weather/sunrise data. For an existing [configurations][elevation] add the value shown in the warning `[homeassistant.config] Incomplete core config. Auto detected elevation: 665` to your `configuration.yaml` file. + [@AlucardZero]: https://github.com/AlucardZero/ [@aparraga]: https://github.com/aparraga/ [@Ardetus]: https://github.com/Ardetus/ @@ -94,3 +98,4 @@ Breaking changes: [reload core config service]: /getting-started/customizing-devices/#reloading-customize [Sony Bravia TV]: /components/media_player.braviatv/ [Raspberry Pi GPIO pins]: /components/garage_door.rpi_gpio/ +[elevation]: https://home-assistant.io/getting-started/basic/ From b78c4068f3c38cc0e9825a69a024f35793ca89cc Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 2 Jul 2016 10:28:45 -0700 Subject: [PATCH 18/52] Release 0.23.1 --- ...nk-homematic-hdmi-cec-and-sony-bravia-tv.markdown | 12 +++++++++--- source/index.html | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown b/source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown index b3b95243bcd..a26ff7ca61c 100644 --- a/source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown +++ b/source/_posts/2016-07-01-envisalink-homematic-hdmi-cec-and-sony-bravia-tv.markdown @@ -18,7 +18,7 @@ This release brings support for two new ecosystems: [Envisalink] and [Homematic] On the config side, you can now [store your passwords][secrets] in your OS keyring or just in a standalone file. We also got a new service to reload the core config so no reboots needed anymore after changing customize settings! - + - Support for [Envisalink] added ([alarm control panel][envi-alarm], [binary sensor][envi-binary-sensor], [sensor][envi-sensor]) ([@cinntax]) - Support for [Homematic] added ([binary sensor][hm-binary-sensor], [light][hm-light], [rollershutter][hm-rollershutter], [sensor][hm-sensor], [switch][hm-switch]) ([@pvizeli], [@danielperna84]) @@ -44,11 +44,17 @@ On the config side, you can now [store your passwords][secrets] in your OS keyri - Lock: [Vera] now supported ([@rhooper]) - HTTP: Migrate to CherryPy WSGI server to fix install and runtime problems ([@balloob]) -Breaking changes: +### {% linkable_title Breaking changes %} - Homematic thermostat configuration has changed and now depends on the new [Homematic] component. -FAQ: +### {% linkable_title Hotfix 0.23.1 - July 2 %} + +- Bump PyVera to 0.2.13 to fix traceback and pyvera thread dying related to bug ([@rhooper]) +- HTTP - SSL: Check for OP_NO_COMPRESSION support before trying to use it ([@AlucardZero]) +- Wink: Downgraded pubnub to work around pycryptodome conflicts ([@w1ll1am23]) + +### {% linkable_title FAQ %} - `elevation: ` was introduced to the configuration for weather/sunrise data. For an existing [configurations][elevation] add the value shown in the warning `[homeassistant.config] Incomplete core config. Auto detected elevation: 665` to your `configuration.yaml` file. diff --git a/source/index.html b/source/index.html index a11cc9d1077..0efff8aeb5e 100644 --- a/source/index.html +++ b/source/index.html @@ -15,8 +15,8 @@ hide_github_edit: true