Compare commits

...

5778 Commits
0.14.1 ... 0.51

Author SHA1 Message Date
Paulus Schoutsen
adbcbe3a67 Merge pull request #8919 from home-assistant/release-0-51
0.51
2017-08-12 11:31:30 -07:00
Martin Hjelmare
eef3dda1e9 Fix SET_TEMPERATURE_SCHEMA in climate component (#8879)
* Require either temperature or high/low target temperatures.
* Add tests.
2017-08-12 10:57:10 -07:00
William Scanlon
08899ade00 Update python-wink version to fix Dome water valve bug. (#8923) 2017-08-12 10:57:10 -07:00
Philipp Schmitt
5814fdadd0 Update roombapy to 1.3.1 to avoid installing all the mapping dependencies (#8925) 2017-08-12 10:57:09 -07:00
cribbstechnologies
daf7d9ea7f fixing emulated hue issue and testing it (#8928)
* fixing emulated hue issue and testing it

* fixing hound issues

* I should probably stop using vim

* Check against dict directly instead of items.
2017-08-12 10:57:09 -07:00
Martin Hjelmare
956543ae1e Remove not needed call to update (#8930)
* This will ensure no I/O in entity properties.
2017-08-12 10:57:09 -07:00
Fabian Affolter
8523aaca64 Prepare for release 2017-08-10 23:26:19 +02:00
Fabian Affolter
e3236d1a3b Honor PEP8 naming convention (#8909)
* Honor PEP8 naming convention

* Update validator
2017-08-10 19:31:28 +02:00
Marcus Schmidt
d7e8616651 Added possibilities to use template in the command_line sensor (#8505)
* Added possibilities to use template in the command_line sensor

* Minor style guideline conforms

* Minor style guideline conforms

* Added new test for template rendering

* Minor style guideline conforms

* Minor style guideline conforms

* Fixed failing testcases

* Fix style violations

* fix code pretty
2017-08-10 18:52:52 +02:00
Fabian Affolter
c0663bf722 Add Shodan sensor (#8902) 2017-08-10 17:27:49 +02:00
Abílio Costa
d195fd47f7 Add new device tracker for Huawei Routers. (#8488)
* Add new device tracker for Huawei Routers.

	This was tested with the HG8247H model, used by Vodafone
	Portugal for the Fiber service.

* add to .coveragerc; remove import and space

* add comments and fix lint

* rename methods

* huawei_router: add constants to scanner class

* huawei_router: remove lock; use format() in string

* huawei_router: use tupple instead of member only class

* huawei_router: reduce min scan time

* huawei_router: lint

* huawei_router: lint

* huawei_router: add missing lines in imports

* huawei_router: correctly decode string after router firmware update

* Remove things that is done on core now
2017-08-10 17:01:52 +02:00
Erik Eriksson
e84ff61d4a Support media position and media duration (will display progressbar in ui) (#8904) 2017-08-10 16:56:34 +02:00
Anders Melchiorsen
317bc10ccb LIFX: improve performance of multi-light transitions (#8873)
* LIFX: improve performance of multi-light transitions

To avoid hub overload, the light.turn_on call will change each light
sequentially.

As LIFX has no hub we can safely increase performance by starting all
light transitions concurrently.

* Improve state updates after light changes

The light.turn_on call will set a new state and then immediately read it
back. However, reading the state of a LIFX light right after a state
change can still return the old value.

To handle this situation we have previously delayed the update request a
little while to allow a potential state change to settle. Because light
updates are now run in parallel, this delay might be too short when many
lights are set at once.

This commit introduces a per-light Lock to make it explicit when the
state cannot yet be trusted.

We must then do the state update ourselves. This was already done at the
end of a long transition and that code can be reused for also doing the
update at the start of a transition.
2017-08-10 10:29:04 +02:00
William Scanlon
1cb42087f9 Update simplisafe-python version (#8908) 2017-08-10 07:58:39 +02:00
karlkar
b035577cf5 Fix for Neato D3 Connected state obtaining (#8817) 2017-08-09 23:22:08 +02:00
Paulus Schoutsen
55c84eaee3 Update frontend 2017-08-09 00:47:29 -07:00
kfcook
eb6017e16c added support for setting/getting position of lutron caseta covers (#8898) 2017-08-09 06:57:32 +02:00
PhracturedBlue
19ee3c42b6 Add longer text strings to mailbox demo to test string truncation (#8893)
* Add longer text strings to mailbox demo to test string truncation in frontend

* Remove lorem ipsum txt file

* Use format instead of %
2017-08-08 23:37:16 +02:00
Aaron Bach
af70054692 Changed Pi-hole graphs from stacked bar to line (#8896) 2017-08-08 22:57:35 +02:00
Fabian Affolter
be94f6e939 Do not call update() in constructor (#8892) 2017-08-08 22:36:59 +02:00
Fabian Affolter
f513f6271e Do not call update() in constructor (#8878)
* Do not call update() in constructor

* Fix lint issues
2017-08-08 20:21:33 +02:00
Alexey
588b36dff2 Fix media_extractor for some sites (#8887) 2017-08-08 15:21:32 +02:00
Fabian Affolter
cc5893ed8b Upgrade youtube_dl to 2017.8.6 (#8880) 2017-08-08 11:53:19 +02:00
Fabian Affolter
124a6cc8c0 Change level (#8883) 2017-08-08 11:53:04 +02:00
Fabian Affolter
0fe4245620 Allow usage of colorlog 3.0.1 (#8885) 2017-08-08 10:16:04 +02:00
Aaron Bach
289c88ff71 Add RainMachine switch platform (#8827)
* Add RainMachine switch platform

* Updated requirements_all.txt

* Cleaning up CI and coverage results

* Small update to deal with older pylint

* Fixed small indentation-based error

* Added some more defensive try/except logic around calls

* I'm not a fan of importing a library multiple times :)

* Making PR-requested changes

* Fixed ref to positional parameter

* Attempting to fix broken linting

* Ignoring no-value-for-parameter pylint error
2017-08-08 09:49:25 +02:00
Fabian Affolter
57f3bed465 Do not call update() in constructor (#8881) 2017-08-08 06:52:27 +02:00
Oleksii Serdiuk
62e86270e6 RFLink: Add send_command service (#8876)
Add an optional extended description…
2017-08-07 17:37:30 +02:00
Philipp Schmitt
3aceca9d8a Add nuki lock'n'go and unlatch services and add attributes (#8687)
* Add lock'n'go service

* Add unlatch service

* Implement changes requested by @MartinHjelmare

* Fix service domain
2017-08-07 14:58:31 +02:00
Philipp Schmitt
e81b3f7bc0 Implement Roomba fan speed (#8863)
* Implement Roomba fanspeed

* Fix: fan_speed_list is always empty

* Log instead of raising an exception when incorrect fan speed has been provided

* Don't attempt to set any preference if fan speed is invalid
2017-08-06 23:43:33 +02:00
Andy Castille
cc6c2bf25e Fix spelling error and update link (#8869) 2017-08-06 21:18:44 +02:00
Paulus Schoutsen
9575cbde09 Consolidate config panels (#8857)
* Remove automation panel registration

* Move Z-Wave config API to config.zwave

* Remove no longer needed test

* Lint

* Update frontend
2017-08-06 12:05:34 -07:00
Paulus Schoutsen
4e79517971 Update mailbox panel icon 2017-08-06 11:51:58 -07:00
Tim Lyakhovetskiy
4ec4cfc44e Add Leviton Decora Smart WiFi Device Platform (#8529)
* Add Leviton Decora Smart WiFi Device Platform

* Decora WiFi Code Review Fixes
2017-08-06 11:30:28 -07:00
PhracturedBlue
d74f4eaf52 Add Initial Mailbox panel and sensor (#8233)
* Initial implementation of Asterisk Mailbox

* Rework asterisk_mbox handler to avoid using the hass.data hash.  Fix requirements.

* Handle potential asterisk server disconnect.  bump asterisk_mbox requirement to 0.4.0

* Use async method for mp3 fetch from server

* Add http as dependency

* Minor log fix. try to force Travis to rebuild

* Updates based on review

* Fix error handling as per review

* Fix error handling as per review

* Refactor voicemail into mailbox component

* Hide mailbox component from front page

* Add demo for mailbox

* Add tests for mailbox

* Remove asterisk_mbox sensor and replace with a generic mailbox sensor

* Fix linting errors

* Remove mailbox sensor.  Remove demo.mp3.  Split entity from platform object.

* Update mailbox test

* Update mailbox test

* Use events to indicate state change rather than entity last-updated

* Make mailbox platform calls async.  Fix other review concerns

* Rewrite mailbox tests to live at root level and be async.  Fixmailbox dependency on http

* Only store number of messages not content in mailbox entity
2017-08-06 11:19:47 -07:00
Paulus Schoutsen
5696e38dd6 Warn instead of raise on duplicate YAML key (#8834)
* Warn instead of raise on duplicate key

* Update test_yaml.py

* Lint

* Change to error
2017-08-06 10:47:19 -07:00
Eugenio Panadero
c6aaacbb08 Add new service clean_spot to vacuums (#8862)
* Add new service `clean_spot` to vacuums

    - Add as base component service, with associated support flag to make it optional
    - Implement on Demo vacuum
    - Implement on Xiaomi vacuum
    - Update tests for platforms Demo and Xiaomi
    - Change default icon for vacuums to `mdi:roomba`, but keep the one for the Xiaomi
    - (In a polymer PR: add new service to command toolbar in the 'more-info' card)

* Add `clean_spot` service description

* fix default properties for vacuum component
2017-08-06 10:23:22 -07:00
Fabian Affolter
d8ca04a4bc Do not call update() in constructor (#8859) 2017-08-06 10:21:55 -07:00
Paulus Schoutsen
ac9c1235bb Allow get local ip to work without internet (#8855) 2017-08-06 09:15:17 -07:00
Andrey Kupreychik
c49cce7243 Do not use pychromecast.Chromecast for Cast Groups (#8786)
* Do not use pychromecast.Chromecast for Cast Groups

pychromecast.Chromecast creates Chromecast instance with friendly_name and cast_type of the device and not of a group.
Which leads to collisions

* Update cast.py

* using hass.data

* Fixed and extended tests

* Line length in tests

* Lint in tests
2017-08-06 09:15:01 -07:00
John Arild Berentsen
99a20c845c Fix off_delay for zwave trigger sensors (#8864) 2017-08-06 18:31:32 +03:00
Kevin Fronczak
3723f67dc1 Added rounding to Google Wifi (#8866) 2017-08-06 18:29:52 +03:00
Fabian Affolter
b655fe6e04 Allow to set coordinates (#8858) 2017-08-06 15:20:51 +02:00
Fabian Affolter
24e9fa238a Upgrade pyasn1 to 0.3.2 and pyasn1-modules to 0.0.11 (#8856) 2017-08-06 15:20:13 +02:00
Charles Blonde
83afd12807 Add support to Dyson 360 Eye robot vacuum using new vacuum platform (#8852)
* Add support to Dyson 360 Eye robot vacuum using new vacuum platform

* Fix tests with Python 3.5

* Code review

* Code review - v2

* Code review - v3
2017-08-06 13:08:46 +02:00
Philipp Schmitt
82a7dffc03 Wi-Fi enabled Roomba support (#8825)
* Roomba vacuum component

* Update requirements and coveragerc

* Update error handling message

* Implement changes requested by @azogue

* Add missing import

* Don't wrap commands with functools.partial

* Refactoring

* Remove state attribute and use double quotes for log messages strings

* Remove unused constants

* Sorting

* Sorting + remove None arg from dict.get() calls

* Re-sort imports
2017-08-06 11:08:45 +02:00
Fabian Affolter
c11b6798dc Upgrade pylast to 1.9.0 (#8854) 2017-08-06 10:08:45 +02:00
Fabian Affolter
8e4c799ad1 Upgrade sqlalchemy to 1.1.13 (#8850) 2017-08-06 10:08:24 +02:00
Fabian Affolter
5059d4c54b Catch ConnectionRefusedError (#8844)
* Do not call update() in constructor

* Catch ConnectionRefusedError
2017-08-06 10:08:00 +02:00
Fabian Affolter
569d9764ab Do not call update() in constructor (#8847) 2017-08-06 10:07:45 +02:00
Fabian Affolter
058deb5be3 Make 'monitored_conditions' optional (#8848)
* Do not call update() in constructor

* Update tests
2017-08-06 10:07:22 +02:00
Fabian Affolter
cd36a71f64 Do not call update() in constructor (#8849)
* Do not call update() in constructor

* Fix pylint issues
2017-08-06 10:07:05 +02:00
Fabian Affolter
6832a2e642 Make 'monitored_conditions' optional (#8843)
* Do not call update() in constructor

* Make 'monitored_conditions' optional

* Update tests
2017-08-06 10:05:37 +02:00
Fabian Affolter
2c7b2fe19e Do not call update() in constructor (#8840) 2017-08-06 10:03:57 +02:00
Fabian Affolter
45ec7f6180 Upgrade sendgrid to 4.2.1 (#8839) 2017-08-06 10:03:32 +02:00
Fabian Affolter
cb8517834a Do not call update() in constructor. (#8837) 2017-08-06 10:03:09 +02:00
Jeroen ter Heerdt
f41ef5d727 Egardia (#8389)
* Added support for Egardia / Woonveilig alarm control panel

* Added support for Egardia / Woonveilig alarm control panel

* Added support for Egardia / Woonveilig alarms

* Updating egardia support with exception handling and other fixes

* Egardia platform, requirements file updated

* Fixing state checking

* Adding exception handling

* Removing unnecessary logging

* Removing unnecessary logging

* Updating to egardiadevice component 1.0.10

* Improving exception handling

* Adding implementation of egardiaserver for alarm triggered status

* Clean-up

* Fix my previous change
2017-08-05 22:04:00 +02:00
Eugenio Panadero
a221b10694 Update xiaomi vacuum tests and include in coverage (#8845)
* Fix tests for Demo vacuum platform (and increase coverage)

* increase coverage of xiaomi vacuum tests and include in coverage

Also little fixes

* remove print statement
2017-08-05 21:45:59 +02:00
Greg Laabs
6e1785173f History query and schema optimizations for huge performance boost (#8748)
* Add DEBUG-level log for db row to native object conversion

This is now the bottleneck (by a large margin) for big history queries, so I'm leaving this log feature in to help diagnose users with a slow history page

* Rewrite of the "first synthetic datapoint" query for multiple entities

The old method was written in a manner that prevented an index from being used in the inner-most GROUP BY statement, causing massive performance issues especially when querying for a large time period.

The new query does have one material change that will cause it to return different results than before: instead of using max(state_id) to get the latest entry, we now get the max(last_updated). This is more appropriate (primary key should not be assumed to be in order of event firing) and allows an index to be used on the inner-most query. I added another JOIN layer to account for cases where there are two entries on the exact same `last_created` for a given entity. In this case we do use `state_id` as a tiebreaker.

For performance reasons the domain filters were also moved to the outermost query, as it's way more efficient to do it there than on the innermost query as before (due to indexing with GROUP BY problems)

The result is a query that only needs to do a filesort on the final result set, which will only be as many rows as there are entities.

* Remove the ORDER BY entity_id when fetching states, and add logging

Having this ORDER BY in the query prevents it from using an index due to the range filter, so it has been removed.

We already do a `groupby` in the `states_to_json` method which accomplishes exactly what the ORDER BY in the query was trying to do anyway, so this change causes no functional difference.

Also added DEBUG-level logging to allow diagnosing a user's slow history page.

* Add DEBUG-level logging for the synthetic-first-datapoint query

For diagnosing a user's slow history page

* Missed a couple instances of `created` that should be `last_updated`

* Remove `entity_id` sorting from state_changes; match significant_update

This is the same change as 09b3498f41 , but applied to the `state_changes_during_period` method which I missed before. This should give the same performance boost to the history sensor component!

* Bugfix in History query used for History Sensor

The date filter was using a different column for the upper and lower bounds. It would work, but it would be slow!

* Update Recorder purge script to use more appropriate columns

Two reasons: 1. the `created` column's meaning is fairly arbitrary and does not represent when an event or state change actually ocurred. It seems more correct to purge based on the event date than the time the database row was written.
2. The new columns are indexed, which will speed up this purge script by orders of magnitude

* Updating db model to match new query optimizations

A few things here: 1. New schema version with a new index and several removed indexes
2. A new method in the migration script to drop old indexes
3. Added an INFO-level log message when a new index will be added, as this can take quite some time on a Raspberry Pi
2017-08-04 23:16:53 -07:00
Fabian Affolter
52cff83267 Upgrade aiohttp to 2.2.5 (#8828) 2017-08-04 23:14:05 -07:00
Paulus Schoutsen
e49b970665 Block dependencies that depend on enum34 (#8698)
* Block dependencies that depend on enum34

* Remove uninstalling enum34

* Update validation script

* Add constraints to tox.ini

* Upgrade yeelight to version that uses enum-compat

* Disable sensor.skybeacon

* Lint
2017-08-04 23:06:10 -07:00
Paulus Schoutsen
a0530d8b9c Update frontend 2 2017-08-04 23:02:07 -07:00
Paulus Schoutsen
99d4021f47 Update frontend 2017-08-04 22:58:19 -07:00
Charles Blonde
7f0d0607f1 Fix Dyson sensors if devices are configured without standby monitoring. Fixes #8569 (#8826)
Upgrade libpurecoolink libraries without unused enum34 dependency
2017-08-04 14:27:23 -07:00
Hellowlol
cf298c2435 Make HA discover sabnzbd and add it to the Configurator (#8634)
* Init discover sab.

* Fix hound errors

Nobody likes being hound at :(

* sabnzbd discovery says if ssl is active.

* Fixups after codereview.
2017-08-04 23:24:55 +02:00
Boyi C
77cdc833f0 Update yweather.py (#8820)
Fix missing weather unit support.
Move some weather code to their correct classes.
2017-08-04 17:22:38 +02:00
Eugenio Panadero
96f8c37dcd Xiaomi vacuum as platform of new vacuum component derived from ToggleEntity, and services (#8623)
* Xiaomi vacuum as component with switch, sensors and services

- Conversion from switch platform to async component.
- Add services proposed in #8416 to the new component, with shorter names.
- Add sensors for the vacuum robot as a selectable list from `battery`, `state`, `error`, `fanspeed`, `clean_time` and `clean_area` (the state attributes of the switch). The sensors don't poll, but listen to a signal to update the state, the switch fires this signal when updating.
- Assign default icons to sensors and the switch (`mdi:google-circles-group` looks like the robot!)

* path change in requirements_all (from switch platform to component)

* copy pasting is a bad habit

* services to the components services.yaml, modify .coveragerc

* review: use with multiple hosts, fix calls to async_add_devices, fix ranges for services

* `icon_for_battery_level` util method

* Xiaomi vacuum as platform of new component vacuum

- Created new component `vacuum` from a ToggleEntity.
- Add services `turn_on`, `turn_off`, `cleaning_play_pause`, `stop`, `return_to_base`, `locate`, `set_fanspeed` and `send_command`.
- Remove the main switch for the xiaomi vacuum (the toggable main entity is the switch).
- Add `support flags` for the common services
- Assign default icons to sensors and the switch (`mdi:google-circles-group` looks like the robot!)
- Move services descriptions to a yaml file for the new component.
- Update requirements_all.
- Update coveragerc.

* fix coveragerc

* fix battery icon helper to use more icons

* remove sensors, create properties and support flags for custom UI

* cleaning

* updated state_attrs for filtering in UI, renamed platform to simply `xiaomi`

* fix platform rename

* change fanspeed and expose `fanspeed_list` to use speed steps

* minor fixes

- Rename service `start_pause`
- Add 'Error' attribute only if `got_error`.
- Minor changes

* rename state attrs

* rename state attrs

* review changes: cut fan__speed, style changes, remove logging, and more

* add ATTR_COMMAND = 'command' to const

* pop entity_id from service data

* remove property accessor for vacuum object

* lint fix

* fix extra attrs names

* module level functions for calling the services

* params as optional keyword for `send_command`

* params as optional keyword for `send_command`, remove debug logs

* explicit parameters for `set_fan_speed` and `send_command`

* Demo platform for the vacuum component

* vacuum tests for the Demo platform

* some fixes

* don't omit vacuum

* vacuum tests for the Xiaomi platform

* fix test

* fix

* fix xiaomi test

* fix coveragerc

* test send command

* fix coveragerc

* fix string formatting

* The coverage is to low. It need 93% or more
2017-08-04 15:27:10 +02:00
Julian Kahnert
5b4e30cde3 geizhals sensor component (#8458)
* initial create of the geizhals component

* only .coveragerc, geizhals.py, and requirements_all.txt included
2017-08-04 12:11:33 +02:00
Paulus Schoutsen
d4dfb4d80c Polymer 2 (#8815)
* Update build for Polymer 2

* Update webcomponents polyfills/helpers

* Load ES5 class adapter when not in dev mode

* Update frontend
2017-08-03 23:46:57 -07:00
Andrey
c895f1f1db When Sonos gets a tts source - dont't show an image (#8777) 2017-08-03 17:39:11 +03:00
Haim Gelfenbeyn
944af9cd7d InfluxDB component improvements (#8633)
* Allow reporting some state attributes as tags to InfluxDB

Some state attributes should really be tags in InfluxDB. E.g.
it is helpful to be able to group by friendly_name, or add a custom
attribute like "location" and group by that. Graphs in Grafana are much
easier to read when friendly names are used, and not node ids.

This commit adds an optional setting to InfluxDB config:
'tags_attributes'. Any attribute on this list will be reported as tag
and not as field to InfluxDB.

* Allow overriding InfluxDB measurement for each reported item separately

Bundling all items with the same "unit of measurement" together does not
always makes sense. For example, both "relatively humidity" and "battery
level" are reported as "%", but I'd rather see them as separate
measurements in InfluxDB. This commit allows for 'influxdb_measurement'
attribute. When set on node, it will take precedence over the global
'override_measurement' and component-specific 'unit_of_measurement'.

* Minor updates to InfluxDB component improvements, as suggested by
@MartinHjelmare.

* Moved per-component config from 'customize' into 'influxdb'
configuration section. The following three sub-sections were added:
'component_config', 'component_config_domain' and
'component_config_glob'. The sole supported per-component attribute
at this point is 'override_measurement'.

* Lint

* Fixed mocked entity_ids in InfluxDB tests to be in domain.entity_id
format, to satisfy EntityValues requirements.

* Added tests for new InfluxDB configuration parameters

* Fixes to some docstrings
2017-08-03 16:26:01 +02:00
John Mihalic
f3e16ca304 Catch divide by zero errors when a sleep type is 0 (#8809)
Add an optional extended description…
2017-08-03 15:58:40 +02:00
Fabian Affolter
6de38cb941 Upgrade aiohttp to 2.2.4 (#8805) 2017-08-03 11:37:02 +02:00
Pascal Vizeli
8e51e66c9b Update numpy 1.13.1 (#8806)
* Update opencv.py

* Update requirements_all.txt
2017-08-03 11:36:50 +02:00
Matthew Treinish
57dfe378a1 Add mochad light component (#8476)
* Add mochad light component

This commit adds a new component to control x10 dimmers/lights with
mochad.

* Create comm_type and address constants

The comm_type and address conf constants are shared between all mochad
devices because they are required information used for configuring a
device. This commit moves the definition into const.py so they're
consistent between all component types.
2017-08-03 10:51:01 +02:00
Fabian Affolter
d8cded637c Revert "Upgrade aiohttp to 2.2.4"
This reverts commit 7c92f7e1ad.
2017-08-03 10:11:32 +02:00
Fabian Affolter
7c92f7e1ad Upgrade aiohttp to 2.2.4 2017-08-03 10:08:09 +02:00
Abílio Costa
ccf0559059 mqtt switch: add voluptuous for availability topic (#8797) 2017-08-03 07:18:18 +02:00
Paulus Schoutsen
2d38e70268 Merge branch 'polymer-build' into dev 2017-08-02 21:34:20 -07:00
Paulus Schoutsen
9dae1ca5c2 Update frontend 2017-08-02 21:34:04 -07:00
Luuk
6ac8caa857 Fix referencing unset variable in tado climate component (causes update to fail when tado zone is in manual mode) (#8723)
Add an optional extended description…
2017-08-02 15:07:03 +02:00
Fabian Affolter
39131d06ba Improvements (configuration and validation) (#8785) 2017-08-02 14:51:09 +02:00
Fabian Affolter
8a626e1572 Upgrade sphinx-autodoc-typehints to 1.2.1 (#8783)
Add an optional extended description…
2017-08-02 14:15:00 +02:00
Fabian Affolter
bc376f7045 Upgrade pyasn1 to 0.3.1 and pyasn1-modules to 0.0.10 (#8787) 2017-08-02 14:14:01 +02:00
Paulus Schoutsen
cad1de790e Build frontend with polymer-build 2017-08-02 01:46:08 -07:00
Sebastian Muszynski
32b7f4d16f Fixes UnboundLocalError: local variable 'setting' referenced before assignment (#8782) 2017-08-02 09:14:28 +02:00
Steve Rhoades
1adb5040e7 Feature alexa launch request (#8730)
* Add support for LaunchRequest alexa intent

* Support LaunchRequest for multiple skills

* formatting

* adding tests to cover launch request

* formatting
2017-08-01 22:53:36 -07:00
Lukas Barth
47dad547eb Add 'forecast' ability to yr weather sensor (#8650)
* Add forecast option to YR sensor

* Fix some style issues

* Fix linting
2017-08-01 22:42:51 -07:00
thrawnarn
86c06ad76e New component: bluesound (#7192)
* New component: bluesound

* New component: bluesound

* Removed response.release()
Fixed update_sync_status bug
Changed should_poll to True

* Fix lint error

* Changes to init

* Fixed blank line

* updated requirements

* bump to xmltodict 0.11.0
2017-08-01 22:41:51 -07:00
pezinek
7dbcf63543 flux_led: support for property "available" (#8764)
* flux_led: support for property "available"

* Implemented changes from code review

* Implemented changes from code review

* Implemented changes from code review
2017-08-01 21:26:27 -07:00
Thomas Friedel
6ff340492b use updated osram lightify 1.0.6 component, including bugfix allowing more than 27 devices (#8774) 2017-08-01 20:36:31 +02:00
Fabian Affolter
50cd6c9a9c Catch exception (fixes #8724) (#8731) 2017-08-01 19:30:26 +02:00
Dan Sarginson
365f21b209 Honeywell fixes and improvements (#8756)
* Honeywell fixes and improvements

Give the Honeywell device a state ('On', 'Off', etc) that
can be displayed to user and understood by other components.
Previously this was always 'Unknown'. Update also raises a
state_changed event when a new temperature is polled.

These two together fix an issue (#8688) where Honeywell
climate data couldn't be logged in InfluxDB.

* Roll back some changes

These were not necessary to achieve the result I wanted.

* Renamed RoundThermostat's 'device' member for greater clarity

Now called 'client'

* Improve and simplify discovering thermostat mode

Per code review, this is a rather neater way to discover the thermostat mode

* Update tests for compatibility with new component

The tests previously relied upon the update() method being
called in the constructor. This is no longer the case.

* Address formatting review comment

Parens not necessary

* This system mode is not certain to apply to domestic hot water

Moved the mode lookup to only happen on update of radiator devices,
since hot water devices seem to be treated differently and I can't test.
2017-08-01 16:18:14 +02:00
Tsvi Mostovicz
075422e7ad Add support for file attachments in pushbullet (#8763)
* Add support for file attachments in pishbullet

* Check filepath is allowed
2017-08-01 14:55:46 +02:00
Steven Looman
342ec8ec99 mpd improvements (#8655)
* Don't require the MPD device to online during HASS startup

* Hide private variables

* Keep tox/flake8 happy

* Fix typo

* Force direct update

* Implement MpdDevice.available

* Fix typo
2017-07-31 23:18:26 -07:00
Matt Colyer
2b59b917c4 Allow sonos to select playlists as a source (#8258)
* Allow sonos to select playlists as a source

Most of this was taken from
https://github.com/home-assistant/home-assistant/issues/5598#issuecomment-278229895
however I made a few small improvements so that it works for other
services than Spotify and it should properly switch to playing the queue
if you had another song playing previously.

/cc @PatBoud

* Attempt to fix style issues

* More indent changes

* Fix misplaced period

* Move playlist replacement to function

* Privatize replace_queue_with_playlist and explain

* Remove unneeded decorator

* Fix doc formatting
2017-07-31 23:16:05 -07:00
viswa-swami
e40388e7ad Enable/Disable Motion detection for Foscam Cameras (#8582)
* Added support to enable/disable motion detection for foscam cameras. This support was added in 0.48.1 as a generic service for cameras. Motion detection can be enabled/disabled for foscam cameras with this code-set.

* Fixed the violation identified by hound-bot

* Fixed the comment posted by HoundCI-Bot regarding using imperative mood statement for pydocstyle

* Fixed the error that travis-ci bot found.

* As per comment from @balloob, Instead of directly using the URL to talk to foscam, used a 3rd party foscam library to communicate with it. This library already has support to enable/disable motion detection and also APIs to change the motion detection schedule etc. Need to add more support in the pyfoscam 3rd party library for checking if motion was detected or even if sound was detected. Once that is done, we can add that into HASS as well.

* Lint

* Removed the requests library import which is not used anymore

* Updating requirements_all.txt based on the code-base of home assistant that i have. Generated using the gen_requirements_all.py script

* Updating requirements_all.txt and requirements_test_all.txt generated by gen_requirements_all.py after latest pull from origin/dev

* Updated requirements_all.txt with script

* Updated the foscam camera code to fix lint errors

* Fixed houndci violation
2017-07-31 23:14:34 -07:00
William Scanlon
cb292a0b18 Wink discovery (#8739)
* Support for Wink discovery

* Switched try/except for if/else
2017-07-31 20:54:07 -07:00
Martin Hjelmare
33663f9502 Clean up remote component (#8728)
* Clean up remote component

* Don't have device be required in send_command service and method.
* Don't have entity_id be required in the base service schema.
* Don't always add activity in the data dict for a service call.
* Update harmony remote platform according to new service schema.
* Remove not needed properties and attributes from the Kira remote
  platform.
* Add send_command method to demo platform.
* Add tests and remove duplicate tests.

* Break out required argument as positional argument
2017-07-31 20:52:39 -07:00
emlt
e57d6f679a Change units from KW to W (#8761)
* Change units from KW to W

Change power unit from KW to W to be consistent with other energy sensors.

* Change units from kW to W
2017-07-31 20:41:45 -07:00
mjj4791
775185896a buienradar dates tz-aware (#8767) 2017-07-31 20:37:33 -07:00
Paulus Schoutsen
e6331aafb2 Merge remote-tracking branch 'origin/master' into dev 2017-07-31 18:30:40 -07:00
Paulus Schoutsen
fbb4c43353 Merge pull request #8757 from home-assistant/release-0-50-2
0.50.2
2017-07-31 18:28:14 -07:00
gwhiteCL
455ac9724a added invert_state optional parameter (#8695)
* added invert_state optional parameter

* removed superfluous parens

* moved state inversion to the is_closed method

* added relay_invert feature

* fixed syntax to comply with houndci-bot rules

* changed state_invert to invert_state and relay_invert to invert_relay
2017-07-31 20:24:21 -04:00
Alan Fischer
e6be560e00 Add toggle to remotes (#8483)
* Add toggle to remotes

* Only include activity if specified, and add service description
2017-07-31 19:46:12 +02:00
Adam Mills
59891fa838 Fix Z-Wave barrier discovery for new API (#8706) 2017-07-31 09:15:10 -07:00
Adam Mills
475ab68853 Correctly discover GE Fan Controllers (#8682) 2017-07-31 09:15:10 -07:00
Paulus Schoutsen
d3f8ad15a4 Version bump to 0.50.2 2017-07-31 09:14:07 -07:00
Sean Gollschewsky
c45fc84859 Move I/O outside of properties for light/tplink platform (#8699)
* Add new component for TPLink light bulbs.

* Update with result of gen_requirements_all.

* Add new component light.tplink.

* Move I/O outside of properties as per https://goo.gl/Nvioub.
2017-07-31 09:10:04 -07:00
Adam Mills
2a09ac017f Fix Kodi reconnection after websocket disconnect (#8704) 2017-07-31 09:10:04 -07:00
Paulus Schoutsen
f9e8d4237d Fix alexa cards (#8708) 2017-07-31 09:10:04 -07:00
Kevin Fronczak
30e16c97fc Fixed sensor issue with Google Wifi routers in bridge mode (#8710)
* Fixed issue with routers in bridge mode

- Router in brdige mode apparently don't report all of the stats
- Re-wrote the data_format function so it's a bit easier to follow and able to log keys that aren't supported by a router in a given mode
- Changed config so that it properly ignores conditions when not explicitly listed
- Added tests to check for the above and also to verify we log that a key doesn't exist rather than throwing an exception

* Mistakenly was calling MONITORED_CONDITIONS in data_format

- Changed to be the actual config values to prevent log error
2017-07-31 09:10:04 -07:00
Eugenio Panadero
0e1f664102 Retry set_webhook up to three times, reduce timeout to 5s again (#8716) 2017-07-31 09:10:04 -07:00
Fabian Affolter
60ca79ce35 Supress exception if host is not available (fixes #8684) (#8732) 2017-07-31 09:10:04 -07:00
Martin Hjelmare
f576b37e9f Fix tradfri error spam (#8738)
* Catch tradfri timout exception

* Remove not needed return statement

* Remove test logging

* Log warning instead of error
2017-07-31 09:10:04 -07:00
Nathan Henrie
592f9901f9 Fix typo (#8754) 2017-07-31 09:10:04 -07:00
Sean Gollschewsky
7991e2df5f Fix brightness issue #8744. (#8755) 2017-07-31 09:10:04 -07:00
Paulus Schoutsen
91b062f9b7 Update frontend 2017-07-31 09:06:50 -07:00
Sean Gollschewsky
9919eec596 Fix brightness issue #8744. (#8755) 2017-07-31 09:02:04 -07:00
Nathan Henrie
e525d13a5d Fix typo (#8754) 2017-07-31 09:00:09 -07:00
Martin Hjelmare
ce67be2fff Fix tradfri error spam (#8738)
* Catch tradfri timout exception

* Remove not needed return statement

* Remove test logging

* Log warning instead of error
2017-07-31 08:58:47 -07:00
Fabian Affolter
53048f71a0 Supress exception if host is not available (fixes #8684) (#8732) 2017-07-31 08:58:13 -07:00
Martin Donlon
164e953e8c New media_player platform for Russound devices using the RIO protocol (#8448)
* New media_player platform for Russound devices using the RIO protocol
Auto discovers zones and sources
Handles media metadata from sources that support it
asyncio implementation
Push updates for any zone or source changes so no polling required.

* Fixed up linting issues

* Addressing PR feedback

Updated russound_rio dependency to 0.1.3
Use enumerate_zones and enumerate_sources methods instead of doing it in
the platform.
Register callbacks in async_added_to_hass coroutine
Corrected behavior of async methods
2017-07-31 14:42:55 +02:00
David McNett
7156e4782e python-insteonplm module version bump (#8736)
Requiring python-insteonplm v0.7.5 (up from 0.7.4) now
2017-07-31 14:33:51 +02:00
Eugenio Panadero
37fef4016e Add proxy support for telegram_bot (#8717)
* Add proxy support for telegram_bot

New optional config parameters `proxy_url` and `proxy_params` (a dict)
```yaml
telegram_bot:
  platform: polling
  api_key: !secret telegram_bot_api_key
  allowed_chat_ids:
    - !secret telegram_bot_chatid
  proxy_url: socks5://proxy_ip:proxy_port
  proxy_params:
    username: my-username
password: my-secret-password
```

* change `ATTR_` for `CONF_` for config params
2017-07-30 12:08:19 +02:00
Eugenio Panadero
cee49f313f Retry set_webhook up to three times, reduce timeout to 5s again (#8716) 2017-07-30 11:14:28 +02:00
Eugenio Panadero
05330ac763 bump python-telegram-bot to 7.0.1 for fully support Bot API 3.2 (#8715) 2017-07-30 11:13:51 +02:00
Nicholas Sielicki
6884965c80 directv: add configuration glue for Genie slaves (#8713)
DirectPy, the third party library used for controlling directv boxes,
has the ability to accept an ID in order to act as a remote for Genie
slaves instead of just the master directv box. This commit adds glue
such that one can configure home assistant to interface with these slave
genie boxes.

Signed-off-by: Nicholas Sielicki <sielicki@yandex.com>
2017-07-30 10:17:56 +02:00
Adam Mills
e992527c68 Fix Kodi reconnection after websocket disconnect (#8704) 2017-07-29 21:55:08 -07:00
Sean Gollschewsky
431a381c8d Move I/O outside of properties for light/tplink platform (#8699)
* Add new component for TPLink light bulbs.

* Update with result of gen_requirements_all.

* Add new component light.tplink.

* Move I/O outside of properties as per https://goo.gl/Nvioub.
2017-07-29 21:53:37 -07:00
Paulus Schoutsen
22088d192a Fix alexa cards (#8708) 2017-07-29 21:52:26 -07:00
Kevin Fronczak
418a8bab11 Fixed sensor issue with Google Wifi routers in bridge mode (#8710)
* Fixed issue with routers in bridge mode

- Router in brdige mode apparently don't report all of the stats
- Re-wrote the data_format function so it's a bit easier to follow and able to log keys that aren't supported by a router in a given mode
- Changed config so that it properly ignores conditions when not explicitly listed
- Added tests to check for the above and also to verify we log that a key doesn't exist rather than throwing an exception

* Mistakenly was calling MONITORED_CONDITIONS in data_format

- Changed to be the actual config values to prevent log error
2017-07-29 21:50:02 -07:00
Adam Mills
a94e7ec25d Fix Z-Wave barrier discovery for new API (#8706) 2017-07-30 00:40:56 -04:00
Adam Mills
8ac63fd70c Remove deprecated sensor_class config options (#8702) 2017-07-29 19:46:27 -04:00
Adam Mills
8ba9e8016b Remove deprecated substitute interfaces (#8701) 2017-07-29 19:18:06 -04:00
Adam Mills
750ea44b4b Remove deprecated host and ssl logic from Kodi (#8700) 2017-07-29 19:17:41 -04:00
Paulus Schoutsen
5876d6766d Version bump to 0.50.1 2017-07-29 15:11:45 -07:00
Paulus Schoutsen
78428b0acd Version bump to 0.51.0.dev0 2017-07-29 13:33:52 -07:00
Paulus Schoutsen
72db28abac Merge remote-tracking branch 'origin/master' into dev 2017-07-29 13:33:15 -07:00
Paulus Schoutsen
e13fd05e7d Merge pull request #8685 from home-assistant/release-0-50
0.50
2017-07-29 13:28:22 -07:00
Adam Mills
80ab02c3e8 Correctly discover GE Fan Controllers (#8682) 2017-07-29 16:24:15 -04:00
Paulus Schoutsen
a760673ad6 Persist shopping list + clear completed (#8697) 2017-07-29 12:22:52 -07:00
Paulus Schoutsen
0bde0a6f3a Persist shopping list + clear completed (#8697) 2017-07-29 12:22:38 -07:00
Paulus Schoutsen
12dec93565 Update frontend 2017-07-29 12:18:50 -07:00
William Scanlon
c376bc2e45 Support for Wink local control (#8607)
* Support for Wink local control
2017-07-29 10:50:56 -07:00
Paulus Schoutsen
f0e5f68865 Shopping List: edit name / complete status (#8666)
* Shopping List: edit name / complete status

* Change ID to be UUID based
2017-07-29 10:50:56 -07:00
Paulus Schoutsen
56f4486e0b Update frontend 2017-07-29 10:45:14 -07:00
kfcook
d1b73a96f4 Added Lutron Caseta Scene Support (#8690)
* added scene support

* Updated pylutron_caseta version number

* Updated pylutron_caseta version number

* Fixed lint errors

* fix style
2017-07-29 18:07:28 +02:00
Paulus Schoutsen
1749859cdf Shopping List: edit name / complete status (#8666)
* Shopping List: edit name / complete status

* Change ID to be UUID based
2017-07-29 17:48:09 +02:00
Fabian Affolter
931f4d8161 Upgrade mypy to 0.521 (#8692) 2017-07-28 23:22:56 -07:00
Fabian Affolter
61508deed3 Upgrade pushbullet.py to 0.11.0 (#8691)
* Upgrade pushbullet.py to 0.11.0

* Update sensor as well
2017-07-28 23:22:35 -07:00
Paulus Schoutsen
828c469ef7 Fix Lint 2017-07-28 20:53:15 -07:00
William Scanlon
1b57566e8e Support for Wink local control (#8607)
* Support for Wink local control
2017-07-28 12:02:16 -04:00
Paulus Schoutsen
0a6d519b9d Merge remote-tracking branch 'origin/master' into release-0-50 2017-07-28 02:42:58 -07:00
Paulus Schoutsen
0c97fe7eac Version bump to 0.50 2017-07-28 02:38:06 -07:00
Chris
e8ce41874c Fix COMMAND_CLASS_BARRIER_OPERATOR for dev branch of OpenZwave (#8574)
* Update zwave.py to work with updated OpenZwave library

Update zwave.py to work with updated OpenZwave library

* Update zwave.py

* Update zwave.py

* Update to fix garage door openers

Update to fix garage door support for latest version of openzwavelib

* Update to cover.zwave list of states

Update to cover.zwave to provide list of states based on dev version of
openzwave lib

* Some values not saved

* Formatting fix

* Formatting fix

* Variable typo

* Formatting fix

* Formatting

* Variable Update

Variable Update and properties added

* Formatting fixes

* Formatting Fix

* Update test case for door states

* Formatting / Testing process fix

* Formatting

* Formatting / Test Fixes

* Variable rename

* Added members to CoverDevice

* Removed un-needed else

* Formatting

* Formatting

* Variable name changes and const updates

* Changed variable names to cover_state
* Added constains into const.py
* Updated to change the main state on the cover device

* Fixes

* Formatting fixes

* Formatting/Variables

* Formatting

* Variable fixes

* Import update

* Formatting  / Variables

* Update test for new states

* Revert state changes

* Test fix

* Variable Fix

* Formatting

* Variable typo

* Missing constant

* Variable fix

* Requested changes

* Added is_opening
* Added is_closing
* Updated test based on changes

* Formatting

* Changed cover_state back to _state

* Formatting and variable fixes

* Test fixes

* Formatting and variable touchup

* Formatting

* Optimizations

* Add new cover features to demo

* Add tests for demo cover closing/opening

* Remove unused STATE_STOPPED

* Add tests for new zwave cover values
2017-07-27 18:57:30 -04:00
Brian Gehrich
0ab0e35d59 Updated pysnmp to 4.3.9 (#8675) 2017-07-27 22:33:17 +02:00
Pascal Vizeli
51108b8fe9 Hass.io: logo support / timeout handling (#8668)
* Disable auth on logo / no timeout for addons update/install

* fix tests
2017-07-27 12:23:22 -07:00
Daniel Perna
9e6817b6d0 Upgrade pyhomematic to 0.1.30 (#8673) 2017-07-27 17:45:59 +02:00
Fabian Affolter
74581b57f8 Upgrade sqlalchemy to 1.1.12 (#8669) 2017-07-27 17:23:51 +02:00
Fabian Affolter
4fcaea23a8 Upgrade libnacl to 1.5.2 (#8670) 2017-07-27 17:23:07 +02:00
Fabian Affolter
b59c29943b Upgrade fuzzywuzzy to 0.15.1 (#8671) 2017-07-27 17:22:40 +02:00
Richard Cox
1e8c00ac02 Adding support for mapping keys to value in statsd (#8665)
* Adding ability to map specific states to values

* Adding test for mapping
2017-07-27 08:58:34 +02:00
Abílio Costa
9d5c61b2f0 MQTT Switch: add availability_topic for online/offline status (#8593)
* mqtt switch: add availability_topic for online/offline status

* fix method doc strings

* MQTT Switch: add test
2017-07-27 08:24:15 +02:00
kfcook
f5eeb252a7 Added support for SerenaHoneycombShades to Lutron Caseta (#8662)
Add an optional extended description…
2017-07-27 08:14:12 +02:00
Robin
3b4ea864a1 Add uk_transport component. (#8600) 2017-07-26 20:49:52 +01:00
Jeff Wilson
3318f02664 Add transition support to light.zha (#8548)
* Add transition support to light.zha

* Address hound formatting

* Address hound comments

Look, nobody is perfect... alright?

* Update zha.py
2017-07-26 17:22:31 +02:00
Greg Laabs
438edc5ca1 History performance improvements for single-entity requests (#8632)
* Bugfix: remove superfluous domain filter

This filter is already applied later in the function by the `filters` object, where it is conditionally applied when appropriate. This fixes the problem where we get a domain filter even when searching for a single entity_id, which needlessly harms the query's performance.

* Performance: build different query when only getting single entity

When querying the history of a single entity, we can use an entirely different method for the "synthetic zero data point" by simply sorting by date and doing a LIMIT 1. This performs thousands of times better than the multi-entity query when the current recorder_run has been going for a while.

* Add entity_id filter to single-entity request

The entity_id filter was handled inside the `filters.apply` logic which is used in most cases, BUT didn't work when no `filters` was passed in to the method. Now it'll work even if no `filters` object is passed in.

* Fix linting errors in history.py

* Undo removal of domain filter

Putting back the domain filter that was removed in 76a6371705 - there are use-cases where get_states is called without a filter object, so we need the domain filter to work in those cases as well.

* Fix truncated comment
2017-07-26 11:22:01 -04:00
Boyi C
abcfcdd887 Yahoo Weather update, supports forecast for more days (#8626)
* work on weather panel

* update yahooweather with more forecast details

* Update yweather to allow user input forecast date

* fix for houndci

* fix long line

* fix1

* Revert "work on weather panel"

This reverts commit 28b4972233.

revert unintentional submodule change

* fix2

fix typo, add try catch to another int()

* fix pylint

* fix3

* fix4

* Update yweather.py

* Update yweather.py

* Remove global data construct

* Yahoo API support only 5 days forecast

* remove forecast

* fix lint

* fix lint p2

* Update yweather.py
2017-07-26 16:46:21 +02:00
Thomas Delaet
fff269e790 Velbus (#8076)
* add Velbus changes

* update library version

* fix python-velbus version

* bug fix and update python-velbus

* change config handling

* update velbus components/platforms

* add support for Velbus switches

* fix bugs

* typo

* add velbus fan

* update velbus library

* bug fix in logic of fan handling of speed settings

* add Velbus changes

change config handling

update velbus components/platforms

add support for Velbus switches

add velbus fan

* remove duplicate entry

* fix documentation links

* fix linting error

* regen requirements_all.txt

* add support for Velbus cover

* bugfix in cover component

* bugfix in cover component

* remove unused imports

* Travis fixes

* fix style

* fix style

* Update velbus.py

* Update velbus.py

* Update velbus.py

* Update requirements_all.txt

* Update velbus.py

* Update velbus.py

* Update velbus.py

* Update velbus.py

* fix style

* Update velbus.py

* Update velbus.py

* Update velbus.py

* Update velbus.py

* Update velbus.py

* Update velbus.py
2017-07-26 14:03:29 +02:00
Anders Melchiorsen
81a27e726c Upgrade aiolifx (#8648)
This release includes a fix for multizone lights with zone counts that are not
a multiple of eight.
2017-07-26 12:33:00 +02:00
Marcelo Moreira de Mello
7c120748ce Fixes Fitbit sensor to report battery level with the expected device (#8647)
Add an optional extended description…
2017-07-26 11:05:48 +02:00
Sean Gollschewsky
e83816c055 Add component Light TPLink (#8643)
* Add new component for TPLink light bulbs.

* Update with result of gen_requirements_all.

* Add new component light.tplink.
2017-07-26 09:04:40 +02:00
Paulus Schoutsen
cd2703e121 Update dependencies cast + discovery (#8646) 2017-07-25 23:35:05 -07:00
Paulus Schoutsen
c2828bac2c Tweak conversation/intent/shopping list (#8636) 2017-07-25 00:42:59 -07:00
Paulus Schoutsen
ad7370e1c2 Update frontend 2017-07-25 00:29:05 -07:00
Adam Mills
3b7f16f189 Catch and log Lyft API errors (#8635) 2017-07-25 00:05:47 -04:00
Colin O'Dell
cc03f7ee6a Manual alarm with MQTT control (#8257)
* Manual alarm with MQTT control

* Duplicate manual control panel code instead of extending it

* Duplicate manual alarm test as well; modify for manual_mqtt

* Add MQTT-specific tests for manual_mqtt alarm
2017-07-24 09:06:38 -07:00
Corey Pauley
ecc1429453 Added support for default value when environment variable is missing (#8484)
* Added support for a default value when an environment variable is missing

* Shouldn't have used docstring
2017-07-24 09:00:01 -07:00
Justin Dray
98568b5eb7 Add support for using credstash as a secret store (#8494) 2017-07-24 08:59:10 -07:00
Paulus Schoutsen
9d9ca64f26 Update README.rst 2017-07-24 07:53:14 -07:00
Paulus Schoutsen
1d31137616 Update README.rst 2017-07-24 07:47:57 -07:00
Pascal Vizeli
f86bd15580 Cleanup old device_tracker stuff (#8627)
* Cleanup old device_tracker stuff

* Fix lint
2017-07-24 07:45:02 -07:00
Paulus Schoutsen
cbf65220aa Merge pull request #8625 from home-assistant/release-0-49-1
0.49.1
2017-07-24 07:35:29 -07:00
Daniel Høyer Iversen
c100b8cb52 Add is_lighting4 to RfxtrxBinarySensor (#8563) 2017-07-24 07:33:37 -07:00
matt2005
654ad41464 added onvif camera fix for non-virtual env installations (#8592)
* added fix for non-virtual env installations

* fixed new line at end of file

* moved import os to top of file
2017-07-24 15:22:12 +02:00
Paulus Schoutsen
a2abb4ae0a Update frontend 2017-07-24 00:11:58 -07:00
Jeff Wilson
36e266442f Properly slugify switch.flux update service name (#8545) 2017-07-23 23:53:21 -07:00
Jeff Wilson
f3d9086ff4 Properly slugify switch.flux update service name (#8545) 2017-07-23 23:53:03 -07:00
Anton Lundin
0c09cfc6c4 ubus: Make multiple instances work again (#8571)
Back in "ubus: Refresh session on Access denied (#8111)" I added the
decorator _refresh_on_acccess_denied. Somehow that stopped multiple ubus
trackers from working in parallel, and only the one first init'ed
worked.

Changing the order of the decorators fixes the issue but, I'm sorry to
say I can't figure out why. There's some magic somewhere which I'm
missing.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-07-23 23:51:25 -07:00
Anton Lundin
b0b6026c68 ubus: Make multiple instances work again (#8571)
Back in "ubus: Refresh session on Access denied (#8111)" I added the
decorator _refresh_on_acccess_denied. Somehow that stopped multiple ubus
trackers from working in parallel, and only the one first init'ed
worked.

Changing the order of the decorators fixes the issue but, I'm sorry to
say I can't figure out why. There's some magic somewhere which I'm
missing.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-07-23 23:51:07 -07:00
Russell Cloran
8f47a9109c prometheus: Fix zwave battery level (#8615) 2017-07-23 23:49:22 -07:00
Russell Cloran
f0293eeac2 prometheus: Fix zwave battery level (#8615) 2017-07-23 23:49:03 -07:00
Phil Cole
e4317a6741 Tado Fix #8606 (#8621)
Handle case where 'mode' and 'fanSpeed' are missing JSON. Based on
changes in commit
adfb608f86
2017-07-23 23:48:33 -07:00
Phil Cole
4b449f5f93 Tado Fix #8606 (#8621)
Handle case where 'mode' and 'fanSpeed' are missing JSON. Based on
changes in commit
adfb608f86
2017-07-23 23:48:20 -07:00
Daniel Schaal
8760dc9b29 Check if /dev/input/by-id exists (#8601) 2017-07-23 23:47:52 -07:00
Daniel Schaal
1831a7da68 Check if /dev/input/by-id exists (#8601) 2017-07-23 23:47:38 -07:00
Marcelo Moreira de Mello
3e34f34f6b Bumped Amcrest version (#8624) 2017-07-23 23:46:35 -07:00
Marcelo Moreira de Mello
3fec2955a5 Bumped Amcrest version (#8624) 2017-07-23 23:46:23 -07:00
Chia-liang Kao
2cf9254a08 Fix STATION_SCHEMA validation on longitude (#8610) 2017-07-23 23:35:49 -07:00
Russell Cloran
333da0dc6d zha: Update to bellows 0.3.4 (#8594) 2017-07-23 23:35:49 -07:00
Yannick POLLART
7b10f0a14f Fix broken status update for lighting4 devices (#8543)
* Fix broken status update for lighting4 devices

* Fixed indentation
2017-07-23 23:35:49 -07:00
Anders Melchiorsen
fb6bdfaba9 LIFX: assume default features for unknown products (#8553)
This makes the detection work for prototypes as well.
2017-07-23 23:35:48 -07:00
Pierre Ståhl
d7da90ae54 Fix support for multiple Apple TVs (#8539) 2017-07-23 23:35:48 -07:00
Eugenio Panadero
a5bfcceacd Attach the chat_id for a callback query from a chat group (fixes #8461) (#8523) 2017-07-23 23:35:48 -07:00
Pascal Vizeli
4961ece931 Realfix for dlib (#8517)
* Update dlib_face_detect.py

* fix lint

* Update dlib_face_detect.py
2017-07-23 23:35:48 -07:00
Pascal Vizeli
7d99d6aad9 Update dlib_face_detect.py (#8516) 2017-07-23 23:35:48 -07:00
Russell Cloran
6dc93c2751 prometheus: Convert fahrenheit to celsius (#8511) 2017-07-23 23:35:48 -07:00
Maikel Wever
5c39eebea8 Fix TP-Link device tracker regression since 0.49 (#8497)
* Fix TP-Link device tracker regression since 0.49

This regression was introduced by #8322.

Fix is to utf encode the password like the other TP-Link backends do.

* Fix linting issue introduced in previous commit

Commit in question: 677f3fbb7f
2017-07-23 23:35:48 -07:00
Paulus Schoutsen
ffd295b38b Update to 0.49.1 2017-07-23 23:34:08 -07:00
Phil Hawthorne
5d810dae86 REST binary sensor value_template optional (#8596)
According to the documentation, the `value_template` for the REST
binary_sensor is not required. However, if you don't provide this when
setting up a binary sensor, the component fails. Looks like a variable
was not being set, which I've now included.

This should make the REST binary sensor act the same way as the REST
sensor now.
2017-07-23 22:42:41 +02:00
Fabian Affolter
486bcc4cae Upgrade mypy to 0.520 (#8616) 2017-07-23 20:20:38 +02:00
Fabian Affolter
cc2de5e1dc Upgrade youtube_dl to 2017.7.23 (#8617) 2017-07-23 20:20:23 +02:00
cribbstechnologies
77d8e393a1 better but still not great (#8618) 2017-07-23 20:19:58 +02:00
Koen Ekelschot
c6bf529d38 Allow set_cover_position in scenes (#8613) 2017-07-23 15:59:27 +02:00
Chia-liang Kao
dac9716cf4 Fix STATION_SCHEMA validation on longitude (#8610) 2017-07-23 10:22:49 +02:00
Thomas Klingbeil
9043895407 make attributes in the fritzdect module easier to process (#8436)
* make attributes in the fritzdect module easier to process
* remove spaces in attribute names
* move units to separate attributes

* make attributes in the fritzdect module easier to process
* remove spaces in attribute names
* move units to separate attributes

* Use new python formating syntax and attribute constant

* Shorten too long line

* Fix indent
2017-07-22 20:34:58 +02:00
Open Home Automation
2f08a91fdd Simplified percent conversion, better logging (#8568)
* Simplified percent conversion, better logging

*  Unnecessary pass statement (unnecessary-pass)
2017-07-22 20:00:13 +02:00
Sean Gollschewsky
1807b45222 Binary sensor ping fixed for hassio (#8573)
* Add support for multiple ping utilities.

* Added support for differing flavours of ping included with
different distributions (specifically alpine linux for hassio's
homeassistant).

* Updated as per comments in PR
2017-07-22 19:50:31 +02:00
Teemu R
b4f392b181 bump python-mirobo version for more robust protocol handling, make the platform to update on startup (#8602) 2017-07-22 19:36:14 +02:00
William Scanlon
8e8ec7a7c3 Remove code in wink.py overwriting hass.data configurator (#8595) 2017-07-22 09:21:38 -04:00
Paulus Schoutsen
7edf14e55f Add Intent component (#8434)
* Add intent component

* Add intent script component

* Add shopping list component

* Convert Snips to use intent component

* Convert Alexa to use intent component

* Lint

* Fix Alexa tests

* Update snips test

* Add intent support to conversation

* Add API to view shopping list contents

* Lint

* Fix demo test

* Lint

* lint

* Remove type from slot schema

* Add dependency to conversation

* Move intent to be a helper

* Fix conversation

* Clean up intent helper

* Fix Alexa

* Snips to use new hass.components

* Allow registering intents with conversation at any point in time

* Shopping list to register sentences

* Add HTTP endpoint to Conversation

* Add async action option to intent_script

* Update API.ai to use intents

* Cleanup Alexa

* Shopping list component to register built-in panel

* Rename shopping list intent to inlude Hass name
2017-07-21 21:38:53 -07:00
Paulus Schoutsen
7bea69ce83 update frontend 2017-07-21 21:29:58 -07:00
Russell Cloran
8d31c5fbf6 zha: Update to bellows 0.3.4 (#8594) 2017-07-21 21:22:43 -07:00
William Scanlon
dc42b6358a Support for Wink oauth application authorization (#8208) 2017-07-21 20:18:57 -04:00
Per Osbäck
06ceadfd54 upgrade pywebpush and PyJWT (#8588) 2017-07-21 22:35:19 +02:00
Daniel Høyer Iversen
4359e0babf xiaomi binary sensor bug fix (#8586)
* xiaomi binary sensor bug fig

* Is not need on binary_sensor
2017-07-21 12:39:25 +02:00
Marcelo Moreira de Mello
ee153062ab Extends Fitbit sensors to track the device battery level (#8583)
* Extends Fitbit sensors to track the device battery level

* cleanup old stuff

* remove update from init
2017-07-21 10:19:26 +02:00
Sebastian Muszynski
fada6d3f49 Device support for different new sensors of the xiaomi aqara gateway (#8577)
* The gateway configuration accepts a MAC address or a SID value in uppercase already.
The ringtone services accepts the same values now. I hope it will avoid confusion.

* Device support for the new wall switches with neutral lead (ctrl_ln1, ctrl_ln2) added.

* Measurement unit from pressure of weather.v1 fixed.

* Device support for sensor_magnet.aq2 added.

* Device support for sensor_motion.aq2 (motion and lux) added.

* Code reformatted.

* The ringtone service (start/stop) uses the parameter gw_mac instead of gw_sid now.

* Version of the required library updated.
2017-07-21 10:13:42 +02:00
Daniel Høyer Iversen
f6a5e0887d upgade xiaomi lib to 0.2 (#8584) 2017-07-21 10:10:03 +02:00
William Scanlon
4f8d2ec317 Added Time Remaining and Time Elapsed sensors for octoprint (#8581)
Add an optional extended description…
2017-07-21 09:40:07 +02:00
Aaron Bach
e63a96cf53 Bumped python-simplisafe version (#8578)
* Bumped python-simplisafe version
2017-07-20 18:59:41 -04:00
Daniel Høyer Iversen
a5c0831dc1 xiaomi bug fix (#8576) 2017-07-20 23:04:21 +02:00
namadori
718949481f fix #8263 corrected Adafruit DHT library version from 1.3.0 to 1.3.2 (#8562)
Add an optional extended description…
2017-07-20 15:53:06 +02:00
Daniel Høyer Iversen
90639d33ab Xiaomi gw support (#8555)
* xiaomi support

* xiaomi support

* style

* style

* style

* style

* style

* coveragerc

* Update xiaomi.py

* Update xiaomi.py

* Update xiaomi.py

* refactorization

* refactorization

* config validation

* style

* package

* refactorization

* refactorization

* refactorization

* HA integration
2017-07-20 15:20:00 +02:00
Greg Dowling
966809c1a1 Merge pull request #8564 from home-assistant/bump_pyvera
Bump pyvera to fix colour exception
2017-07-20 11:53:53 +01:00
pavoni
bc27d173d0 Bump pyver to fix exception in fetching colours. 2017-07-20 10:21:08 +01:00
Daniel Høyer Iversen
fde291f866 Add is_lighting4 to RfxtrxBinarySensor (#8563) 2017-07-20 11:12:42 +02:00
Paulus Schoutsen
49c399c358 Update persistent deps dir version in config.py (#8479)
* Update persistent deps dir version in config.py

* Update last version to remove deps dir in tests
2017-07-19 22:59:21 -07:00
Sean Dague
8d1999dc12 Enhance python_script to support "_getitem_" (#8541)
* Enhance python_script to support "_getitem_"

In order to use dict / list structures in python scripts we need
_getitem_ allowed in the RestrictedPython environment. There is a
default_guarded_getitem included with RestrictedPython, which is a
pass through used in the Eval code paths.

* Add tests for dict/list support in python_scripts

* Lint
2017-07-19 22:56:24 -07:00
Yannick POLLART
ee05a4ab89 Fix broken status update for lighting4 devices (#8543)
* Fix broken status update for lighting4 devices

* Fixed indentation
2017-07-19 22:56:11 -07:00
Anders Melchiorsen
8a42e1551a LIFX: assume default features for unknown products (#8553)
This makes the detection work for prototypes as well.
2017-07-19 22:54:46 -07:00
Jeff Wilson
9cc3e7e47b Handle manual edits to emulated_hue_ids.json (#8560) 2017-07-19 22:51:50 -07:00
Open Home Automation
54755df9ea Added a service to write to KNX group addressed including documentation (#8491)
* Added a service to write to KNX group addressed including documentation

* Define parameters as required

* Reformating

* Moved service documentation to service.yaml

* Moved service documentation to services.yaml

* Update knx.py
2017-07-20 07:01:05 +02:00
William Scanlon
84ebcd8a59 Support for Wink Switch and Light groups also fix fan speed selection (#8501)
* Support for Switch and Light groups, fix fan speed

* Fixed hound violations
2017-07-20 00:27:39 +02:00
Marcelo Moreira de Mello
f1280d3edb Extends Pi-hole sensor to support the new sensors: (#8549)
- domains_being_blocked
  - queries_cached
  - queries_forwarded
  - unique_clients
  - unique_domains
2017-07-19 19:45:53 +02:00
Eugenio Panadero
c27074e6f7 turn_on_action and turn_off_action with script syntax (#8558) 2017-07-19 13:33:16 -04:00
viswa-swami
c8bfcd2ed4 Upgrade the alarmdecoder dependency library from 0.12.1 to 0.12.3. (#8542)
* Upgrade the alarmdecoder dependency library from 0.12.1 to 0.12.3. Nutech software who owns this library have upgraded this library with some fixes regarding arming it to home/away and then disarming the alarm. Without this upgraded library, HASS is having a problem when we try to disarm an armed alarm after around 8 hours or so.

* Updated the requirements_all.txt by running the script gen_requirements_all.py
2017-07-19 12:21:39 +02:00
Jeff Wilson
42699b7a60 Report Harmony remote off if state is unknown (#8547)
Add an optional extended description…
2017-07-19 12:20:45 +02:00
Aliaksandr
6bc07298d3 [media_extractor] Add support for custom stream queries for media_extractor (#8538)
* Add support for different stream formats

* Encapsulate logic inside MediaExtractor class

* Add CONFIG_SCHEMA

* Fix for cases when youtube-dl returns content of playlist as list
2017-07-19 08:14:48 +01:00
Marcelo Moreira de Mello
4ece4bf241 Fix exception dlib_face_identify when image is not recognized by face_recognition module (#8552)
*   Some images are not supported by face_recognition, so this patch treats the error
  messages instead throwing a traceback. Fixes #7867

* Makes lint happy
2017-07-19 09:04:01 +02:00
Kevin Fronczak
1a86fa5a02 Initial support for Google Wifi/OnHub (#8485)
* Initial support for Google Wifi/OnHub

* Moved state logic to update function of API class

- Throttle added to update
- State logic implementation is cleaner
- Modified tests to work with the new throttle on update
2017-07-19 00:16:32 +02:00
Paulus Schoutsen
d54a634f11 Update demo.py 2017-07-18 15:11:17 -07:00
Thibault Cohen
5e1ff20b09 Decora: Fix set brightness and improve reconnection (#8522) 2017-07-19 00:02:42 +02:00
Pierre Ståhl
29266213a0 Fix support for multiple Apple TVs (#8539) 2017-07-18 19:19:36 +01:00
Fabian Affolter
2aa89cfe07 Upgrade TwitterAPI to 2.4.6 (#8535) 2017-07-18 16:24:32 +02:00
Fabian Affolter
879c816f5c Update docstrings (#8536) 2017-07-18 16:23:57 +02:00
Thibault Cohen
4ae11c009d Fix #6469 and #6828 (#8537) 2017-07-18 16:23:39 +02:00
Phil Lavin
dcd6f7a29e Return a 0 temperature value when none is found (#8518)
* Return a 0 temperature value when none is found

It's well documented that these TRVs will only return the current temperature
for a short time after the actuator has moved. This means that, usually, they will
not return the current temperature. Setting a non-value here causes errors in the logs
and for the TRV to not show on the dashboard at all

* Fix lint issue
2017-07-17 23:34:38 +02:00
Jan Losinski
fde4a7d029 Citybikes: Allow None as result for empty slots (#8528)
The citibykes API returns "null" as value for empty_slots on some
stations (see #8527). This causes the component to not process the data.

This is fixed by accepting None as valid data. The row in the frontend
is left empty if "null" was returned by the service.

fixes #8527
2017-07-17 22:50:55 +02:00
Anders Melchiorsen
b83ff739bc Remove deprecated automation keywords (#8510)
* Remove deprecated automation keywords

* Remove retired test case

* Remove retired keyword
2017-07-17 22:24:05 +02:00
Eugenio Panadero
8c9b3898fc handle timeout errors without logging.exception when updating hue lights; double quotes in log msgs (#8524) 2017-07-17 22:16:18 +02:00
Fabian Affolter
95e0027924 Fix KeyError 2017-07-17 20:21:16 +02:00
Mike Christianson
c67c20f752 fix for a bug introduced with media support in #8282 (#8513)
data may be None if twitter data property unconfigured:
  File "/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/notify/twitter.py", line 63, in send_message
    media = data.get(ATTR_MEDIA)
2017-07-17 19:45:42 +02:00
Kevin Fronczak
1a1571cd52 Added sensor state rounding (#8499) 2017-07-17 19:21:41 +02:00
Eugenio Panadero
cca0d3ed44 Attach the chat_id for a callback query from a chat group (fixes #8461) (#8523) 2017-07-17 13:47:28 +02:00
Pascal Vizeli
f0479855bd Realfix for dlib (#8517)
* Update dlib_face_detect.py

* fix lint

* Update dlib_face_detect.py
2017-07-17 12:09:42 +02:00
Russell Cloran
40aafcdf5d prometheus: Convert fahrenheit to celsius (#8511) 2017-07-17 11:25:20 +02:00
Pascal Vizeli
8c9557401f Update dlib_face_detect.py (#8516) 2017-07-17 11:03:16 +02:00
Alexander Rust
ffd3081743 Added additional attributes to OwnTracks device_tracker (#8503)
* Added additional attributes to OwnTracks device_tracker

* Added missing space after :
2017-07-16 21:43:47 +02:00
Paulus Schoutsen
d0275c8075 Persistent notification import (#8507)
* Rewrite persistent notification creation

* Update components.is_on to use auto loading

* Fix two hass parameters
2017-07-16 21:39:38 +02:00
Maikel Wever
f6c3832e90 Fix TP-Link device tracker regression since 0.49 (#8497)
* Fix TP-Link device tracker regression since 0.49

This regression was introduced by #8322.

Fix is to utf encode the password like the other TP-Link backends do.

* Fix linting issue introduced in previous commit

Commit in question: 677f3fbb7f
2017-07-16 10:27:48 -07:00
Paulus Schoutsen
d29bdddaa7 Add bind_hass to components (#8502)
* Add bind_hass to components

* Add bind_hass to group
2017-07-16 10:14:46 -07:00
Paulus Schoutsen
d3be056d15 Expose all components on hass [Concept] (#8490)
* Add components concept

* Lint

* Raise ImportError if component not found
2017-07-16 09:23:06 -07:00
Open Home Automation
bffa0d2b04 Bump to KNXIP 0.5 (#8492)
* Bump to KNXIP 0.5

* Updated requirements file
2017-07-16 13:34:13 +02:00
Paulus Schoutsen
23b65bfb30 Version bump to 0.50.0dev0 2017-07-15 21:07:15 -07:00
Paulus Schoutsen
1d4a7f1160 Version bump to 0.49 2017-07-15 21:06:20 -07:00
Paulus Schoutsen
dc08852fc2 Merge pull request #8468 from home-assistant/release-0-49
0.49
2017-07-15 21:05:07 -07:00
Andrey
3377f30613 Make themes API work even when themes are not defined. (#8473) 2017-07-15 19:43:06 -07:00
Anders Melchiorsen
84ca4d2a21 Accept transition for light.toggle (#8466) 2017-07-15 19:43:06 -07:00
Bryce Edwards
1366c93c83 Radarr sensor fix for issue #8250 (#8456)
* Radarr sensor fix for issue #8250

* Radarr sensor fix for issue #8250
2017-07-15 19:43:06 -07:00
Sean Gollschewsky
e5e2a151aa Remove km from visibility, add visibility_distance (#8454)
* Remove km from visibility, add visibility_distance

* Fix line length

* Fix trailing space and line break indentation

* Indentation

* More whitespace
2017-07-15 19:43:06 -07:00
dersger
bd1e533409 Fix media_position for cast component (#8452)
* Make it available during state paused.

* Don't adjust for media_position_updated_at. I.e. do as vlc, sonos etc
  so that returned position is the position at the time of
  media_position_updated_at, not now.
2017-07-15 19:43:06 -07:00
Dougal Matthews
21e82bd037 Add RGB support to switch.flux (#8417) 2017-07-15 19:43:06 -07:00
Anders Melchiorsen
af9a0e8fea LIFX: support for multizone (#8399)
* Make aiolifx modules easily available

* Use aiolifx features_map for deciding bulb features

Also move the feature detection out of Light so it is available even
during the initial detection.

* Move each LIFX light type to a separate class

* Simplify AwaitAioLIFX

This has become possible with recent aiolifx that calls the callback even
when a message is lost.

Now the wrapper can be used also before a Light is added though the register
callback then has to become a coroutine.

* Refactor send_color

* Add support for multizone

This lets lifx_set_state work on individual zones.

Also update to aiolifx_effects 0.1.1 that restores the state for individual
zones.
2017-07-15 19:43:05 -07:00
Paulus Schoutsen
abc5c3e128 Fix iFrame panel test 2017-07-15 19:42:17 -07:00
Martin Hjelmare
543e8bb62e Fix check for running inside venv (#8481)
* Import and use the function from pip instead of defining it
  ourselves.
* Fix tests.
2017-07-15 07:25:02 -07:00
Andrey
6ca828fd14 Make themes API work even when themes are not defined. (#8473) 2017-07-14 11:26:26 -07:00
Anders Melchiorsen
87b83f3602 Accept transition for light.toggle (#8466) 2017-07-13 20:04:23 -07:00
Bryce Edwards
5829cdfdf1 Radarr sensor fix for issue #8250 (#8456)
* Radarr sensor fix for issue #8250

* Radarr sensor fix for issue #8250
2017-07-13 20:02:07 -07:00
Sean Gollschewsky
d473f3407b Remove km from visibility, add visibility_distance (#8454)
* Remove km from visibility, add visibility_distance

* Fix line length

* Fix trailing space and line break indentation

* Indentation

* More whitespace
2017-07-13 20:01:25 -07:00
dersger
9373d5e901 Fix media_position for cast component (#8452)
* Make it available during state paused.

* Don't adjust for media_position_updated_at. I.e. do as vlc, sonos etc
  so that returned position is the position at the time of
  media_position_updated_at, not now.
2017-07-13 20:00:23 -07:00
Dougal Matthews
d8abef9210 Add RGB support to switch.flux (#8417) 2017-07-13 19:53:19 -07:00
Anders Melchiorsen
4fde0ffe9c LIFX: support for multizone (#8399)
* Make aiolifx modules easily available

* Use aiolifx features_map for deciding bulb features

Also move the feature detection out of Light so it is available even
during the initial detection.

* Move each LIFX light type to a separate class

* Simplify AwaitAioLIFX

This has become possible with recent aiolifx that calls the callback even
when a message is lost.

Now the wrapper can be used also before a Light is added though the register
callback then has to become a coroutine.

* Refactor send_color

* Add support for multizone

This lets lifx_set_state work on individual zones.

Also update to aiolifx_effects 0.1.1 that restores the state for individual
zones.
2017-07-13 19:38:36 -07:00
Martin Hjelmare
ba019c799a Make deps directory persistent over upgrades (#7801)
* Use pip install --user if venv not active

* Set PYTHONUSERBASE to deps directory, when installing with --user
  option.
* Reset --prefix option to workaround incompatability when installing
  with --user option. This requires pip version 8.0.0 or greater.
* Require pip version 8.0.3.
* Do not delete deps directory on home assistant upgrade.
* Fix local lib mount and check package exist.

* Update and add tests

* Fix upgrade from before version 0.46

* Extract function to get user site

* Add function(s) to package util to get user site.
* Use async subprocess for one of the functions to get user site.
* Add function to package util to check if virtual environment is
  active.
* Add and update tests.

* Update version for last removal of deps dir

* Address comments

* Rewrite package util tests with pytest

* Rewrite all existing unittest class based tests for package util as
  test functions, and capitalize pytest fixtures.
* Add test for installing with target inside venv.
2017-07-13 19:26:21 -07:00
Paulus Schoutsen
5581c6295e Fix iFrame panel test 2017-07-13 10:19:59 -07:00
Paulus Schoutsen
192db5bec3 Update frontend 2017-07-13 09:22:15 -07:00
Andrey
b8eaec565a Add kiosk-mode panel (#8457) 2017-07-13 09:11:49 -07:00
Daniel Perna
e0f35c0279 HomeMatic dependency upgrade + IP Wall Thermostat support (#8465)
* Upgrade dependency + added IP Wall Thermostat
2017-07-13 17:55:30 +02:00
Abílio Costa
2eeeb9075a Plex: Add exception handler when connection fails (#8179)
* add exception handler when connection fails

* plex: improve exception handling

* remove uneeded exception handler
2017-07-13 08:01:12 -07:00
Daniel Høyer Iversen
71ee290bfd upgrade rfxtrx lib (#8463) 2017-07-13 14:57:44 +02:00
Daniel Høyer Iversen
7aad93e90d upgrade broadlink (#8462) 2017-07-13 14:42:30 +02:00
Andrey
a65f22378e Backend support for themes (#8419)
* Backend support for themes

* Fix test

* Add theme_updated event

* Shorten name

* Add tests
2017-07-12 18:08:13 -07:00
Anders Melchiorsen
bb9db28c95 LIFX: make broadcast address configurable (#8453) 2017-07-12 23:08:18 +02:00
Anders Melchiorsen
d10f017441 LIFX: improve light availability (#8451)
The default aiolifx timers are tuned for a network with few lost packets.
This means that lights can become "unavailable" from just a two second
dropout. An unavailable light is completely useless for HA until it is
rediscovered so this is an undesirable state to be in.

These tweaks make aiolifx try harder to get its messages through to the
bulbs, at the cost of some latency in detecting lights that actually are
unavailable.
2017-07-12 19:24:24 +02:00
Open Home Automation
b6e0286d71 Implement a bridge between HASS event bus and KNX bus to send events (#8449)
* Implement a bridge between HASS event bus and KNX bus to send events as KNX messages

* Formatting
2017-07-12 12:21:15 +02:00
Fabian Affolter
4451d2e847 Upgrade youtube_dl to 2017.7.9 (#8450) 2017-07-12 10:38:08 +02:00
Niccolò Maggioni
229000b834 Support for Plex servers with enforced SSL (#8341)
* Support for Plex servers with enforced SSL

* Fixed HoundCI warnings

* Fixed HoundCI warnings (2nd)

* Configurator data validation

* Travis linting
2017-07-11 23:26:29 -07:00
viswa-swami
9704057959 Fix Arlo Q not working with 0.48.1 (#8446)
* This change will enable the functionality for Arlo Q cameras. When we added the code to enable/disable motion detection, we assumed that base station will be present for all arlo type of cameras. But found recently that Arlo Q cameras does not have base station. So, removed the base_station dependency in the init code. Also added code in enable/disable motion detection code to first check if base station is detected by library. If base station is detected then it will use it to enable the motion detection. If not detected, even if service was called, it will not do anything.  Enabling/disabling the motion detection for Arlo Q cameras have to added by someone who has that camera.  I don't have the Arlo Q cameras.

* Fixed a typo in the code.
2017-07-11 23:25:55 -07:00
Paulus Schoutsen
effb9e9d23 Hass.io: Disable timeout when updating OS/supervisor/hass (#8447) 2017-07-11 23:24:35 -07:00
Sean Dague
effbb3bd4c Add support for rain and moisture sensors (#8440) 2017-07-11 23:09:05 +02:00
gitmopp
471501d386 DHT support for humidity and temperature offset (#8238)
* Added support for temperature_offset and humidity_offset

Some DHT sensors require some offsets to work.

* Support for temperature and humidity offset

* Changed lines with 79 characters

* Moved const to dht.py from const.py

* Changed temperature_offset range

* Removed the const

const.py is at original state.

* Fixed continuation line under-indented

* Removed first round and added debug info
2017-07-11 23:04:00 +02:00
Vlad Korniev
ef94b5c77a Vizio SmartCast support (#8260)
* Vizio SmartCast support

* Requested changes
Added new config params

* Vizio SmartCast support

* Requested changes
Added new config params
2017-07-11 22:55:46 +02:00
Andrey
60dcc9a5c0 Switch pyW215 to pypi (#8445) 2017-07-11 22:44:01 +02:00
Fabian Affolter
5b4862cc3c Exclude 'TAXI' product (fixes #8401) (#8438) 2017-07-11 21:23:23 +02:00
Fabian Affolter
fbf945c18b Add effects (#8442) 2017-07-11 21:22:00 +02:00
Fabian Affolter
609c25691a Upgrade phue to 1.0 (fixes #7749) (#8444) 2017-07-11 21:21:17 +02:00
Paulus Schoutsen
6e77877743 Update frontend 2017-07-11 09:11:36 -07:00
Alan Fischer
7b105a2150 Updated pyvera (#8437) 2017-07-11 15:14:46 +02:00
Aliaksandr
ee57a823af Added media_helper service (#8369)
* Added media_helper service

* Fixed lint warning

* media_helper renamed to media_extractor
2017-07-11 10:16:34 +02:00
Andrew
04b1621b65 Fix radiothermostat -1 value issue (#8395)
* Fix -1 value issue

Fixed issue where thermostat will sometimes return a current temperature or set temperature value of -1

* Update radiotherm.py

* Update radiotherm.py

* Update radiotherm.py

Added retry limit

* Update radiotherm.py

* Update radiotherm.py
2017-07-11 10:12:51 +02:00
Marcelo Moreira de Mello
f5e24cb0bb Refactored Amcrest to use central hub component (#8184)
* Refactored Amcrest to use central hub component

* Set default streaming source to snapshot

* Simplified code by using discovery platforms

* Makes lint happy

* Update authentication method to basic

* Fixed lint issues

* Makes Amcrest hub async

*  Make Amcrest hub IO synchronous and disabled ffmpeg dependency on sensor/amcrest.

* Removed async to load component

* Organized import order

* Update amcrest.py
2017-07-11 10:10:10 +02:00
Russell Cloran
ac72dea09a Add support for Prometheus (#8211)
Prometheus (https://prometheus.io/) is an open source metric and alerting
system. This adds support for exporting some metrics to Prometheus, using
its Python client library.
2017-07-10 21:20:17 -07:00
Russell Cloran
2f474a0ed8 zha: Handle both input and output clusters (#8410)
bellows 0.3.0 changes the API to have both, renaming the attribute which used
to be for input clusters in the process.

This is in preparation for remotes.
2017-07-10 21:16:44 -07:00
thecynic
7a4cc8e082 Fix typo (sending USERNAME instead of PASSWORD) introduced in #7963 (#8433) 2017-07-10 20:52:37 -07:00
Mike Christianson
92dc76773a Allow Twitter notifications to include media (#8282)
* Allow notifications to include media, with Twitter as the first implementation. The Twitter notifier uses the Twitter-recommended async chunked media/upload approach and tries to convey the correct mime type of the media. Twitter implementation based on https://github.com/geduldig/TwitterAPI/blob/master/examples/upload_video.py.

* Changes based on balloob's review:
balloob: "Please remove this file. We fixed the issue in our tests that left this artifact."
balloob: "…prefer a guard clause"
balloob: "This is very inefficient. You are now generating up to 99 values."
balloob: "Since media_id is going to be None, why not just return None and you can remove the else."

* balloob: "Other notify platforms are using ATTR_DATA for it. That way if a platform requires extra metadata, we don't need to add extra fields. So please add it to Twitter via ATTR_DATA."
2017-07-10 19:58:01 -07:00
Open Home Automation
fe4abc8454 Integrate utility functions into restricted Python environment (#8427) 2017-07-10 18:42:42 -07:00
Eugenio Panadero
821d01f82c New service send_magic_packet with new component wake_on_lan (#8397)
* New service `send_magic_packet` in new component `wake_on_lan`

* fix

* Unit tests for new component wake_on_lan

* Add wakeonlan to tests requirements

* remove wakeonlan from tests requirements and remake the component tests

* remove wakeonlan from tests requirements

* link domain and service names to component

* fix mocking in test_setup_component

* send_magic_packet as coroutine, better use of mock_calls in tests

* fix imports

* review changes

* better async calls

* Update test_wake_on_lan.py
2017-07-10 18:37:51 -07:00
Teemu R
b453834b2f bump python-mirobo requirement to support newer firmwares and more (#8431) 2017-07-10 23:18:58 +02:00
Fabian Affolter
97f14015ea Use HA lat/long for the start (fixes #3971) (#8429) 2017-07-10 23:16:37 +02:00
Fabian Affolter
4fb25cf16d Fix KeyError (fixes #3721, fixes #7241) (#8428) 2017-07-10 23:15:59 +02:00
Julius Mittenzwei
e7b5c5812c Fixed link to documentation (#8424)
* Issue #8203: fixed link to documentation

* Revert URL change

* Minor changes to docstring
2017-07-10 12:11:16 +02:00
James Marsh
2ac423bd9d Do not overwrite a custom hyperion light name with the hostname of the server. (#8391)
Do not overwrite a custom name with the hostname of the hyperion server.
Correct comment in name() method.

Fixes #8390
2017-07-10 00:06:31 +02:00
Adam Mills
ec7ca9a560 Make gzips reproducible by excluding timestamp (#8420) 2017-07-09 16:21:17 -04:00
Matthew Treinish
cb298123d4 Add set_operation_mode support to generic_thermostat (#8392)
This commit adds support for the set_operation_mode system call to the
generic thermostat component. This enables users to set whether the
thermostat is enabled or not by either setting it to auto or off.
2017-07-08 09:21:10 -07:00
Andrey
c5bf4fe339 Properly handle the case when a group includes itself. (#8398)
* Properly handle the case when a group includes itself.

* Fix lint
2017-07-08 09:20:11 -07:00
Julius Mittenzwei
57c5ed33ee New component to connect to VELUX KLF 200 Interface (#8203)
* New component to connect to VELUX KLF 200 Interface

* Issue #8203: modifications as suggested by hound

* Issue #8203: added entries to .coveragerc

* moving velux/__init__p.y to velux.py

* Issue #8203: Using hass.data for storing global object, updated docstrings

* Issue #8203: validation of config, using standard approach for getting config values

* Issue #8203: Exception handling if connection to velux component fails

* Issue #8203: removed unused import

* Issue #8203: Some minor changes within docstrings

* Issue #8203: Some minor changes within docstrings

* Issue #8203: added dependency for pyvlx to requirements_all.txt

* Issue #8203: less broad exception

* Issue #8203: increased version

* Issue #8203: changed position of pyvlx within requirements_all.txt

* Issue #8203: bumped version of pyvlx to 0.1.3 (better handling of retries when token expires)

* reset pointer to home-assistant-polymer

* Issue #8203: modifications as suggested by fabaff

* hound *sigh*
2017-07-08 16:12:19 +02:00
Oliver
3be0103259 Marrantz SR5006 & SR5006 treated as AVR-X device | Fixed Mapping of Media Player and AUX input functions (#8409) 2017-07-08 16:02:59 +02:00
Andy Castille
614b5da170 Use upstream RachioPy, fix manual run switches (#8286)
* use upstream RachioPy, fix manual run switches

* Update requirements for PyPi version of rachiopy

* Use upstream RachioPy 0.1.2 (partial revert of 39c6484d89)

* Revert rachiopy downgrade
2017-07-08 11:34:34 +02:00
Fabian Affolter
acf6d4ab82 Upgrade Sphinx to 1.6.3 (#8405) 2017-07-08 11:57:24 +03:00
Adam Mills
d3acb25070 Fix CODEOWNERS z-wave team name (#8400) 2017-07-07 17:00:14 -07:00
Charles Blonde
222ad3ab6d Add new Dyson sensors (#8199)
* Add new Dyson sensors

* Add unit of measurement for dust and air quality

* Code review
2017-07-07 16:59:41 -07:00
Paulus Schoutsen
5ae2bcdbb7 Code owners (#8393)
* Add initial code owners file

* Add component author owners

* Add link to blog

* Sort

* Add setup.py

* Update CODEOWNERS
2017-07-07 11:40:04 -07:00
Anders Melchiorsen
6c9742afc4 Update aiolifx (#8396) 2017-07-07 19:57:14 +02:00
Andrey
cf924cd14d Update waqi sensor (#8385) 2017-07-07 07:55:58 -07:00
Paulus Schoutsen
f2267437df Update snips.py 2017-07-07 07:53:04 -07:00
Tom Matheussen
233920f22c Sets spotify media_type to music (#8387)
* Sets spotify media_type to music

* Removed whitespace

* Update spotify.py
2017-07-07 07:52:11 -07:00
Open Home Automation
7536e825fa LaMetric platform and notify module (#8230)
* First version of a LaMetrci platform with a Notify module

* Cleanup, fix formatting bugs

* More formatting

* Formatting

* Updated requirements

* formatting

* Formatting

* More formatting

* Dummy commit for new Travis CI run

* Refactoring class methods to instance methods

* Cleanup unused classed

* Removed Eddystone_weatherurl that had nothing to do with this component

* Cleanup class methods

* Cleanup requirements

* Removed broad excepts
Removed storage of LaMetric devices

* Removed unused import
2017-07-07 08:21:06 +02:00
Pascal Vizeli
e12a9eaadd Update avion.py (#8364)
* Update avion.py

* Update decora.py

* Update decora.py

* Update decora.py

* Update avion.py

* Update decora.py

* Update decora.py

* Update decora.py

* Update decora.py
2017-07-06 23:20:39 -07:00
Simao
fb184b4b6f Added support for upload of remote or local files to slack (#8278)
* Added support for upload of remote or local files to slack

* Checking local file with hass.config.is_allowed_path prior to posting it
2017-07-06 23:14:24 -07:00
Andy Castille
63ff173305 Use user-set device names for Linksys Smart Wi-Fi routers (3) (#8300)
* Use user-set device names for Linksys Smart Wi-Fi routers (3)

* Newline at end of linksys_smart.py

* Remove spaces in last line of linksys_smart.py

* Update linksys_smart.py
2017-07-06 23:07:12 -07:00
Diogo Gomes
903e6b5aee Upnp mapping notification (#8303)
* make port mapping optional

* dependencies + improvements

* Added bytes and packets sensors from IGD

* flake8 check

* new sensor with upnp counters

* checks

* whitespaces in blank line

* requirements update

* added sensor.upnp to .coveragerc

* downgrade miniupnpc

Latest version of miniupnpc is 2.0, but pypi only has 1.9

Fortunately it is enough

* revert to non async

miniupnpc will do network calls, so this component can’t be moved to
coroutine

* hof hof

forgot to remove import ot asyncio

* UPnP mapping overlap

Addressing: https://community.home-assistant.io/t/upnp-new-module/20839

* removed whitespaces
2017-07-06 23:05:09 -07:00
Russell Cloran
46ce26eb7a zha: Try multiple reads to get manufacturer/model (#8308)
Some devices don't seem to return the information properly when asked for
multiple attributes in one read. This separates out the reads if it didn't
work as expected the first time.

Because this data is cached in bellows, I don't expect any extra reads in
the "happy" case.
2017-07-06 23:02:22 -07:00
Russell Cloran
b1bba3675d zha light: Refresh at startup (#8310)
* zha light: Refresh at startup

* Add asyncio.coroutine annotation
2017-07-06 22:59:17 -07:00
Alex
ed5d10448e Presence detection for tp link eap225 (#8322)
* Added support for TP-Link EAP 225

* code style changes

* more code style changes

* more understandable variable name

* Added support for TP-Link EAP 225

* code style changes

* more code style changes

* more understandable variable name

* Fix pylint issue (#8325)

* Added support for TP-Link EAP 225

* code style changes

* more code style changes

* more understandable variable name

* Added support for TP-Link EAP 225

* code style changes

* Update snips.py
2017-07-06 22:52:40 -07:00
William Scanlon
652c006cbc Prevent errors on Octoprint sensors and binary_sensors when Octoprint and/or Printer are off (#8343)
* Added platformnotready

* Only log the first failure if octoprint/printer isn't up

Remove blank line
2017-07-06 22:39:11 -07:00
PhracturedBlue
b67c5df525 cover_template:i open/close/stop actions no longer required. Improve tests (#8344) 2017-07-06 22:35:59 -07:00
Matthew Schick
a7d5a8d93e Cleanup the asuswrt component (#8359)
* Get the list of wireless interfaces from nvram so tri-band routers
  work
* ARP checks don't work reliably for ap mode so remove it, associated
  list seems pretty solid
* Match on 'mac' instead of 'ip' since we can't use it for ap mode
* The `client_info_tmp` nvram reference, Asus removed it some time ago
* Update AsusWrtResult
2017-07-06 22:34:21 -07:00
Sabesto
c48c2b00a8 Modbus fixes to work with pymodbus 1.3.1 (#8365)
* Fixed a bug where changing fan speed was not possible

* Bump pymodbus version to 1.3.1 to fix issue #8285

* Changed all modbus components so that they use CONF_SLAVE from const.py

* Fix checking result from a modbus transaction

* Add missing decorator

* Added modbus write coil service and added descriptions

* Removed a hiding debug print
2017-07-06 22:30:23 -07:00
Charles Blonde
9bc5cd2d4b Add Soundtouch support for playing an HTTP url (#8370) 2017-07-06 22:28:09 -07:00
Open Home Automation
ecf3a9cb36 Implement KNX dimming functionality (#8371)
* Implement KNX dimming functionality

* Formatting

* Formatting

* Formatting
2017-07-06 22:24:25 -07:00
Marc Plano-Lesay
074e31bcf9 GTFS: check start/end date on services (#8373)
Fixes #8372
2017-07-06 22:22:31 -07:00
Open Home Automation
63cc658010 Add address-specific KNX listeners that fire events on the HASS bus (#8374)
* Add address-specific KNX listeners that fire events on the HASS bus

* Added docstring
1-byte messages will be converted from a list to the value

* Formating
2017-07-06 22:21:40 -07:00
Charles Blonde
8682f21fc5 Fix TTS options. #8375 (#8376) 2017-07-06 22:20:49 -07:00
Charles Blonde
aa28e6727d Fix Amazon Polly with non english voices. #8377 (#8378) 2017-07-06 22:19:05 -07:00
Sean
12129f0e6a Try catch around database updates in recorder. Resolves 6919 (#8349)
* Try catch around database updates in recorder. Resolves 6919

* Fixing failed test for line length

* Catch only OperationalError and retry connections before giving up

* Including alchemy exceptions in single function
2017-07-06 21:46:50 -07:00
Teemu R
8a7cfce67b Add component for xiaomi robot vacuum (switch.xiaomi_vacuum) (#7913)
* add component for xiaomi robot vacuum (switch.xiaomi_vacuum)

* enforce token length, update requirements_all.txt and .coveragerc

* bump version to avoid catching generic exception
2017-07-06 21:44:34 -07:00
mjj4791
5e71e9b826 buienradar==0.7, fix winddirection/azimuth, logging (#8281)
* buienradar==0.7, fix winddirection/azimuth, logging

* prevent multiple update cycles

* prevent multiple update cycles

* prevent multiple sensor updates for precipitation forecast

* prevent multiple sensor updates for precipitation forecast

* Update comments

* Adapted logging

* Adapted logging
2017-07-06 21:39:28 -07:00
Pierre Ståhl
db8bb53984 Add One-Time Password sensor (OTP) (#8332) 2017-07-06 21:25:54 -07:00
Craig J. Ward
692f4c293b update version (#8380) 2017-07-06 21:24:04 -07:00
John Mihalic
da37380410 Update pyHik to catch XML errors (#8384) 2017-07-06 21:23:47 -07:00
Paulus Schoutsen
fa4aa2244e Allow all panel urls (#8368)
* Allow all panel urls

* Lint
2017-07-06 20:58:21 -07:00
Michael Heinemann
c63bdd5afe Mqtt client_id fix for #8315 (#8366)
This applies what was the intended fix in #8336.

moves the fallback for setting client_id to the case when no mqtt config was provided at all. This should reflect the most common use case that fails.

This commit is a workaround and should be reverted when hbmqtt is fixed to allow empty client_id again.
2017-07-06 14:47:30 -07:00
clarkewd
20a9899354 Allow Pilight Binary Sensor to control reset_delay_sec through configuration (#8358)
* Allow Pilight Binary Sensor to control reset_delay_sec through configuration

* Define constant in platform

* Don't define constant twice
2017-07-06 21:09:31 +02:00
Johan Bloemberg
fe6a4b8ae5 Correct spelling of aliases, deprecate old config options. (#8348)
* correct spelling of aliases

* add deprecation

* Fix style.
2017-07-06 15:59:54 +02:00
Paulus Schoutsen
143044f8f1 Remove some more usage of run_in_executor (#8352)
* Remove usage of run_in_executor

* Lint
2017-07-06 14:08:32 +02:00
Fabian Affolter
d655c0e358 Upgrade aiohttp to 2.2.3 (#8363) 2017-07-06 13:56:50 +02:00
Paulus Schoutsen
46e030662d Fix pylint 1.7.2 no-else-return issues (#8361)
* Fix pylint 1.7.2 no-else-return issues

* Update tomato.py
2017-07-05 23:30:01 -07:00
Paulus Schoutsen
5779d64e98 Fix some issues for PyLint 1.7.2 (#8356)
* Fix some issues for PyLint 1.7.2

* More fixes

* Revert position change for cover
2017-07-05 20:02:16 -07:00
Lev Aronsky
83a5f932d1 Add citybikes platform (#8202)
* Initial commit - new CityBikes platform

* Several syntax fixes.

* Added imperial unit support.

* Added station list lenght validation.

* Style fixes.

* Updated requirements.

* Updated .coveragerc.

* Fixed style problems according to pylint output.

* Updated SCAN_INTERVAL value.

* Fixed station names.
Removed unnecessary calls to `slugify`.
Changed the base name to reflect the name of the bike sharing
network, instead of the more generic `citybikes`.

* Small style fix.

* Use async version of python-citybikes

* Made platform setup async.

* Made some more things async.

* Switched to constants.

* WIP: different approach to async.

* Removed python-citybikes depnedency to fix async issues.

* Removed unnecessary hidden property.

* Style fixes.

* Retry network detection.

* Style fixes, and base name usage.

* Fixes according to comments.

* Use cv.latitude instead of coercing to float.

* Updated requirements.

* Several fixes and improvements.

* Started using PlatformNotReady exception.
* Cached the networks list result to avoid unnecessary API requests.
* Switched the asyncio.timeout to use a constant.
* Refactored CityBikes API requests into a separate function

* Fixed linting errors.

* Removed unnecessary requirement.
2017-07-04 22:55:21 -07:00
Paulus Schoutsen
a12fa2e5bf Merge branch 'master' into dev 2017-07-04 21:53:35 -07:00
Paulus Schoutsen
ee37fc344b Merge pull request #8351 from home-assistant/release-0-48-1
0.48.1
2017-07-04 21:51:57 -07:00
Fabian Affolter
8cc0748db3 Temporary fix for the client_id generation (fixes #8315) (#8336)
* Temporary fix for the client_id generation (fixes #8315)

* Fix comment

* Move client id setting.

* Lint
2017-07-04 21:47:48 -07:00
Fabian Affolter
0ecceb601b Temporary fix for the client_id generation (fixes #8315) (#8336)
* Temporary fix for the client_id generation (fixes #8315)

* Fix comment

* Move client id setting.

* Lint
2017-07-04 21:47:30 -07:00
Fabian Affolter
2a1a5e53a1 Fix hass.data (fixes #8288) (#8290) 2017-07-04 21:43:15 -07:00
Paulus Schoutsen
c8b782189e Fix harmony (#8302)
* Fix harmony

* Fix 1 reference
2017-07-04 21:43:15 -07:00
Pascal Vizeli
74016c4179 Fix pathlib resolve (#8311)
* Fix pathlib resolve

* fix test
2017-07-04 21:43:15 -07:00
Adrien Ball
c30c8df449 Fix Snips json schema (#8317)
* Fix Snips json schema

* Fix test
2017-07-04 21:43:14 -07:00
Eugenio Panadero
58de661ad5 API POST has new state validation (fix for state = 0) (#8324)
* Fix validation of get new state

* Add unittest to check posting a state with zero value
2017-07-04 21:43:14 -07:00
bergemalm
f4a97db783 Fix arlo sensors. (#8333) 2017-07-04 21:43:14 -07:00
Paulus Schoutsen
b220ceec9c Update frontend 2017-07-04 21:41:22 -07:00
Paulus Schoutsen
fb796b5481 Version bump to 0.48.1 2017-07-04 21:38:48 -07:00
Pierre Ståhl
ea5bec3ef4 Add new feature to Apple TV platform (#8122)
* Lift Apple TV to pyatv 0.3.2

Update code to use basic new features.

* Support button presses in Apple TV

* Support device authentication

* Convert Apple TV to a component

A media_player platform and a remote platform will be loaded for each
manually configured or discovered device.

* Move device auth to apple_tv component

* Update requirements and coverage config

* Add scan support to apple_tv
2017-07-04 21:37:18 -07:00
Flavien Charlon
8185587100 Fix the "302" error in the UPC Connect component and remove the need to specify the router password (#8335)
* Remove the need to login on the UPC Connect component

* Remove unnecessary imports

* Update the unit tests for the UPC Connect component

* Fix the "302" error with the UPC Connect component

* Fix a flake8 error

* Update the unit tests for the UPC Connect component
2017-07-04 21:06:24 -07:00
Matthew Garrett
061a38cc3b Update Avion and Decora switches to match upstream changes (#7903)
The upstream Avion and Decora code has changed to punt retry logic out to
consumers, so update to match. As a bonus, Avion also gains support for
pulling switch configuration off the web rather than requiring manual
configuration.
2017-07-05 00:39:51 +02:00
Pascal Vizeli
23fc5e2c9f Bump dlib face_recognition to 0.2.0 (#8345)
* Update dlib_face_detect.py

* Update dlib_face_identify.py

* Update requirements_all.txt
2017-07-04 23:07:53 +02:00
Sabesto
6496c38ce6 Fix issue #8285 (#8340)
* Fixed a bug where changing fan speed was not possible

* Bump pymodbus version to 1.3.1 to fix issue #8285

* Changed all modbus components so that they use CONF_SLAVE from const.py
2017-07-04 17:01:35 +02:00
Fabian Affolter
3363b88a73 Only allow 'tls_insecure_set()' if cert is present (fixes #8329) (#8337)
Add an optional extended description…
2017-07-04 15:22:05 +02:00
Fabian Affolter
2e17d0926a Revert "Only allow 'tls_insecure_set()' if cert is present (fixes #8329)"
This reverts commit 85ac50cc77.
2017-07-04 13:46:38 +02:00
Fabian Affolter
85ac50cc77 Only allow 'tls_insecure_set()' if cert is present (fixes #8329) 2017-07-04 13:40:38 +02:00
Fabian Affolter
da61b18392 Partially revert #7931 (#8326) 2017-07-04 10:07:06 +02:00
bergemalm
8a88af20da Fix arlo sensors. (#8333) 2017-07-04 10:06:46 +02:00
John Mihalic
f8527e9773 Update pyEmby to fix media images (#8331) 2017-07-04 08:02:29 +02:00
Per Sandström
7977996c0d vsure 1.3.7 (#8321) 2017-07-04 06:26:55 +02:00
Eugenio Panadero
22681fbe08 API POST has new state validation (fix for state = 0) (#8324)
* Fix validation of get new state

* Add unittest to check posting a state with zero value
2017-07-03 23:35:57 +02:00
Fabian Affolter
1e655eea74 Fix pylint issue (#8325) 2017-07-03 22:02:43 +02:00
Adrien Ball
8d940fb585 Fix Snips json schema (#8317)
* Fix Snips json schema

* Fix test
2017-07-03 15:07:59 +02:00
Fabian Affolter
afe3dd8dbb Upgrade aiohttp to 2.2.2 (#8314)
* Upgrade aiohttp to 2.2.1

* Upgrade to aiohttp to 2.2.2
2017-07-03 13:48:53 +02:00
Fabian Affolter
bf96f28e95 Upgrade chardet to 3.0.4 (#8313) 2017-07-03 11:49:23 +02:00
Russell Cloran
5cba3085b4 zha: Strip whitespace from device names (#8306) 2017-07-03 08:31:16 +02:00
Fabian Affolter
407a419c83 Upgrade discord.py to 0.16.8 (#8304) 2017-07-03 08:30:54 +02:00
Robin
4ab778fd97 Fix doc link in header (#8305)
* Fix doc link in header

* Add missing `/`
2017-07-03 08:30:42 +02:00
Pascal Vizeli
ee7d4710c4 Fix pathlib resolve (#8311)
* Fix pathlib resolve

* fix test
2017-07-03 07:24:08 +02:00
Paulus Schoutsen
3a6434f566 Fix harmony (#8302)
* Fix harmony

* Fix 1 reference
2017-07-02 13:05:07 -07:00
Wolfgang Malgadey
a2f5b630d6 pytado moved to pypi (#8298) 2017-07-02 12:54:59 -07:00
Paulus Schoutsen
3f2fa0ed5a Disable Python 3.6-dev while it's broken 2017-07-02 11:52:24 -07:00
Robin
865865ca0f Add london_underground (#8272)
* Add tube_state

Add tube_state sensor

* Final cleanup

* Make corrections

Correct PLATFORM_SCHEMA

* Fix space

* Make test pass

* Correct format of test

Test still failing, don’t understand why

* correct description

* Make test pass

Preferred method below returns None

state = self.hass.states.get('sensor.london_overground')

* Format for hound

* indent

* Make requested changes to test, not working

Test fails with:

AssertionError: assert 0 > 0
where 0 = len([])

Surely I need tube_state.setup_platform ?

* Fixed test

Config was wrong

* Change component name to london_tube

* Update name to london_underground

Make consistent

* cleanup
2017-07-02 11:32:38 -07:00
Open Home Automation
05ced33648 Update knxip to 0.4 (better handling of reconnects) (#8289) 2017-07-02 12:59:45 +02:00
Fabian Affolter
b4165fe9f3 Fix hass.data (fixes #8288) (#8290) 2017-07-02 12:02:41 +02:00
Michaël Arnauts
47aa8c387a Update apcaccess to 0.0.13. Add "Percent Load Capacity" to INFERRED_UNITS. (#8277) 2017-07-02 11:24:07 +02:00
Paulus Schoutsen
2b94857ffd Merge branch 'master' into dev 2017-07-01 17:42:23 -07:00
Paulus Schoutsen
7461c57542 Merge pull request #8270 from home-assistant/release-0-48
0.48
2017-07-01 16:58:10 -07:00
Paulus Schoutsen
632f9a21b6 Update frontend 2017-07-01 16:53:50 -07:00
Mike Megally
da44f80b32 Create an index on the states table to help hass startup time (#8255) 2017-07-01 14:10:39 -07:00
Mike Megally
0bf5021c2c Create an index on the states table to help hass startup time (#8255) 2017-07-01 14:10:17 -07:00
Michael Fester
8fb49e8687 Snips ASR and NLU component (#8156)
* Snips ASR and NLU component

* Fix warning

* Fix warnings

* Fix lint issues

* Add tests

* Fix tabs

* Fix newline

* Fix quotes

* Fix docstrings

* Update tests

* Remove logs

* Fix lint warning

* Update API

* Fix Snips
2017-07-01 13:58:35 -07:00
Michael Fester
b82003ae08 Snips ASR and NLU component (#8156)
* Snips ASR and NLU component

* Fix warning

* Fix warnings

* Fix lint issues

* Add tests

* Fix tabs

* Fix newline

* Fix quotes

* Fix docstrings

* Update tests

* Remove logs

* Fix lint warning

* Update API

* Fix Snips
2017-07-01 13:58:12 -07:00
Will W
5f8dc8af20 components.knx - KNXMultiAddressDevice corrections (#8275)
1. The has_attributes was comparing names to addresses
2. Some errors outside of an except block were using
_LOGGER.except. This will cause an exception itself because there is no
trance context available to the logger
3. Added alias names for the address and state addresses so that they
can be accessed with the same
4. Added return values for the set_int_value and set_percentage methods
to allow error checking similar to the set_value method
5. Added the name of the configured object to the log messages to make
them more meaningful (otherwise multiple similar log messages are
received without any hint as to the target device)
2017-07-01 13:31:01 -07:00
Will W
c13fdd23c1 components.knx - KNXMultiAddressDevice corrections (#8275)
1. The has_attributes was comparing names to addresses
2. Some errors outside of an except block were using
_LOGGER.except. This will cause an exception itself because there is no
trance context available to the logger
3. Added alias names for the address and state addresses so that they
can be accessed with the same
4. Added return values for the set_int_value and set_percentage methods
to allow error checking similar to the set_value method
5. Added the name of the configured object to the log messages to make
them more meaningful (otherwise multiple similar log messages are
received without any hint as to the target device)
2017-07-01 13:30:39 -07:00
Fabian Affolter
e6e0e5263a Don't call update() in constructor (#8276) 2017-07-01 16:14:18 +02:00
Fabian Affolter
0981956caa Upgrade pyowm to 2.7.1 (#8274) 2017-07-01 12:53:29 +02:00
lrmate
d267fc608f Update modbus.py (#8256)
* Update modbus.py

Prevents Modbus binary sensors showing up as "unnamed_device".
Originally proposed here https://community.home-assistant.io/t/modbus-sensor/6751/11 by user Pjeter

* Update modbus.py
2017-06-30 23:56:46 -07:00
lrmate
e077998d38 Update modbus.py (#8256)
* Update modbus.py

Prevents Modbus binary sensors showing up as "unnamed_device".
Originally proposed here https://community.home-assistant.io/t/modbus-sensor/6751/11 by user Pjeter

* Update modbus.py
2017-06-30 23:32:10 -07:00
Paulus Schoutsen
d3bc8519c0 Update frontend 2017-06-30 22:34:55 -07:00
viswa-swami
d3adc6ddfb Camera services arm disarm including Netgear Arlo (#7961)
* Added camera service calls to arm/disarm the cameras. Entity id is optional so that with a single call we can arm all the cameras or specify a particular entity id to arm if applicable and possible in that camera type.

* Added camera service calls to arm/disarm the cameras. Entity id is optional so that with a single call we can arm all the cameras or specify a particular entity id to arm if applicable and possible in that camera type.

* Added camera service calls to arm/disarm the cameras. Entity id is optional so that with a single call we can arm all the cameras or specify a particular entity id to arm if applicable and possible in that camera type.

* Fixed the spaces and indentation related issues that houndci found

* Fixed the spaces and indentation related issues that houndci found

* Missed the const file which has the macros defined.

* Fixed the CI build error

* Fixed the CI build error because of unused variable in exception case

* Updating the arlo code based on comment from @balloob. Changed the arm and disarm to enable_motion_detection and disable_motion_detection respectively. Similarly fixed the AttributeError handling. Added dummy code to the demo camera also. Moved out the definitions in const.py into the camera __init__ file

* Fixed the comments posted by houndci-bot

* Fixed the comments posted by houndci-bot

* Fixed the comments posted by houndci-bot

* Fixed the comments posted by travis-ci integration bot

* Fixed the comments posted by travis-ci integration bot

* Fixed the comments posted by travis-ci integration bot for demo.py: expected 2 lines, found 1

* Updated code in camera __init__.py to use the get function instead of directly calling the member in the structure.

* Updated code in camera __init__.py

* Posting the updated code for PR based on @balloob's suggestions/recommendations

* Removed the arlo reference from demo code. Copy-paste error

* Removed the unused import found by hound bot

* Expected 2 lines before function, but found only 1.

* Based on @balloob's comments, moved these constants to the camera/arlo.py

* Added test_demo.py to test the motion enabled and motion disabled in camera component

* Fixing issues found by houndci-bot

* Fixing issues found by houndci-bot

* Fixing the code as per @balloob's suggestions

* Fixing the code as per @balloob's suggestions

* Fixing the test_demo failure. Tried to rewrite a base function to enable the motion in __init__.py and missed to add it to as a job.

* Fixing the hound bot comment

* Update arlo.py

* Update arlo.py
2017-06-30 22:24:36 -07:00
Josh
a3f586d097 Adding done_message to alert (#8116)
* Adding done_message to alert

Adding an optional entry to the config that will send a notification when an
alarm goes from on to off.

* Update test_alert.py

* Update test_alert.py
2017-06-30 22:24:36 -07:00
Paulus Schoutsen
f8c7fd212f Revert "Make Android app shortcut use 'Home Assistant' as name." (#8271)
* Revert "Version bump to 0.49.0.dev0 (#8266)"

This reverts commit 8e4394f173.

* Revert "Adding done_message to alert (#8116)"

This reverts commit 5e56bc7464.

* Revert "Camera services arm disarm including Netgear Arlo (#7961)"

This reverts commit ed20f7e359.

* Revert "Make Android app shortcut use 'Home Assistant' as name instead of just 'Assistant'. (#8261)"

This reverts commit 0bcb7839fb.
2017-06-30 22:24:36 -07:00
Paulus Schoutsen
b1f3492fd0 Notify.smtp: default to STARTTLS 2017-06-30 22:15:41 -07:00
Paulus Schoutsen
7123ec14be Revert "Make Android app shortcut use 'Home Assistant' as name." (#8271)
* Revert "Version bump to 0.49.0.dev0 (#8266)"

This reverts commit 8e4394f173.

* Revert "Adding done_message to alert (#8116)"

This reverts commit 5e56bc7464.

* Revert "Camera services arm disarm including Netgear Arlo (#7961)"

This reverts commit ed20f7e359.

* Revert "Make Android app shortcut use 'Home Assistant' as name instead of just 'Assistant'. (#8261)"

This reverts commit 0bcb7839fb.
2017-06-30 21:57:38 -07:00
Fabian Affolter
8e4394f173 Version bump to 0.49.0.dev0 (#8266) 2017-06-30 21:07:50 -07:00
Josh
5e56bc7464 Adding done_message to alert (#8116)
* Adding done_message to alert

Adding an optional entry to the config that will send a notification when an
alarm goes from on to off.

* Update test_alert.py

* Update test_alert.py
2017-06-30 21:07:12 -07:00
viswa-swami
ed20f7e359 Camera services arm disarm including Netgear Arlo (#7961)
* Added camera service calls to arm/disarm the cameras. Entity id is optional so that with a single call we can arm all the cameras or specify a particular entity id to arm if applicable and possible in that camera type.

* Added camera service calls to arm/disarm the cameras. Entity id is optional so that with a single call we can arm all the cameras or specify a particular entity id to arm if applicable and possible in that camera type.

* Added camera service calls to arm/disarm the cameras. Entity id is optional so that with a single call we can arm all the cameras or specify a particular entity id to arm if applicable and possible in that camera type.

* Fixed the spaces and indentation related issues that houndci found

* Fixed the spaces and indentation related issues that houndci found

* Missed the const file which has the macros defined.

* Fixed the CI build error

* Fixed the CI build error because of unused variable in exception case

* Updating the arlo code based on comment from @balloob. Changed the arm and disarm to enable_motion_detection and disable_motion_detection respectively. Similarly fixed the AttributeError handling. Added dummy code to the demo camera also. Moved out the definitions in const.py into the camera __init__ file

* Fixed the comments posted by houndci-bot

* Fixed the comments posted by houndci-bot

* Fixed the comments posted by houndci-bot

* Fixed the comments posted by travis-ci integration bot

* Fixed the comments posted by travis-ci integration bot

* Fixed the comments posted by travis-ci integration bot for demo.py: expected 2 lines, found 1

* Updated code in camera __init__.py to use the get function instead of directly calling the member in the structure.

* Updated code in camera __init__.py

* Posting the updated code for PR based on @balloob's suggestions/recommendations

* Removed the arlo reference from demo code. Copy-paste error

* Removed the unused import found by hound bot

* Expected 2 lines before function, but found only 1.

* Based on @balloob's comments, moved these constants to the camera/arlo.py

* Added test_demo.py to test the motion enabled and motion disabled in camera component

* Fixing issues found by houndci-bot

* Fixing issues found by houndci-bot

* Fixing the code as per @balloob's suggestions

* Fixing the code as per @balloob's suggestions

* Fixing the test_demo failure. Tried to rewrite a base function to enable the motion in __init__.py and missed to add it to as a job.

* Fixing the hound bot comment

* Update arlo.py

* Update arlo.py
2017-06-30 21:06:56 -07:00
Fabian Affolter
74acc5cf41 Merge branch 'master' into dev 2017-06-30 18:56:26 +02:00
Michaël Arnauts
0bcb7839fb Make Android app shortcut use 'Home Assistant' as name instead of just 'Assistant'. (#8261) 2017-06-30 18:51:07 +02:00
PhracturedBlue
17237e9d3f Implement templates for covers (#8100)
* Implement templates for covers

* Fix a few remaining pylint warnings

* Fix hound line-length warnings

* Fix one more hound line-length warning

* Fix quadruple-quotes an line length code-quality issues

* Irrelevant change to retrigger travis due to timeout

* Use volutuous Exclusive to check for mutex condition

* Fix incorrect state check
2017-06-30 08:24:29 -07:00
Michaël Arnauts
a663dbada0 Docker cleanup. (#8226) 2017-06-30 08:07:33 -07:00
Fabian Affolter
96e1d5524a Upgrade libnacl to 1.5.1 (#8259) 2017-06-30 11:12:21 +02:00
JudgeDredd
33fd2250fd further document add_node_secure (#8229)
added documentation to *attempt* explanation that add_node_secure will also function for adding unsecure nodes.
2017-06-30 10:00:38 +03:00
Per Sandström
31f17a91e6 verisure component names (#8251) 2017-06-30 08:53:14 +02:00
Andrey
d0720ac699 Add PlatformNotReady support for Sensibo (#8252) 2017-06-30 08:50:25 +02:00
Fabian Affolter
05acf1c10a Use constant and update ordering (#8246) 2017-06-30 08:46:22 +02:00
Fabian Affolter
27c92937f2 Use 'hass.data' instead of global (#8245) 2017-06-30 08:46:03 +02:00
Anders Melchiorsen
a328df6014 LIFX: Small code cleanups (#8228) 2017-06-30 02:10:28 +02:00
Eugenio Panadero
1fb4eefc2c better logging to debug when a message is not sent (#8248) 2017-06-29 21:13:46 +02:00
Fabian Affolter
0f12b4c955 Do not call update() in constructor (#8247)
Add an optional extended description…
2017-06-29 16:21:29 +02:00
Fabian Affolter
a9f14b67a8 Update docstrings (#8244) 2017-06-29 11:44:35 +02:00
Eugenio Panadero
445065700c update i2csense requirement (#8242) 2017-06-29 11:03:52 +02:00
Fabian Affolter
4bd96fd437 Upgrade python-digitalocean to 1.12 (#8241) 2017-06-29 10:52:12 +02:00
Michaël Arnauts
5dde0c2201 Comfoconnect fan component (#8073)
* Comfoconnect fan component.

* Fix linter. Don't store hass object when not needed.

* More code style.

* Rebase to dev and add to coverage ignore list.

* Use published package from pypi.
2017-06-28 18:04:54 +02:00
Open Home Automation
6846a76c46 KNX Cover tilt control (#8159)
* Added invert flag for position for actuators that uses 100% for fully closed position

* Implementation of tilt functionality

* Bugfix check tilt

* Formatting

* Formatting fixes

* Formatting

* Bugfix set_tilt

* Minor modifications in configuration section

* Formatting

* Update knx.py
2017-06-28 14:08:07 +02:00
Fabian Affolter
fa6e93f0c7 Do not call update() in constructor (#8148)
* Do not call update() in constructor

* Move handling to update and re-add throttle

* Fix indent

* Fix interval
2017-06-27 10:56:25 +02:00
Paulus Schoutsen
5ef274adce Cleanup automations yaml (#8223) 2017-06-27 10:36:26 +02:00
Eugenio Panadero
e39f7d3ef5 Fix homeassistant.start trigger (#8220)
* Fix homeassistant.start trigger

* ooops

* set sleep(0) just before changing to running state, revert async_block_till_done changes
2017-06-27 10:36:00 +02:00
Will W
88b9503962 add percentage (DPT_Scaling) KNX sensors (#8168)
* add percentage (DPT_Scaling) KNX sensors

1. moved basic functionality to KNXSensorBaseClass instead of
KNXSensorFloatClass
2. added "if" clause in setup for a "percentage" sensor type and added KNXSensorDPTScalingClass

* support-knx-percentage-sensor: lint correction

Updated convert method base sensor class to avoid lint warning
(R201 - Method could be a function)

* added PLATFORM_SCHEMA for configuration

1. added SCHEMA extension for defined keywords
2. moved fixed data for internal settings out of sensor logic
3. moved everything into standard KNXSensor object
4. added parsing of extra config parameters in __init__

* correct lint errors on support-knx-percentage-sensor
2017-06-26 22:25:54 -07:00
Eugenio Panadero
596093d564 telegram_bot platform to only send messages (#8186)
* add new telegram_bot platform to only send messages

* Fix async
2017-06-26 22:22:33 -07:00
natemason
23400c4b0a Fixed mqtt subscription filter on sys $ topics (#8166)
* Fixed mqtt subscription filter on sys $ topics

* fixed linting issue

* added unit tests for $ topics and changed fix to use re.escape

* merge upstream/dev mqtt unit tests

* Update test_init.py
2017-06-26 22:17:55 -07:00
Anders Melchiorsen
af54311718 LIFX: Move light effects to external library (#8222)
* LIFX: Move light effects to external library

This moves the LIFX light effects to the external library aiolifx_effects.

To get the light state synchronized between that library and HA, the LIFX
platform no longer maintains the light state itself. Instead, it uses the
cached state that aiolifx maintains.

The reorganization also includes the addition of a cleanup handler.

* Fix style
2017-06-26 22:05:32 -07:00
Pascal Vizeli
442dcd584b Improve executor pool size / speedup python 3.5 (#8215)
* Improve executor pool size / speedup python36

* fix style

* Add comment
2017-06-26 18:18:42 -07:00
Eugenio Panadero
1e4aec63ed guess the content_type in local_file cameras (#8217)
* guess the content_type in local_file cameras

* add unittest to check content_type of local_file cameras
2017-06-26 22:36:35 +02:00
Per Sandström
80c187f8ea WIP: Verisure app api (#7394)
update to verisure app api
2017-06-26 22:30:25 +02:00
Paulus Schoutsen
d73b695e73 EntityComponent to retry platforms that are not ready yet (#8209)
* Add PlatformNotReady Exception

* lint

* Remove cap, adjust algorithm
2017-06-26 09:41:48 -07:00
Adam Baxter
f02d169864 Fix Plex component to use port number in discovery. (#8197)
* Fix Plex component to use port number in discovery.

* Break line

* Correctly save port to config

* Handle port with fewer code changes

* This is stuck configuring and I'm not sure why

* Changes suggested by @dale3h
2017-06-25 18:06:15 -05:00
Pascal Vizeli
2dd7f0616e Add security layer to send file output things (#8189)
* Add security layer to send file output things

* Make telegram secure

* fix lint

* fix handling

* invert check

* resolve relative paths

* add test for relative paths

* fix lint

* fix tests

* Address paulus comments

* fix style

* fix tests

* Add more tests

* fix tests

* fix tests

* fix test p2

* fix lint

* fix tests

* Make it available for windows

* Change name / address comments

* fix set

* fix test

* fix tests

* fix test

* fix lint
2017-06-26 00:10:30 +02:00
Wim Haanstra
2f2952e0ec Openhardwaremonitor (#8056)
* Open Hardware Monitor sensor

Platform which is able to connect to the JSON API of Open Hardware Monitor and adds sensors for the devices.

* Remove copyright in header, not needed.

* - Removed old code
- Fixed typo’s in comments
- Removed log spamming
- Removed code that was unnecessary
- Use requests instead of urllib
- Moved sensor update functionality to data handler, to remove unwanted constructor parameters

* Fixed typo in comment
Added tests

* Added default fixture, to stabilize tests

* - Fix for values deeper than 4 levels, no longer relies on fixed level
- Fixed tests

* Removed timer in preference of helper methods

* Moved update functionality back to Entity….
Updated SCAN INTERVAL

* Added timeout to request
Removed retry when Open Hardware Monitor API is not reachable
Fixed naming of sensors
Flow optimalisations
Fixed tests to use states

* Remove unused import
2017-06-25 13:48:05 -07:00
Adam Mills
8358542ce0 Remove unnecessary thread_ident assignment (#8194)
* Remove mocking of _thread_ident

* Re-add run_loop thread_ident assignment
2017-06-25 16:39:05 -04:00
Eugenio Panadero
4ca5ed25bc add option to set content_type in camera.generic to support 'svg cameras' (#8188)
* add custom content_type to support 'generic svg cameras'

* add unittest to check content_type for svg generic camera

* Tweak tests
2017-06-25 12:25:14 -07:00
Paulus Schoutsen
7bf6ceafec Split mock_service (#8198) 2017-06-25 10:53:15 -07:00
Paulus Schoutsen
1cfed4f015 Fix plants calling async methods from sync context (#8200) 2017-06-25 10:07:28 -07:00
Paulus Schoutsen
a082ffca1d Fix MySensors climate (#8193) 2017-06-24 18:11:34 -07:00
Oliver
1b563b0640 Pushed to version 0.5.1 of the library (#8190) 2017-06-24 12:14:57 -07:00
Adam Mills
1fe189e9cb Switch to new zwave entity ids by default (#8192) 2017-06-24 15:01:57 -04:00
Marc Plano-Lesay
edeb92ea42 Add offset option to sensor.gtfs (#7980)
* Add offset option to sensor.gtfs

* Fix long lines in sensor.gtfs

* Expose GTFS offset as an attribute
2017-06-24 17:45:14 +02:00
Alex Mekkering
c1095665e9 added optional node_id to MQTT discovery (#8096) 2017-06-24 00:46:41 -07:00
Kane610
2a1f8af10a Axis service vapix call (#7794)
* Initial commit for an Axis service to do Vapix calls to device

* Added check to see if metadatastream initiated properly

* Make sure to configure the correct IP address when setting up registered devices on system start

* Manage reconnection when device is discovered with a different IP

* Cleaned up setting new IP

* Better naming of event for new IP

* New version of dependency axis

* Fix flake8 failing

* Break out service default strings to constants

* Use the dispatcher and not the core event bus for internal communication
2017-06-24 00:14:57 -07:00
Bas Schipper
6234f2d73f Added buienradar precipitation forecast average & total sensors (#8171)
* Added precipitation forecast average & total sensors

* Fixed some code style issues

* Fixed some code style issues

* Minor fix default timeframe

* Update buienradar.py

* Update buienradar.py
2017-06-24 00:12:52 -07:00
Paulus Schoutsen
b488663f2c Update Dockerfile 2017-06-23 23:13:38 -07:00
Sean Dague
a55d8776ff Throw exception if _convert_for_display called on non Number (#8178)
In trying to come up for some reason behind issue #6365 (which only
happens on some platforms) the best guess is that some components are
managing to get a string value all the way up to the Polymer UI for
temperature, which then an increment of +0.5 is treating as a string
concat operation instead of addition. So 20 + 0.5 becomes 200.5 hits
the max thermostat value.

This will throw an exception if the climate temp value isn't a
number. That's going to turn a soft fail into a hard fail on
potentially a number of platforms. Mysensors is one of the platforms
that was reported as having the issue. So put some explicit float
casts where that might be coming from as well.
2017-06-23 23:03:37 -07:00
Ryan Nowakowski
5ceb4c404d Fix radiotherm model CT50 (#8181)
Model CT50 has an "Auto" mode.  When mode is set to auto we need to ask
what the current state is: cool or heat.  Then we can query the
appropriate target temperature.

Without this fix, the target temperature shows up blank in the UI and
setting the mode fails.
2017-06-23 22:53:10 -07:00
lrmate
0061cece0c Update buienradar.py (#8173)
Swapped unit of measurement 'winddirection' vs 'windazimuth'
2017-06-23 22:51:45 -07:00
Morten Lied Johansen
0099168ff8 Add device tracker for Linksys Smart Wifi devices (#8144)
* Add device tracker for Linksys Smart Wifi devices

* Fixing code style
2017-06-23 22:36:04 -07:00
Paulus Schoutsen
87c89752ab Revert "Add libboost-python1.62-dev (fixes #7851)" (#8182)
* Revert "Uninstall enum34 in python3.6 docker image (#8103)"

This reverts commit 45f6f4443a.

* Revert "Add libboost-python1.62-dev (fixes #7851) (#7868)"

This reverts commit f1290d3135.
2017-06-23 22:33:33 -07:00
Jean Regisser
45f6f4443a Uninstall enum34 in python3.6 docker image (#8103)
* Uninstall enum34 in python3.6 docker image

This is a short term fix for #7733

What's happening is the following dependencies are pulling enum34:
- pygatt
- libsoundtouch
- yeelight
However, enum34 is not meant to be installed in Python versions 3.4+
and causing the `AttributeError: module 'enum' has no attribute 'IntFlag'``

I've submitted patches to these projects so we don't have to do this
manual uninstall in the future.

* Update Dockerfile
2017-06-23 22:29:39 -07:00
Fabian Affolter
f1290d3135 Add libboost-python1.62-dev (fixes #7851) (#7868) 2017-06-23 22:16:19 -07:00
Omar Usman
746aae51ec Add ClickSend notify service. (#8135)
* Add ClickSend notify service.

* PR #8135 changes.

- Some code spacing fixes.
- Add timeout to requests.
- Change doc url.
- Use const.py as much as possible.
- Check credentials to determine if setup fails or not.
- Add docstrings.
- Use string formatting.

* PR #8135 changes.

- Remove unused variables.
- Continuation line under-indented for visual indent.

* PR #8135 changes.

- Format code based on PEP8.

* PR #8135 changes.

- Remove unused base64 dependency.

* PR #8135 changes.

- Fix: D205: 1 blank line required between summary line and description (found 0)
- Fix: standard import "import json" comes before "import requests"

* PR #8135 changes.

- Add files to .coveragerc

* Remove obvious comments and set constant
2017-06-23 22:51:41 +02:00
Wolfgang Malgadey
da9430ed12 Tado climate device (#8041)
* added default parameter

* zone overlay can be set with or without a temperature and with or without a duration. Duration is not supported by hass

* Fixes issue #7059 with missing sensorDataPoints

* Fixes issue #6943 added ac_mode

* ac_mode cases
* added fan modes
* changed handling of device state OFF

* fixed an error initializing a dictionary (#6943)

* changed pytado version

* activated pytado debugging

* Changed pyTado version

* mytado.com changed authentication challenge

* Fixed linelength and whitespace issues

* requirements to pytado changed
2017-06-23 18:45:44 +02:00
Tim Wilde
bef22076ea Use version 1.3 of radiotherm (#8164)
Add an optional extended description…
2017-06-23 11:08:23 +02:00
Bas Schipper
fe93b51017 Fixed rfxtrx binary_sensor off command (#8160)
* Fixed applying rfxtrx binary off command

* Fixed some deprecation issues
2017-06-22 23:00:44 +02:00
Eugenio Panadero
07293e8d1e add telegram_bot service: delete_message (#8153)
* add telegram_bot service: delete_message

* better validating for `last` message_id option
2017-06-22 15:03:11 +02:00
Open Home Automation
ca71d34076 Added invert flag for position for actuators that uses 100% for fully closed position (#8147) 2017-06-22 13:42:13 +02:00
Anton Lundin
548417761e ubus: Refresh session on Access denied (#8111)
When a openwrt router reboots, all the session ids gets invalidated.
In that case we need to log in again and get a new session id.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-06-22 13:34:57 +02:00
Andrey
7b8ad1d365 Switch rachiopy to pypi (#8040)
* Switch rachiopy t pypi

* Update rachio.py

* Update requirements_all.txt
2017-06-22 13:34:00 +02:00
Fabian Affolter
61cb6ec3dc Upgrade libsoundtouch to 0.6.2 (#8149) 2017-06-22 13:27:42 +02:00
Fabian Affolter
349746f5f2 Upgrade python-telegram-bot to 6.1.0 (#8151) 2017-06-22 13:27:02 +02:00
Oliver
2e3b279873 Add support of Zone2 and Zone3 (#8025)
* Add support of Zone2 and Zone3

* Changes from balloobs feedback
2017-06-21 22:54:10 -07:00
Yannick POLLART
f26861976d Rfxtrx binary sensor (#6794)
* Added rfxtrx binary sensors to a new branch

* binary_sensor/rfxtrx: added support for automatic_add

* Fixed pylint warnings

* off_delay is set wit clearer time specifiers (cv.time_period)

* fire_event config attribute is now supported by rfxtrx binary sensors.

* Cosmetic ordering

* Fix lint errors for PR requirements.

* Fixed indents, line length and comment problems.

* Yet another line too long fix...

* Using existing attributes and config constants.

* Cosmetic fix (ATTR_DATABITS -> ATTR_DATA_BITS)

* Removed unused attribute

* FIX masked device id logging message

* FIX line too long

* FIX trailing white space

* FIX: rfxtrx binary_sensor manages its own devices only.

* Added a basic config helper for pt2262 devices

* Make pylint happy

* Fixed most houndci-bot-detected issues

* Fix TOX complaint about blank line after function docstring

* Fix data bit value calculation

* Fixed line too long

* Removed unnecessary code.

* remove trailing whitespace

* Added hass property to device object.
2017-06-21 22:48:45 -07:00
Anthony Hughes
6bfeac7f80 Harmony auto discovery via netdisco (#7741)
* Use netdisco to automatically discover harmony hubs.

* Allow some settings in configuration.yml to override even on discovered hubs.

* Global is not required as no assignment on variable

* Use `set` instead of list for perf

* Store cache of discovered devices against `hass.data` rather than in global

* Handle case if the device cache is empty

* Fix indentation issue
2017-06-21 22:43:35 -07:00
Miha Lunar
a95fe588ca LimitlessLED: Configurable fade-out behavior (#7369)
* Configurable fade-out behavior

Adds a per-group "fade" option with values of "out" (default) or "none".
By default, the lights are faded out when turned off, but this can cause usability issues when manually switching wall switches, since the bulbs turn back on at minimum brightness.

* Changed fade value from enum to boolean

* No need to fall back to default since voluptuous takes care of that.
2017-06-21 22:22:24 -07:00
Eugenio Panadero
e5d11dd1a5 Add new BH1750 light level sensor (#8050)
* new sensor platform
* requirements_all and .coveragerc update
2017-06-22 07:09:08 +02:00
Eugenio Panadero
435e5c8a91 Add I2c HTU21D temperature and humidity sensor for Raspberry Pi (#8049)
* Add new HTU21D temperature and humidity sensor

* new sensor platform
* requirements_all and .coveragerc update

* fix lint

* review changes: move sensor code to external module

* remove debug log msg

* add i2csense to COMMENT_REQUIREMENTS, require i2csense 0.0.3

* Add new HTU21D temperature and humidity sensor

* new sensor platform
* requirements_all and .coveragerc update

* fix lint

* review changes: move sensor code to external module

* remove debug log msg

* add i2csense to COMMENT_REQUIREMENTS, require i2csense 0.0.3

* change style for hass

* fix requirements
2017-06-22 07:05:58 +02:00
Jose Juan Montes
8d0553d9e6 Adds CPU temp monitoring, and allow startup when endpoint is not yet available. (#8093)
* Adds CPU temp monitoring, and allow startup when endpoint is not yet available.

* Added support for available() to glances sensor.
2017-06-21 22:45:15 +02:00
Charles Blonde
9a239d1afb Upgrade libsoundtouch to prevent Python3.6 errors with enum. #7733 #8103 (#8143) 2017-06-21 22:20:30 +02:00
Paulus Schoutsen
9252854f99 Merge pull request #8141 from home-assistant/release-0-47-1
0.47.1
2017-06-21 09:24:12 -07:00
Paulus Schoutsen
8d76e2679d Allow iteration in python_script (#8134)
* Allow iteration in python_script

* Add tests
2017-06-21 09:09:08 -07:00
Alan Fischer
4b1dcad7ae Fixed iTach command parsing with empty data (#8104)
* Fixed iTach command parsing with empty data

* Switched to using format
2017-06-21 09:09:08 -07:00
Phil Hawthorne
b45c386fd6 Update InfluxDB to handle datetime objects and multiple decimal points (#8080)
* Update InfluxDB to handle datetime objects

Updates the InfluxDB regex to ignore datetime objects being coverted
into float values.

Adds tests to the component to ensure datetime objects are corectly
handled.

* Fix Hound errors

Fixes errors from Hound bot

* Update InfluxDB to handle multiple decimal points

Changes the way InfluxDB handles values such as 1.2.3.4 to be 1.234 so
it stores in InfluxDB as a valid float value

* Fix lint issues

Reduce the size of a line for the linter

* Update InfluxDB to pass on unknown variable

If we get an error trying to convert a variable to a float, let's ignore
it completely

* Make InfluxDB Regex constants

Makes the Regex's used by InfluxDB constants so they don't need to be
compiled each time

* cleanup

* fix lint

* Update regex

* fix tests

* Fix JSON body missing new line character

* fix exceptions
2017-06-21 09:09:08 -07:00
Charles Blonde
cb5fa79835 Fix Dyson async_add_job (#8113) 2017-06-21 09:09:08 -07:00
Tsvi Mostovicz
b74217bec2 Fix lights issue #8098 (#8101)
* Fix lights issue #8098

* Don't check self._color to decide whether to calll get_color()

self._color is None on init, so get_color() will never be called.
2017-06-21 09:09:08 -07:00
Paulus Schoutsen
fcf60e740d Version bump to 0.47.1 2017-06-21 09:08:20 -07:00
Eugenio Panadero
bb05600010 Add I2c BME280 temperature, humidity and pressure sensor for Raspberry Pi (#7989)
* Add new BME280 temperature, humidity and pressure sensor

* Add BME280 sensor to optional requirements and .coveragerc

* move validation to sensor handler, async fix in setup

* fix Invalid attribute name

* review changes: move sensor code to external module

* async fix

* add i2csense to COMMENT_REQUIREMENTS, require i2csense 0.0.3, round prec to 1 dec

* change style for hass

* fix lint

* fix lint part 2
2017-06-21 17:24:39 +02:00
Thibault Cohen
d3bb6d3988 Decora light: Fix brightness level in UI (#8139) 2017-06-21 16:37:27 +02:00
Thibault Cohen
f3945147a4 Add current balance to hydroquebec sensor (#8138) 2017-06-21 16:36:20 +02:00
Paulus Schoutsen
6398e92836 Allow iteration in python_script (#8134)
* Allow iteration in python_script

* Add tests
2017-06-21 13:32:50 +02:00
Steven Conaway
4d2b79156d Change Error Message when Turning off ISY994 Light (#8131) 2017-06-21 09:38:12 +02:00
Fabian Affolter
b6d335f993 Do not call update() in constructor (#8120) 2017-06-21 09:35:44 +02:00
lunar-consultancy
4b82c34b8f Added RFXTRX UV badge (#8129) 2017-06-21 08:55:51 +02:00
Paulus Schoutsen
66fc852363 Update frontend 2017-06-20 21:10:53 -07:00
Paulus Schoutsen
87274879a8 Upgrade RestrictedPython dependency (#8132) 2017-06-20 19:30:01 -07:00
Fabian Affolter
e4dbf8033c Upgrade aiohttp to 2.2.0 (#8121) 2017-06-21 00:35:49 +02:00
Fabian Affolter
43db94d62d Upgrade sqlalchemy to 1.1.11 (#8124) 2017-06-21 00:32:49 +02:00
Fabian Affolter
6d5fca2db1 Upgrade paho-mqtt to 1.3.0 (#8125) 2017-06-21 00:32:04 +02:00
Fabian Affolter
d5e55448ef Upgrade mutagen to 1.38 (#8126) 2017-06-21 00:29:35 +02:00
Alan Fischer
4ad998378f Fixed iTach command parsing with empty data (#8104)
* Fixed iTach command parsing with empty data

* Switched to using format
2017-06-20 15:26:18 +02:00
Fabian Affolter
d46607c0d0 Add option to specify the location of the API (fixes #8115) (#8118) 2017-06-20 14:09:54 +02:00
Luar Roji
04920fa0bf Only mark active DHCP clients as present (#8110)
We only want to know which of the DHCP clients are indeed active.

For example: I've a table of static DHCP leases with most of the IPs of my network, so this module is always detecting them as present. With my patch only the active ones will be detected as present.

I already mentioned here: https://github.com/home-assistant/home-assistant/pull/7366#issuecomment-302950139
2017-06-20 12:16:56 +02:00
Fabian Affolter
1928da1fae Remove config details (see docs) (#8119) 2017-06-20 12:09:42 +02:00
Phil Hawthorne
06b051c53d Update InfluxDB to handle datetime objects and multiple decimal points (#8080)
* Update InfluxDB to handle datetime objects

Updates the InfluxDB regex to ignore datetime objects being coverted
into float values.

Adds tests to the component to ensure datetime objects are corectly
handled.

* Fix Hound errors

Fixes errors from Hound bot

* Update InfluxDB to handle multiple decimal points

Changes the way InfluxDB handles values such as 1.2.3.4 to be 1.234 so
it stores in InfluxDB as a valid float value

* Fix lint issues

Reduce the size of a line for the linter

* Update InfluxDB to pass on unknown variable

If we get an error trying to convert a variable to a float, let's ignore
it completely

* Make InfluxDB Regex constants

Makes the Regex's used by InfluxDB constants so they don't need to be
compiled each time

* cleanup

* fix lint

* Update regex

* fix tests

* Fix JSON body missing new line character

* fix exceptions
2017-06-20 07:53:13 +02:00
Charles Blonde
473d765bb9 Fix Dyson async_add_job (#8113) 2017-06-19 23:50:27 +02:00
sn0oz
8e34c27b63 Added SMTP SSL/TLS support (#7960)
* Added SMTP SSL/TLS support

* added new encryption option

* validation of encryption option

* Fix lint issues

* Rename var
2017-06-19 14:19:31 +02:00
Eugenio Panadero
77aa2e940d increase timeout for setWebhook to 10s (#8102)
Add an optional extended description…
2017-06-19 12:03:58 +02:00
Tsvi Mostovicz
3bbaf37193 Fix lights issue #8098 (#8101)
* Fix lights issue #8098

* Don't check self._color to decide whether to calll get_color()

self._color is None on init, so get_color() will never be called.
2017-06-19 09:54:13 +02:00
Andrey
b2d6ff9783 More updates to zwave services.yaml file (#8083) 2017-06-18 22:38:14 -07:00
Will W
4fdde4f0e2 add knx cover support (#7997)
* add knx cover

also corrected bugs in device config

1. overwriting of addresses in KNXMultiAddressDevice
2. setting and getting int values
3. added percentage scaling

* Update __init__.py
2017-06-18 22:30:39 -07:00
Jeff Wilson
756768e745 Add support for Insteon FanLinc fan (#6959)
* Add support for Insteon FanLinc fan

* Upgrade insteonlocal dependency to 0.49

* Lint/flake fixes

* Remove configurator

* Make Hound fixes

* Revert "Make Hound fixes" and "Remove configurator"

This reverts commit 04d1f7fdb1.
This reverts commit 7b8278d7cf.
2017-06-18 21:43:10 -07:00
Diogo Gomes
83b791489b Upnp properties (#8067)
* make port mapping optional

* dependencies + improvements

* Added bytes and packets sensors from IGD

* flake8 check

* new sensor with upnp counters

* checks

* whitespaces in blank line

* requirements update

* added sensor.upnp to .coveragerc

* downgrade miniupnpc

Latest version of miniupnpc is 2.0, but pypi only has 1.9

Fortunately it is enough

* revert to non async

miniupnpc will do network calls, so this component can’t be moved to
coroutine

* hof hof

forgot to remove import ot asyncio
2017-06-18 21:32:39 -07:00
Eugenio Panadero
35132f9836 media player Kodi: handle TransportError exceptions when calling JSONRPC API methods (#8047)
* handle TransportError exceptions when calling JSONRPC API

* use double quotes for log messages; show TransportErrors as in async_ws_connect

* fix spaces around keyword / parameter

* fix logging message

* review changes
2017-06-18 23:00:02 +02:00
Paulus Schoutsen
0e08785373 Update frontend 2017-06-18 11:37:15 -07:00
Per Osbäck
bf0dbdfd6a update pywebpush to 1.0.5 (#8084) 2017-06-18 10:51:37 -07:00
Michaël Arnauts
04407b8623 Cleanup .coveragerc (#8088) 2017-06-18 10:50:35 -07:00
Michael Auchter
fb0ee34f10 mpd: implement support for seek, shuffle, and clear playlist (#8090)
* mpd: add shuffle and clear_playlist support

* mpd: implement seek
2017-06-18 18:31:45 +02:00
Myles Eftos
ef63cfe8e4 Stopping the logfile spam by piping STDERR to /dev/null (#8081) 2017-06-18 11:44:41 +02:00
Paulus Schoutsen
e40f72e773 Merge branch 'master' into dev 2017-06-17 12:13:59 -07:00
Paulus Schoutsen
cec8ccb1a4 Version bump to 0.48.0.dev0 2017-06-17 12:13:46 -07:00
Paulus Schoutsen
9b1ed4e79b Merge pull request #8055 from home-assistant/release-0-47
0.47
2017-06-17 12:07:58 -07:00
happyleavesaoc
8fffaebe50 bump ups (#8075) 2017-06-17 11:12:50 -07:00
happyleavesaoc
84aab1c973 bump usps version (#8074) 2017-06-17 11:12:50 -07:00
Caleb
a2fbc0d2ef Update pyunifi component to use APIError passed from pyunifi 2.13. Better accommodate login failures with wrapper in pyunifi 2.13. (#7899)
* Pyunifi update

* Update pyunifi_test

* Import API Error

* Adjust test_unifi.py to import APIError

* Remove urllib import

* Remove urllib import from test

* Try fix mock

* Remove automations.yaml

* Lint
2017-06-17 11:09:44 -07:00
Caleb
6a017efc0e Update pyunifi component to use APIError passed from pyunifi 2.13. Better accommodate login failures with wrapper in pyunifi 2.13. (#7899)
* Pyunifi update

* Update pyunifi_test

* Import API Error

* Adjust test_unifi.py to import APIError

* Remove urllib import

* Remove urllib import from test

* Try fix mock

* Remove automations.yaml

* Lint
2017-06-17 11:09:27 -07:00
Paulus Schoutsen
363a429c41 Fix EntityComponent handle entities without a name (#8065)
* Fix EntityComponent handle entities without a name

* Implement solution by Anders
2017-06-17 10:59:18 -07:00
Lev Aronsky
9fc22ee47a Added 'all_plants' group and support for plant groups state. (#8063)
* Added 'all_plants' group and support for plant groups state.

* Reversed the group states.
2017-06-17 10:59:18 -07:00
Pascal Vizeli
a250f583eb Fix attribute entity (#8066)
* Bugfix entity attribute setter

* Fix tests

* Fix tests part 2

* Change filter only None

* Fix tests part 3

* Update entity.py

* Fix tests
2017-06-17 10:59:18 -07:00
Andrey
bf495edbb5 Add to zwave services descriptions (#8072) 2017-06-17 10:59:18 -07:00
Paulus Schoutsen
3ea7dee83d Always enable monkey patch (#8054) 2017-06-17 10:59:18 -07:00
pezinek
d796e8db5c No update in MQTT Binary Sensor #7478 (#8057) 2017-06-17 10:59:18 -07:00
Pascal Vizeli
d24b45054a Update numpy 1.13.0 (#8059) 2017-06-17 10:59:18 -07:00
Paulus Schoutsen
18935440ed Fix EntityComponent handle entities without a name (#8065)
* Fix EntityComponent handle entities without a name

* Implement solution by Anders
2017-06-17 10:50:59 -07:00
Lev Aronsky
2ba6b3a2ab Added 'all_plants' group and support for plant groups state. (#8063)
* Added 'all_plants' group and support for plant groups state.

* Reversed the group states.
2017-06-17 10:22:23 -07:00
Pascal Vizeli
2438c6b7c2 Fix attribute entity (#8066)
* Bugfix entity attribute setter

* Fix tests

* Fix tests part 2

* Change filter only None

* Fix tests part 3

* Update entity.py

* Fix tests
2017-06-17 10:03:49 -07:00
Andrey
32a84f1466 Add to zwave services descriptions (#8072) 2017-06-17 10:02:37 -07:00
happyleavesaoc
0002a895ca bump usps version (#8074) 2017-06-17 18:42:56 +02:00
happyleavesaoc
d0b43b187a bump ups (#8075) 2017-06-17 18:42:12 +02:00
John Mihalic
33d381731f Bump pyEmby version to account for API changes (#8070) 2017-06-17 18:41:35 +02:00
Eugenio Panadero
18f81d7824 Add option to set language of openweathermap sensor, and handle updating errors (#8046)
* Add option to set language of openweathermap sensor messages

* handle error updating openweathermap sensor
2017-06-17 12:37:34 +02:00
Fabian Affolter
844c8149d7 Add initial support for Shiftr.io (#7974)
* Add initial support for Shiftr.io

* Fix lint issue

* Use paho-mqtt instead of internal MQTT object

* remove async flavor while paho is not async
2017-06-17 12:34:12 +02:00
pezinek
7617864ba5 Failed to parse response from WU API: 'record' (and 'recordyear') #7747 (#8058) 2017-06-17 12:32:22 +02:00
jshore1296
58c234466c Allow config of latitude and longitude (#8068)
This will allow for dynamically updating weather states, for instance if
you wanted to use the latitude and longitude of a phone or other device
to get the weather for your current location.
2017-06-17 10:41:11 +02:00
Phil Hawthorne
9071946e87 Remove % sign from Vera Battery Levels (#8069)
Vera devices are reporting battery levels as a sting by appending a
percentage sign (%) on the end.

To make the Vera component act like other Home Assistant components,
let's remove the percentage sign from the battery report levels so that
we only display the battery level.

This may be a "breaking change" if people are relying on the Vera
battery levels to be a string instead of an int. However, this will make
the battery level reports compatible with everything else.
2017-06-17 10:38:15 +02:00
Paulus Schoutsen
b24aa24f6a Always enable monkey patch (#8054) 2017-06-16 17:17:18 -07:00
Andrey
1fde234c78 Fix some warnings found by quantifiedcode (#8027)
* Cleanup of warnings by quantifiedcode

* Fix lint

* Fix test

* Delete insteon_hub component

* Also update .coveragerc
2017-06-16 22:44:14 +03:00
Adam Mills
d67f3b8060 Use standard entity_ids for zwave entities (#7786)
* Use standard entity_ids for zwave entities

* Include temporary opt-in for new entity ids

* Update link to blog post

* Update tests

* Add old entity_id as state attribute

* Expose ZWave value details

* Update tests

* Also show new_entity_id

* Just can't win with this one
2017-06-16 13:25:12 -04:00
Adam Mills
afb9cba806 Use standard entity_ids for zwave entities (#7786)
* Use standard entity_ids for zwave entities

* Include temporary opt-in for new entity ids

* Update link to blog post

* Update tests

* Add old entity_id as state attribute

* Expose ZWave value details

* Update tests

* Also show new_entity_id

* Just can't win with this one
2017-06-16 13:07:17 -04:00
pezinek
1c2f4866e2 No update in MQTT Binary Sensor #7478 (#8057) 2017-06-16 14:55:59 +02:00
Pascal Vizeli
e90ae2fb75 Update numpy 1.13.0 (#8059) 2017-06-16 11:47:48 +02:00
Paulus Schoutsen
4339e9aab1 version bump to 0.47 2017-06-15 22:51:13 -07:00
Paulus Schoutsen
9b640f6a81 Add comment to default config 2017-06-15 22:31:22 -07:00
Alex Harvey
437ddb8dea Updater improvements to send option component information (#7720)
* Setup to send component data is option is enabled

* testcases, as well as moved to a single boolean, passed to the function

* fixed pep8 failures

* Clarify config option.
2017-06-15 22:29:18 -07:00
Erik Eriksson
a119bd0056 Provide entity_id to avoid sensor mixup (fixes #7636). Use async_dispatcher. Provide icon. (#7946)
* Avoid sensor mixup. Fixes #7636. Also provide icon. Plus some smaller
fixes.

* fix async p1

* Create volvooncall.py
2017-06-15 22:28:30 -07:00
matt2005
0eaad46d93 Added ONVIF camera component (#7979)
* Added ONVIF camera component

* added requirements

* corrected long lines

* fixed indenting

* fixed indenting

* removed bad whitespace

* updated coveragerc

* Added ONVIF camera component

* added requirements

* corrected long lines

* fixed indenting

* fixed indenting

* removed bad whitespace

* updated requirements

* updated requirements

* Added ONVIF camera component

* added requirements

* corrected long lines

* fixed indenting

* fixed pylink error indenting

* Added ONVIF camera component

* added requirements

* corrected long lines

* fixed indenting

* fixed indenting

* removed bad whitespace

* updated requirements

* fixed indenting

* removed bad whitespace

* updated requirements

* fixed pylink error indenting

* rebased and fixed requirements

* Removed Debug logging

* Added info logging to show URL being used.

* corrected spacing

* Tidied up and renamed input to host

* fixed typo

* corrected line lengths

* added default to ffmpeg_arguments

* removed unecessary ffmpeg arguements

* changed to use .format instead of +

* fixed indenting

* cleanup & make it more readable
2017-06-15 22:28:17 -07:00
Jean-Michel Ruiz
8af6bacfd0 media_player.firetv - Adding support for https. (#8022)
* Adding support for https.

This change allows to access a firetv-server instance that runs over https (via a reverse proxy for exemple).
Default stays http, but if `ssl: true` is set in the configuration the connection goes over https.

Successfully tested.

* respecting the 79 characters line limit
2017-06-15 22:23:10 -07:00
Giuseppe
09ca440c20 Fixed the Wind sensor following new release of netatmo-api-python (#8030)
* Fixed the Wind sensor following new release of netatmo-api-python

The NetAtmo PR was at:
https://github.com/jabesq/netatmo-api-python/pull/5

Essentially, this commit adds a protection when adding an incorrect
monitored conditions to avoid to fail the entire NetAtmo component,
plus for consistency reasons all conditions are now in lower case.

* Fixes following the CI tests
2017-06-15 22:14:46 -07:00
Paulus Schoutsen
74cc675a38 Restrict Python Script (#8053) 2017-06-15 22:13:10 -07:00
boojew
c478f2c7d0 Added host variable to Splunk.py and updated tox tests (#8052)
* Added host variable to Splunk.py and updated tox tests

* Update splunk.py

* Update splunk.py
2017-06-15 20:41:19 -07:00
Martin Tremblay
a3a702b269 Adding ssocr to docker to support Seven Segments Display (#8028)
* Adding ssocr to docker to support Seven Segments Display

* Adding cleanup
2017-06-15 20:31:30 -07:00
Paulus Schoutsen
92a6f21cc2 Update frontend 2017-06-15 20:29:11 -07:00
Pascal Vizeli
814834512a Group service / dynamic handling (#7971)
* Add Service to group

* Finish service

* Add service functions

* fix lint

* Address paulus comments

* fix lint & cleanup

* fix lint

* fix lint

* fix lint p3

* add test for check group

* add more tests

* fix lint

* Update service.yaml

* Fix order for tests

* Fix comment

* Fix test

* Fix tests

* Fix name in tests

* Fix view

* Fix default value

* Fix lint

* Fix key error

* add name

* migrate component entity

* fix tests

* fix import

* migrate device tracker

* fix lint

* fix bug

* fix logic

* fix lint

* fix tests

* fix generator

* fix group

* fix other tests.

* Not need to load group on first stage anymore.

* fix service

* add more group depency

* fix tests

* Revert "fix tests"

This reverts commit 35a922b3a8.

* Real fix

* fix test p2

* fix test p3

* fix test p4

* fix test p5

* fix test p6

* fix lint

* fix test p7

* Rename attribute

* fix group test

* fix bug

* fix flagy tests

* fix service.yaml

* fix lint
2017-06-16 00:52:28 +02:00
Alan Fischer
46f3088a70 Vera fix for dimmable vs rgb lights (#8007)
* Differentiate between dimmable & rgb lights

* Updated requirements

* Cache _has_color for supported_features

* simplify & cleanup code

* Create vera.py
2017-06-16 00:28:24 +02:00
Fabian Affolter
deed760008 Upgrade zeroconf to 0.19.1 (#8043) 2017-06-15 21:25:19 +02:00
Fabian Affolter
d1da53615f Upgrade pysnmp to 4.3.8 (#8044) 2017-06-15 21:24:31 +02:00
Fabian Affolter
69c919183a Do not call update() in constructor (#8048) 2017-06-15 21:23:55 +02:00
Anders Melchiorsen
8eb29787a5 LIFX: add multiple modes to pulse effect (#8016)
* blink: the existing 50/50 flashing between base color and effect color
* breathe: a lifx_effect_breathe replacement
* ping: mostly base color with a short flash at the end of the cycle
* strobe: dark base color and short cycles by default
* solid: temporary color change, base color never visible

Adding a service call for each mode is a bit extravagant so instead
lifx_effect_breathe has been folded in as an option and that service
call is deprecated.
2017-06-15 07:59:11 +02:00
Adam Mills
ae3973144c Discover Z-Wave values by index (#7853)
* Discover Z-Wave values by index

* Add URLs for enums (Some Assembly Required)

* URLs on one line

* Move lint suppression to single line
2017-06-14 08:41:20 -04:00
Andrey
02f7eb9675 Allow device_tracker platforms to specify picture and icon upon discovery (#8018)
* Allow device tracker platforms to specify picture

* Allow device tracker to specify icon during discovery

* Clean up and add tests

* Fix lint

* Fix test
2017-06-14 14:39:18 +02:00
Charles Blonde
8c0967a190 Add Dyson Pure Cool Link support (#7795)
* Add Dyson Pure Cool Link support

* Code review

* Improve auto/night mode

* Move night_mode to Dyson fan component

* Code review

* fix asynchrone/sync

* Create dyson.py
2017-06-14 13:56:03 +02:00
Tom Matheussen
bf2fe60cb5 Take in account Spotify account permissions (#8012)
* only show Spotify actions when Premium account is used

* Fix indentation, stupid autoformat
2017-06-14 00:45:00 +02:00
Phil Hawthorne
1ddcab5e26 Make percentage string values as floats/ints in InfluxDB (#7879)
* Make percentage string values as floats in InfluxDB

Currently Z-wave and other compontents report an attributes battery
level as an integer, for example

```yaml
{
"is_awake": false,
"battery_level": 61,
}
```

However, some other components like Vera add the battery level as a
string

```yaml
{
"Vera Device Id": 25,
"device_armed": "False",
"battery_level": "63%",
"device_tripped": "False",
}
```

By removing any % signs in the field, this will send the value to
InfluxDB as an int, which can then be used to plot the data in graphs
correctly, like other percentage fields.

* Add tests and remove all trailing non digits

Adds tests and now removes all trailing non-numeric characters for
better use

* Update variable name for InfluxDB digit checks

Updates the variable used for the regex to remove trailing non digits

* Fix linting errors for InfluxDB component

Fixes a small linting error on the InfluxDB component
2017-06-14 00:42:55 +02:00
Thiago Oliveira
09fec29537 entity_id for service fan.turn_off is optional (#7982)
* entity id is optional

* use a simple if/else to set the data for the fan.turn_off service
2017-06-13 17:28:05 +02:00
Fabian Affolter
9189cbdc8b Remove globally disabled pylint issues (#8005) 2017-06-13 11:10:32 +02:00
Marco Sirabella
7fae8cd0f1 Configure conversation for custom actions with keywords (#7734)
* - Simple keyword to action config

* - Added more fuzzy stuff

* - Logging & a bit of commenting

* - pep8?

* - pep8 and quick formatting fixes

* - Changed configuration a bit

* - Backwards compatibility tests

* - Fallback or

* - Added custom configuration for conversation

* - Moved imports inside function

* - pep8

* - Pass tests better

* - Removed unused imports

* - Moved warning ignore to above import for fuzzy

* - Moved return for consistent return types

* - Fallback if no choices to listen for

* - Fixed linting errors

* - Better logging and fixed linting errors(?)

* - Fixed continuation

* - Added one blank line after class docstring

* Create conversation.py

* Create test_conversation.py

* Create test_conversation.py

* Update test_conversation.py
2017-06-12 23:34:20 -07:00
Fabian Affolter
843f8ce9ee Allow put as method (#8004) 2017-06-12 22:27:25 -07:00
Nolan Gilley
2bf781185f update pyripple (#8015) 2017-06-13 07:22:46 +02:00
Sabesto
1e1d4c2013 Add Flexit AC climate platform (#7871)
* Add Flexit AC climate platform

* Protocol extracted to third party lib
2017-06-12 22:06:47 -07:00
Fabian Affolter
bde711a9ff Make it more flexible (fixes #7954) (#8001)
* Make it more flexible (fixes #7954)

* Fix var name
2017-06-12 09:13:03 +02:00
cribbstechnologies
dc45ed38e7 fixing potential null issue with optional param being parsed as a script (#7928)
* fixing potential null issue with optional param being parsed as a script

* Create template.py
2017-06-11 22:58:20 -07:00
Sören Oldag
03f916ed10 Fixed bug in spotify component. (#7976) 2017-06-11 22:24:01 -07:00
happyleavesaoc
6e33c12008 Update mailgun (#7984)
* add mailgun component

* add to coveragerc
2017-06-11 22:19:10 -07:00
Adam Mills
401309c3b2 Additional demo fan with only speed support (#7985)
* Additional demo fan with only speed support

* Update demo fan tests
2017-06-11 22:12:56 -07:00
sander76
1c06b51968 Fixing Client connection error (#7991) 2017-06-11 21:42:35 -07:00
Fabian Affolter
e7de1fb9ae Add Gitter.im sensor (#7998) 2017-06-11 21:40:06 -07:00
tedstriker
de0f6b781e dismiss service for persistent notifications (#7996)
* dismiss service for persistent notifications

Unnecessary notifications can now be removed automatically. Added a
dismiss service to remove persistent notifications via script and/or
automation.

* removed unnecessary loop

loop removed
2017-06-11 22:54:10 +02:00
Anders Melchiorsen
314bce1073 LIFX: add support for setting infrared level (#8000)
* LIFX: update aiolifx

This adds support for infrared and multizone.

* LIFX: add support for infrared
2017-06-11 22:38:07 +02:00
Anders Melchiorsen
9e16be3173 LIFX: clean up internal color conversions (#7964)
* Add color_util.color_hsv_to_RGB

* Use helper functions for LIFX conversions

The LIFX API uses 16 bits for saturation/brightness while HA uses 8 bits.
Using helper functions makes the conversion a bit nicer and less prone
to off-by-one issues.

The colorsys library uses 0.0-1.0 but we can avoid that by using the HA
color_util converters instead.
2017-06-11 21:19:58 +02:00
Fabian Affolter
1b1619fbf1 Upgrade py-cpuinfo to 3.3.0 (#7992) 2017-06-11 12:03:02 +02:00
Oliver
1f226cffe9 Bugfixing with version 0.4.4 of denonavr (#7995) 2017-06-11 12:02:32 +02:00
Eugenio Panadero
b9ee5fb867 make last_name field optional (#7988) 2017-06-10 22:19:13 +02:00
Thiago Oliveira
ba80d5e52a test that all lights turn off when no entity id is given (#7981) 2017-06-10 10:13:52 +02:00
Erik Eriksson
f2feabcf0b Update eliqonline.py (#7977)
Print error
2017-06-10 10:12:30 +02:00
Daniel Perna
a19e7ba3f1 HomeMatic optimizations and code cleanup (#7986)
* Cleanup and optimizations

* Cleanup

* Typo -.-

* Linting
2017-06-10 10:08:36 +02:00
mwsluis
49d642741d Nadtcp component (#7955)
* initial commit

* class name and requirements_all.txt

* removed mentions of D7050

* changed default name

* catch oserror in update, travis errors.

* use nad_receiver pip version

* update coveragerc
2017-06-09 14:53:07 -04:00
Paulus Schoutsen
db0efc647d New component: Python Script (#7950)
* Add initial version

* Fix requirements

* Prefer logging over printing

* Set executor thread name on >Py36 only

* Add tests

* Lint

* Add restrictedpython to test dependencies

* Create python_script.py

From doc:
```
However, an empty dict ({}) is treated as is. If you want to specify a list that can contain anything, specify it as dict:
>>> schema = Schema({}, extra=ALLOW_EXTRA)  # don't do this
>>> try:
...   schema({'extra': 1})
...   raise AssertionError('MultipleInvalid not raised')
... except MultipleInvalid as e:
...   exc = e
>>> str(exc) == "not a valid value"
True
>>> schema({})
{}
>>> schema = Schema(dict)  # do this instead
>>> schema({})
{}
>>> schema({'extra': 1})
{'extra': 1}

```
2017-06-09 12:38:40 +02:00
Paulus Schoutsen
640c692e1f Fix platforms being able to block startup (#7970) 2017-06-09 12:11:58 +02:00
Paulus Schoutsen
4aef0b68bc Merge branch 'master' into dev 2017-06-08 22:21:25 -07:00
Paulus Schoutsen
c2b7c93375 Merge pull request #7968 from home-assistant/release-0-46-1
0.46.1
2017-06-08 22:20:32 -07:00
Paulus Schoutsen
8cc759ea4b Prevent Roku doing I/O in event loop (#7969) 2017-06-08 22:18:48 -07:00
Paulus Schoutsen
a223efb840 Prevent Roku doing I/O in event loop (#7969) 2017-06-08 22:18:33 -07:00
Jacob Mansfield
c32807803e Create metoffice.py (#7965)
Fix met office sensor
2017-06-08 21:44:33 -07:00
Jacob Mansfield
24a172163a Create metoffice.py (#7965)
Fix met office sensor
2017-06-08 21:44:24 -07:00
Barry Williams
372169a03a Fixed metadata issue (#7932) 2017-06-08 21:41:42 -07:00
Barry Williams
e4d100d54d Fixed metadata issue (#7932) 2017-06-08 21:41:24 -07:00
cribbstechnologies
bfd9623d8b Mqtt cover modifications (#7841)
* adding set position ability
removing command_topic being required

* flaking

* flaking test

* updating docs

* requested updates

* Revert "updating docs"

This reverts commit 9cfc5ed7a8.

* forgot to update constructor calls in tests
2017-06-08 21:35:38 -07:00
mje-nz
3464454662 Fix typos in Wunderground component (Percipitation -> Precipitation) (#7901) 2017-06-08 21:35:26 -07:00
Johan Bloemberg
533bb5565b Dsmr5 revert (#7900)
* Revert "Update to dsmr_parser supporting v5 arguments."

This reverts commit 3567de4b90.

* Revert "Using dev branch until released upstream."

This reverts commit 53e8de112c.

* Revert "Give good example."

This reverts commit 4f90fc4be6.

* Revert "Allow configuring DSMR5 protocol."

This reverts commit 9fa0e14187.
2017-06-08 21:35:26 -07:00
Adam Mills
a8709a6988 Support for renaming ZWave values (#7780)
* Support for renaming ZWave values

* Improve test
2017-06-08 21:35:26 -07:00
Paulus Schoutsen
4b767b088e Version bump to 0.46.1 2017-06-08 21:34:39 -07:00
Albert Lee
c52b18d7c8 lock.sesame: Update pysesame, add state attributes (#7953)
* Update pysesame requirement to 0.1.0 to support caching

* Set `available` property based on API enabled status

* Add state attributes for device ID and battery level
2017-06-09 00:21:56 +02:00
Fabian Affolter
aaaf9637eb Add configuration check and use default var names (#7963) 2017-06-09 00:21:06 +02:00
Riccardo Canta
055db05946 Osram lightify, removed double set to the lightify bridge in case of brightness changes (#7662)
* osram lightify removed duplicated set in case of brightness changes

* lightify component: anticipate brightness evaluation to handle unconsidered scenario described in the PR request comments (light turned on with color/temperature)

* Correction for travis ci error:
undefined name 'transition'
2017-06-08 20:17:28 +02:00
Fabian Affolter
0863d50210 Fix typos (#7957)
Add an optional extended description…
2017-06-08 15:53:12 +02:00
Alan Fischer
1e352d37d0 Vera colored light support (#7942)
* Added support for color to vera lights

* Updated requirements
2017-06-08 12:28:03 +02:00
Boris K
620197b276 Fix the negative values bug in history_stats (#7934) 2017-06-08 12:27:43 +02:00
Michael Heinemann
727a22f925 test connection without needing admin rights (#7947)
SHOW DIAGNOSTICS always needs admin privileges on influxdb. For
the purposes of home-assistant this is too much.
Use 'SHOW SERIES' to have a relatively lightweight query which
only needs READ privileges.
2017-06-08 12:26:37 +02:00
Fabian Affolter
9bea7d7d8b Upgrade coinmarketcap to 3.0.1 (#7951) 2017-06-08 12:15:46 +02:00
Teagan Glenn
97f62cfb78 [WIP] Fix opencv (#7864)
* Updates to opencv image processor

* Remove opencv hub

* Requirements

* Remove extra line

* Fix linting errors

* Indentation

* Requirements

* Linting

* Check for import on platform setup

* Remove opencv requirement

* Linting

* fix style

* fix lint
2017-06-08 11:26:24 +02:00
Oliver
482db94372 Add option to display all input sources / Add support for favourite channels / Treat Marantz SR5008 as Denon AVR-X device (#7949)
* add option to display all sources / pushed to version 0.4.3 of library

* Add show_all_sources option for auto discovery too

* change code style for hass

* fix lint
2017-06-08 09:46:26 +02:00
vrs01
8a4e993183 Update ping.py (#7944) 2017-06-08 07:30:51 +02:00
joopert
790610525b update to 006 (#7945) 2017-06-08 07:30:07 +02:00
Daniel Perna
7e668ef9e3 Merge pull request #7948 from danielperna84/HomeMatic
HomeMatic: Updated dependency
2017-06-08 00:09:53 +02:00
Daniel Perna
4dbf7be267 Updated dependency 2017-06-07 23:55:42 +02:00
Juggels
36eb0ceff3 [media_player.sonos] Send media_stop on turn_off (#7940) 2017-06-07 13:15:29 +01:00
Fabian Affolter
d38acfbd39 Add Yahoo! weather platform (#7939) 2017-06-07 10:49:54 +02:00
Nolan Gilley
b87e31617a add ripple sensor (#7935) 2017-06-07 10:24:07 +02:00
Jacob Minnis
bb6fe822f9 Added 'change' field to statistics sensor (#7820)
* Added 'change' field to statistics sensor

* Updated statistics sensor test

* Updated statistics sensor test complaint
2017-06-07 09:38:00 +02:00
Stephan Auerhahn
5504a511e3 Add service_url config option to volvooncall (#7919)
* Add service_url config option to volvooncall

* Import default value from volvooncall lib
2017-06-07 08:52:36 +02:00
Fabian Affolter
5c96936eb4 Do not call update() in constructor (#7931) 2017-06-06 19:15:03 +02:00
Fabian Affolter
cbbb15fa48 Fix changes introduced with #7917 (#7930) 2017-06-06 19:14:41 +02:00
Fabian Affolter
760138ac52 Do not call update() in constructor (#7917) 2017-06-05 21:28:13 +02:00
Per Osbäck
b1f538b622 update to pywebpush 1.0.4 which allows install on system with openssl-1.1.0 (cryptography dep) (#7915) 2017-06-05 17:46:51 +02:00
John Mihalic
ac8592587f Bump pyEight version to fix 0hr session errors (#7916) 2017-06-05 17:44:13 +02:00
Jesse Hills
aee25a020d Add juicenet platform (#7668)
* Add juicenet platform

* Update missing variable
Add missing blank lines

* Remove unnecessary override

* Update juicenet.py

* Remove whitespace
Add missing docstring

* Remove unused services
Use the hass built in unique_id

* Fix lint issues

* Update python-juicenet library version

* Update python-juicenet library version

* Remove unnecessary code

* Remove unused import

* Remove super call
2017-06-05 08:39:31 -07:00
Fabian Affolter
13df925795 Do not call update() in constructor (#7912)
* Do not call update() in constructor

* Do not call update() in constructor

* Remove unused import
2017-06-05 17:35:26 +02:00
PhracturedBlue
2b850f417e Minor cleanup - Define 'CONF_ICON_TEMPLATE' constant centrally (#7910)
* Add 'icon_template' to switch templates (similar to sensor template)

* Add test for template switch 'icon_template'

* Define 'CONF_ICON_TEMPLATE' constant centrally

* Missed a redundant definition
2017-06-05 17:33:57 +02:00
Fabian Affolter
f303f6a191 Move consts to 'const.py' (#7909) 2017-06-05 16:59:59 +02:00
Fabian Affolter
f8cfa15152 Sync crypto-currency platforms (#7906) 2017-06-05 13:36:39 +02:00
Fabian Affolter
12f731b32c Fix docstring (#7907) 2017-06-05 13:16:53 +02:00
PhracturedBlue
11dcbd4449 Add 'icon_template' to switch templates (similar to sensor template) (#7862)
* Add 'icon_template' to switch templates (similar to sensor template)

* Add test for template switch 'icon_template'
2017-06-05 11:27:48 +02:00
Paulus Schoutsen
fa6a089fb3 Lint 2017-06-05 00:10:57 -07:00
florincosta
87da2ff1d7 Add raspihats switch (#7665) 2017-06-04 23:56:21 -07:00
Paulus Schoutsen
b576df53e9 Update .coveragerc 2017-06-04 23:54:15 -07:00
Martin Berg
b90964faad Add support for Vanderbilt SPC alarm panels and attached sensors (#7663)
* Add support for Vanderbilt SPC alarm panels.

 * Arm/disarm + read state

 * Autodiscover and add motion sensors

* Fix code formatting.

* Use asyncio.async for Python < 3.4.4.

* Fix for moved aiohttp exceptions.

* Add docstrings.

* Fix tests and add docstrings.
2017-06-04 23:53:25 -07:00
mjj4791
549133a062 Added buienradar sensor and weather (#7592)
* Added buienradar sensor and weather

* used external library for parsing

* used external library for parsing

* updated buienradar lib to 0.4

* Make sure you import 3rd party libraries inside methods.

* Make sure you import 3rd party libraries inside methods.

* clean up code; optimized

* imports, sensor name and attributes

* updated requirements to match imports

* use asyncio for http get
2017-06-04 23:48:11 -07:00
Matthew Schick
c29553517f Add service to set nest away/home modes (#7619)
* Add service to set nest away/home modes

* New service `nest.set_mode`
* Update the NestDevice object to export the local structures

* Validation and structure cleanup
2017-06-04 23:45:24 -07:00
Trevor
2e27c0d5ec Add Radarr sensor (#7318)
* Add radarr.py

* Update radarr.py

* Update radarr.py

* Add test_radarr.py

* Update test_radarr.py

* Update test_radarr.py

* Update radarr.py

* Update .coveragerc

* Fix hound.
2017-06-04 23:44:24 -07:00
cribbstechnologies
774f584ba8 Mqtt cover modifications (#7841)
* adding set position ability
removing command_topic being required

* flaking

* flaking test

* updating docs

* requested updates

* Revert "updating docs"

This reverts commit 9cfc5ed7a8.

* forgot to update constructor calls in tests
2017-06-04 22:55:06 -07:00
Nolan Gilley
81b1446aad blockchain.info sensor (#7856)
* blockchain sensor

* Update blockchain.py

* Update blockchain.py

* add validation of btc addresses
2017-06-04 22:48:38 -07:00
Nolan Gilley
6bfd52ada8 Etherscan.io sensor (#7855)
* etherscan sensor

* Update etherscan.py
2017-06-04 22:48:04 -07:00
Per Osbäck
0646d01152 Add support for the expirationTime parameter. (#7895)
Enabled by default in Chrome 60.
Only accepts the param, doesn't act on the actual expiration date. Chrome will always pass NULL for now.

https://github.com/w3c/push-api/pull/248
https://www.chromestatus.com/feature/4929396687241216
https://bugs.chromium.org/p/chromium/issues/detail?id=718837
2017-06-04 22:46:18 -07:00
mje-nz
da5f5335eb Fix typos in Wunderground component (Percipitation -> Precipitation) (#7901) 2017-06-04 22:37:16 -07:00
Johan Bloemberg
c9d55cff23 Dsmr5 revert (#7900)
* Revert "Update to dsmr_parser supporting v5 arguments."

This reverts commit 3567de4b90.

* Revert "Using dev branch until released upstream."

This reverts commit 53e8de112c.

* Revert "Give good example."

This reverts commit 4f90fc4be6.

* Revert "Allow configuring DSMR5 protocol."

This reverts commit 9fa0e14187.
2017-06-04 22:36:19 -07:00
Albert Lee
aeb1d3d3fe lock.sesame: New lock platform for Sesame smart locks (#7873)
* Manage Sesame devices through CANDY HOUSE's cloud API
* Add dependency on new pysesame library
2017-06-04 22:06:18 -07:00
Barry Williams
a1c119adb6 Added a Taps Aff binary sensor (#7880)
* Added a Taps Aff binary sensor

* PR Review updates

* Added a Taps Aff binary sensor

* PR Review updates

* Improved error handling

* Cosmetic changes (ordering, docstings, etc.)
2017-06-04 13:35:19 +02:00
Paulus Schoutsen
e9f273e7e0 Merge pull request #7866 from home-assistant/release-0-46
0.46
2017-06-03 19:16:35 -07:00
Paulus Schoutsen
7ebf36bb70 Fix MQTT camera test (#7878) 2017-06-03 18:57:05 -07:00
Paulus Schoutsen
84fe4f75df Fix MQTT camera test (#7878) 2017-06-03 18:51:29 -07:00
Fabian Affolter
c07bf551d9 Upgrade python-telegram-bot to 6.0.3 (#7885) 2017-06-03 22:36:41 +02:00
Fabian Affolter
a745bf83ef Upgrade sendgrid to 4.2.0 (#7886) 2017-06-03 22:34:17 +02:00
Fabian Affolter
1432ae649a Upgrade pyasn1-modules to 0.0.9 (#7887) 2017-06-03 22:33:43 +02:00
Fabian Affolter
cf1a27bd7c Use constants (#7888) 2017-06-03 22:33:12 +02:00
Andrey
3d8b7a4122 Switch pymyq to pypi (#7884) 2017-06-03 17:12:36 +02:00
joopert
e50588afe1 Change nad_receiver to pypi (#7852)
* Change to pypi

* add requirements
2017-06-03 17:01:51 +03:00
Anders Melchiorsen
4dc4a98caa [light.lifx] Update aiolifx (#7882)
This makes LIFX Gen3 lights work with the current firmware.
2017-06-03 13:21:31 +01:00
Anders Melchiorsen
423e809e45 [light.lifx] Update aiolifx (#7882)
This makes LIFX Gen3 lights work with the current firmware.
2017-06-03 13:20:55 +01:00
Paulus Schoutsen
a79f1d4d40 Fix telegram_bot (#7877) 2017-06-03 10:52:00 +01:00
Paulus Schoutsen
8461cf2717 Fix telegram_bot (#7877) 2017-06-03 10:50:37 +01:00
Adam Mills
9c9f5068b7 Support for renaming ZWave values (#7780)
* Support for renaming ZWave values

* Improve test
2017-06-02 23:03:00 -07:00
twendt
6d41024e76 Enocean Binary Sensor: Handle click of both rockers (#7770) 2017-06-02 22:12:41 -07:00
Kevin
7d24efc690 Added effects to Yeelight bulbs (#7152)
* Added effects to Yeelight bulbs

* Fix Typo and Use randint instead of randrange

* Added Effects

* updated requirements_all.txt

* fix empty line

* minor fixes

* fix passing effects as parameter
2017-06-02 21:35:32 -07:00
Paulus Schoutsen
7d4adbbef5 Fix html5 unsub (#7874)
* Fix #7758 subscription expiration/removal

Removes a subscription after receiving an HTTP 410 response when trying to send a new message.

* Fix tests failing due to additional call

* Fix code style

* Lint
2017-06-02 20:56:16 -07:00
Erik Eriksson
e11ec88482 Update squeezebox.py (#7617)
Do not fail in case no players are connected, in which case squeezeserver will return a result without player_loop.
2017-06-02 00:26:54 -07:00
Paulus Schoutsen
e39bdf8763 Version bump to 0.47.0dev0 2017-06-02 00:24:40 -07:00
Paulus Schoutsen
a33bcdf270 Version bump to 0.46 2017-06-02 00:24:19 -07:00
Paulus Schoutsen
f056cbc641 Update frontend 2017-06-02 00:20:53 -07:00
Paulus Schoutsen
4163bcebbc Update netdisco (#7865) 2017-06-02 00:13:17 -07:00
Johan Bloemberg
d472d81538 Align switch group handling with light. (#7577) 2017-06-02 00:05:34 -07:00
David-Leon Pohl
2b70b1881a Quickfix Bug #7384 (#7582)
* Quickfix Bug #7384

* Fix devices not available runtime bug
2017-06-02 00:05:07 -07:00
Juggels
12607aeaea Check if media commands are actually applicable (#7595)
* Check if media commands are actually applicable

- Explicitly allow ‘stop’ and ‘play’ on radio streams
- Disallow media commands when the playlist is empty
- Check if command is supported when calling `turn_on` and `turn_off`

* Suppress UPnP error 701 on media commands

* Clean up soco_filter_upnperror

Clean up soco_filter_upnperror and fix small bug in support_previous_track determination
2017-06-02 00:03:10 -07:00
Erik Eriksson
1855f1ae85 fix for https://github.com/home-assistant/home-assistant/issues/7019 (#7618) 2017-06-02 00:02:26 -07:00
Thibault Cohen
613da308f2 Query in InfluxDB sensor is now templatable (#7634) 2017-06-02 00:01:14 -07:00
Teagan Glenn
cefacf9ce4 Spotify aliases (#7702)
* Alias support for spotify devices

* Fix log

* Formatting/Fixes

* Remove default arg

* Add default keyword

* None check
2017-06-01 23:53:23 -07:00
Alex Harvey
78887c5d5c Start of migration framework, to allow moving of files in the config … (#7740)
* Start of migration framework, to allow moving of files in the config directory to be hidden, ios.conf used as the first one to undergo this change.

* Update const.py

* Update test_config.py

* improvement to syntax
2017-06-01 23:50:04 -07:00
Craig J. Ward
3a92bd78ea fix permissions issue for Insteon Local #6558 (#7860)
* fix unlinked commit

* Update insteon_local.py
2017-06-01 23:36:47 -07:00
Paulus Schoutsen
d0021a6171 Make monkey patch work in Python 3.6 (#7848)
* Make monkey patch work in Python 3.6

* Update dockerfiles back to 3.6

* Lint

* Do not set env variable for dockerfile

* Lint
2017-06-01 23:23:39 -07:00
Anders Melchiorsen
e2cfdbff06 Disallow ambiguous color descriptors in the light.turn_on schema (#7765)
* Disallow ambiguous color descriptors in the light.turn_on schema

* Update tests
2017-06-01 23:05:05 -07:00
abmantis
9480f41210 dont use default for switch name, so that the object id is used (#7845) 2017-06-01 22:58:57 -07:00
Boris K
1b5f6aa1b9 Optimize history_stats efficiency and database usage (#7858) 2017-06-01 22:52:55 -07:00
Eugenio Panadero
2065426b16 log time delay of domain setup in info level (#7808)
* log time delay of domain setup in info level

 * when setup problems appear, it's difficult to debug which are the components that took a lot to set up. This minimal change goes further than the 'slow setup warning' and measures the setup time interval for each domain.

* use timer as in helpers/entity
2017-06-01 22:44:44 -07:00
Adam Mills
beb8c05d91 Use expected behvaior for above/below (#7857) 2017-06-01 22:43:24 -07:00
Adam Mills
cf42303afb Rename time trigger 'after' to 'at' (#7846) 2017-06-01 22:40:27 -07:00
Daniel Perna
4bcbeef480 Bumped pyhomematic version (#7861) 2017-06-01 22:33:53 -07:00
Adam Mills
e0712ba329 Expose the node name on the zwave node entity (#7787) 2017-06-01 22:33:16 -07:00
Fabian Affolter
66d6f5174d Allow 'base_url' (fixes #7784) (#7796) 2017-05-31 09:08:53 -07:00
Marcelo Moreira de Mello
9762e1613d Introduced support to Netgear Arlo Cameras (#7826)
*  Introduced support to Netgear Arlo Cameras

* Using async_setup_platform() and applied other changes

* Removed unecessary variables

* Using asyncio for sensor/arlo

* Update arlo.py

* Removed entity_namespace
2017-05-31 09:25:25 +02:00
Phil Hawthorne
bb92ef5497 Downgrade Docker to Python 3.5 to solve Segmentation Faults (#7799)
Downgrades the Dockerfiles used by Home Assistant to Python 3.5, after
Python 3.6 base image was causing segmentation faults.

See home-assistant/home-assistant#7752
2017-05-30 23:56:20 -07:00
Paulus Schoutsen
9f5bfe28d1 Add initial benchmark framework (#7827)
* Add initial benchmark framework

* Use timer from timeit
2017-05-30 21:34:40 -07:00
Marcelo Moreira de Mello
8ee32a8fbd Added persistent error message if cover.myq fails to load (#7700)
* Show persistent error if cover.myq fails

* Fixed typo on getLogger()

* Added ValueError on except condition

* Make pylint happy

* Removed DEFAULT_ENTITY_NAMESPACE since it is not being used
2017-05-30 23:17:32 +02:00
Fabian Affolter
052cd3fc53 Upgrade PyMVGLive to 1.1.4 (#7832) 2017-05-30 18:26:26 +02:00
Fabian Affolter
0ccaf97924 Update docstrings and log messages (#7709) 2017-05-30 11:52:26 +02:00
happyleavesaoc
96b20b3a97 update snapcast media player (#7079)
* update snapcast

* fix docstrings

* bump dep version

* address snapcast review comments

* add snapcast group volume support

* fix snapcast requirements

* update snapcast client entity id

* snapshot/restore functions

* refactor snapshot/restore services

* clean up

* update snapcast req

* bump version

* fix async updates
2017-05-30 11:34:39 +02:00
Daniel Høyer Iversen
91806bfa2a Flux led fix (#7829)
* Update flux_led.py

* style fix
2017-05-30 10:46:18 +02:00
Fabian Affolter
1c4e097bed Upgrade pysnmp to 4.3.7 (#7828) 2017-05-30 09:08:57 +02:00
Pascal Vizeli
2df6aabbf3 Cleanup telegram / Add url to webhook (#7824)
* Cleanup telegram / Add url to webhook

* fix lint

* Fix lint
2017-05-30 06:55:06 +02:00
John Mihalic
81b2111751 Bump aiohttp to 2.1.0 (#7825) 2017-05-30 06:54:16 +02:00
Eugenio Panadero
f7e0d13fe6 Telegram send image: fix mimetype detection (#7802)
* Add `name` var to BytesIO content to get recognized

Sometimes the python-telegram-bot doesn't recognize the mimetype of the file and looks after a name variable to deduce it. Fixes #7413

* bytesio stream recycle less explicit
2017-05-29 22:59:44 +02:00
Johan Bloemberg
5e5c0daa87 Allow configuring DSMR5 protocol. (#7535)
* Allow configuring DSMR5 protocol.

* Give good example.

* Using dev branch until released upstream.

* Update to dsmr_parser supporting v5 arguments.
2017-05-29 16:19:50 +02:00
Fabian Affolter
a7277db4d7 Upgrade mypy to 0.511 (#7809)
Add an optional extended description…
2017-05-29 15:39:24 +02:00
Fabian Affolter
ba44b7edb3 Upgrade sqlalchemy to 1.1.10 (#7807) 2017-05-29 15:38:56 +02:00
Lev Aronsky
8fcc750998 Added handling of an AssertionError from pxssh failed login (#7750)
* Added handling of an AssertionError from pxssh failed login

* Destory and re-create pxssh instance, to fix behavior upon router restart.
2017-05-29 11:22:20 +02:00
Teagan Glenn
eff619a58f Rest notify data (#7757)
* Rest notify data

* Cleanup

* Fix spaces
2017-05-29 11:20:23 +02:00
Andy Castille
fc1bb58247 Rachio (Sprinklers) (#7600)
* Rachio platform started

* Rachio tests

* detect bad api token

* Documentation, Code cleanup

* Docstrings end with a period, log uses %

* Fix arguments, default run time is now 10 minutes

* Fix typo, remove todo (GH issue exists)

* Revert polymer submodule commit

* Use a RachioPy version with SSL cert validation

* Update requirements
2017-05-29 11:15:27 +02:00
Fabian Affolter
c12b8f763c Upgrade pysnmp to 4.3.6 (#7806) 2017-05-29 10:28:31 +02:00
Dan Cinnamon
ef51d8518a Bump pyenvisalink to version 2.1 (#7803) 2017-05-29 10:27:36 +02:00
Fabian Affolter
8b7894fb86 Upgrade slacker to 0.9.50 (#7797) 2017-05-29 10:26:56 +02:00
Fabian Affolter
010f098df3 Upgrade Sphinx to 1.6.2 (#7805) 2017-05-29 10:26:33 +02:00
Oliver
1f3bb51821 Add Marantz SSDP discovery / Detect error string in AppCommand.xml body (#7779) 2017-05-29 10:26:10 +02:00
CTLS
10367eb250 Fix home/stay in concord232 (#7789) 2017-05-28 12:06:18 +02:00
sander76
7fb5488058 Powerview to async (#7682)
* first commit

* first commit

* first commit

* first commit

* changing requirements

* updated requirements_all.txt

* various changes as suggested in the comments.

* using global values for dict keys.
2017-05-26 22:19:19 +02:00
Paulus Schoutsen
e68bd0457c Fix more deprecation warnings (#7778)
* Remove setting up an hbmqtt broker

* Don't pass loop to web.Application in tests

* Use .query instead of deprecated .GET for aiohttp requests

* Fix closing file resource

* Do not use asyncio mark

* Notify.html5 - PyJWT: Use options to disable verify

* Yamaha: Test was still using deprecated ip

* Remove pytest-asyncio
2017-05-26 13:12:17 -07:00
Eugenio Panadero
910020bc5f Fix Telegram Bot send file to multiple targets, snapshots of HA cameras, variable templating, digest auth (#7771)
* fix double template rendering when messages come from notify.telegram

* fix 'chat' information not present in callback queries

* better inline keyboards with yaml

To make a row of InlineKeyboardButtons you pass:
- a list of tuples like: `[(text_b1, data_callback_b1), (text_b2, data_callback_b2), ...]
- a string like: `/cmd1, /cmd2, /cmd3`
- or a string like: `text_b1:/cmd1, text_b2:/cmd2`

Example:
```yaml
data:
   message: 'TV is off'
   disable_notification: true
   inline_keyboard:
     - TV ON:/service_call switch.turn_on switch.tv, Other:/othercmd
     - /help, /init
```

* fix send file to multiple targets

* fix message templating, multiple file targets, HA cameras

- Allow templating for caption, url, file, longitude and latitude fields
- Fix send a file to multiple targets
- Load data with some retrying for HA cameras, which return 500 one or two times sometimes (generic cams, always!).
- Doc in services for new inline keyboards yaml syntax: `Text button:/command`

* HttpDigest authentication as proposed in #7396

* review changes

- Don't use `file` as variable name.
- For loop
- Simplify filter allowed `chat_id`s.

* Don't use `file` as variable name!

* make params outside the while loop

* fix chat_id validation when editing sent messages
2017-05-26 21:05:12 +02:00
Paulus Schoutsen
f43db3c615 Replace executor with async_add_job (#7658)
* Remove executor

* Lint

* Lint

* Fix tests
2017-05-26 08:28:07 -07:00
Adam Mills
9e9705d6b2 Support for GE Zwave fan controller (#7767)
* Support for GE Zwave fan controller

* Tests for zwave fan

* Add additional fan workarounds
2017-05-25 22:55:00 -07:00
Paulus Schoutsen
6899c7b6f7 assertEquals is deprecated (#7777) 2017-05-25 22:21:22 -07:00
Paulus Schoutsen
d0c9d6b69a Remove usage of event_loop fixture (#7776) 2017-05-25 21:40:36 -07:00
Paulus Schoutsen
81aaeaaf11 Get rid of mock http component app (#7775)
* Remove mock_http_component from config tests

* Remove mock_http_component_app from emulated hue test
2017-05-25 21:13:53 -07:00
Adam Mills
65c3201fa6 Rename of the zwave hass.data constants (#7768)
* Rename of the zwave hass.data constants

* Remove zwave since it is already implied
2017-05-25 21:11:02 -07:00
Anton Sarukhanov
3a843e1817 Add icons to device tracker. (#7759) 2017-05-24 19:12:26 -07:00
Paulus Schoutsen
0c7f8e910e Merge branch 'master' into dev 2017-05-24 19:05:01 -07:00
Hugo Herter
0abde3aa57 Change setup script to use pip install instead of setup.py develop (#7756)
Using `python setup.py develop` did not manage to install the required dependencies.
This updates `script/setup` to use `pip install -e .` instead in order to resolve the required dependencies.
2017-05-24 15:31:51 -07:00
amigian74
775d45ae5a Exclude filter for event types (#7627)
* add exclude filter for event types to recorder component

* corrected long line (279)

* change source code structure
add test for exclude event types

* code cleanup

* change source code structure

* Update __init__.py

* Update test_init.py
2017-05-24 15:23:52 -07:00
Paulus Schoutsen
e7d783ca2a Update links.html 2017-05-24 14:47:22 -07:00
cribbstechnologies
ef4ef2d383 Template light (#7657)
* starting light template component

* linting/flaking

* starting unit tests from copypasta

* working on unit testing

* forgot to commit the test

* wrapped up unit testing

* adding remote back

* updates post running tox

* Revert "adding remote back"

This reverts commit 852c87ff96.

* adding submodule back from origin

* updating submodule

* removing a line to commit

* re-adding line

* trying to update line endings

* trying to fix line endings

* trying a different approach

* making requested changes, need to fix tests

* flaking

* union rather than intersect; makes a big difference

* more tests passing, not sure why this one's failing

* got it working

* most of the requested changes

* hopefully done now

* sets; the more you know
2017-05-24 14:32:22 -04:00
everix1992
3638b21bcb Added new commands and functionality to the harmony remote component. (#7113)
* Added new commands and functionality to the harmony remote component.

-This includes the ability to optionally specify a number of times to repeat a specific command, such as pressing the volume button multiple times.
-Also added a new command that allows you to send multiple commands to the harmony at once, such as sending a set of channel numbers.
-Updated the unit tests for these changes.

* Fix flake8 coding violations

* Remove send_commands command and make send_command handle a single or list of commands

* Remove send_commands tests

* Update itach and kira remotes for new send_command structure. Fix pyharmony version in requirements_all.txt

* Fix incorrect variable name

* Fix a couple minor issues with remote tests
2017-05-23 17:00:52 -07:00
Stu Gott
54c45f80c1 Fix time_date sensor to update at predictable intervals (#7644)
* Fix time_date sensor to update at predictable intervals

* Delete automations.yaml
2017-05-23 16:00:26 -07:00
Juggels
e3307fb1c2 Redesign monitored variables for hp_ilo sensor (#7534)
* Redesign monitored variables

Allow generating specific sensors without the need for template sensors

* Import 3rd party library inside update method

* Remove jsonpath_rw dependency

* Do not interfere with value_template or ilo_data output

Do not interfere with value_template or ilo_data output, this is now the responsibility of the user and should be handled in `configuration.yaml`

Fix UnusedImportStatement

Fix newline after function docstring

* Always output results to state
2017-05-23 14:56:00 -07:00
William Scanlon
b5f20c9b64 Always return rgb color of bulbs (#7743) 2017-05-23 14:49:20 -07:00
Anton Sarukhanov
7055fddfb4 Don't block startup more than 60 seconds while waiting for components. (#7739) 2017-05-23 14:29:27 -07:00
Anders Melchiorsen
fce09f624b LIFX: disable color features for white-only bulbs (#7742)
The product type is already established in order to decide the Kelvin range
so just reuse that information to disable color features for white-only lights.

Also change the breathe/pulse effects to be more useful for white-only
bulbs. For consistency, color bulbs set to a desaturated (i.e. white-ish)
color get the same default treatment as white-only bulbs.
2017-05-23 22:35:19 +02:00
nordeep
be53cc7068 Don't initialize mqtt components which have already been discovered (#7625)
* Don't initialize mqtt components which have already been discovered

* Fix string length

* Fix blank lines, fix constant name

* Remove globals. Remove JSON dump

* Add tests. Update grammar

* PEP8 style issue

* Add hyphen to object_id regex

* PEP8 style fix
2017-05-23 11:08:12 -07:00
Anton Sarukhanov
f3dabe21ab Prevent the random template filter from caching its output. Fixes #5678 (#7716) 2017-05-23 10:32:06 -07:00
Brenton Zillins
228fb8c072 Ensure https base_url in telegram bot (#7726) 2017-05-23 10:16:54 -07:00
Lev Aronsky
c556b619b7 Asuswrt continuous ssh (#7728)
* Make ssh and telnet connections continuous in asuswrt

* Refactored SSH and Telnet connections into respective classes.

* Fixed several copy-paste typos and errors.

* More typos fixed.

* Small changes to arguments, to pass automated tests.

* Removed unsupported named arguments.

* Fixed a couple of mistakes in Telnet, and other lint errors.

* Added Telnet tests, and added lint exceptions.

* Removed comments from tests, as they irritated the hound.
2017-05-23 09:55:01 -07:00
Paulus Schoutsen
2682996939 Constrain requests to a version (#7725)
Add an optional extended description…
2017-05-23 15:45:22 +02:00
Alex Harvey
6872daab89 update apcacccess used in apcupsd to 0.0.10, which fixes random file drop from apcaccess (#7722) 2017-05-22 17:00:41 -07:00
Paulus Schoutsen
6d183e8bb3 Merge pull request #7686 from home-assistant/release-0-45-1
0.45.1
2017-05-22 11:36:21 -07:00
Paulus Schoutsen
cdc8628e5a Allow fetching hass.io panel without auth (#7714) 2017-05-22 11:06:04 -07:00
tobygray
dc4b0695b5 device_tracker.ubus: Handle empty results (#7673)
If OpenWRT isn't running the DHCP server then some OpenWRT hardware,
such as TP-Link TL-WDR3600 v1, can't determine the host
corresponding to an associated wifi client. This change handles that
by returning None when the request has no data in the result.
2017-05-22 11:06:04 -07:00
cgtobi
3fb691ead6 Fix playback control of web streams (#7683)
Web streams can't be paused and resumed later. That's why volumio stops them instead of pausing them.
2017-05-22 11:06:04 -07:00
Eugenio Panadero
a9926e355f Fix telegram chats (#7689)
* bugfix for Telegram chat_ids

- Negative `chat_id`s for groups.
- Include `chat_id` in event data.
- Handle KeyError when receiving other types of messages, as `new_chat_member` ones, and send them as text.

* unused import

* fix double quote style, fix boolean expr, change warning msg

* mistake

* some more fixes

- fix if condition for msg bad fields.
- return True for a correct but not allowed or not recognized message: if not, the message arrives continuously.
- Allow to receive messages from unauthorized users if they come from authorized groups.

* support for `edited_message`s

- They come as normal messages, except for the 'edited_message' field instead of 'message'.
2017-05-22 11:06:04 -07:00
Paulus Schoutsen
17cbe0c6ce Allow fetching hass.io panel without auth (#7714) 2017-05-22 11:00:02 -07:00
Fabian Affolter
783abc7996 Make 'sender' as requirement for the config (fixes #7698) (#7706) 2017-05-22 15:17:15 +02:00
Fabian Affolter
47355eed41 Upgrade python-telegram-bot to 6.0.1 (#7704) 2017-05-22 13:56:36 +02:00
John Mihalic
d5642a5faf Bump pyEight version (#7701) 2017-05-22 07:54:01 +02:00
tobygray
ca3f07cdef device_tracker.ubus: Handle empty results (#7673)
If OpenWRT isn't running the DHCP server then some OpenWRT hardware,
such as TP-Link TL-WDR3600 v1, can't determine the host
corresponding to an associated wifi client. This change handles that
by returning None when the request has no data in the result.
2017-05-21 17:26:05 -07:00
LvivEchoes
99ea1e3f4f Continue tracking device over dhcp lease table if wireless adapter not installed (#7690) 2017-05-21 17:18:55 -07:00
Anders Melchiorsen
bb8de5845a Sort entities in default groups by name (#7681)
* Sort entities in default groups by name

* Cleanups from review
2017-05-21 17:05:48 -07:00
cgtobi
b3cb057aac Fix playback control of web streams (#7683)
Web streams can't be paused and resumed later. That's why volumio stops them instead of pausing them.
2017-05-21 17:05:04 -07:00
Eugenio Panadero
922303fd4b Fix telegram chats (#7689)
* bugfix for Telegram chat_ids

- Negative `chat_id`s for groups.
- Include `chat_id` in event data.
- Handle KeyError when receiving other types of messages, as `new_chat_member` ones, and send them as text.

* unused import

* fix double quote style, fix boolean expr, change warning msg

* mistake

* some more fixes

- fix if condition for msg bad fields.
- return True for a correct but not allowed or not recognized message: if not, the message arrives continuously.
- Allow to receive messages from unauthorized users if they come from authorized groups.

* support for `edited_message`s

- They come as normal messages, except for the 'edited_message' field instead of 'message'.
2017-05-21 17:02:22 -07:00
Adam Mills
8c1181f8e3 Remove defunct INSTALL_OPENZWAVE from Dockerfile (#7697) 2017-05-21 17:01:42 -07:00
John Arild Berentsen
4a0d6e73f4 ZWave: Add reset service to meters (#7676)
* Add reset service for command_class meters.

* Add reset service for command_class meters.

* cast index to const.py
2017-05-21 20:15:24 +02:00
Paulus Schoutsen
171086229a Guard against new and removed state change events (#7687) 2017-05-21 07:41:33 -07:00
Andrey
927024714b Zwave: Apply refresh_node workaround on 1st instance only (#7579)
* Apply refresh_node workaround on 1st instance only

* Add another test
2017-05-21 17:33:42 +03:00
tobygray
24b7fd3694 zoneminder: fix incorrect use of logging.exception. (#7675)
Prior to this change the zoneminder component was attempting to
use logging.exception outside of exception handling code. This
would lead to the traceback module throwing an exception when
trying to work out the traceback for the exception.

This fixes the issue by changing the exception call into a
plain error logging call.
2017-05-21 11:11:33 +02:00
Paulus Schoutsen
d6f43ba839 Version bump to 0.45.1 2017-05-20 22:34:59 -07:00
Paulus Schoutsen
3492545ec1 Update state automation to work with new and deleted state changes 2017-05-20 22:34:53 -07:00
Fabian Affolter
ceff9981be Merge branch 'master' into dev 2017-05-21 00:47:42 +02:00
Fabian Affolter
70ea16bdc0 Merge pull request #7648 from home-assistant/release-0-45
0.45
2017-05-21 00:34:44 +02:00
Marcelo Moreira de Mello
943958b140 Added support to Amcrest camera to feed using RTSP via ffmpeg (#7646)
* Implemented ffmpeg option on Amcrest camera and upgraded to version 1.2.0

* Added ffmpeg arguments and binary options to Amcrest camera

* Added ffmpeg as dependencies

* Makes lint happy and fixed requirements_all.txt

* Inherent the ffmpeg.binary configuration from ffmpeg component

* Update amcrest.py
2017-05-20 23:55:15 +02:00
John Arild Berentsen
23c5fc0aad Bugfix #7586 (#7661) 2017-05-20 23:53:48 +02:00
Fabian Affolter
45b4ef46cc Align with OpenALPR platform for naming conf variables (#7650) 2017-05-20 23:51:16 +02:00
Andrey
44edf3e105 Switch pymodbus to pypi (#7677) 2017-05-20 21:19:22 +02:00
Anders Melchiorsen
81f0826550 Ignore attribute changes in automation trigger from/to (#7651)
* Ignore attribute changes in automation trigger from/to

* Quote names in deprecation warnings

This makes it somewhat easier to read if the suggestion happens to be
named "to".

* Add test with same state, new attribute value
2017-05-20 15:18:59 -04:00
Barry Williams
adde9e6231 Upgrade Openhome library (#7671)
* Added support for openhome devices using transport service

* Style cleanup
2017-05-20 17:43:35 +02:00
Paulus Schoutsen
de85d38aa5 Update frontend 2017-05-20 08:08:06 -07:00
Paulus Schoutsen
f637a07016 Update frontend 2017-05-20 08:07:32 -07:00
thecynic
9e153119ef Point pylutron to pypi (#7664) 2017-05-20 14:27:35 +03:00
Fabian Affolter
b5c54864ac Change line endings to LN (#7660) 2017-05-19 07:39:13 -07:00
Paulus Schoutsen
d369d70ca5 Fix tests (#7659)
* Remove global hass

* Http.auth test no longer spin up server

* Remove server usage from http.ban test

* Remove setupModule from test device_sun_light_trigger

* Update common.py
2017-05-19 07:37:39 -07:00
John Arild Berentsen
5aa72562a7 Bugfix #7586 (#7661) 2017-05-19 13:40:26 +02:00
Robbie Trencheny
c4da921cb5 Add network_key as a config option (#7637)
* Add network_key as a config option

* Update __init__.py
2017-05-18 23:49:37 -07:00
Robbie Trencheny
7daa92249a Add network_key as a config option (#7637)
* Add network_key as a config option

* Update __init__.py
2017-05-18 23:49:15 -07:00
John Arild Berentsen
4a3d9a956d Final tweaks for Zwave panel (#7652)
* # This is a combination of 3 commits.
# The first commit's message is:
Add seperate zwave panel

# The 2nd commit message will be skipped:

#	unused import

# The 3rd commit message will be skipped:

#	Use get for config

* Add seperate zwave panel

* Modify set_config_parameter to accept setting string values

* descriptions

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* lint

* Fallback if no config parameteres are available

* Update services.yaml

* review changes
2017-05-18 17:41:31 -07:00
Paulus Schoutsen
6662b7f52d Update frontend 2017-05-18 17:41:26 -07:00
Paulus Schoutsen
e91fe94585 Update frontend 2017-05-18 17:41:03 -07:00
John Arild Berentsen
88ffe39945 Final tweaks for Zwave panel (#7652)
* # This is a combination of 3 commits.
# The first commit's message is:
Add seperate zwave panel

# The 2nd commit message will be skipped:

#	unused import

# The 3rd commit message will be skipped:

#	Use get for config

* Add seperate zwave panel

* Modify set_config_parameter to accept setting string values

* descriptions

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* lint

* Fallback if no config parameteres are available

* Update services.yaml

* review changes
2017-05-18 17:39:31 -07:00
happyleavesaoc
e479324db9 update usps (#7655)
* update usps

* fix doc
2017-05-18 17:30:43 -07:00
happyleavesaoc
f65cc68705 bump ups version (#7654) 2017-05-18 23:38:50 +02:00
happyleavesaoc
238921b681 bump fedex version (#7653) 2017-05-18 23:37:39 +02:00
Marcelo Moreira de Mello
0fd415d7fb Added support to Amcrest camera to feed using RTSP via ffmpeg (#7646)
* Implemented ffmpeg option on Amcrest camera and upgraded to version 1.2.0

* Added ffmpeg arguments and binary options to Amcrest camera

* Added ffmpeg as dependencies

* Makes lint happy and fixed requirements_all.txt

* Inherent the ffmpeg.binary configuration from ffmpeg component

* Update amcrest.py
2017-05-18 10:06:24 +02:00
Fabian Affolter
0eb6540fe7 Align with OpenALPR platform for naming conf variables (#7650) 2017-05-18 09:57:38 +02:00
Paulus Schoutsen
fc0c8540d3 Version bump to 0.46.0.dev0 2017-05-17 23:03:47 -07:00
Paulus Schoutsen
eb473600f6 Version bump to 0.45 2017-05-17 23:03:27 -07:00
Paulus Schoutsen
de999d8439 Merge remote-tracking branch 'origin/master' into dev 2017-05-17 23:03:00 -07:00
Paulus Schoutsen
6d97546f40 Update frontend 2017-05-17 22:29:46 -07:00
Paulus Schoutsen
e773133bcf Fix automation failing to setup if no automations specified (#7647) 2017-05-17 21:57:50 -07:00
Anders Melchiorsen
3d4b2436db Coerce color_temp to int even when passed in as kelvin (#7640) 2017-05-17 19:20:59 -07:00
Paulus Schoutsen
a068efcd47 Abort tests when instances leaked (#7623) 2017-05-18 00:19:40 +02:00
Fabian Affolter
f86edd4f24 Seven segments OCR image processing (#7632)
* Add initial seven segments OCR image processing

* Fix typo
2017-05-18 00:07:02 +02:00
Daniel Perna
a24aebd5ae Updated dependency (#7638) 2017-05-17 23:57:34 +02:00
Riccardo Canta
f3b9e1e988 Osram lightify Removed wrong assignment (#7615)
self._brightness is assigned with the returned value of the
set_luminance() function, which is always equal to None.
2017-05-17 23:26:58 +02:00
corneyl
76b747edd6 Updated limitlessled requirement to v1.0.8 (#7629) 2017-05-17 09:05:34 -07:00
Eugenio Panadero
f7d25396a4 Kodi specific service to call Kodi API methods (#7603)
* Kodi specific services to call Kodi API methods

 - new service: `kodi_execute_addon` to run a Kodi Addon with optional parameters. Results of the Kodi API call, if any, are redirected in a Home Assistant event: `kodi_execute_addon_result`.
 - new service: `kodi_run_method` to run a Kodi JSONRPC API method with optional parameters. Results of the Kodi API call are redirected in a Home Assistant event: `kodi_run_method_result`.
 - Add descriptions in services.yaml.
 - Add `timeout` parameter to yaml config (needed to make slow queries to the JSONRPC API, default timeout is set to 5s).
 - Trigger events with the results of the Kodi API calls, with:
 ```
 event_data = {
   'result': api_call_results,
   'result_ok': boolean,
   'input': api_call_parameters,
   'entity_id': 'media_player.kodi'}
```

* no need to clean OrderedDicts; no need for the `kodi_execute_addon` service

* no need for the `kodi_execute_addon` service

* unused import

* naming changes
2017-05-17 08:42:47 -04:00
Fabian Affolter
0e9728d94a Update docstrings (#7630) 2017-05-17 10:10:35 +02:00
Fabian Affolter
3b69de8a1a Upgrade Sphinx to 1.6.1 (#7624) 2017-05-17 09:14:28 +02:00
Fabian Affolter
f0b2a6d0e6 Update docstrings and comments (#7626) 2017-05-17 09:14:11 +02:00
Conrad Juhl Andersen
d2ed3a131f Add support for disabling tradfri groups (#7593)
* Add support for disabling tradfri groups

* Fixed styleguide problems

* Fix style problems

* Use default for groups when setting up in UI
2017-05-16 23:26:57 -07:00
Anders Melchiorsen
ed5f94fd8a Add kelvin/brightness_pct alternatives to light.turn_on (#7596)
* Refactor color profiles to a class

* Refactor into preprocess_turn_on_alternatives

* LIFX: use light.preprocess_turn_on_alternatives

This avoids the color_name duplication and gains support for profile.

* Add kelvin parameter to light.turn_on

* Add brightness_pct parameter to light.turn_on

* LIFX: accept brightness_pct in effects

* Add test of kelvin/brightness_pct conversions
2017-05-16 23:00:46 -07:00
Greg Dowling
9dcc0b5ef5 Bump pyvera - fixes issue with % in brightness levels. (#7622) 2017-05-16 20:01:29 -07:00
Fabian Affolter
1fafa34eb1 Fix typo and update style to match the other platforms (#7621) 2017-05-16 21:57:00 +02:00
Ole-Kenneth
71ed17b836 Add Content-type: image/jpeg for camera proxy (#7581)
* Add Content-type: image/jpeg for camera proxy

* Set content_type in constructur
2017-05-16 09:11:44 -07:00
Philipp Schmitt
a7f933966b Update Docker base image to python 3.6 (#7613) 2017-05-16 09:09:21 -07:00
Paulus Schoutsen
641ba014f2 Update frontend 2017-05-15 23:17:33 -07:00
Paulus Schoutsen
d5ca6a5aed Force automation ids to always be a string (#7612) 2017-05-15 23:15:06 -07:00
Marc Egli
d6081f3dc5 Make miflora monitored_conditions parameter optional (#7598)
* Make miflora monitored_conditions parameter optional.

* Use default keyword instead.

* Use list instead of tuple

* Simplify even more
2017-05-15 23:13:41 -07:00
Fabian Affolter
f25347d98d File sensor (#7569)
* Add File sensor

* Use None and return

* Remove I/O

* Use less memory

* No traceback if file is empty
2017-05-15 14:25:46 +02:00
John Mihalic
a1dc35fc75 Fix handling of single user (#7587) 2017-05-15 00:46:43 -07:00
Marc Egli
4da91d6a8b Add sonos alarm clock update service (#7521)
* Add sonos alarm clock update service

* Add tests and break lines

* Fix style errors

* Make test work with python<3.6

* Fix last two pylint errors

* fix new line to long errors
2017-05-15 00:42:45 -07:00
jhemzal
5c4a21efac Add posibility to specify snmp protocol version (#7564)
* snmp sensor protocol version configuration option

* fixed lint findings.
2017-05-15 00:34:51 -07:00
Adam Mills
e2e58e6acc Automation State Change For timer attribute fix (#7584) 2017-05-15 00:34:30 -07:00
Eugenio Panadero
d0304198de SMTP notify enhancements: full HTML emails and custom product_name in email headers (#7533)
* SMTP notify enhancements: HTML emails and customization options

- Send full HTML emails, with or without inline attached images.
- Custom `timeout`.
- Custom `product_name` identifier for the `FROM` and `X-MAILER` email headers.
- New HTML email test

* `sender_name` instead of product_name

 - Change `sender_name` instead of `product_name`.
 - No changes in `X-Mailer` header.
 - `From` header as always unless you define the new `sender_name` parameter.
2017-05-15 00:23:57 -07:00
Paulus Schoutsen
36d7fe72eb Fix websocket api reaching queue (#7590)
* Fix websocket api reaching queue

* Fix outside task message sending

* Fix Py34 tests
2017-05-15 00:10:06 -07:00
Marc Egli
6d245c43fc Pass additional arguments to tox in test_docker (#7591) 2017-05-14 23:21:39 -07:00
Matt N
e1a4d51fa2 camera.zoneminder: Handle old versions of zoneminder (#7589) 2017-05-13 23:09:44 -07:00
Paulus Schoutsen
352cca1037 Remove more test requirements (#7574)
* No longer require pyunify during tests

* No longer require cast during tests

* No longer required dependency for tests

* No longer require pymochad for tests

* Astral is a core dependency

* Avoid having to install datadog dependency during tests

* CMUS test doesn't test anything

* Frontier Silicon doesn't test anything

* No longer require mutagen

* Update requirements_test_all.txt

* Remove stale comment
2017-05-13 21:25:54 -07:00
Paulus Schoutsen
206d02d531 Websocket_api: avoid parallel drain (#7576)
* Websocket_api: avoid parallel drain

* Remove send_message method
2017-05-13 16:34:45 -07:00
William Scanlon
cfbbade6d1 Additional Wink lock features (#7445)
* Additional Wink lock features
2017-05-13 14:09:00 -04:00
Adam Mills
cfea4b17e3 Add tests for zwave network events (#7573) 2017-05-12 23:06:32 -07:00
Stu Gott
9c4bc2a47f Add Kira component to sensor and remote platforms (#7479)
* Add Kira component to sensor and remote platforms

* Test cases for Kira component and platforms
2017-05-12 21:12:47 -07:00
Eugenio Panadero
4cdf0b4969 Fix Kodi specific services registry and add descriptions (#7551)
* Fix Kodi specific services, add descriptions, add more handled exceptions

 - Fixes issue #7528
 - Add descriptions for Kodi specific services in services.yaml.
 - Error handling in Kodi API errors.
 - Make compatible the existent specific service `media_player.kodi_set_shuffle` with the general `media_player.shuffle_set` service (both use the same method but with different named parameter, I think the Kodi specific service should be eliminated, since it is not)

* fix line too long

* removed new services (for another PR); removed `kodi_set_shuffle` service

* requested changes

 - Removed `kodi_set_shuffle` service.
 - Optional `media_name` and `artist_name` parameters. `media_name` defaults to 'ALL'.
 - Guard clause to check if the services are already registered.
2017-05-12 20:48:57 -07:00
bestlibre
ad15844cf4 Fix systematic warning in influxdb sensor (#7541) 2017-05-12 20:47:12 -07:00
Kevin Fronczak
25cb7c652b Blink version bump (#7571)
Bumped blink version to support automatic reauthorization when tokens expire. Changed the battery sensor call to a string version so that the battery reports back "Low" or "OK" rather than a cryptic integer
2017-05-12 20:30:07 -07:00
Adam Mills
189023821b Tests for zwave setup features (#7570)
* Tests for zwave setup features

* Add test for frontend panel register
2017-05-12 20:27:44 -07:00
Adam Mills
c118be6639 Tests for zwave discovery logic (#7566)
* Tests for zwave discovery logic

* Simplify patching

* Test ignored node
2017-05-12 20:18:20 -07:00
Mitesh Patel
11a3dc268f Support lutron serena shades (#7565)
* Adds support for the Lutron Caseta Serena shades hardware

* fixes typos
2017-05-12 20:17:11 -07:00
Paulus Schoutsen
f0ce6c8210 Update netdisco (#7563) 2017-05-12 20:14:17 -07:00
Juggels
ed0ec613c3 Comment RasPi specific requirements (#7562) 2017-05-12 20:06:28 -07:00
Johan Bloemberg
4a3048b370 Initialize sun with correct values. (#7559)
* Initialize sun with unknown values.

Initial values should be `unknown` instead of `0`. Otherwise on HA restart the value of `0` is pushed to metrics databases (graphite/influx/recorder).

* Update sun position before emitting initial update

* Simplify based on armills comment.

* Use provided time for calculation.
2017-05-12 16:04:30 -07:00
Per Osbäck
fdb7371256 update pywebpush to 1.0.0 (#7561) 2017-05-12 09:25:34 -07:00
florincosta
a96a98a260 Add raspihats binary sensor (#7508)
* Added raspihats binary_sensor platform

* Updated .coveragerc to ommit raspihats platforms.

* Using vol.Coerce(int) for validation and casting of I2CHat config address
2017-05-12 09:20:48 -07:00
Anders Melchiorsen
1ab7103aea LIFX: add lifx_set_state service call (#7552)
* Move service helpers to LifxManager

* Add lifx_set_color

This is a synonym for light.turn_on except it does not actually turn on the
light unless asked to.

Thus, turn_on can be implemented just by asking.

* Rename set_color to set_state

* Support power=False with lifx_set_state
2017-05-12 09:19:51 -07:00
Kane610
416b8e0efe Axis component (#7381)
* Added Axis hub, binary sensors and camera

* Added Axis logo to static images

* Added Axis logo to configurator
Added Axis mdns discovery

* Fixed flake8 and pylint comments

* Missed a change from list to function call
V5 of axis py

* Added dependencies to requirements_all.txt

* Clean up

* Added files to coveragerc

* Guide lines says to import function when needed, this makes Tox pass

* Removed storing hass in config until at the end where I send it to axisdevice

* Don't call update in the constructor

* Don't keep hass private

* Unnecessary lint ignore, following Baloobs suggestion of using NotImplementedError

* Axis package not in pypi yet

* Do not catch bare excepts. Device schema validations raise vol.Invalid.

* setup_device still adds hass object to the config, so the need to remove it prior to writing config file still remains

* Don't expect axis.conf contains correct values

* Improved configuration validation

* Trigger time better explains functionality than scan interval

* Forgot to remove this earlier

* Guideline says double qoutes for sentences

* Return false from discovery if config file contains bad data

* Keys in AXIS_DEVICES are serialnumber

* Ordered imports in alphabetical order

* Moved requirement to pypi

* Moved update callback that handles trigger time to axis binary sensor

* Renamed configurator instance to request_id since that is what it really is

* Removed unnecessary configurator steps

* Changed link in configurator to platform documentation

* Add not-context-manager (#7523)

* Add not-context-manager

* Add missing comma

* Threadsafe configurator (#7536)

* Make Configurator thread safe, get_instance timing issues breaking configurator working on multiple devices

* No blank lines allowed after function docstring

* Fix comment Tox

* Added Axis hub, binary sensors and camera

* Added Axis logo to static images

* Added Axis logo to configurator
Added Axis mdns discovery

* Fixed flake8 and pylint comments

* Missed a change from list to function call
V5 of axis py

* Added dependencies to requirements_all.txt

* Clean up

* Added files to coveragerc

* Guide lines says to import function when needed, this makes Tox pass

* Removed storing hass in config until at the end where I send it to axisdevice

* Don't call update in the constructor

* Don't keep hass private

* Unnecessary lint ignore, following Baloobs suggestion of using NotImplementedError

* Axis package not in pypi yet

* Do not catch bare excepts. Device schema validations raise vol.Invalid.

* setup_device still adds hass object to the config, so the need to remove it prior to writing config file still remains

* Don't expect axis.conf contains correct values

* Improved configuration validation

* Trigger time better explains functionality than scan interval

* Forgot to remove this earlier

* Guideline says double qoutes for sentences

* Return false from discovery if config file contains bad data

* Keys in AXIS_DEVICES are serialnumber

* Ordered imports in alphabetical order

* Moved requirement to pypi

* Moved update callback that handles trigger time to axis binary sensor

* Renamed configurator instance to request_id since that is what it really is

* Removed unnecessary configurator steps

* Changed link in configurator to platform documentation

* No blank lines allowed after function docstring

* No blank lines allowed after function docstring

* Changed discovery to use axis instead of axis_mdns

* Travis CI requested rerun of script/gen_requirements_all.py
2017-05-12 08:51:54 -07:00
Andrey
5b3ef0f76f Treat swing and fan level as optional in Sensibo Climate. (#7560) 2017-05-12 18:28:58 +03:00
Tsvi Mostovicz
452c3a1b25 Support adding different server locations for Microsoft face component (#7532)
* Support adding different server locations

* Rename variables and move CONF_ const into component as requested in review

* Fix unittests

* Forgot to add tests for microsoft_face_identify
2017-05-12 10:53:25 +02:00
Paulus Schoutsen
8da10f670b Only install tox in dev mode (#7557) 2017-05-12 00:01:06 -07:00
Adam Mills
b805d8a844 Hide proximity updates in logbook (#7549) 2017-05-11 19:37:32 -07:00
Paulus Schoutsen
76675a54f8 Do not install all dependencies in dev mode (#7548)
* ps - do not install all dependencies

* Comment out blinkt because it depends on GPIO

* Add pip upgrade check back

* Disable import error blinkt

* Update comment

* Fix comment
2017-05-11 19:20:23 -07:00
Trevor
0e246059f9 Add SSL support to NZBGet sensor (#7553) 2017-05-11 23:05:06 +02:00
Fabian Affolter
0e41342a40 Upgrade dweepy to 0.3.0 (#7550) 2017-05-11 22:48:03 +02:00
Adam Mills
04f1054d07 Automatic version bump (#7555) 2017-05-11 22:47:47 +02:00
Fabian Affolter
966bda079e Upgrade sendgrid to 4.1.0 (#7538) 2017-05-11 09:06:22 -07:00
jumpkick
ef4587f994 Fix for #7459 (#7544)
* Generate a new updateDate with every call

This should fix #7459
Tests need to be updated in another commit.

* Replace STATIC_TIME with datetime object check

Removing the "DATE" argument from the Alexa component's configuration (because it is now dynamically generated) requires this commit's changes to the test cases to check that the updateDate data is a datetime type rather than a specific hardcoded value ('2016-10-10T19:51:42.0Z').

* Fix brackets
2017-05-11 09:04:17 -07:00
Kane610
2c8f6a0ad0 Threadsafe configurator (#7536)
* Make Configurator thread safe, get_instance timing issues breaking configurator working on multiple devices

* No blank lines allowed after function docstring

* Fix comment Tox
2017-05-11 10:24:36 +03:00
Fabian Affolter
8cdadd2aa0 Add not-context-manager (#7523)
* Add not-context-manager

* Add missing comma
2017-05-11 09:14:52 +02:00
Fabian Affolter
3bdf77ad62 Add myStrom binary sensor (#7530) 2017-05-10 16:58:03 +02:00
Adam Mills
8c90fd19ff Try to request current_location Automatic scope (#7447) 2017-05-10 05:44:52 -07:00
Fabian Affolter
71b4afb780 Update docstrings and log messages (#7526) 2017-05-10 12:06:57 +02:00
corneyl
6e6a000217 Upgrade limitlessled to 1.0.7 (#7525) 2017-05-10 10:45:33 +02:00
Bas Schipper
85e71fc785 Support for the PiFace Digital I/O module (#7494)
* Added rpi_pfio component supporting the PiFace I/O module

* Fixed some code style issues

* Removed global listener

* Update rpi_pfio.py
2017-05-09 22:36:33 -07:00
Fabian Affolter
216199556a Don't interact with hass directly (#7099) 2017-05-09 21:56:17 -07:00
Nuno Sousa
89d950c73a Add password parameter to uvc component (#7499) 2017-05-09 21:54:38 -07:00
Eugenio Panadero
b30c352e37 Telegram Bot enhancements with callback queries and new notification services (#7454)
* telegram_bot and notify.telegram enhancements:
- Receive callback queries and produce `telegram_callback` events.
- Custom reply_markup (keyboard or inline_keyboard) for every type of message (message, photo, location & document).
- `disable_notification`, `disable_web_page_preview`, `reply_to_message_id` and `parse_mode` optional keyword args.
- Line break between title and message fields: `'{}\n{}'.format(title, message)`
- Move Telegram notification services to `telegram_bot` component and forward service calls from the telegram notify service to the telegram component, so now the `notify.telegram` platform depends of `telegram_bot`, and there is no need for `api_key` in the notifier configuration. The notifier calls the new notification services of the bot component:
	- telegram_bot/send_message
	- telegram_bot/send_photo
	- telegram_bot/send_document
	- telegram_bot/send_location
	- telegram_bot/edit_message
	- telegram_bot/edit_caption
	- telegram_bot/edit_replymarkup
	- telegram_bot/answer_callback_query
- Added descriptions of the new notification services with a services.yaml file.
- CONFIG_SCHEMA instead of PLATFORM_SCHEMA for the `telegram_bot` component, so only one platform is allowed.
- Async component setup.

* telegram_bot and notify.telegram enhancements: change in requirements_all.txt.
2017-05-09 21:42:17 -07:00
Gergely Imreh
1312ee0f7d sensor.envirophat: do not set up platform if hardware is not attached (#7438)
* sensor.envirophat: do not set up platform if hardware is not attached

Fixes comment from:
https://github.com/home-assistant/home-assistant/pull/7427#discussion_r114703904

* Fix update logic.
2017-05-09 21:29:38 -07:00
Andrey
f4915ddb0b Switch basicmodem and python-roku to pypi (#7514) 2017-05-09 20:23:19 -07:00
Marc Egli
43296069c3 Update docker dev environment to python3.6 (#7520)
* Update docker dev environment to python3.6

* comment out disable switches again
2017-05-09 20:16:46 -07:00
John Arild Berentsen
1eaec8f406 Zwave panel api (#7456)
* # This is a combination of 3 commits.
# The first commit's message is:
Add seperate zwave panel

# The 2nd commit message will be skipped:

#	unused import

# The 3rd commit message will be skipped:

#	Use get for config

* Add seperate zwave panel

* more info

* Add usercodeview

* Improve api

* Improve api

* Separate api into own file.

* disable missing import

* review changes

* Tests 1

* Verify that we fetch data from groups

* Tests groups

* config 1

* usercode 1

* Api mods

* Tweak API

* docstrings

* 100% api testing
2017-05-09 18:56:41 -07:00
Paulus Schoutsen
5d820ec188 Add support for automation config panel (#7509)
* Add support for automation config

* Build fromtend

* Lint
2017-05-09 18:44:00 -07:00
Marc Egli
d86dfb6336 Fix sonos sleep timer (#7503) 2017-05-09 18:35:51 +02:00
Josh Anderson
b34c58386c Correct retrieval of spotify shuffle state (#7505)
Returned on the current playback response itself, not the device
2017-05-09 17:35:30 +02:00
abmantis
5cb3382425 new source only forces "play" if the current state is "playing" (#7506) 2017-05-09 17:34:17 +02:00
Adam Mills
40d27cde0e Refactor sun component for correctness (#7295)
* Refactor sun component for correctness

* Convert datetimes to dates for astral

* Fix tests for updated code

* Fix times now that calcs are fixed

* Move sun functions to helpers

* Fix flake on new file

* Additional tweaks from review

* Update requirements
2017-05-09 00:03:34 -07:00
Oliver
419d97fc06 Fixed potential AttributeError when checking for deleted sources (#7502) 2017-05-09 07:24:18 +02:00
Andrey
1cd51bc6a8 Switch onkyo to pypi (#7497) 2017-05-09 08:13:29 +03:00
Fabian Affolter
c12c742297 Upgrade beautifulsoup4 to 4.6.0 (#7491) 2017-05-08 19:39:40 +02:00
Johan Bloemberg
ce879b7eb8 Prevent printing of packets. (#7492)
A small bug in the python-rflink library caused packets to be printed. This update prevents this from happening.
2017-05-08 17:04:17 +02:00
Fabian Affolter
d7e3962cc0 Upgrade async_timeout to 1.2.1 (#7490) 2017-05-08 17:02:37 +02:00
Anders Melchiorsen
86b34b40a1 LIFX: avoid out-of-bounds hue aborting the colorloop effect (#7495)
The hue is now a float but the hsbk conversion still believed it to be
an integer that could not be larger than 359. The float can in fact be,
for example, 359.9 and this would cause an out-of-bounds error in the
set_color call.

For completeness, the initial hue is also changed to a float.
2017-05-08 16:51:27 +02:00
Paulus Schoutsen
12293d6600 0.44.2 (#7488)
* Version bump to 0.44.2

* Update frontend
2017-05-07 22:07:52 -07:00
Mitesh Patel
66cbdc3043 Uses pypi for deps (#7485) 2017-05-07 17:32:13 -07:00
Paulus Schoutsen
e1d1385358 Fix travis 2017-05-07 16:55:22 -07:00
Paulus Schoutsen
bafc04ca42 Update tox.ini 2017-05-07 16:53:28 -07:00
Paulus Schoutsen
5717c87097 Update tox.ini 2017-05-07 16:51:46 -07:00
Paulus Schoutsen
ab9c394e93 Version bump to 0.44.1 2017-05-07 15:09:53 -07:00
Paulus Schoutsen
5d13f36a4b Merge pull request #7482 from home-assistant/release-0-44-1
0.44.1
2017-05-07 15:08:37 -07:00
Caleb
4165629f97 Update to pyunifi 2.12 (#7468)
* Update to pyunifi 2.12

* Update requirements_all.txt
2017-05-07 14:03:39 -07:00
Marc Egli
f87b9b7b85 Fix plant MIN_TEMPERATURE, MAX_TEMPERATURE validation (#7476)
* Fix plant MIN_TEMPERATURE, MAX_TEMPERATURE validation

small_float only allows values from 0 to 1 so we should use float instead

* Do not use vol.All for a single validation
2017-05-07 14:03:14 -07:00
Martin Hjelmare
2ab45441a8 Upgrade pymysensors to 0.10.0 (#7469) 2017-05-07 14:02:53 -07:00
pezinek
fcdfebefd9 Forecasts for weather underground (#7062) 2017-05-07 13:56:19 -07:00
Brian Cribbs
9b920b3b40 fixing nits 2017-05-07 13:56:05 -07:00
Brian Cribbs
0c94df9fcf fixing documentation 2017-05-07 13:56:05 -07:00
Brian Cribbs
1ba4435693 repairing functionality for non-zero based ranges 2017-05-07 13:56:05 -07:00
Paulus Schoutsen
00ec50da4b Update frontend 2017-05-07 13:50:07 -07:00
Marc Egli
c1056ea4d4 Fix plant MIN_TEMPERATURE, MAX_TEMPERATURE validation (#7476)
* Fix plant MIN_TEMPERATURE, MAX_TEMPERATURE validation

small_float only allows values from 0 to 1 so we should use float instead

* Do not use vol.All for a single validation
2017-05-07 15:15:18 +02:00
Paulus Schoutsen
9440ff881f Remove listening to homeassistant_start with event automation (#7474) 2017-05-06 23:52:39 -07:00
Robbie Trencheny
c525ee9daa Make this an error instead of an info 2017-05-06 23:11:11 -07:00
Paulus Schoutsen
79ca47640e Update requirements_test_all.txt 2017-05-06 23:02:12 -07:00
Caleb
41212b90c4 Update to pyunifi 2.12 (#7468)
* Update to pyunifi 2.12

* Update requirements_all.txt
2017-05-06 22:39:21 -07:00
Paulus Schoutsen
aa6339818e Test only dependencies (#7472)
* Generate requirements file for tests

* Update tox

* Update validate

* Lint

* Tweak order in travis.yml to run longest job first
2017-05-06 22:37:31 -07:00
Paulus Schoutsen
305309a59e Upgrade Dockerfile to Python 3.6 (#7471) 2017-05-06 20:16:40 -07:00
Paulus Schoutsen
ea095de98e Demo: Update old group member thermostat.ecobee -> climate 2017-05-06 19:40:59 -07:00
Paulus Schoutsen
e8a33758c1 Capitalize group names in demo 2017-05-06 19:38:48 -07:00
Martin Hjelmare
47034f83f4 Upgrade pymysensors to 0.10.0 (#7469) 2017-05-06 19:10:17 -07:00
Andrey
2c1df75c07 Switch russound, pymysensors, and pocketcasts to pypi (#7449)
* Switch russound to pypi

* Switch pymysensors to pypi

* Switch pocketcasts to pypi
2017-05-07 02:22:38 +02:00
Paulus Schoutsen
43ff95ad3b Merge pull request #7444 from home-assistant/release-0-44
0.44
2017-05-06 10:38:45 -07:00
Josh Wright
e2559fd6cf Fix object type for default KNX port
#7429 describes a TypeError that is raised if the port is omitted in the config for the KNX component (integer is required (got type str)). This commit changes the default port from a string to an integer. I expect this will resolve that issue...
2017-05-06 10:27:36 -07:00
Gergely Imreh
abe6f9343f sensor.envirophat: add missing requirement (#7451)
Adding requirements that is not explicitly pulled in by the library
that manages the Enviro pHAT.
2017-05-06 10:27:17 -07:00
pezinek
7a70496b11 Forecasts for weather underground (#7062) 2017-05-06 10:11:31 -07:00
Adam Mills
7dd7f509ca Add tests for deprecation helpers (#7452) 2017-05-06 10:10:48 -07:00
Robbie Trencheny
6cc85adb81 Merge pull request #7460 from home-assistant/fix/default-knx-port
Fix object type for default KNX port
2017-05-05 18:03:46 -07:00
Josh Wright
2971a24c56 Fix object type for default KNX port
#7429 describes a TypeError that is raised if the port is omitted in the config for the KNX component (integer is required (got type str)). This commit changes the default port from a string to an integer. I expect this will resolve that issue...
2017-05-05 19:19:24 -04:00
Nuno Sousa
20ded1ba3e Add datadog component (#7158)
* Add datadog component

* Improve test_invalid_config datadog test

* Use assert_setup_component for test setup
2017-05-06 00:34:40 +02:00
Josh Wright
2e4ae3e73d PyPI Openzwave (#7415)
* Remove default zwave config path

PYOZW now has much more comprehensive default handling for the config
path (in src-lib/libopenzwave/libopenzwave.pyx:getConfig()). It looks in
the same place we were looking, plus _many_ more. It will certainly do a
much better job of finding the config files than we will (and will be
updated as the library is changed, so we don't end up chasing it). The
getConfig() method has been there for a while, but was subsntially
improved recently.

This change simply leaves the config_path as None if it is not
specified, which will trigger the default handling in PYOZW.

* Install python-openzwave from PyPI

As of version 0.4, python-openzwave supports installation from PyPI,
which means we can use our 'normal' dependency management tooling to
install it. Yay.

This uses the default 'embed' build (which goes and downloads
statically sources to avoid having to compile anything locally). Check
out the python-openzwave readme for more details.

* Add python-openzwave deps to .travis.yml

Python OpenZwave require the libudev headers to build. This adds the
libudev-dev package to Travis runs via the 'apt' addon for Travis.

Thanks to @MartinHjelmare for this fix.

* Update docker build for PyPI openzwave

Now that PYOZW can be install from PyPI, the docker image build process
can be simplified to remove the explicit compilation of PYOZW.
2017-05-05 14:57:14 -07:00
Gergely Imreh
4b5be750b2 sensor.envirophat: add missing requirement (#7451)
Adding requirements that is not explicitly pulled in by the library
that manages the Enviro pHAT.
2017-05-05 11:37:54 -07:00
florincosta
92411cdc18 Add new raspihats component (#7392)
* Add new raspihats component

* added raspihats to COMMENT_REQUIREMENTS in gen_requirements_all.py

* disabled pylint import errors

* using hass.data for storing i2c-hats manager
2017-05-05 00:02:47 -07:00
Daniel Høyer Iversen
94f7c397d7 Add hass to rfxtrx object (#6844) 2017-05-04 23:51:35 -07:00
Daniel Høyer Iversen
526abdd329 Add hass to rfxtrx object (#6844) 2017-05-04 23:50:53 -07:00
Paulus Schoutsen
61196b1c83 Version bump to 0.45.0.dev0 2017-05-04 21:41:32 -07:00
Paulus Schoutsen
03e3fb77c4 Version bump to 0.44 2017-05-04 21:41:11 -07:00
Anders Melchiorsen
bfd6110091 LIFX: handle unavailable lights gracefully
Recent aiolifx allow sending messages to unregistered devices (as a
no-op). This is handy because bulbs can disappear anytime we yield and
constantly testing for availability is both error-prone and annoying.

So keep the aiolifx device around until a new one registers on the same
mac_addr.
2017-05-04 21:40:35 -07:00
Anders Melchiorsen
71f9507df7 LIFX: fix color restore after running effects
State restoration takes up to a second because bulbs can be slow to react.
During this time an effect could keep running, overwriting the state that we
were trying to restore.

Now the effect forgets the light immediately and it thus avoids further
changes while the restored state settles.
2017-05-04 21:40:35 -07:00
Anders Melchiorsen
1c5eb88368 LIFX: avoid warnings about already running updates
Forcing a refresh will log a warning if the periodic async_update happens
to be running already.

So let's do the refresh locally and remove the force_refresh.
2017-05-04 21:40:35 -07:00
Anders Melchiorsen
4be89521d4 LIFX: Update aiolifx requirement
This update silences some warnings (frawau/aiolifx#7).
2017-05-04 21:40:35 -07:00
Anders Melchiorsen
1e4b56c4d4 LIFX: Move random hue initial color to the LIFXEffect base class
It's a reasonable default for several light effects.
2017-05-04 21:40:35 -07:00
Anders Melchiorsen
655b82c1e2 LIFX: Use 3500K as neutral white
This does not really matter because the colorloop uses saturated colors
(without much white). Anyway, just copy the 3500K that the LIFX app uses.
2017-05-04 21:40:35 -07:00
Anders Melchiorsen
81b567b68f LIFX: refresh state after stopping an effect
This clears the internal cache in case polling picked up the state as set by
an effect.

For example, aborting an effect by selecting a new brightness could keep a
color set by the effect.
2017-05-04 21:40:34 -07:00
Paulus Schoutsen
009a9d59ed Update frontend 2017-05-04 21:38:50 -07:00
Paulus Schoutsen
629bf3eefd Update frontend 2017-05-04 21:38:28 -07:00
Paulus Schoutsen
3b237795ba Merge branch 'release-0-44' into dev 2017-05-04 21:23:40 -07:00
Paulus Schoutsen
80e55fb286 Merge remote-tracking branch 'origin/master' into release-0-44 2017-05-04 21:23:18 -07:00
Robbie Trencheny
12910de9ae Merge pull request #7289 from jminardi/jminardi/tplink-logout
Log out of TP-Link router after devices are recorded.
2017-05-04 18:47:25 -07:00
Robbie Trencheny
2f686124c8 Merge pull request #7446 from amelchio/lifx-misc
LIFX: small error corrections
2017-05-04 18:45:14 -07:00
Robbie Trencheny
b59ca034ae Merge pull request #7393 from cribbstechnologies/dev
MQTT Cover: Fixed status reporting for range with non-zero base
2017-05-04 18:32:24 -07:00
Anders Melchiorsen
78a3f259d6 LIFX: handle unavailable lights gracefully
Recent aiolifx allow sending messages to unregistered devices (as a
no-op). This is handy because bulbs can disappear anytime we yield and
constantly testing for availability is both error-prone and annoying.

So keep the aiolifx device around until a new one registers on the same
mac_addr.
2017-05-04 22:51:00 +02:00
William Scanlon
1d0acb5a2c Get new token to keep pubnub updates working (#7437) 2017-05-04 13:17:35 -07:00
Daniel Perna
ea36c91919 Fix for broken virtual keys (#7439) 2017-05-04 13:15:36 -07:00
Greg Dowling
1d9f1487c3 Bump pyvera version - handle malformed json replies in poll thread. (#7440) 2017-05-04 13:14:36 -07:00
Nolan Gilley
d251621f2b Update join (#7443)
* update python-join-api to 0.0.2

* bump python-join-api to 0.0.2
2017-05-04 13:14:14 -07:00
William Scanlon
8d50045971 Suppress logs when octorpint goes offline (#7441)
* Suppress logs when octorpint goes offline

* Fixed line length
2017-05-04 13:13:09 -07:00
Philipp Schmitt
cc0299d046 Replace pymailgun with pymailgunner (#7436)
* mailgun: Replace pymailgun with pymailgunner

* Fix imports
2017-05-04 20:34:00 +03:00
Pascal Vizeli
7e539a3cb2 Add support for face recognition with dlib (#7421)
* Add support for face recognition with dlib

* fix lint

* fix lint p2

* update library

* dlib can not build

* fix lint

* Fix int p1

* Update dlib_face_detect.py

* Update dlib_face_detect.py

* Update dlib_face_detect.py
2017-05-04 16:03:50 +02:00
deisi
e3bb45c906 Added osramlightify groups. (#7376)
* Added osramlighrify groups.

Allows you to make use of the build in osram lightify groups. Group states get
handeled similar as in the case of phillips hue. A lightify group shows up as
light in the homeassistant webinterface. If one light of the
group is on, the complete group is considered to be on.

To use this feature, first define some groups within your lighrify bridge, then
set add `allow_lightify_groups=true` to you osramlightify config.

It might look like:
````yaml
- platform: osramlightify
  host: IP-ADDRES
  allow_lightify_groups: true
```

* Fixed Pylint errors.

* Included requests.

* Included more requests.

* Fixed setup bridge and removed _light attribute.

* Update osramlightify.py
2017-05-03 23:11:27 -07:00
Gergely Imreh
df13352989 Add new sensor: Enviro pHAT (#7427)
* Add new sensor: Enviro pHAT

Add support for the Enviro pHAT for Raspberry Pi, see hardware
info at https://shop.pimoroni.com/products/enviro-phat

* Move update to add_devices call
2017-05-03 22:59:50 -07:00
Nolan Gilley
05a3c463bf update for pypi (#7430) 2017-05-04 07:48:43 +02:00
Fabian Affolter
c44ebbefc4 Upgrade temperusb to 1.5.3 (#7428) 2017-05-04 07:46:43 +02:00
Paulus Schoutsen
fab533de87 ps - fix websocket yielding pt2 (#7434) 2017-05-03 21:12:08 -07:00
Paulus Schoutsen
ad5a9bf5ac wsock.send_json is a coroutine (#7433) 2017-05-03 20:27:03 -07:00
Paulus Schoutsen
c5a91393e4 Guard against no content type (#7432) 2017-05-03 20:12:51 -07:00
Anders Melchiorsen
494a776959 LIFX: avoid warnings about already running updates
Forcing a refresh will log a warning if the periodic async_update happens
to be running already.

So let's do the refresh locally and remove the force_refresh.
2017-05-04 00:21:24 +02:00
Anders Melchiorsen
193270c4fb LIFX: Update aiolifx requirement
This update silences some warnings (frawau/aiolifx#7).
2017-05-04 00:21:24 +02:00
Anders Melchiorsen
ec490070ca LIFX: Move random hue initial color to the LIFXEffect base class
It's a reasonable default for several light effects.
2017-05-04 00:21:24 +02:00
Anders Melchiorsen
8233f086cd LIFX: Use 3500K as neutral white
This does not really matter because the colorloop uses saturated colors
(without much white). Anyway, just copy the 3500K that the LIFX app uses.
2017-05-04 00:21:24 +02:00
Anders Melchiorsen
99e34539b9 LIFX: fix color restore after running effects
State restoration takes up to a second because bulbs can be slow to react.
During this time an effect could keep running, overwriting the state that we
were trying to restore.

Now the effect forgets the light immediately and it thus avoids further
changes while the restored state settles.
2017-05-04 00:21:24 +02:00
Anders Melchiorsen
71d909483c LIFX: refresh state after stopping an effect
This clears the internal cache in case polling picked up the state as set by
an effect.

For example, aborting an effect by selecting a new brightness could keep a
color set by the effect.
2017-05-04 00:21:24 +02:00
Anders Melchiorsen
dbd6f7e4ed Reverse limitlessled color_temp range (#7359)
Reverse limitlessled color_temp range
2017-05-03 23:32:49 +02:00
Andrey
403a721e91 Comment out opencv-python that is not installable on arm (#7426)
* Comment out opencv-python that is not installable on arm

* Disable import-error
2017-05-03 21:08:21 +03:00
Paulus Schoutsen
af5439860f Update opencv.py 2017-05-03 08:29:17 -07:00
Paulus Schoutsen
0f94c8a2e7 ps - fix opencv (#7419)
* ps - fix opencv

* fix lint
2017-05-03 12:15:04 +02:00
Fabian Affolter
203f48cadc Update docstrings (#7420) 2017-05-03 10:11:39 +02:00
Luar Roji
1a74c41056 Fixed extra R in variable name. (#7418) 2017-05-03 08:32:19 +02:00
Teagan Glenn
b321e0ef80 Opencv (#7261)
* OpenCV

* Fix

* Type-o

* Remove unused opencv camera component discovery.
2017-05-02 21:55:51 -07:00
Gergely Imreh
70ad06d71c light.piglow update (#7408)
* light.piglow: brightness control logic update

Do not reset brightness when brightness is not explicitly supplied.
Based on conversation at:
https://github.com/home-assistant/home-assistant/pull/7377#discussion_r114102005

* light.piglow: add assumed state
2017-05-02 21:21:37 -07:00
Adam Mills
c35d09d5f0 Convert automatic device tracker to push updates (#7404)
* Convert automatic device tracker to push updates

* Update test

* Add to coveragerc

* Fire hass events when automatic update received

* Change brace indentation
2017-05-02 21:21:17 -07:00
Henrik Nicolaisen
f389266f5f remove charset if set in content type header (#7411)
* remove charset if set in content type header like this “Content-Type: image/jpeg;charset=UTF-8”

* fixed lint error
2017-05-02 21:19:16 -07:00
wokar
f9627a5646 applx suggested fix from issue #6573 (#7390) 2017-05-02 21:04:00 -07:00
zeltom
517bd39015 Pilight binary sensor components (#6774)
* Add files via upload

Pilight binary sensor components.

* Pep8 fixed

* Remove unused imports

* Remove STATE_UNKNOWN import

* Grouping import

* New import grouping

* Update pilight.py

* Update pilight.py

* Update pilight.py

* Prevent multiple timer call

* Update .coveragerc

* Fix alphabet ordre

* Fix & clean code (change payload comparaison, delete state function)

* Fix payload comparison and remove state methode

* Fix unused import, whitespaces

* Fix ident error
2017-05-02 20:48:49 -07:00
Andrey
11dc7246af Add Sensibo climate platform (#7379)
* Add Sensibo climate platform

* Force update after running a service

* Add sensibo to .coveragerc

* Use 10s timeout

* Fix schema. Remove print.

* Better handle unit conversions.
2017-05-02 17:23:36 -07:00
Gergely Imreh
8654993b18 light.sensehat: brightness control logic update (#7409)
Do not reset brightness when brightness is not explicitly supplied.
Based on conversation at:
https://github.com/home-assistant/home-assistant/pull/7377#discussion_r114102005
2017-05-02 17:02:13 -07:00
Anders Melchiorsen
1aa3ab52b7 LIFX: Add transition option to colorloop effect (#7410)
This allows for more of a disco mode where lights change so fast that you
actually notice it.

Also change the valid period to the maximum 20 msgs/sec that LIFX bulbs
can handle.
2017-05-03 00:41:43 +02:00
Anders Melchiorsen
d68f59ca6c Update LIFX default color for breathe/pulse effects (#7407)
First, move the default away from turn_on so we do not have to test for
the current service.

Next, change the default color away from random. The new default is that
saturated colors will flash white and desatured colors will flash to their
fully satured color. Always with full brightness.

After many experiments, this was the method that best produced results that
are both visually pleasing and always noticeable as a flash.
2017-05-03 00:05:11 +02:00
Fabian Affolter
4d52b0ecd5 Update docstrings (#7405)
* Update docstrings

* Fix lint issues

* Update docstrings
2017-05-02 22:47:20 +02:00
Brian Cribbs
1b2c83145c fixing nits 2017-05-02 15:41:45 -04:00
Gergely Imreh
12c8266942 light.blinkt: update brightness control logic (#7389)
Always use the current brightness, as per discussion at
https://github.com/home-assistant/home-assistant/pull/7377#discussion_r114102005
2017-05-02 18:35:23 +02:00
Fabian Affolter
a4f1f6e724 Update docstrings (#7374)
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstring

* Update docstrings

* Update docstrings

* Fix lint issues

* Update docstrings

* Revert changes in dict
2017-05-02 09:18:47 -07:00
amigian74
0e08925259 correct MQTT subscription filter (#7269)
* correct MQTT subscription filter

* wildcard handling (#) fixed

* wildcard handling (#) fixed

* added tests for topic subscription like +/something/#

* function names changed (line too long)

* using raw strings for regular expression
import order changed
2017-05-02 09:18:34 -07:00
Andrey
570c5549a9 Clean up requirements (#7391) 2017-05-02 09:15:02 -07:00
Scott Bradshaw
f4f06af0c5 OpenGarage support (#7338)
* OpenGarage.io support

Cleaned up component and ran lint checking

* Fixing lint errors

* Added supported_features and device_class

* Added timeout to HTTP Requests and other changes based on feedback.

* Removed watcher. It provided little value and could cause issues if status was stuck in a state.

* Changes based on feedback. Added error checking for invalid device_key.

* Lint
2017-05-02 08:46:56 -07:00
John Mihalic
752a4b958e Add Eight sleep component (#7275)
* Eight Sleep Implementation

* Update coverage

* Update hass requirements

* Remove unnecessary debug statements

* Bump version to fix date error

* Address comments

* Update requirements
2017-05-02 08:38:27 -07:00
Paulus Schoutsen
350a6fd5fa Lint 2017-05-02 07:47:02 -07:00
Paulus Schoutsen
f17c1090e1 Remove path whitelisting for hassio (#7399)
* Remove path whitelisting for hassio

* Update frontend

* Lint
2017-05-02 00:27:50 -07:00
Paulus Schoutsen
8ea6c7319a Migrate updater to aiohttp (#7387)
* Migrate updater to aiohttp

* Fix tests

* Update updater.py

* Docs
2017-05-01 23:29:01 -07:00
Paulus Schoutsen
da2521a299 Fix YAML dump (#7388)
* Fix YAML dump

* Add test
2017-05-01 20:09:49 -07:00
Brian Cribbs
098e28534b fixing documentation 2017-05-01 13:34:34 -04:00
Brian Cribbs
dc716cd971 repairing functionality for non-zero based ranges 2017-05-01 13:22:54 -04:00
Jack Minardi
7a24e210ae Try again to pass string to error msg 2017-05-01 09:31:23 -04:00
Daniel Perna
fafd0d4e4c Fix impulse events, added error event for Homegear (#7349)
* Fix impulse event, added error event

* Requested changes
2017-05-01 06:37:00 +02:00
Robbie Trencheny
8ba7e61ed6 Merge pull request #7385 from robbiet480/dont-validate-ios-identify
Disable iOS device identify schema validation for now
2017-04-30 20:11:21 -07:00
Alok Saboo
86cfc2a0ed Updated docstrings (#7383)
* Updated docstrings

* Updated docstrings

* Updated docstrings

* Update docstrings

* Update more docstrings
2017-04-30 20:10:08 -07:00
Marcelo Moreira de Mello
6aac53399d Upgrade Ring to 0.1.4 (#7386) 2017-04-30 20:08:14 -07:00
Jack Minardi
bc0559813c Dont add two strings inside logger call 2017-04-30 22:26:16 -04:00
Jack Minardi
dd7690f265 Use % formatting 2017-04-30 21:31:55 -04:00
Jack Minardi
b6827ce57a Use throwaray variable name 2017-04-30 21:02:03 -04:00
Robbie Trencheny
ae93cf702a Merge pull request #7347 from cribbstechnologies/dev
Adding tilt functionality for MQTT cover
2017-04-30 15:56:45 -07:00
Robbie Trencheny
ecf511ff35 Remove unused dependency 2017-04-30 15:55:34 -07:00
Robbie Trencheny
87ef26be22 Disable identify schema validation for now 2017-04-30 15:23:49 -07:00
Brian Cribbs
0fe0f1918a more requested changes 2017-04-30 16:33:29 -04:00
abmantis
c085f06df5 Add support for shuffle toggling on Spotify component. (#7339)
* add support for shuffle toggling on Spotify component.

	this also required adding support for shuffle on the
	media_player component.

* lint

* Use ATTR_MEDIA_SHUFFLING for service handler param

* Line too long fix

* fix tests

* add shuffle set to demo mediaplayer

* rename shuffle attribute
2017-04-30 12:41:21 -07:00
ChristianKuehnel
5d7403bd81 Plant (replacement for MiGardener) (#7131)
* new implementation without mqtt

* fixed lint findings

* fixed more lint findings

* fixed final flak8 error

* added unit tests for platform "plant"

* - changed status to "OK" / "problem"
- added attribute "problem" with details on the problems
- removed unused constant
- setting icon to "?" until we have meaningful data

* reformatted code to meet line length requirements
2017-04-30 12:32:32 -07:00
Wojciech Bederski
c14b829f27 improve handling of flux_led lights in RGBW mode (#7221)
allows simultaneous control of both RGB and White
channels.
2017-04-30 12:03:03 -07:00
Gergely Imreh
f20a81d0c5 light.blinkt: add support for Blinkt! lights on Raspberry Pi (#7377) 2017-04-30 11:48:54 -07:00
Paulus Schoutsen
9afbbbf3fe Remove ordered_dict validator (#7375)
* Remove ordered_dict validator

* Lint

* Update test_config_validation.py
2017-04-30 10:55:03 -07:00
Fabian Affolter
1f4f2d7086 Upgrade voluptuous to 0.10.5 (#7107)
* Upgrade voluptuous to 0.10.5

* Fix tests
2017-04-30 00:42:19 -07:00
Dan Ports
7ff1ded0b5 binary_sensor.workday: fix handling of states vs provinces (#7162)
* binary_sensor.workday: fix handling of states vs provinces

* Add test cases for workday sensor with states

* remove redundant assignment

* Repair unit test to improve coverage

Patch from Wolf-Bastian Pöttner

* Fix handling of invalid states/provinces

* fix indentation to satisfy pylint
2017-04-30 00:31:46 -07:00
Henrik Nicolaisen
8df5de2bb8 optimize remote calls and apps on webostv media_player (#7191)
* - changed updater to only do updated if they succed and handle calls when tv is off better by only doing 1 remote call
- show all sources instead of only connected, to fix source selection when unit is powered off
- fixed sources so they can launch apps and select sources

* fixed lint errors

* show all sources and apps if no custom options are defined in the conf

* fixed indentation for lint

* set _current_source when state is off and fixed timeout exception
2017-04-30 00:30:37 -07:00
Brent Hughes
955e3e0542 Zoneminder: Fixed undefined index error (#7340)
* Zoneminder: Fixed undefined index error

* Add Pascal's correct fix.
2017-04-30 00:18:00 -07:00
Anders Melchiorsen
9f68fd9184 Flux switch: avoid updates when off (#7363)
* Flux switch: avoid updates when off

Calling turn_on when the switch is already on would orphan the existing
time tracker, losing our ability to cancel it when turn_off is called.

* Cleanups

The self.is_on property can now be found from self.unsub_tracker, so
get rid of the self._state attribute.

Add an entry guard to turn_on, making further conditionals unnecessary.
2017-04-30 00:05:29 -07:00
Paulus Schoutsen
85b7433bc4 Update sensehat.py 2017-04-29 22:42:12 -07:00
Fabian Affolter
3ee4d1060f Update docstrings (#7361)
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update tomato.py

* Update isy994.py

* Lint + fix tests

* Lint
2017-04-29 22:04:49 -07:00
Paulus Schoutsen
e22e70a01a Update sensehat.py 2017-04-29 21:40:10 -07:00
Paulus Schoutsen
cf664e42cc Add assumed state to sensehat light. 2017-04-29 21:39:27 -07:00
Gergely Imreh
b815ccc3b8 light.sensehat: plugin to control the 8x8 LED matrix on a Sense hat (#7365)
* light.sensehat: adding plugin to control the 8x8 LED matrix on a Sense Hat

* add new .coveragerc entry

* light.sensehat: formatting and removing unused import

* light.sensehat: add to requirements list

* light.sensehat: update docstrings to the linter's specs

* light.sensehat: add a bit more docstring
2017-04-29 21:34:31 -07:00
onsmam
7b1e948e8d Create knx.py (#7356)
* Create knx.py

light device for the knx component

* Fix doc strings
2017-04-29 21:20:46 -07:00
Jason Carter
607394a0a0 Netdisco now returns a dictionary while it used to be a tuple, fixed (#7350) 2017-04-29 20:54:45 -07:00
LvivEchoes
e4ebae55d5 Feature/add mikrotik device tracker (#7366)
* Add Mikroik device tracker platform

* Update coveragerc with mikrotik.py

* Update coveragerc with mikrotik.py

* Fix lint errors
2017-04-29 20:39:11 -07:00
Paulus Schoutsen
ce3d8be72b Remove binary sensor platforms implementing state property (#7371)
* Remove binary sensor platforms implementing state property

* Fix workday inheritance
2017-04-29 20:36:50 -07:00
Brian Cribbs
a1be80d5d4 added optimistic configuration for tilt state 2017-04-29 19:27:19 -04:00
Brian Cribbs
dc3706523a I was thinking *far* too hard about this 2017-04-29 19:19:24 -04:00
Paulus Schoutsen
55731b759f Fix lint 2017-04-29 15:47:21 -07:00
Paulus Schoutsen
064b2cdb9f Remove state property from alarmdecoder binary sensor (#7370) 2017-04-29 15:12:18 -07:00
Anders Melchiorsen
64a7be66b1 Remove global limit on white light temperature (#7206)
* Remove global limit on white light temperature

Here are the supported temperatures of some popular bulbs:

 Philips Hue: 2000K-6500K (the current 500-154 mired range)
 LIFX Color 1000: 2500K-9000K
 IKEA TRÅDFRI: 2200K, 2700K, 4000K

Obviously, Home Assistant cannot enforce a global limit and work properly
with all of these bulbs. So just remove the limit and leave it up to each
platform to work it out.

This commit updates the existing users and adds a clamp to Hue (where the
limit appears to have originated). It does not attempt to update other
platforms that might need extra handling of the larger range that is now
possible.

* Add min_mireds/max_mireds state attributes to lights

* Support min_mireds/max_mireds with LIFX lights
2017-04-29 15:04:20 -07:00
Fabian Affolter
ae9f44c708 Upgrade speedtest-cli to 1.0.6 (#7354) 2017-04-30 00:00:04 +02:00
Fabian Affolter
74362df19c Upgrade xmltodict to 0.11.0 (#7355) 2017-04-29 23:59:38 +02:00
Greg Dowling
d8afea64af Add debug logging to pyvera events. (#7364) 2017-04-29 17:19:22 +01:00
Daniel Høyer Iversen
b853fb2178 Upgrade Flux led lb to 0.19 (#7352) 2017-04-29 07:46:34 +02:00
Brian Cribbs
5b22e57643 some changes requested on PR 2017-04-28 21:41:50 -04:00
Brian Cribbs
88782fa90a added coroutine annotation to async method 2017-04-28 16:32:06 -04:00
Brian Cribbs
4c06cca3e1 left trailing whitespace 2017-04-28 13:58:01 -04:00
Brian Cribbs
d3042a8199 forgot to remove constructor arg 2017-04-28 13:57:13 -04:00
Brian Cribbs
e61c1ffbc2 fixing hound violations 2017-04-28 13:25:15 -04:00
Brian Cribbs
6cfc1b6af8 removing unnecessary payload value for tilt 2017-04-28 13:15:05 -04:00
Brian Cribbs
c120c47bc1 style changes 2017-04-28 12:14:17 -04:00
Brian Cribbs
44dbf2678b adding tests to cover new functionality 2017-04-28 11:32:42 -04:00
Brian Cribbs
bbe8b2019b style/lint updates 2017-04-28 10:45:32 -04:00
Fabian Affolter
f9c9b3c1b8 Multiple changes (typo, ordering, docstrings, timeouts) (#7343)
* Multiple changes (typo, ordering, docstrings, timeouts)

* Remove debug output

* Catch exception

* Separate URL
2017-04-28 13:25:39 +02:00
Robbie Trencheny
9dd28ac18f Properly return self._unit_of_measurement in the unit_of_measurement function (#7341)
Add an optional extended description…
2017-04-28 12:26:17 +02:00
Thibault Cohen
8114c45b3d Add auxheat to ecobee climate (#6562)
* Add auxheat to ecobee

* Add is_aux_heat_on property in ecobee climate
2017-04-28 11:52:48 +02:00
Anders Melchiorsen
89164d0244 Allow multiple recipients for SMTP notify (#7319)
The existing (singular) configuration keyword is kept for compatibility.
2017-04-28 11:29:30 +02:00
Brian Cribbs
79e134b076 removing accidentally added file 2017-04-27 23:43:54 -04:00
Brian Cribbs
630516f309 slider and tilt open/close seem to work 2017-04-27 23:42:50 -04:00
Paulus Schoutsen
6902e522b9 Merge pull request #7335 from home-assistant/release-0-43-2
0.43.2
2017-04-27 12:42:25 -07:00
Fabian Affolter
0298522fd5 Use four-digits year (#7336) 2017-04-27 09:30:34 -07:00
Paulus Schoutsen
6750e33525 Right fix for Python Open Z-Wave in Docker (#7337) 2017-04-27 09:28:40 -07:00
Paulus Schoutsen
9a67111a0f Right fix for Python Open Z-Wave in Docker (#7337) 2017-04-27 09:28:08 -07:00
Paulus Schoutsen
e6a690558b Fix breaking SSL in test HTML5 (#7310) 2017-04-27 09:27:31 -07:00
Adam Mills
a3bc559fa3 Version bump for automatic (#7329) 2017-04-27 09:05:58 -07:00
Adam Mills
3a1072a158 Version bump of aioautomatic (#7300)
* Version bump of aioautomatic

* Update requirements_all.txt
2017-04-27 09:05:58 -07:00
Paulus Schoutsen
0841bf8529 Update frontend (#7324)
* Initial version of hassio panel

* Update frontend
2017-04-27 09:03:54 -07:00
Fabian Affolter
2b82c222b0 Upgrade python-telegram-bot to 5.3.1 (#7311) 2017-04-27 09:03:46 -07:00
Paulus Schoutsen
d966129fd8 Upgrade pytradfri to 1.1 (#7290) 2017-04-27 09:03:25 -07:00
Paulus Schoutsen
84752b3b13 Hassio api v3 (#7323)
* HassIO rest API v3

* fix content type

* fix lint

* Update comment

* fix content type

* change proxy handling

* fix handling

* fix register

* fix addons

* fix routing

* Update hassio to just proxy

* Fix tests

* Lint
2017-04-27 09:02:43 -07:00
Pascal Vizeli
3735c2e761 Fix HassIO bug with supervisor update & log (#7282) 2017-04-27 09:02:43 -07:00
Pascal Vizeli
9fc89ba744 WIP: HassIO allow to access to container logs. (#7271)
* HassIO allow to access to container logs.

* Add unittest & make a fixture for env

* Add unittest to check if no env exists

* Fix lint
2017-04-27 09:02:43 -07:00
Paulus Schoutsen
f7603a421f Version bump to 0.43.2 2017-04-27 09:02:08 -07:00
Adam Mills
6631e9e939 Version bump for automatic (#7329) 2017-04-27 08:01:30 -04:00
Paulus Schoutsen
3e4e84e3a7 Re-enable Open Z-Wave in Dockerfile (#7325)
Turbo fixed it in #7316
2017-04-27 01:02:14 -07:00
John Arild Berentsen
ce63bb0842 Fix broken docker build (#7316)
* Fix broken docker build

python3 branch

* Update python_openzwave
2017-04-27 01:00:07 -07:00
Anders Melchiorsen
d1121478ab Reduce color_xy_brightness_to_hsv to color_xy_to_hs (#7320)
This makes more sense because the input and output brightness is the same.

We currently convert through RGB which does contain a brightness so we supply
an arbitrary value as input and discard the output.
2017-04-27 00:59:49 -07:00
Paulus Schoutsen
9527390736 Update frontend (#7324)
* Initial version of hassio panel

* Update frontend
2017-04-27 00:57:40 -07:00
Paulus Schoutsen
a732271793 HassIO API fix 2017-04-26 23:24:02 -07:00
Paulus Schoutsen
b532267596 HassIO API fix 2017-04-26 23:23:18 -07:00
Paulus Schoutsen
b14c07a60c Hassio api v3 (#7323)
* HassIO rest API v3

* fix content type

* fix lint

* Update comment

* fix content type

* change proxy handling

* fix handling

* fix register

* fix addons

* fix routing

* Update hassio to just proxy

* Fix tests

* Lint
2017-04-26 22:36:48 -07:00
Jan Losinski
3374169c74 Allow InfluxDB to blacklist domains (#7264)
* Allow InfluxDB to blacklist domains

This adds an option to InfluxDB to blacklist whole domains. This is
useful for domains like automation or script, where no statistic data
is needed.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Add unittest for InfluxDB domain blacklist

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Use common include/exclude config for InfluxDB.

Its now the same syntax as it is for recorder.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Add unittests for InfluxDB include whitelist.

There where no tests for that feature before.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2017-04-26 21:14:52 +02:00
Anders Melchiorsen
ffb8872f95 LIFX: use white light when setting a specific temperature (#7256)
* Default to white when setting LIFX temperature

Changing the temperature of a saturated color is possible but not very
interesting. So assume that a change of the temperature implies setting
the color to white, unless a different color is actually specified.

This makes the frontend temperature picker much more useful because it can
now be used to get away from a colored light.

* Default to a neutral white temperature when setting LIFX colors

This means that setting a particular color will always give the same output,
no matter what the temperature was previously at.

* Find brightness after colors

Now the color_temp logic will not see a changed color when setting
temperature+brightness and thus we will actually get a white light in
this situation.

The XY conversion can then not use brightness as input. This is not
an issue because XY only affects hue and saturation, not brightness. So
we can just use an arbitrary value as brightness input.

* Add a simple comment to a complex conditional
2017-04-26 17:21:14 +02:00
Paulus Schoutsen
d2fb4675e1 Disable Open Z-Wave in Docker (#7315) 2017-04-26 07:37:05 -07:00
Fabian Affolter
569ea0cc01 Upgrade python-telegram-bot to 5.3.1 (#7311) 2017-04-26 10:50:08 +02:00
Adam Mills
00f034cef2 Version bump of aioautomatic (#7300)
* Version bump of aioautomatic

* Update requirements_all.txt
2017-04-25 20:21:16 -07:00
Henrik Nicolaisen
615691efc3 Issue 7218 update pylgtv to 0.1.7 (#7302)
* update pylgtv module to 0.1.7

* update pylgtv to 0.1.7 requirements
2017-04-25 20:20:54 -07:00
Daniel Perna
760d2f1f0a Upgrade pyhomematic, extend device support (#7303) 2017-04-25 20:20:10 -07:00
Paulus Schoutsen
8bb952e416 Fix breaking SSL in test HTML5 (#7310) 2017-04-25 20:18:23 -07:00
Fabian Affolter
f29e0bf53e Don't stack up error messages, fix link, and ordering (#7291) 2017-04-25 12:40:13 +02:00
Alan Fischer
28aab33cd1 Added scene controller support to the vera component, along with proper polling when a vera device needs it (#7234)
Add an optional extended description…
2017-04-25 09:17:25 +02:00
Russell Cloran
d79f89e168 Add support for Zigbee Home Automation (#6263)
* Add support for Zigbee Home Automation

* Fewer magic numbers

* Make optional device config work

* Remove non-zha device_tracker stuff

* Always return boolean from is_on

* Only pass through JSON serializable discovery_info

* Update to bellows 0.2.4

* Fewer magic numbers in binary sensor

* Populate const structures from a function

* Update bellows to 0.2.6

* Fewer magic numbers in light

* Take all possible clusters when overriding

* Update bellows to 0.2.7
2017-04-24 22:24:57 -07:00
micw
699cc7213d Feature/rss feed template (#7032)
* rss_feed_template initial checking

* lint

* Remove use of deprecated cgi-escape()

* Switching back to chardet==2.3 (resolve failing tests with 3.0)

* Code and test improvments

* Option 'requires_api_password', default is True
2017-04-24 22:16:47 -07:00
Ron Klinkien
f65d8e1254 Adding group control to tradfri light component (#7248)
* Added initial support for tradfri group control

* Tried to keep original variable structure

* pylint and pep8 fixes

* Fixed lint error about docstring

* Removed unneeded stuff, renamed _light. Needs to be released pytradfri version.

* Better naming of variables inside add_devices call.
2017-04-24 21:57:38 -07:00
Paulus Schoutsen
fb297981af Upgrade pytradfri to 1.1 (#7290) 2017-04-24 21:57:27 -07:00
Jack Minardi
8bf1c21738 Add space 2017-04-25 00:48:23 -04:00
Jack Minardi
943861a8a3 Remove unused var 2017-04-25 00:45:59 -04:00
Jack Minardi
450fd7f2b5 Log out of router admin interface after devices are recorded. 2017-04-25 00:34:26 -04:00
Jack Minardi
2d5da3e958 Catch KeyError; Add response.text to error message 2017-04-25 00:32:31 -04:00
Paulus Schoutsen
66a63b983e Merge branch 'master' into dev 2017-04-24 21:10:03 -07:00
Paulus Schoutsen
758aed07e8 Merge pull request #7288 from home-assistant/release-0-43-1
0.43.1
2017-04-24 21:02:39 -07:00
Paulus Schoutsen
166bcc0687 Recorder: Check for ENTITY_ID key that contains None value (#7287) 2017-04-24 20:51:14 -07:00
Paulus Schoutsen
335362ffc4 Recorder: Check for ENTITY_ID key that contains None value (#7287) 2017-04-24 20:51:03 -07:00
Klaas Hoekema
41a803a7be Work around bad content-type in Hook api response (#7267) 2017-04-24 20:36:16 -07:00
Martin Hjelmare
1b55dbeb44 Fix telegram webhooks (#7236)
* Always register the view if a webhook exists.
* Return True if platform is set up succesfully, False otherwise.
* Remove the webhook when home assistant stops. Webhooks and long
  polling are mutually excklusive. If a webhook is left after home
  assistant is stopped, a polling telegram bot is unable to be set up,
  on next start of home assistant.
2017-04-24 20:36:08 -07:00
Greg Dowling
6c594e20f6 Workround for wemo subscription bug. (#7245) 2017-04-24 20:35:59 -07:00
Fabian Affolter
c8404cb299 Upgrade paho-mqtt to 1.2.3 (#7214) 2017-04-24 20:35:51 -07:00
John Arild Berentsen
79c6467797 Zwave cover workaround for graber shades. (#7204)
* wierd pylint complaint

* Workaround for Graber csz1 shades

* logging

* Try direct

* Try direct

* Use workaround

* Review changes and tests

* test

* reset test

* Use Bright and Dim also as open and close is
2017-04-24 20:35:27 -07:00
Paulus Schoutsen
e01c36c906 Version bump to 0.43.1 2017-04-24 20:34:56 -07:00
Keaton Taylor
17bdb9558a Fixes utf-8 encoding no longer required by python-openzwave0.3.3 (#7266)
* Fixes utf-8 encoding no longer required by libopenzwave0.3.3

Removes byte encoding for values operation mode, fan mode and swing
mode.

* Fix zwave climate tests for utf-8 change
2017-04-24 17:59:51 -07:00
Patrick Easters
9738bffc3f Updating ping binary sensor with Windows support (#7253)
Fixed ping command syntax and updated regex match
2017-04-24 23:32:12 +02:00
Pascal Vizeli
f58d200ecb Fix HassIO bug with supervisor update & log (#7282) 2017-04-24 23:22:40 +02:00
Jan Losinski
215987d5a7 Add script to import state events to InfluxDB (#7254)
* Add script to import state events to InfluxDB

This adds a script to import recorded events from a recorder database
to a InfluxDB instance. This can be useful for initial importing after
setup of a InfluxDB.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Fix step argument handling in Influx import

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Correct typo in InfluxDB Importer

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Update influxdb_import.py
2017-04-24 23:01:09 +02:00
Nils Uliczka
16227704d7 Fix telegram_polling no first_name or last_name (#7281)
* Default to 'N/A' if sender has no first_name or last_name

* Fixed as requested
2017-04-24 22:08:06 +02:00
Fabrizio Furnari
aad375b713 Add https certificate expiry sensor (#7272)
* fixing rebase issues

* cert_expiry: added .coveragerc entry

* cert_expiry: renamed to SCAN_INTERVAL, removed Throttle

* cert_expiry: better socket exception management

* cert_expiry: splitted line too long

* Update cert_expiry.py

* Fix hass style
2017-04-24 22:01:00 +02:00
LvivEchoes
104d372dfa Add support for Ukrainian Language in Google TTS (#7278) 2017-04-24 21:43:56 +02:00
Stuart Mumford
7960206e2e Refactor matrix notify service (#7122)
* Refactor matrix notify service.

This refactor aims to close #6118 by making the save / restore of the
authentication tokens much more resilient to failure.

It also refactors the module so that all the functionality is part of the class
and that a login failure causes the service to fail on setup rather than at
message send time.

* Make the linter overlords happy

* Improve logger levels and messages

* small style change

* Fix indentation issue
2017-04-24 21:43:02 +02:00
Anders Melchiorsen
4f5ec3e360 Update aiolifx (#7279)
This contains a fix for TypeError bug seen only with LIFX Z.
2017-04-24 21:09:14 +02:00
Pascal Vizeli
ead457f312 WIP: HassIO allow to access to container logs. (#7271)
* HassIO allow to access to container logs.

* Add unittest & make a fixture for env

* Add unittest to check if no env exists

* Fix lint
2017-04-24 15:16:28 +02:00
Daniel Høyer Iversen
575f57a24e Rfxtrx upgrade lib 0.18 (#7273) 2017-04-24 13:42:26 +02:00
Klaas Hoekema
64da8cd47d Work around bad content-type in Hook api response (#7267) 2017-04-23 23:58:17 -07:00
Martin Hjelmare
0e662c4007 Fix telegram webhooks (#7236)
* Always register the view if a webhook exists.
* Return True if platform is set up succesfully, False otherwise.
* Remove the webhook when home assistant stops. Webhooks and long
  polling are mutually excklusive. If a webhook is left after home
  assistant is stopped, a polling telegram bot is unable to be set up,
  on next start of home assistant.
2017-04-23 23:20:04 -07:00
Greg Dowling
6a8a656fef Workround for wemo subscription bug. (#7245) 2017-04-23 23:18:43 -07:00
Fabian Affolter
cfc023e128 Don't use len(SEQUENCE) as condition value (#7249)
* Don't use len(SEQUENCE) as condition value

* Update volvooncall.py
2017-04-23 20:41:09 -07:00
Fabian Affolter
15b2473224 Iterating the dictionary directly (#7251) 2017-04-23 20:16:52 -07:00
clayton craft
48eeb55198 Add notice regarding submission of analytics (#7263) 2017-04-23 19:59:26 -07:00
Oliver
4cd024d91e Pushed to version 0.4.0 of denonavr which also includes experimental support for Marantz receivers (#7250) 2017-04-23 21:00:00 +02:00
Fabian Affolter
fa4a912a86 Use consts and string formatting (#7243) 2017-04-23 13:54:39 +02:00
Fabian Affolter
209da6f338 Upgrade aiohttp_cors to 0.5.3 (#7213) 2017-04-23 09:25:58 +02:00
Fabian Affolter
ec5e9fcd0d Upgrade paho-mqtt to 1.2.3 (#7214) 2017-04-23 09:25:34 +02:00
Fabian Affolter
e9eb7edda6 Upgrade speedtest-cli to 1.0.5 (#7215) 2017-04-23 09:25:11 +02:00
Fabian Affolter
b60b06a062 Upgrade mutagen to 1.37.0 (#7216) 2017-04-23 09:24:53 +02:00
Fabian Affolter
efe8b46576 Upgrade pygatt to 3.1.1 (#7220)
* Upgrade pygatt to 3.1.1

* Fix mess
2017-04-23 09:24:26 +02:00
Anders Melchiorsen
91b8eea6ad LIFX: avoid "Unable to remove unknown listener" warning (#7235)
Forget the cancelled update handler so it is not cancelled a second time
later on (if when <= BULB_LATENCY) and thus invoking the warning.
2017-04-23 09:24:08 +02:00
Adam Mills
b6a4a0d9af Refactor lyft sensor update (#7233) 2017-04-23 09:23:00 +02:00
Matthew Garrett
7b3cc9fe1f Bump a couple of dependencies (#7231)
* avion light: Bump python-avion dependency version

The dependencies in python-avion weren't sufficiently strict. This is now
fixed, but means we need to depend on a new version.

* decora light: Bump python-decora dependency

There's a new version of python-decora with a reliability fix, so depend on
that.
2017-04-23 09:20:58 +02:00
Dan Ports
2c39038507 lyft sensor: re-enable Prime Time rate attribute (#6982)
Turns out this does work correctly even without a user login
(assuming that sandbox mode is disabled)
2017-04-22 21:16:06 +02:00
Fabian Affolter
5bfe5b3f70 Remove superfluous comments and update ordering (#7227)
* Remove superfluous comments and update ordering

* Fix pylint issues
2017-04-22 21:13:04 +02:00
Alok Saboo
d229787fa6 Fixed typo and clarified details for Lifx effects (#7226)
* Fixed typo

* Update services.yaml

* Clarified service details for Lifx effects
2017-04-22 20:43:17 +02:00
John Arild Berentsen
1836c7a358 Zwave cover workaround for graber shades. (#7204)
* wierd pylint complaint

* Workaround for Graber csz1 shades

* logging

* Try direct

* Try direct

* Use workaround

* Review changes and tests

* test

* reset test

* Use Bright and Dim also as open and close is
2017-04-22 16:23:39 +02:00
Joakim af Sandeberg
1b83ce8759 Pushbullet notification sensor (#7182)
* Added the pushbullet sensor component

* Updated requirements_all.txt and .coveragerc with the new sensor

* Updated acording to houndci-bots comments

* Some more changes

* Final change by the hound (?)

* Fixes from balloobs review and from houndci-bot

This changes the sensors information to only contain one attribute
as information, and the rest as device_state_attributes.

* Added leading space to comments

* Added docstrings, removed API_KEY from log, changed imports

* The hound is at it again

* Fix remaining issues

* Fix pylint issue
2017-04-22 14:01:30 +02:00
Fabian Affolter
8c72a57344 Bump version to 0.44.0.dev0 (#7217) 2017-04-22 11:52:24 +02:00
Paulus Schoutsen
8be2ac70ec Merge pull request #7197 from home-assistant/release-0-43
0.43
2017-04-22 00:33:01 -07:00
Paulus Schoutsen
477ebd99b4 Version bump to 0.43 2017-04-22 00:32:27 -07:00
Martin Hjelmare
093c7f0e44 Fix tradfri lights (#7212)
* Remove leftover use of slugify

* The IKEA manufacturer key is now exactly as found in device info.

* Fix bitwise addition of supported features
2017-04-22 00:31:44 -07:00
Martin Hjelmare
3f47bf6b77 Fix tradfri lights (#7212)
* Remove leftover use of slugify

* The IKEA manufacturer key is now exactly as found in device info.

* Fix bitwise addition of supported features
2017-04-22 00:31:23 -07:00
Paulus Schoutsen
80e9e9bfda tradfri: Improve color temp support detection (#7211) 2017-04-21 23:33:25 -07:00
Paulus Schoutsen
40f480c24e tradfri: Improve color temp support detection (#7211) 2017-04-21 23:32:51 -07:00
Henrik Nicolaisen
dafbdbd2d0 Issue 6749 updated pylgtv to 0.1.6 to fix thread leak in asyncio loop (#7199)
* updated pylgtv module to fix problems with timeouts

* - update pylgtv to 0.1.6
- handle new TimeoutError exception from pylgtv

* used full name for exception handling of concurrent.futures._base.TimeoutError

* the exception handling should now follow the rules

* float typecasting should not be necessary

* use asyncio for TimeoutError it’s an alias for concurrent.futures.TimeoutError
2017-04-21 20:24:33 -07:00
Henrik Nicolaisen
8e716780b7 Issue 6749 updated pylgtv to 0.1.6 to fix thread leak in asyncio loop (#7199)
* updated pylgtv module to fix problems with timeouts

* - update pylgtv to 0.1.6
- handle new TimeoutError exception from pylgtv

* used full name for exception handling of concurrent.futures._base.TimeoutError

* the exception handling should now follow the rules

* float typecasting should not be necessary

* use asyncio for TimeoutError it’s an alias for concurrent.futures.TimeoutError
2017-04-21 20:24:21 -07:00
Sean Dague
b641f6863c Fix arwn platform to update hass state when events are received (#7202)
The arwn platform was refactored to be asyncio friendly, however in
doing so one thing was missed which was explicitly telling hass when
something interesting has happened. This led to the very interesting
to debug issue that the state cards were all out of date, even though
the graphs were not.
2017-04-21 20:22:49 -07:00
Sean Dague
b77b22b01a Fix arwn platform to update hass state when events are received (#7202)
The arwn platform was refactored to be asyncio friendly, however in
doing so one thing was missed which was explicitly telling hass when
something interesting has happened. This led to the very interesting
to debug issue that the state cards were all out of date, even though
the graphs were not.
2017-04-21 20:22:36 -07:00
Nikolas Beutler
07fcf22aeb Update ios.py (#7160)
* Update ios.py

as discussed. the part: 
       if battery_state == ios.ATTR_BATTERY_STATE_FULL:
            returning_icon_level = DEFAULT_ICON_LEVEL
kinda screws up the charging icon.

i might just miss a logical solution for that though.
let me know what you think. it might not be beautiful but i think its an overall improve over the current "double battery" solution

* Update ios.py

chound fix and full_battery_charge fix

* Update ios.py

removed new line

* Update ios.py

* Update ios.py

* Update ios.py

* Update ios.py

* Update ios.py

* Update ios.py

* merged request from robbie

* Update ios.py

* Update ios.py

* Update ios.py
2017-04-21 20:18:31 -07:00
Anders Melchiorsen
2d57c6a1c7 Support xy_color with LIFX lights (#7208) 2017-04-21 20:18:31 -07:00
Nikolas Beutler
1194690c42 Update ios.py (#7160)
* Update ios.py

as discussed. the part: 
       if battery_state == ios.ATTR_BATTERY_STATE_FULL:
            returning_icon_level = DEFAULT_ICON_LEVEL
kinda screws up the charging icon.

i might just miss a logical solution for that though.
let me know what you think. it might not be beautiful but i think its an overall improve over the current "double battery" solution

* Update ios.py

chound fix and full_battery_charge fix

* Update ios.py

removed new line

* Update ios.py

* Update ios.py

* Update ios.py

* Update ios.py

* Update ios.py

* Update ios.py

* merged request from robbie

* Update ios.py

* Update ios.py

* Update ios.py
2017-04-21 20:16:59 -07:00
Anders Melchiorsen
2657668a86 Support xy_color with LIFX lights (#7208) 2017-04-21 20:16:36 -07:00
Pierre Ståhl
f5dd25c87f Capture and log pip install error output (#7200)
Add an optional extended description…
2017-04-21 14:15:05 +02:00
Pascal Vizeli
5c737cfa6e HassIO API v2 (#7201)
Add an optional extended description…
2017-04-21 12:21:55 +02:00
Pascal Vizeli
0acc52b23b HassIO API v2 (#7201)
Add an optional extended description…
2017-04-21 12:20:19 +02:00
Anders Melchiorsen
e3f682c7d3 LIFX light effects (#7145)
* Refactor into find_hsbk

This will be useful for new methods that also have to find passed in colors.

* Add AwaitAioLIFX

This encapsulates the callback and Event that aiolifx needs and thus avoids an
explosion of those when new calls are added.

The refresh_state is now generally useful, so move it into its own method.

* Initial effects support for LIFX

These effects are useful as notifications. They mimic the breathe and pulse
effects from the LIFX HTTP API:

    https://api.developer.lifx.com/docs/breathe-effect
    https://api.developer.lifx.com/docs/pulse-effect

However, this implementation runs locally with the LIFX LAN protocol.

* Saturate LIFX no color value

Now the color is "full saturation, no brightness". This avoids a lot of
temporary white when fading from the "no color" value and into a real color.

* Organize LIFX effects in classes

This is to move the setup/restore away from the actual effect, making it quite
simple to add additional effects.

* Stop running LIFX effects on conflicting service calls

Turning the light on/off or starting a new effect will now stop the running
effect.

* Present default LIFX effects as light.turn_on effects

This makes the effects (with default parameters) easily accessible from
the UI.

* Add LIFX colorloop effect

This cycles the HSV colors, so that is added as an internal way to set a
color.

* Move lifx to its own package and split effects into a separate file

* Always show LIFX light name in logs

The name is actually the easiest way to identify a bulb so just using it
as a fallback was a bit odd.

* Compact effect getter

* Always use full brightness for random flash color

This is a stopgap. When a bit more infrastructure is in place, the intention
is to turn the current hue some degrees. This will guarantee a flash color
that is both unlike the current color and unlike white.

* Clear effects concurrently

We have to wait for the bulbs, so let us wait for all of them at once.

* Add lifx_effect_stop

The colorloop effect is most impressive if run on many lights. Testing
this has revealed the need for an easy way to stop effects on all lights
and return to the initial state of each bulb. This new call does just that.

Calling turn_on/turn_off could also stop the effect but that would not
restore the initial state.

* Always calculate the initial effect color

To fade nicely from power off, the breathe effect needs to keep an
unchanging hue. So give up on using a static start color and just find the
correct hue from the target color.

The colorloop effect can start from anything but we use a random color
just to keep things a little interesting during power on.

* Fix lint

* Update .coveragerc
2017-04-20 22:46:29 -07:00
Anders Melchiorsen
d4b085081a LIFX light effects (#7145)
* Refactor into find_hsbk

This will be useful for new methods that also have to find passed in colors.

* Add AwaitAioLIFX

This encapsulates the callback and Event that aiolifx needs and thus avoids an
explosion of those when new calls are added.

The refresh_state is now generally useful, so move it into its own method.

* Initial effects support for LIFX

These effects are useful as notifications. They mimic the breathe and pulse
effects from the LIFX HTTP API:

    https://api.developer.lifx.com/docs/breathe-effect
    https://api.developer.lifx.com/docs/pulse-effect

However, this implementation runs locally with the LIFX LAN protocol.

* Saturate LIFX no color value

Now the color is "full saturation, no brightness". This avoids a lot of
temporary white when fading from the "no color" value and into a real color.

* Organize LIFX effects in classes

This is to move the setup/restore away from the actual effect, making it quite
simple to add additional effects.

* Stop running LIFX effects on conflicting service calls

Turning the light on/off or starting a new effect will now stop the running
effect.

* Present default LIFX effects as light.turn_on effects

This makes the effects (with default parameters) easily accessible from
the UI.

* Add LIFX colorloop effect

This cycles the HSV colors, so that is added as an internal way to set a
color.

* Move lifx to its own package and split effects into a separate file

* Always show LIFX light name in logs

The name is actually the easiest way to identify a bulb so just using it
as a fallback was a bit odd.

* Compact effect getter

* Always use full brightness for random flash color

This is a stopgap. When a bit more infrastructure is in place, the intention
is to turn the current hue some degrees. This will guarantee a flash color
that is both unlike the current color and unlike white.

* Clear effects concurrently

We have to wait for the bulbs, so let us wait for all of them at once.

* Add lifx_effect_stop

The colorloop effect is most impressive if run on many lights. Testing
this has revealed the need for an easy way to stop effects on all lights
and return to the initial state of each bulb. This new call does just that.

Calling turn_on/turn_off could also stop the effect but that would not
restore the initial state.

* Always calculate the initial effect color

To fade nicely from power off, the breathe effect needs to keep an
unchanging hue. So give up on using a static start color and just find the
correct hue from the target color.

The colorloop effect can start from anything but we use a random color
just to keep things a little interesting during power on.

* Fix lint

* Update .coveragerc
2017-04-20 22:46:12 -07:00
Paulus Schoutsen
dbb0525311 Merge branch 'master' into dev 2017-04-20 22:39:09 -07:00
Pascal Vizeli
f641287aa2 Add HassIO to discovery component (#7195)
* Add HassIO to autodiscovery

* Fix tests

* fix tests

* fix test v2

* fix mock test

* call
2017-04-20 18:45:15 -07:00
LvivEchoes
bbeb64eb24 Add support of input registers while querying modbus sensor. (#7082)
* Add support of input registers while querying modbus sensor.

* Changed config option. Refactoring.
2017-04-20 21:28:49 -04:00
Fabian Affolter
eb2e5e5b9d Upgrade py-cpuinfo to 3.2.0 (#7190) 2017-04-20 12:07:56 +02:00
mountainsandcode
920d298c7e mvglive bug fixes and improvements (#6953)
* Refactored mvglive.py

This pull requests builds on the first work with the mvglive sensor:
- Refactoring the code so that multiple sensors for departures can be added
- Rewrites the transport mode restrictions ("products") to be more modular
- Fixes bugs, such as missing implementation of line restriction
- Other improvements, such as including data attribution

* Further improvements to mvglive sensor

- The API returns the property 'direction', which can be used to filter U-Bahn trains by direction without having to enter all final destinations
- The sensor icon now corresponds to the mode of transport of the next departure

* UBahnDirection refactored

U-Bahn SEV (bus replacement services) have unexpected direction values, fixed resulting bug and hound issues
2017-04-20 00:11:55 -07:00
Pierre Ståhl
93820d5124 Do not request artwork if not available (#7189)
This should fix the "dancing media player" issue where the media player
requests artwork when it's not really available, making the UI "dance".
2017-04-20 00:10:06 -07:00
Pierre Ståhl
2e11d49af3 Fix auto discovery for Apple TV (#7188) 2017-04-20 00:09:27 -07:00
Mitko Masarliev
2d5ab520ef Fix for errors on missing preview on LG webos TV (#6755)
* fix for missing image preview on LG webos TV

* fix to use largeIcon if it start with http
2017-04-20 00:08:53 -07:00
Sören Oldag
0c14c66fbc Added light.pwm component. (#7009)
* Added light.pwm component.

* Renamed pwm platform to rpi_gpio_pwm.

* Update requirements_all.txt
2017-04-19 23:32:20 -07:00
Fabian Affolter
b1621d4175 Add ping binary sensor (#7052)
* Add ping binary sensor

* Fix typo and lint issues

* Use SCAN_INTERVAL
2017-04-19 23:15:26 -07:00
happyleavesaoc
1860b6c521 opensky sensor (#7061)
* opensky sensor

* address opensky review comments

* update opensky distance calc
2017-04-19 22:56:20 -07:00
Gianluca Barbaro
f59b3da5fe JSON MQTT Device tracker (#7055)
* ready for PR

* minor fix

* another minor fix

* new platform mqtt_json

* using ATTR constants

* voluptuous check on JSON payload

* voluptuous check on JSON payload
2017-04-19 22:53:07 -07:00
happyleavesaoc
e020d5114a spotify media player (#6980)
* spotify media player

* fix refresh token

* spotify improvements

* add checks for idle

* import STATE_IDLE

* support more media_ids, limit updates

* move spotify device update

* Remove schedule_update_ha_state because should_poll is true
2017-04-19 22:45:12 -07:00
Paulus Schoutsen
ce51866bd2 Update frontend 2017-04-19 22:03:48 -07:00
Charles Blonde
931fce8239 Add Bose soundtouch discovery support and upgrade libsoundtouch library (#7005)
* Add Bose soundtouch discovery support and upgrade libsoundtouch library

* Remove DEVICE global variable

* Update netdisco to lastest version
2017-04-19 21:52:37 -07:00
Paulus Schoutsen
76d2154820 Fix wemo discovery (#7183)
* Fix wemo discovery

* Fix key
2017-04-19 21:25:45 -07:00
Henrik Nicolaisen
b985e4ef0b updated pylgtv module to fix problems with timeouts (#7184) 2017-04-19 19:36:11 -04:00
Gianluca Barbaro
632256fae2 Mqtt camera test (#7175)
* mock mqtt

* minor fix

* minor fix

* minor fix
2017-04-19 09:26:44 -07:00
Paulus Schoutsen
9b43b39370 Update frontend 2017-04-19 09:24:02 -07:00
Paulus Schoutsen
1a635fede3 Tweak Tradfri (#7172) 2017-04-19 09:15:39 -07:00
Paulus Schoutsen
90baa2ce4d Add history to component priority list (#7173) 2017-04-19 09:15:18 -07:00
Sytone
2f4b2ddc0a Add condition for API failure (#7181)
* Add condition for API failure

If you are not running the latest ve3rsion of ZM this will cause exceptions to fire. This fix handles a response from ZM but a non successful attempt. 

This resolves the issue https://github.com/home-assistant/home-assistant/issues/7178

* Fixed houndci-bot issues
2017-04-19 09:08:48 -07:00
Fabian Affolter
921760f8c1 Upgrade mypy to 0.501 (was renamed from mypy-lang) (#7117) 2017-04-19 14:34:23 +02:00
Fabian Affolter
8ba41563c9 Disable invalid-sequence-index (#7177) 2017-04-19 14:09:00 +02:00
Fabian Affolter
a41d0aced7 Supress trackback and upgrade PyMata to 2.14 (#7176) 2017-04-19 12:48:15 +02:00
Alessandro Mogavero
5179832f6f Added new services to platform kodi (#6426)
* added new service

* fixed basic test in kodi platform

* Added new method async_get_albums

* Added new methods in module kodi

* added method find_song in kodi module

* method add_song_to_playlist made
async

* Added media type to method async_play_media

* added methods async_clear_playlist
and play_song

* methods play_song and find_song
made async

* added new service play_song

* Improved kodi._find
now it find for whole words only

* added possibility to specify artist in
kodi.async_find_artist

* added kodi.async_find_album

* added new optional input to play_song service

* In async_play_song added handling of no song found

* default artist value changed to ''

* async_add_song_to_playlist now can also
search for musinc

* added service add_song_to_playlist

* Added new service add_album_to_playlist

* added services to switch shuffle mode

* added service add_all_albums_to_playlist

* handled error in async_unset_shuffle
and async_set_shuffle

* Added abstract methods to media_player

* _server substituted with server property

* style made consistent with requirements

* Fixed issue with pylint

* Services moved to kodi platform

* service play_song removed

* removed service unset_shuffle

* all add services merged into one

* removed service get_artists

* added kodi_ to service names

* Fixed some style issues

* Removed changes in media_player __init__

* Implemented requested changes

* Fixed pylint problem
2017-04-18 23:19:27 -07:00
Paulus Schoutsen
ce9bb0e84c Upgrade netdisco (#7171) 2017-04-18 20:58:25 -07:00
Johan Bloemberg
e5feeec7a4 Value of 0 should not be considered unknown. (#7139)
* Value of 0 should not be considered `unknown`.

* Reflect disconnect state in entity states.

* Due to adding unknown state on disconnect, the amount of reconnects can sometimes be more. Test for at least 2 reconnect attempts.
2017-04-18 20:24:44 -07:00
Paulus Schoutsen
4becfb66e3 Upgrade pytradfri to 1.0 (#7163) 2017-04-18 20:11:18 -07:00
Mitesh Patel
e4bbbe20dd Fix id zone mismatch (#7165)
* Fixes issue with id mismatch when multiple devices are connected to the lutron bridge

* Updates labels

* removes no longer needed config values.

* removes no longer needed imports
2017-04-19 00:24:58 +02:00
Erik Eriksson
1e758ed030 Keep track of already added players (#7149) 2017-04-19 00:20:52 +02:00
Michaël Arnauts
d007269ecc Update neato.py (#7166)
Fix leftover copy/paste error in comment of neato.py
2017-04-18 22:03:06 +02:00
Greg Dowling
bbad15f853 Add subscription update for Wemo switches, fix bug in Insight switches, fix wemo motion bug, fix wemo discovery (#7135)
* Fix wemo discovery.

* Bump wemo version, add subscription_update for basic switch, fix bug with turning insight switches off.

* Fix missed callback change for wemo motion.

* Regress netdisco changes.
2017-04-18 09:11:08 -07:00
Thibault Cohen
de71fee0a0 Fix #7026 adding a new wol parameter (#7144) 2017-04-18 09:09:06 -07:00
Fabian Affolter
c7a11277ac myStrom WiFi bulbs (#7161)
* Add initial support for myStrom WiFi bulbs

* Upgrade python-mystrom to 0.3.8

* Add myStrom light

* Fix lint issue
2017-04-18 09:03:56 -07:00
Paulus Schoutsen
5574686d74 Disable MQTT camera test (#7164) 2017-04-18 08:55:51 -07:00
Martin Hjelmare
15d8f8b827 Add support for tradfri color temp (#7153)
* Add support for tradfri color temp

* Only return rgb_color if supported features indicate support.
* Return color_temp if supported features indicate support and dict
  with allowed color temperatures exist for manufacturer.
* Add manufacturer specific supported features, with default.
* Color temperature is set from a dict of allowed pairs per
  manufacturer, where kelvin is mapped to hex_color. When a user sets a
  color temperature, the closest matching temperature is selected and
  set.

* Clean up
2017-04-18 08:26:59 -07:00
Greg Dowling
1925748f61 Add vera power meter. (#7134)
* Add vera power meter.

* Use W for power.
2017-04-18 12:01:23 +02:00
Mike Megally
226066eafd exposed content_type in rest_command (#7101)
* exposed content_type in rest_command, which allows for manually specifying the content_type for more-strict api endpoints

* fixed up column length

Length was 86 chars, and it needed to be 79

* double import of HTTP_HEADER_CONTENT_TYPE

Removed the accidental double-import of HTTP_HEADER_CONTENT_TYPE

* moved rest_command-specific config value into component

* if no content_type, default to None

* unit test

* newline

* unused CONTENT_TYPE_TEXT_PLAIN

* removed the http-agnostic abstraction hass provided in favor of aiohttps hdrs constant
2017-04-18 11:50:43 +02:00
Kevin
43799b8fee small fix for random effect in order to use the whole rgb range. So 255 is not excluded anymore. (#7156) 2017-04-18 11:46:18 +02:00
Robbie Trencheny
9c0171ec5e Track device last identify time 2017-04-17 23:31:50 -07:00
Robbie Trencheny
b7141901f6 Change iOS sensor unique ID to use the device ID 2017-04-17 22:58:04 -07:00
Robbie Trencheny
919bb08d02 Fix iOS icon calculation to return mdi:battery for levels above 95 2017-04-17 22:51:06 -07:00
Pascal Vizeli
cec39077ba Fix HassIO timeout bug (#7155)
* Fix HassIO timeout bug

* fix lint

* Add long polling timeout to stop event
2017-04-18 00:25:50 +02:00
thecynic
9ed4ed2e47 lutron: fix typo that prevented callback registration (#7148) 2017-04-17 23:04:44 +02:00
Anders Melchiorsen
d4b05a6a85 Fix LIFX lights with disappearing names (#7119)
* Cache the name of LIFX lights

After #7031 the LIFX device will change during an unregister/register
transition. This has the user-visible effect of the new device missing
a friendly name until the next poll.

We now cache the name internally and it will then transfer to the new
device when it registers.

* Allow LIFX logging even without an available device

This will allow us to set the device to None when it unregisters.

* Calculate LIFX availability from the existence of a device

This has become possible because the device is no longer needed
to provide the name of the light when it is unavailable.

We just have to forget the device when it unregisters.
2017-04-16 17:40:22 -07:00
Anders Melchiorsen
103377bdb0 Add LIFX Cloud scene support (#7124)
This uses the LIFX HTTP API to list and activate the scenes that are
stored in the LIFX cloud by the native LIFX smartphone apps.
2017-04-16 16:40:12 -07:00
Anders Melchiorsen
5fa8037231 Always return True/False from is_state and is_state_attr (#7138)
* Always return True/False from is_state and is_state_attr

These functions are documented to always return True/False but the
short-circuit evaluation would return None if the entity_id did not exist.

* Reword into a single statement
2017-04-16 16:36:15 -07:00
Paulus Schoutsen
a2d268a061 Merge pull request #7142 from home-assistant/release-0-42-4
0.42.4
2017-04-16 16:02:10 -07:00
Adam Mills
37f959eb02 Add debug logging to automation initial state (#7068) 2017-04-16 15:45:40 -07:00
Robbie Trencheny
1ce2b6357a Replace rollershutter with cover in demo (#7140) 2017-04-16 15:27:03 -07:00
Adam Mills
527223b992 Fix for zwave RGB setting (#7137) 2017-04-16 15:07:11 -07:00
Adam Mills
409fd62a7c Fix for zwave RGB setting (#7137) 2017-04-16 15:06:59 -07:00
Robbie Trencheny
fadd33bcb2 Make version number optional and a string to fix identify issue introduced in iOS 1.0.1 (#7141) 2017-04-16 15:00:08 -07:00
Fabian Affolter
904b017552 Upgrade aiohttp to 2.0.7 (#7106) 2017-04-16 15:00:08 -07:00
Martin Hjelmare
1efa6eaf0f Fix mysensors callback (#7057)
* Fix mysensors callback

* All messages was not triggering proper updates. Fix by checking all
  child value types each update.

* Upgrade mysensors dep

* Fix pickle persistence when upgrading.
2017-04-16 15:00:08 -07:00
Paulus Schoutsen
9744ec584a Version bump to 0.42.4 2017-04-16 14:59:15 -07:00
Robbie Trencheny
58dfc1d1b1 Make version number optional and a string to fix identify issue introduced in iOS 1.0.1 (#7141) 2017-04-16 14:53:03 -07:00
Paulus Schoutsen
951af6c76d Make Tradfri discoverable (#7128)
* Make Tradfri discoverable

* Fix lint errors

* Fix bugs and clean up calls to light_control

* Add more color util tests

* Add coap client to dockerfile
2017-04-16 14:37:39 -07:00
Patrik
75242e67a7 IKEA Tradfri Gateway: added support for RGB (#7115)
* After rebase and all fixes

* Added color_rgb_to_hex to util.color

* Added test_color_rgb_to_hex

* Changed reference to color_rgb_to_hex

* Bumped to pytradfri 0.5, having support for retry

* Bumped to pytradfri 0.5, having support for retry

* Bumped to pytradfri 0.5, having support for retry

* Bumped to pytradfri 0.5, having support for retry

* Rolled back to 0.4

* Rolled back to 0.4
2017-04-16 11:35:52 -07:00
Paulus Schoutsen
a1208261a8 Load zwave panel (#7127)
* Load Z-Wave panel when component loads

* Update frontend

* Fix tests
2017-04-16 11:10:55 -07:00
Martin Hjelmare
3528705afd Bump version to 0.43.0.dev0 (#7132) 2017-04-16 13:27:25 +02:00
Gianluca Barbaro
7d76186798 Mqtt camera (#7092)
* first commit

* minor fixes

* minor fix

* async_camera_image + test

* minor fix

* async calls
2017-04-16 11:06:57 +02:00
Marcelo Moreira de Mello
9249b6bc33 Upgraded Amcrest module to 1.1.9 to support new firmware versions: (#7130)
- V2.400.AC01.15.R.20170328
    - V2.420.AC00.17.R.20170322
2017-04-16 09:05:15 +02:00
Anders Melchiorsen
6cbe28a9cd Send stderr of ping tracker to devnull (#7096)
When pinging an inaccessible device, OS errors like

    ping: sendto: No route to host

can occur. For a ping tracker this is not an error but rather a normal
situation. Thus, it makes sense to hide the error.
2017-04-15 19:00:01 -07:00
Fabian Affolter
f7b6f8e8fb Upgrade chardet to 3.0.2 (#7112) 2017-04-15 18:32:06 -07:00
Adam Mills
35de3a1dc4 Use third-party lib aioautomatic for automatic (#7126) 2017-04-15 18:11:36 -07:00
Robbie Trencheny
815422a886 Merge pull request #7109 from home-assistant/allow-extra-in-zone-config
Allow extra keys in zone config
2017-04-15 16:39:29 -07:00
Fabian Affolter
c43a3efabd Remove globally disabled pylint issue and update docstrings (#7111) 2017-04-15 00:32:04 +02:00
Fabian Affolter
b0ffc55cfa Upgrade speedtest-cli to 1.0.4 (#7105) 2017-04-15 00:28:04 +02:00
Fabian Affolter
cce372ff66 Update file header, add const for defaults, and update log messages (#7110) 2017-04-15 00:26:04 +02:00
Fabian Affolter
5ffda53805 Upgrade aiohttp to 2.0.7 (#7106) 2017-04-15 00:18:39 +02:00
Robbie Trencheny
60f7a1947f Allow extra keys in zone config 2017-04-14 14:31:10 -07:00
Adam Mills
0ca80cc27e No product ids configured should fetch all ids (#7091) 2017-04-14 19:09:21 +02:00
Adam Mills
46352f6de9 Uber version bump (#7100) 2017-04-14 19:08:28 +02:00
Robbie Trencheny
7e3e742938 Merge pull request #7094 from robbiet480/zwave-manufacturer-product-names
Break Z-Wave product name up into manufacturer name and product name
2017-04-13 23:10:40 -07:00
Robbie Trencheny
e5756ba41d Break product name up into manufacturer name and product name 2017-04-13 22:48:59 -07:00
Andrey
b6ee2332f4 Better thread safety in zwave node_entity (#7087)
* Better thread safety

* Update node_entity.py
2017-04-13 23:45:27 +03:00
Patrik
c267326891 Added initial support for IKEA Tradfri Gateway (#7074)
* Added initial support for IKEA Tradfri Gateway

* Pinned requirement

* Fixed lint-errors

* Added file to .coveragerc

* Trying to fix commit

* Fixed requirements_all again

* Minor reorder of code

* Minor reorder of code

* Made the changes suggested by @balloob

* Made the changes suggested by @balloob and removed debug

* Update tradfri.py
2017-04-13 10:04:42 -07:00
John Arild Berentsen
38ad5714cd Add support fo map data from Neato (#6939)
* Responsiveness

* Delay was not needed as commands does not return until done.

* Add support for cleaning maps and cleaning data

* Hound

* Docstring

* Update requirements

* Review changes

* External lib now returns the raw data.

* debug

* Sensor did not refresh

* Error handling

* Issue warning on connection error

* Update requirements

* Review changes
2017-04-13 07:41:25 -07:00
Colin O'Dell
01c7616147 Bump qnapstats library version to 0.2.4 (#7085) 2017-04-13 07:39:36 -07:00
Gianluca Barbaro
fa65783f39 MQTT: Managing binary payloads (#6976)
* Managing binary payloads

Hello,
background: I wrote a HA camera component that gets the image from a binary payload. I'm testing it with Zanzito (https://play.google.com/store/apps/details?id=it.barbaro.zanzito) and it works apparently well: it gets the image and correctly displays it in the front-end.
But I had to make the changes I'm proposing here: the message was being blocked because the utf-8 decoding failed.
As far as I know, the utf-8 encoding is required for the topic, not for the payload. What I did here was try the utf-8 decoding, but even if unsuccessful, it dispatches the message anyway.
Is there anything else I'm missing?
thanks
Gianluca

* Update __init__.py

* Update __init__.py

* Update __init__.py

* git test - ignore

* Should work

* minor fixes

* updated mqtt/services.yaml

* added two tests, modified threaded subscribe

* removing polymer

* requested changes

* requested changes - minor fix

* security wrap around payload_file_path

* services.yaml updated

* removed file publishing

* minor fix
2017-04-13 07:38:09 -07:00
Thibault Cohen
9a9342ec3f Fix account balance in fido sensor (#7077) 2017-04-13 07:42:48 +02:00
Robbie Trencheny
34cb02177d Bump braviarc version to 0.3.7 (#7078) 2017-04-12 18:22:23 -07:00
Robbie Trencheny
5ba4033651 Merge pull request #6869 from JesseWebDotCom/dev
Exposed more attributes, enabled play_media tv show or season episodes
2017-04-12 15:17:53 -07:00
Andrey
5e18c997f7 Add product_name attribute to zwave nodes. (#7071) 2017-04-12 21:12:37 +03:00
John Arild Berentsen
d63028e44a Add communication data attributes to Zwave node_entity (#6813)
* Add quality attribute to node

* Move quality to node_entity

* adjustments

* Line lenght

* flake8

* Cleanup and add each entry from getNodeStatistics as attribute

* resolve conflict

* Move NETWORK to hass.data

* Test Done

* Cleanup from review

* Resolve conflicts

* Review changes

* Long lines....

* blank line

* import-error-disable

* Update tests Part1... Again

* Hound

* Argh!

* Argh!

* YABBADABBADOOOOOOO!

* Enhance tests

* hound

* Resolve

* resolve tests...
2017-04-12 19:09:29 +02:00
hawk259
f68542ba0d Adding AlarmDecoder platform (#6900)
* Added AlarmDecoder platform

* remove try/catch for generic execption

* Changes for @pvizeli, thanks for the review!

Removed _ prefix from normal function variables
Removed _hass as it will be set via .hass for us
Broke out the three config (socket, serial, usb) and use vol.Any
Added support for USB I think, don't have device, but should work
Removed components dictionary, was form old group all code that didn't work

* Fix hass string handling
2017-04-12 11:35:35 +02:00
Pascal Vizeli
9d20a17642 Lutron. Bugfix callback registration. (#7042)
* Lutron. Bugfix callback registration.

* Change handling to event
2017-04-12 09:52:01 +02:00
Pascal Vizeli
e026717239 Fix handling with register callbacks on added_to_hass (#7067) 2017-04-12 09:51:19 +02:00
Fabian Affolter
f06cff35ff Upgrade paho-mqtt to 1.2.2 (#7066) 2017-04-12 09:48:21 +02:00
sander76
7cb8f49d62 Telegram bot component (incl. webhook and polling platform) (#6913)
* first commit.

* removed pointless string statement

* manually removed  # homeassistant.components.telegram_webhooks from requirements_all.txt

* deleted obsolete file.

* coveragerc abc
2017-04-11 21:10:56 -07:00
Paulus Schoutsen
edf500e66b Upgrade netdisco to 1.0.0rc2 (#7008)
* Upgrade netdisco to 1.0.0rc2

* fix tests
2017-04-11 20:10:02 -07:00
Paulus Schoutsen
72a01b8a90 Speed up aiohttp (#7064) 2017-04-11 19:58:54 -07:00
micw
3c35d5ea58 Fix/slugify with german umlaut ss (#7029)
* more tests for slugify

* Fix german umlauts in slugify

* Update __init__.py
2017-04-11 19:51:07 -07:00
Paulus Schoutsen
4d9e681fc1 Constrain chardet to 2.3 (#7063) 2017-04-11 19:50:43 -07:00
Martin Hjelmare
4e388666b2 Fix mysensors callback (#7057)
* Fix mysensors callback

* All messages was not triggering proper updates. Fix by checking all
  child value types each update.

* Upgrade mysensors dep

* Fix pickle persistence when upgrading.
2017-04-11 19:17:09 -07:00
johanpalmqvist
ed012014bc Add MaryTTS platform (#6988)
* Add MaryTTS platform

* Fix lint error

* Doc link, config and formatting fixes

* Remove stuff not needed with aiohttp2

* Get rid of unnecessary else statement
2017-04-11 22:52:44 +02:00
Paulus Schoutsen
bf6c4604f4 Merge pull request #7050 from home-assistant/release-0-42-3
0.42.3
2017-04-11 09:30:04 -07:00
Pascal Vizeli
c91cf66dec Bugfix slider (#7047)
* Bugfix slider

* Update input_slider.py

* Update input_slider.py
2017-04-11 09:24:25 -07:00
Pascal Vizeli
11125864c6 Bugfix slider (#7047)
* Bugfix slider

* Update input_slider.py

* Update input_slider.py
2017-04-11 09:23:41 -07:00
Pascal Vizeli
7377ce2640 Bugfix wait on start event (#7013)
* Bugfix wait on start event

* Paulus sugestion

* Change handling with stop_track_task

* Add new unittests

* Update test_core.py
2017-04-11 09:15:31 -07:00
Anders Melchiorsen
0013139591 Plug file leak on LIFX unregister (#7031)
* Plug file leak on LIFX unregister

The aiolifx 0.4.4 release closes its socket when the unregister callback is
called. This plugs a file descriptor leak but also means that we must be
careful to not use the device after it goes unavailable.

Also, when a light reappears, it has a new device that must be used.

* Do not test self.available in service calls

The core will learn to handle that.
2017-04-11 09:15:30 -07:00
Fabian Affolter
e3c2d27f4a Fix US states check (fixes #7015) (#7017) 2017-04-11 09:15:30 -07:00
Xorso
f00d721293 Bump pyalarmdotcom to support new version of aiohttp (#7021)
Add an optional extended description…
2017-04-11 09:15:30 -07:00
Paulus Schoutsen
b295451d46 Fix two more instances of JSON parsing synology (#7014)
Add an optional extended description…
2017-04-11 09:15:30 -07:00
Paulus Schoutsen
7a3df037ba Fix Synology camera content type (#7010) 2017-04-11 09:15:30 -07:00
Paulus Schoutsen
a60e8b16c0 Version bump to 0.42.3 2017-04-11 09:14:37 -07:00
Pascal Vizeli
b52cabf2c0 Bugfix wait on start event (#7013)
* Bugfix wait on start event

* Paulus sugestion

* Change handling with stop_track_task

* Add new unittests

* Update test_core.py
2017-04-11 09:09:31 -07:00
Fabian Affolter
cc459e25cc Remove configuration sample (#7048) 2017-04-11 09:05:27 -07:00
Pascal Vizeli
d7ca9e7a66 Make core to look avilable state of device on servicecall (#7045) 2017-04-11 08:59:46 -07:00
Anders Melchiorsen
f099aee69a Plug file leak on LIFX unregister (#7031)
* Plug file leak on LIFX unregister

The aiolifx 0.4.4 release closes its socket when the unregister callback is
called. This plugs a file descriptor leak but also means that we must be
careful to not use the device after it goes unavailable.

Also, when a light reappears, it has a new device that must be used.

* Do not test self.available in service calls

The core will learn to handle that.
2017-04-11 08:58:51 -07:00
David Straub
07bb64815d Missing line name restriction added (fixes #7039) (#7040) 2017-04-11 13:55:42 +02:00
Fabian Affolter
2cfdb44df6 Upgrade sendgrid to 4.0.0 (#7038) 2017-04-11 13:52:47 +02:00
Fabian Affolter
2748bc4165 Upgrade psutil to 5.2.2 (#7037) 2017-04-11 13:52:34 +02:00
micw
f76a4b2806 Feature/min max improvements (#6786)
* Fix #6783, remove a test that makes no sense anymore

* Fix #6784

* Fix typo in docstring

* Fix handling of known->unknown state, extended test, fix lint errors

* Better handling of mismatch in unit of measurement.

Set state to "unkown" and unit of measurement to "ERR" if unit of measurement differs between aggregatet states.
Add entity_id to logged warning.

* Make icon configurable

* Fix typo

* Fix lint

* Fix lint

* Fix lint

* Add option to set entity_id on min_max sensor

* Fix lint logging-not-lazy

* Revert "Add option to set entity_id on min_max sensor"

This reverts commit 4685f26647.

* Revert "Make icon configurable"

This reverts commit fe45aec82d.

* Fixes
2017-04-11 13:52:12 +02:00
pezinek
197db6bded Google TTS can't read percent sign (#6971) (#7030) 2017-04-11 10:27:45 +02:00
happyleavesaoc
aa3ccf16ca update fedex (#7034) 2017-04-11 08:10:31 +02:00
happyleavesaoc
aa91351ff0 update usps version (#7035) 2017-04-11 08:10:07 +02:00
happyleavesaoc
32da163421 bump ups version (#7033) 2017-04-11 08:09:39 +02:00
Adam Mills
ee988dc884 Additional ZWave coverage (#7024)
* Additional ZWave coverage

* setup_platform tests
2017-04-10 16:11:39 -04:00
micw
05eb73a0e3 more tests for slugify (#7027) 2017-04-10 22:51:46 +03:00
Fabian Affolter
89e8e1a4c7 Replace 'vendor_id' with 'arch' (fixes #7003) (#7023) 2017-04-10 18:43:40 +02:00
Paulus Schoutsen
d081e5ab3a Remove deprecated remote classes (#7011)
* Remove deprecated remote classes

* Lint

* Fix tests

* Lint
2017-04-10 09:04:19 -07:00
Fabian Affolter
ab247b0f4d Fix US states check (fixes #7015) (#7017) 2017-04-10 16:13:43 +02:00
Xorso
6cd3758b58 Bump pyalarmdotcom to support new version of aiohttp (#7021)
Add an optional extended description…
2017-04-10 16:13:07 +02:00
Paulus Schoutsen
90e73fda3c Fix two more instances of JSON parsing synology (#7014)
Add an optional extended description…
2017-04-10 10:18:37 +02:00
Paulus Schoutsen
d5e3cd51a5 Fix Synology camera content type (#7010) 2017-04-10 08:19:22 +02:00
Greg Dowling
ecfe0770ed Bump pywemo version. (#7004) 2017-04-09 22:48:18 +01:00
Paulus Schoutsen
6cc5bb0713 Merge pull request #6995 from home-assistant/release-0-42-2
0.42.2
2017-04-09 01:37:18 -07:00
Paulus Schoutsen
f6e819e799 Downgrade aiohttp to 205 (#6994) 2017-04-09 01:36:36 -07:00
Paulus Schoutsen
c42293eb10 Downgrade aiohttp to 205 (#6994) 2017-04-09 01:36:01 -07:00
Paulus Schoutsen
a6dc86fa75 version bump to 0.42.2 2017-04-09 01:31:46 -07:00
Paulus Schoutsen
9c386c68dd Merge pull request #6993 from home-assistant/release-0-42-1
0.42.1
2017-04-09 01:06:10 -07:00
Paulus Schoutsen
f51d705ac7 Make discovery not block start (#6991)
* Make discovery not block start

* Fix tests
2017-04-09 01:06:16 -07:00
Paulus Schoutsen
ba8488d8f1 Make discovery not block start (#6991)
* Make discovery not block start

* Fix tests
2017-04-09 01:05:34 -07:00
Paulus Schoutsen
62d0df4f73 Upgrade to aiohttp 2.0.6 (#6992) 2017-04-08 18:30:02 -07:00
Paulus Schoutsen
d675804119 Version bump to 0.42.1 2017-04-08 18:29:39 -07:00
Paulus Schoutsen
eb0a9869d8 Upgrade to aiohttp 2.0.6 (#6992) 2017-04-08 18:29:28 -07:00
Paulus Schoutsen
cd8723f742 Merge pull request #6956 from home-assistant/release-0-42
0.42
2017-04-08 15:40:30 -07:00
Marcelo Moreira de Mello
50cc2ed97c Bump Amcrest module to 1.1.8 (#6990)
Fixed traceback when calculating SD card percent storage

   self._state = self._camera.percent(sd_used[0], sd_total[0])
AttributeError: 'Http' object has no attribute 'percent'
2017-04-08 14:55:12 -07:00
Paulus Schoutsen
dea9aec268 Warn if start takes a long time. (#6975)
* Warn if start takes a long time.

* ps - cleanup

* Tweak message

* Add tests

* Tweak messagE
2017-04-08 14:55:12 -07:00
Paulus Schoutsen
5d3fe83e62 Warn if start takes a long time. (#6975)
* Warn if start takes a long time.

* ps - cleanup

* Tweak message

* Add tests

* Tweak messagE
2017-04-08 14:53:32 -07:00
happyleavesaoc
2277778d8d update gstreamer (#6987) 2017-04-08 14:53:16 -07:00
Marcelo Moreira de Mello
c5d89499fa Bump Amcrest module to 1.1.8 (#6990)
Fixed traceback when calculating SD card percent storage

   self._state = self._camera.percent(sd_used[0], sd_total[0])
AttributeError: 'Http' object has no attribute 'percent'
2017-04-08 14:52:10 -07:00
Adam Mills
31da54d530 Add tests for ZWaveDeviceEntityValues helper (#6978)
* Add tests for ZWaveDeviceEntityValues helper

* Add remaining coverage
2017-04-08 06:34:59 -07:00
Teemu R
5a2ab3167b switch.tplink: bump pyhs100 version requirement (#6986) 2017-04-08 06:33:59 -07:00
Teemu R
475ac52180 switch.tplink: bump pyhs100 version requirement (#6986) 2017-04-08 06:33:25 -07:00
John Mihalic
660b1b616b Update Emby for aiohttp v2 (#6981) 2017-04-08 04:51:47 -07:00
Paulus Schoutsen
d8558ad173 Fix control+c quitting HASS (#6974) 2017-04-08 04:50:52 -07:00
Pascal Vizeli
a93c01788d Bugfix time and task coro (#6968)
* Bugfix time and task coro

* fix also other create_task

* fix tests

* fix lint in test
2017-04-08 04:50:52 -07:00
Adam Mills
d3c1a48475 Update kodi for aiohttp2 (#6967) 2017-04-08 04:50:52 -07:00
happyleavesaoc
01672e63ea Crime Reports sensor (#6966)
* add crimereports

* add crimereports metadata

* implicit interval

* remove zone support
2017-04-08 04:50:52 -07:00
viswa-swami
382519e082 Foscam Camera: Adding exception handling when fetching the camera image to avoid python exception errors when host is not reachable or rather any url error to camera (#6964)
* Adding exception handling when fetching the camera image to avoid python errors when host is not reachable or any url errors to camera

* Added exception as ConnectionError instead of plain except

* Added exception as ConnectionError instead of plain except. Removed the unused error handle
2017-04-08 04:50:52 -07:00
Andrey
5d1dbd61b2 Preserve customize glob order. (#6963)
* Preserve customize glob order.

* add tests
2017-04-08 04:50:52 -07:00
aufano
69dee168a1 Fix current_temperature is rounded (#6960)
* Fix current_temperature is rounded

* fix  Unnecessary parens after 'if'
2017-04-08 04:50:52 -07:00
Teemu R
6d8af58891 light.yeelight: catch i/o related exceptions from the backend lib (#6952)
Fixes/mitigates problems with #5949 and #6624
2017-04-08 04:50:52 -07:00
Pascal Vizeli
0bb224d8c7 Initial import for HassIO (#6935)
* Initial import for HassIO

* Cleanup api code for views

* First unittest for view

* Add test for edit view

* Finish unittest

* fix addons test

* cleanup service.yaml

* Address first round with ping command

* handle timeout dynamic

* fix lint
2017-04-08 04:50:52 -07:00
Teemu R
55077b9965 switch.tplink: upgrade to the newest upstream release which adds support for plugs using the newer communication protocol (#6979) 2017-04-07 19:19:11 -07:00
John Mihalic
ad8ee1383c Update Emby for aiohttp v2 (#6981) 2017-04-07 19:17:10 -07:00
Paulus Schoutsen
64174f5763 Fix control+c quitting HASS (#6974) 2017-04-07 21:02:49 +02:00
Adam Mills
df77529bfe Tests for zwave services (#6937)
* Initial tests for zwave services

* Fix linter issues

* Complete zwave service tests
2017-04-07 09:17:23 -04:00
Nate
8cff98d07b From Dusk till Dawn (#6857)
* Added dawn, dusk, noon and midnight to the Sun component

* Created a helper method for the solar events
2017-04-06 22:59:41 -07:00
happyleavesaoc
216c2682f0 Crime Reports sensor (#6966)
* add crimereports

* add crimereports metadata

* implicit interval

* remove zone support
2017-04-06 22:47:03 -07:00
Teemu R
d952a07658 light.yeelight: catch i/o related exceptions from the backend lib (#6952)
Fixes/mitigates problems with #5949 and #6624
2017-04-06 22:41:47 -07:00
viswa-swami
9254e7e862 Foscam Camera: Adding exception handling when fetching the camera image to avoid python exception errors when host is not reachable or rather any url error to camera (#6964)
* Adding exception handling when fetching the camera image to avoid python errors when host is not reachable or any url errors to camera

* Added exception as ConnectionError instead of plain except

* Added exception as ConnectionError instead of plain except. Removed the unused error handle
2017-04-06 22:40:33 -07:00
Andrey
f96e06a2c2 Preserve customize glob order. (#6963)
* Preserve customize glob order.

* add tests
2017-04-06 22:39:35 -07:00
Pascal Vizeli
3e66df50c8 Initial import for HassIO (#6935)
* Initial import for HassIO

* Cleanup api code for views

* First unittest for view

* Add test for edit view

* Finish unittest

* fix addons test

* cleanup service.yaml

* Address first round with ping command

* handle timeout dynamic

* fix lint
2017-04-06 22:19:08 -07:00
Pascal Vizeli
74ac160355 Bugfix time and task coro (#6968)
* Bugfix time and task coro

* fix also other create_task

* fix tests

* fix lint in test
2017-04-06 21:00:58 -07:00
JesseWebDotCom
c20d48c8e0 import order fix 2017-04-06 20:52:56 -04:00
aufano
2ce8c2f80e Fix current_temperature is rounded (#6960)
* Fix current_temperature is rounded

* fix  Unnecessary parens after 'if'
2017-04-06 17:40:59 -07:00
Adam Mills
51dc8b78cc Update kodi for aiohttp2 (#6967) 2017-04-07 00:12:24 +02:00
Fabian Affolter
eb55fc8e77 Update for 0.42 2017-04-06 09:36:57 +02:00
Fabian Affolter
37246449f1 Upgrade sqlalchemy to 1.1.9 (#6955) 2017-04-06 00:27:49 -07:00
Diogo Soares
2551bf8645 Added average temperature for the day before and the current period (#6883)
* Added average temperature for the day before and the current period

* Fixed "line too long" warnings

* Fixed "indentation contains tabs" and "indentation contains mixed spaces and tabs" warnings

* Fixed "trailing whitespace" warnings

* upgrade pyhydroquebec requirements to version 1.1.0
2017-04-06 00:26:26 -07:00
Martin Hjelmare
749f79e813 Upgrade mysensors dep and callbacks (#6950) 2017-04-06 00:21:21 -07:00
Pascal Vizeli
86568b443c Fix startup of sonos / snapshot handling / error handling (#6945)
* Fix startup of sonos / snapshot handling / error handling

* Use decorator for coordinator relay

* fix lint

* Fix unittest

* Move subscribe into executor
2017-04-05 23:24:30 -07:00
Paulus Schoutsen
29f385ea76 Fix automations listening to HOMEASSISTANT_START (#6936)
* Fire EVENT_HOMEASSISTANT_START automations off right away while starting

* Actually have core state be set to 'starting' during boot

* Fix correct start implementation

* Test and deprecate event automation platform on start

* Fix doc strings

* Remove shutting down exception

* More strict when to mark an instance as finished

* Add automation platform to listen for start/shutdown

* When we stop we should wait till it's all done

* Fix testing

* Fix async bugs in tests

* Only set UVLOOP when hass starts from CLI

* This hangs normal asyncio event loop

* Clean up Z-Wave node entity test
2017-04-05 23:23:02 -07:00
Fabian Affolter
289d6b6605 Upgrade py-cpuinfo to 3.0.0 (#6948) 2017-04-05 21:29:59 +02:00
Fabian Affolter
73f69085d9 Upgrade Sphinx to 1.5.5 (#6947) 2017-04-05 21:05:50 +02:00
Thibault Cohen
118bd34d74 Add multi phone numbers support (#6605)
* Add multi phone numbers support

* Update fido.py
2017-04-05 17:18:02 +02:00
Jeff Wilson
f1f033e5d2 Report proper features in mqtt_json light (#6941)
* Add tests for supported features in mqtt_json (it fails)

* Fix supported features in mqtt_json
2017-04-05 14:39:19 +02:00
Adam Mills
75a3747f61 Rename zwave nodes by node ID instead of entity ID (#6938) 2017-04-05 08:11:37 -04:00
Marcelo Moreira de Mello
a5f77d5f46 Clean artifacts after running Ring tests. (#6944)
* Clean artifacts after running Ring tests.

* Clean artifacts from top level test_ring.py
2017-04-05 11:26:56 +02:00
Greg Dowling
534187f4cd Bump pywemo version. Fixes Osram/Sylvania Lightify tunable white bulbs. (#6946)
Add an optional extended description…
2017-04-05 11:26:03 +02:00
Pascal Vizeli
8f4fd951e5 Add android ip webcam support for aiohttp2 (#6940) 2017-04-04 21:40:19 -07:00
JesseWebDotCom
90a834cbda String formatting, import order, type check fixes 2017-04-04 22:33:52 -04:00
citruz
e4e7141ae7 Eddystone Beacon Temperature Sensor (#6789)
* Added eddystone_temperature platform.

* Fixed style issues.

* Fixed style issues #2.

* Fixed style issues #3.

* Added new platform to .coveragerc

* Refactored platform to use the beacontools package.

* Fixed style issues and added beacontools to excluded requirements.

* Removed obsolete constants and added pylint exception.

* Added blank line

* Updated beacontools to version 1.0.0

* Updated beacontools to version 1.0.1

* Forgot to regenerate requirements_all

* Minor changes
2017-04-04 23:57:19 +02:00
Paulus Schoutsen
c4e1255a84 Initial state over restore state (#6924)
* Input Boolean: initial state > restore state

* Input select: initial state overrules restored state

* Input slider: initial state overrule restore state

* Lint

* Lint
2017-04-04 09:29:49 -07:00
Craig J. Ward
c5574c2684 total connect alarm support (#6887)
* total connect alarm support

* linting fixes

* linting fixes

* docstring

* docstring

* use sync and update coveragerc

* remove unused import

* changes as per notes

* Update HA code style
2017-04-04 12:21:53 +02:00
Greg Dowling
dcbc0b490c WIP - Fix bug in state handling in Vera Switch and Light (#6931)
* Fix bug in state handling.

* Tidy.
2017-04-04 12:02:09 +02:00
Klaas Hoekema
57a00c1fbf Allow token authentication for 'hook' switch component (#6922)
The Hook switch component currently uses username/password to get a token
from the Hook web app to use for subsequent requests. This adds an option
to specify the token directly in config.

Makes the 'password' and 'token' options mutually exclusive since
otherwise one would have to take precedence, and it seems worth
preventing people from filling their config with passwords that don't
even need to be there.
2017-04-04 10:55:43 +02:00
Fabian Affolter
aff8c0f695 Upgrade Sphinx to 1.5.4 (#6927) 2017-04-04 10:50:04 +02:00
Fabian Affolter
542e430c1c Upgrade distro to 1.0.4 (#6926) 2017-04-04 10:44:08 +02:00
Fabian Affolter
26e9e59a5b Upgrade paho-mqtt to 1.2.1 (#6928) 2017-04-04 10:43:41 +02:00
Daniel Høyer Iversen
86d265d407 Upgrade flux_led to 0.17 (#6929)
* Update flux_led lib
2017-04-04 10:42:51 +02:00
Paulus Schoutsen
23645da74c Automation: initial state > restore state (#6911)
* Automation: initial state > restore state

* Clean up code

* Ensure MQTT defaults are used.

* Ensure failed platforms always return None

* Automation: write state to state machine after start
2017-04-03 23:11:39 -07:00
Paulus Schoutsen
3895979e39 Update frontend 2017-04-03 23:02:15 -07:00
Greg Dowling
5b9d9954c5 Update vera cover refresh logic (#6897)
* Update cover update logic to fix compatibility bug. Bump vera library.

* Tidy.

* Add missed file.
2017-04-03 22:44:52 -07:00
John Mihalic
4c7ec4932c Bump pyHik library version to support more cameras (#6921) 2017-04-04 06:54:33 +02:00
Adam Mills
06e1c21b1f Support for zwave light transitions (#6868)
* Support for zwave light transitions

* Dimming duration is optional

* Updated supported_features to show transition
2017-04-03 14:56:48 -04:00
Mitesh Patel
01e581aced Adds support for the PlugInDimmer hardware (#6915) 2017-04-03 08:52:02 -07:00
John Arild Berentsen
a107a592de Fix for #6691 Neato Connection error handling (#6731)
* Responsiveness

* Delay was not needed as commands does not return until done.

* Offline error catch

* Remove unneeded code
2017-04-03 14:42:21 +02:00
Dan
134b21dfea Onkyo update (#6906)
* Update onkyo req, change volume to int

* Update Onkyo

Updates onkyo component. Pulls added sources (Bluetooth, built-in
streaming, etc.)

* Regenerated requirements_all.txt via script

* Update onkyo.py

* Update requirements_all.txt
2017-04-03 00:35:36 -07:00
David McNett
c27a526f5b Eliminate needless async_add_job invocation of async_add_devices (#6864) 2017-04-03 00:01:53 -07:00
Marcelo Moreira de Mello
f4d2ece2fe Make sensor.ring to handle scan_interval option as expected. (#6886)
* Make sensor.ring to handle scan_interval option as expected.

* Fix lint

* Fixed lint timedelta
2017-04-02 23:46:54 -07:00
Marcelo Moreira de Mello
5b8f1850fa Makes amcrest.sensor to handle properly the scan_interval option. (#6885)
* Makes amcrest.sensor to handle scan_interval option as expected.

* Added _LOGGER.debug statement for troubleshooting.

* Fixed lint
2017-04-02 23:46:18 -07:00
Paulus Schoutsen
ce42648a51 Update README.rst 2017-04-02 17:35:03 -07:00
Paulus Schoutsen
36e5878b2e Move examples out (#6908)
* Remove examples from main repo

* Simplify README

* Point screenshot for components at dev branch for now
2017-04-02 17:01:51 -07:00
Dan
f0027e3cc1 Fox UMP volume set (#6904)
async needs consistant paramater namming accross platforms. This fixes
UMP's volume set method by renaming the paramater.
2017-04-02 15:31:28 -07:00
Wolfgang Malgadey
864b57d42c Fix Tado climate set off mode (#6848) 2017-04-02 12:47:15 -04:00
JesseWebDotCom
b99dd19ad6 Fixed log errors if session username or content rating is blank 2017-04-02 10:51:03 -04:00
Daniel Høyer Iversen
8806265e99 Fluxled (#6892)
* Update flux_led lib
2017-04-02 14:12:38 +02:00
ChristianKuehnel
2413d97415 added support for Fibaro FGR-222 (similar to FGRM-222) (#6890) 2017-04-02 12:41:53 +03:00
Fabian Affolter
395f9b6548 Upgrade sqlalchemy to 1.1.8 (#6873) 2017-04-01 12:36:46 +02:00
Fabian Affolter
7afe694cc7 Upgrade aiohttp_cors to 0.5.2 (#6874) 2017-04-01 12:36:35 +02:00
Fabian Affolter
ec2df2ca0f Upgrade pytz to 2017.02 (#6875) 2017-04-01 12:36:24 +02:00
Marcelo Moreira de Mello
65b9383e04 Bumped amcrest module to 1.1.5 (#6872) 2017-04-01 12:36:04 +02:00
JesseWebDotCom
ae21fa9ce1 Fixed setting username and content rating data 2017-03-31 23:20:36 -04:00
JesseWebDotCom
564a01f344 mend
Exposed more attributes, enabled play_media tv show or season episodes
2017-03-31 22:36:37 -04:00
JesseWebDotCom
05bab8c808 Exposed more attributes, enabled play_media tv show or season episodes 2017-03-31 22:19:04 -04:00
Fabian Affolter
a0bb554f8a Upgrade speedtest-cli to 1.0.3 (#6867) 2017-03-31 22:57:29 +02:00
Jacob Tomlinson
2d6b09586d Added Met Office weather and sensor components (#6742)
* Added Met Office weather and sensor components

* Removed unnecessary dependancy

* Generated requirements

* Fix time interval

* Updated coverage

* Some review changes

* Allow user to specify lat and lon in component

* Added missing import

* Fixed unit

* Fixed import indent

* Updated condition to use CONDITION_CLASSES
2017-03-31 22:03:27 +02:00
Fabian Affolter
573b2a11c0 Upgrade sphinx-autodoc-typehints to 1.2.0 (#6865) 2017-03-31 21:39:22 +02:00
Fabian Affolter
ac25eff2d0 Upgrade sendgrid to 3.6.5 (#6866) 2017-03-31 12:37:34 -07:00
Marcelo Moreira de Mello
05398a9dff Introduced Ring binary sensors and refactored Ring component (#6520)
* - Introduced Ring binary_sensor.

- Added unittest for Ring binary_sensor.

- Bumped ring_doorbell 3rd party module.

* Updated requirements

* Added correct file for unittest

* - Introduced Ring binary_sensor.

- Added unittest for Ring binary_sensor.

- Bumped ring_doorbell 3rd party module.

* Updated requirements

* Added correct file for unittest

* Added extra sensors last_ding and last_motion

* Modified Ring binary_sensor and sensor to inherit DOMAIN configuration

* Moved static to top ring.py

* Fixed requirements

* Bump version ring_doorbell to 0.1.2

* testing unittests

* Use hass.data dict instead GLOBALS

* Fixed unittests

* Bump ring_doorbell to 0.1.3

* Updated unittest and coverted to use decorator @requests_mock.Mocker()

* Updated ring_session with lower case
2017-03-31 08:53:56 -07:00
Paulus Schoutsen
8c97bccaaa Handle aiohttp task cancellation better (#6862) 2017-03-31 11:55:22 +02:00
Craig J. Ward
5bb201c7fc use change light level to avoid variable ramp speeds (#6860) 2017-03-30 23:53:10 -07:00
Pascal Vizeli
72db4a80dd Update aioHTTP to 2.0.5 (#6856) 2017-03-30 08:27:53 -07:00
Johan Bloemberg
816b1891b5 Add option to disable automatic add for lights and sensors. (#6852) 2017-03-30 08:02:03 -07:00
Beat
ee8701b560 Fix configuration setup (#6853)
When the user exceeds the request limit for google APIs, the response status stays at 200 but the response body is different:
```
{
   "error_message" : "You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console: https://console.developers.google.com/apis/credentials?project=_",
   "results" : [],
   "status" : "OVER_QUERY_LIMIT"
}
```
This prevents HA from creating the initial configuration
2017-03-30 15:26:11 +02:00
Paulus Schoutsen
714b516176 aiohttp 2 (#6835)
* Upgrade aiohttp2

* Fix resource caching

* Fix helpers.aiohttp_client

* Lint

* Use static path for api error_log

* Fix ClientErrors import

* Remove not needed DisconnectError

* Remove releasing responses code

* Add timeout if stream starts non responding

* More async_aiohttp_proxy_stream cleanup

* Fix references to ClientError

* Fix fingerprinting

* Fix aiohttp stream tests

* Rename aiohttp_proxy_stream

* Remove impossible darksky test

* Fix sleepiq requests escaping mocker

* Lint

* Remove deprecated parameter

* Break up aiohttp_proxy_stream in 2 methods

* Lint

* Upgrade to aiohttp 2.0.4

* Convert connector close to a callback

* Fix static fingerprinted links
2017-03-30 00:50:53 -07:00
Anders Melchiorsen
7b83a836f3 Lifx legacy (#6847)
* Add legacy LIFX platform for Windows support

The async platform introduced in 9ef084d903 has
turned out to use Python functionality that is not available in Windows.

This commit restores the previous implementation, now named lifx_legacy.

* Add a comment about the platform being a legacy implementation

* Warn when using unsupported lifx platform on Windows

* Update .coveragerc
2017-03-29 23:00:22 -07:00
Johan Bloemberg
ead00e956f Handle initial event after entity is instantiated. (#6760) 2017-03-29 22:50:32 -07:00
Paulus Schoutsen
556dba4020 Convert Alexa tests to use aiohttp test utils (#6839) 2017-03-29 22:21:39 -07:00
Paulus Schoutsen
bfe0aee468 Locative tests to use aiohttp test utils (#6838) 2017-03-29 22:19:58 -07:00
Lewis Juggins
9de4c2b056 [switch.wemo] Fix today_energy_kwh calculation. (#6846)
* [switch.wemo] Fix today_energy_kwh calculation.

* Blank line fail

* Round to two decimal places.
2017-03-29 21:49:28 +02:00
Anubhaw Arya
c935bfce2a Integration with lockitron (#6805)
* Integration with lockitron

* Let super class deal with polling and updating
2017-03-29 17:25:23 +02:00
Martin Hjelmare
7c614a6738 Add voluptuous config validation to scenes (#6830)
* Add platform schema to scene component and homeassistant platform.
* Clean up code and add constants.
* Add unit test and clean up tests.
2017-03-28 23:39:53 -07:00
Xorso
d1b519a418 Updating Alarm.com Component for async and no Selenium (#6752)
* Updating Alarm.com Component for async and no Selenium

* Fixed gen_all_requirements
2017-03-28 23:21:40 -07:00
Johan Bloemberg
e1ed076015 Rflink group commands (#5969)
* Add support for group commands (allon/alloff).
Add 'group_aliasses' config attribute that only respond to group commands.
Add nogroup_aliases that only respond to 'on' 'off' commands.
Allow settings device id group behaviour.

* Fix linting.

* Fix lint.
2017-03-29 01:04:25 -04:00
Oleksii Serdiuk
63c15e997a history_stats: Fix schema, as state can be arbitrary string (#6753) 2017-03-29 00:58:59 -04:00
Andrey
fb8323f48d Remove zwave cover invert workaround. Use config instead. (#6832) 2017-03-28 23:01:29 +03:00
William Scanlon
b5336ed04e Updated pubnubsub-handler version (#6829) 2017-03-28 14:13:45 -04:00
Teemu R
429367409c yeelight: adjust supported features on update() (#6799)
* yeelight: adjust supported features on update()

Earlier we checked for the type only during the initialization,
but this won't work when the bulb is disconnected during the init,
causing failures to adjust rgb&color temperature even if those should be supported.

fixes #6692

* Use reassign instead of OR for updating the supported features
2017-03-28 17:26:43 +02:00
Lewis Juggins
6dba05c79f [switch.wemo] Fix mW to kW conversion. (#6826)
* Fix mW to kW conversion.

* Line length.
2017-03-28 17:24:33 +02:00
Janne Grunau
5c80da6a8f lights/hue: use device class for on/off devices like the osram lightify plug (#6817)
* hue: remove duplicate SUPPORT_FLASH flag

* hue: use correct device class for the Osram Lightify Plug
2017-03-28 00:04:28 +02:00
Fabian Affolter
d027df5a89 Allow to monitor Windows hosts (#6803) 2017-03-27 22:11:15 +02:00
goto100
b8c1bc9542 fix WOL in docker/jail (#6810)
* fix WOL in docker/jail

add ip_address parameter to send_magic_packet if host specific.

in docker/jail, WOL doesn't works due to subnet broadcast issues.

* Update wake_on_lan.py

lint
2017-03-27 14:02:43 +02:00
Greg Dowling
c53de19246 Update Insight parameters using the subscription data. (#6782)
* Update Insight parameters using the subscription dta.

* Minor refactor.

* Tidy.
2017-03-27 12:43:43 +02:00
John Mihalic
f242ad26ca Add NVR support to Hikvision Binary Sensors (#6807)
* Add NVR support to hikvision

* Only append channel for nvr devices

* Descriptor cleanup

* Update requirements
2017-03-27 12:41:57 +02:00
tantecky
a70af62e60 Make get_snmp_data more robust (#6798) 2017-03-27 12:22:59 +02:00
Fabian Affolter
be04ef7be1 Upgrade matrix-client to 0.0.6 (#6808) 2017-03-27 10:35:40 +02:00
Fabian Affolter
f4f72e420a Fix typo and update name (#6809) 2017-03-27 10:35:27 +02:00
Fabian Affolter
84287872bb Use string formatting and remove already global disabled pylint issue (#6801) 2017-03-26 21:13:38 +02:00
David Straub
78b5eb7aac Platform for Munich public transport departure times (#6704)
* Add MVGLive (Munich public transport real-time departure) sensor platform

* Move update on startup to add_devices; rewrite dictionary filtering

* Fix lint error

* Updated requirement to PyMVGLive 1.1.3 (PyPI version)

* Refactor and clean up MVGLiveData.update method

* Shorten line
2017-03-26 19:06:40 +02:00
Fabian Affolter
6e44ccf683 Upgrade pysnmp to 4.3.5 (#6793) 2017-03-26 15:53:53 +02:00
Fabian Affolter
ad649009cd Upgrade zeroconf to 0.19.0 (#6792) 2017-03-26 15:53:42 +02:00
Fabian Affolter
7782e7e948 Add optional unit of measurement (#6796) 2017-03-26 15:52:59 +02:00
Fabian Affolter
5d5547cdb6 Update docstrings (#6795)
* Add link to docs and remove comments which are obvious

* Update docstrings

* Repleace conf details with link to docs

* Add link to docs

* Update docstrings

* Update import

* Update ordering

* Update ordering

* Update docstring

* Update ordering

* Update ordering
2017-03-26 15:50:40 +02:00
Fabian Affolter
22b28d85db Add switch to MQTT discovery (#6733) 2017-03-26 15:48:28 +02:00
Teemu R
f5d4f853ba switch.tplink: upgrade to the newest upstream release which adds support for plugs using the newer communication protocol (#6790) 2017-03-26 10:55:17 +02:00
Fabian Affolter
0f098df232 Merge branch 'master' into dev 2017-03-26 00:07:25 +01:00
Fabian Affolter
1f046972d9 Merge pull request #6756 from home-assistant/release-0-41
0.41
2017-03-26 00:01:49 +01:00
John Arild Berentsen
5a7155fc4a Wrong info in discovery schema (#6779) 2017-03-25 19:39:03 +01:00
Nick Sabinske
c817ab08b7 Fix bridge-led support in limitlessled.py (#6776)
Addressing #6382 . Feedback from github & forums is the bridge_led feature never worked and defining the bridge LED as another group+bulb type is the right way to do this in the limitlessled component.
2017-03-25 15:32:57 +01:00
William Scanlon
f8005153c9 Fix wink siren (#6775)
* Fix siren/switch attributes and update python-wink

* Updated requirements_all.txt
2017-03-25 15:28:16 +01:00
Daniel Perna
447048701c Homematic Fixes (#6769)
* Added missing operational modes for thermostats

* Added attributes

* Updated requirements

* Bumped dependency
2017-03-25 09:48:05 +01:00
Pascal Vizeli
f4e9466394 Bugfix automation fire on bootstrap (#6770)
* Bugfix automation fire on bootstrap

* Add test & fix bug

* fix lint
2017-03-24 15:52:14 -07:00
Adam Mills
cffc6c7bea Tests for zwave workaround detection (#6761)
* Tests for zwave workaround detection

* Remove unused code

* Revert "Remove unused code"

This reverts commit e06cce0abe.

* Tests for empty manufacturer ID
2017-03-24 15:31:46 -07:00
Fabian Affolter
8d606f8d16 Upgrade sleekxmpp to 1.3.2 (#6773) 2017-03-24 21:44:04 +01:00
Fabian Affolter
7ae814357a Upgrade psutil to 5.2.1 (#6771) 2017-03-24 21:43:48 +01:00
Fabian Affolter
1be2706de3 Upgrade pydroid-ipcam to 0.7 (#6772) 2017-03-24 21:42:00 +01:00
geekofweek
06d3889e1b Wink Aros Fixes (#6726)
Wink Aros only supports 3 Fan Modes:

Low
Medium
High

Fan Mode had a Typo and wasn't represented in the UI
2017-03-24 16:13:14 -04:00
John Arild Berentsen
ee6c9ab6a9 Typing error and update test (#6757) 2017-03-23 23:53:59 -07:00
John Arild Berentsen
82c599a749 current temp could be none (#6759) 2017-03-23 23:50:36 -07:00
Paulus Schoutsen
0b7f873120 Merge branch 'release-0-41' into dev 2017-03-23 23:34:08 -07:00
Paulus Schoutsen
9f2f0c5566 Version bump to 0.42.0.dev0 2017-03-23 23:33:49 -07:00
Paulus Schoutsen
53f8828181 Merge branch 'master' into release-0-41 2017-03-23 23:32:50 -07:00
Adam Mills
22613d8e2e Repair zwave sensor coverage (#6764) 2017-03-23 20:57:15 -07:00
Adam Mills
efbd66bca1 Fix flaky template test (#6768) 2017-03-23 20:56:39 -07:00
Tim Soderstrom
5dfdb9e481 New indexes for states and recording_runs tables (#6688)
* New indexes for states table

* Added recorder_runs indexes

* Created a new function for compound indexes.

A new function was created because it makes it a little cleaner when creating
a single-field index since one doesn't have to create a list. This is mostly
when creating the name of the index so with a bit more logic it's possible
to combine it into one function. Given how often migration changes are run,
I thought that code bloat was probably a worthy trade-off for now.

* Adjusted indexes, POC for ref indexes by name.

* Corrected lint errors

* Fixed pydocstyle error

* Moved create_index function outside apply_update

* Moved to single line (just barely)
2017-03-23 20:48:31 -07:00
micw
6c5989895a Adding expire_after to mqtt sensor to expire outdated values (#6708)
* Adding expire_after to mqtt sensor to expire outdated values

* Extending test case

* mqtt: refactoring expire_after to use timed events instead of polling; lint

* refactor to reset unused trigger

* Fix: handler must be set to None after execution or removal to avoid warning

* Commenting out non-working test

* Fix lint

* Commit to trigger new build

* Commit to trigger new build

* Make testcase work

* Undo unnecessary change

* Remove default value, add extra check
2017-03-23 17:55:07 -04:00
Daniel Høyer Iversen
3acd926d29 Flux led update lib (#6763)
* Update flux_led lib
2017-03-23 21:58:22 +01:00
Paulus Schoutsen
b6b40286ef Version bump to 0.41 2017-03-23 08:42:01 -07:00
Andrey
8a86ec5b74 Add zwave per-node entity. (#6690)
* Add zwave per-node entity.

* Disable lint import error

* Add tests for base class

* More tests

* More tests

* Sort .coveragerc

* more tests

* Move location, battery and wakeup to node entity

* More tests

* Cleanup

* Make zwave node entity visible by default

* Remove battery sensor

* Fix tests
2017-03-23 08:37:20 -07:00
Dan Ports
20c5f9de4b Add sensor for Lyft time and price (based on Uber sensor) (#6711)
* Add sensor for Lyft time and price (based on Uber sensor)

* Minor fixes to lyft sensor
 - use add_devices(...,True) instead of explicitly calling update
 - move sensor name check into constructor

* lyft sensor: disable sandbox mode
2017-03-23 08:15:52 -07:00
Mitesh Patel
61730012d8 Adds Support for Lutron Caseta devices. (#6631)
* Adds support for the Lutron Caseta family of devices

* Added external requirement

* Removes unuse import

* Adds requirement to requirements_all.txt

* Removes unuse import

* fixes requirement_all.txt. by regenerating

* Cleans up syantax

* Cleans up syantax

* Cleans up syantax

* Cleans up syantax

* Shortens long line

* adds lutron_caseta component to .coveragerc

* Merges into light, removes component

* Fixes long lines

* Fixes requirement.txt

* Removes 'ERROR' log statements. Adds missing dependency

* savig work to pick up on other machine

* Enables Lutron Caseta component with Light and Switch platforms

* Add missing file to .coveragerc

* Changes based on PR review

* fixes requirements file

* Fixes install of paramiko dependency.

* Moves callback registration to

* comment changes

* Platform have no return value

* Change style for guard

* fix logic

* fix lint
2017-03-23 01:18:14 +01:00
Paulus Schoutsen
25d2df5689 Merge pull request #6740 from home-assistant/release-0-40-2
0.40.2
2017-03-22 09:31:21 -07:00
Paulus Schoutsen
672b83db8a Update constraints 2017-03-22 09:30:36 -07:00
Paulus Schoutsen
b37438ebb7 Constrain core dependencies to core versions (#6738)
* Require at least pip 7.1

* Write and use constraint files for packages

* Update gen_requirements_all.py
2017-03-22 08:51:18 -07:00
Paulus Schoutsen
902b72ba1a Constrain core dependencies to core versions (#6738)
* Require at least pip 7.1

* Write and use constraint files for packages

* Update gen_requirements_all.py
2017-03-22 08:50:54 -07:00
Paulus Schoutsen
f10fede17f Bump PyChromecast to 0.8.1 (#6702) 2017-03-22 08:50:42 -07:00
Paulus Schoutsen
c9548b11b1 Version bump to 0.40.2 2017-03-22 08:50:15 -07:00
Wolfgang Malgadey
f4aec3ac88 Tado climate device (#6572)
* Added tado climate component

named the component v1 because of the unsupported state of the api I
used (mytado.com)

* sensor component
* climate component which uses sensors
* main component initiating sensor and climate devices
* order of imports
* consts for username and password
* removed redundant code
* changed wrong calls and properties

* remove pylint overrides

* merged update() and push_update()

* changed wrong calls
* removed pylint overrides
* moved try..except

* renamed MyTado hass-data object

* added TadoDataStore

* moved update methods from sensor to TadoDataStore

* reorganised climate component

* use new TadoDataStore

* small change to overlay handling

* code refactoring

* removed unnessesary comments
* changed throttle to attribute
* changed suggestions from PR

* Added constant variable for string literal

* remove wrong fget() call

* changed dependencies

* Changed operation mode list

* added human readable list of operations
* removed unnecessary const
* activated update on add_devices

* droped unit

* removed unnused property

* changed temperature conversion

* removed defaults from config
changed naming of tado data const

* switched operation_list key/values

* changed the value returned as state

* added one extra line

* dropped state to use base impl.

* renamed component

* had to inplement temperature_unit

* because it is not implemented in base class

* create a copy of the sensors list

* because it can be changed by other components

* had to check for empty data object

* hass is too fast now
2017-03-22 08:18:13 -04:00
Adam Mills
e7425e9808 ZWave Lock Tests (#6730)
* ZWave Lock Tests

* Linting fixes

* Missed coveragerc
2017-03-21 08:55:21 -07:00
Matt N
978b539111 camera.zoneminder: Show recording state (#6686) 2017-03-21 07:25:10 +01:00
Paulus Schoutsen
9f4cd5fafe Do not log warning on rest_command if no error (#6713) 2017-03-21 07:18:33 +01:00
Anders Melchiorsen
ba3c9f9765 Fix LIFX unregister races (#6723)
* Fix LIFX unregister races

If the initial state request never got a response, we tried to unregister
a device that was not yet registered.

Also, aiolifx 0.4.2 has an "unregister" race fix.

* Update requirements
2017-03-21 07:17:58 +01:00
Paulus Schoutsen
4ee8be52fe Update frontend 2017-03-20 21:31:58 -07:00
Adam Mills
866bf887d3 ZWave switch tests (#6722) 2017-03-20 13:17:42 -04:00
Adam Mills
dddbce82f5 ZWave Sensor tests (#6721)
* ZWave Sensor tests

* Add missed coverage
2017-03-20 13:17:17 -04:00
Jeff Wilson
be15ca3f23 Don't warn if octoprint completion is null (#6719) 2017-03-20 09:00:45 -07:00
Finbarr Brady
9a305c9742 Fix for issue: luci returns 403 invalid token when rebooted #6715 (#6717) 2017-03-20 08:55:59 -07:00
Paulus Schoutsen
de231cf9ab restore_state: do not crash if domain not defined (#6714) 2017-03-20 08:54:51 -07:00
Adam Mills
8325f9db8a Add zwave light tests (#6710)
* Add zwave light tests

* Test turn_off
2017-03-19 22:22:13 -07:00
Paulus Schoutsen
3f38b9e52f Update frontend 2017-03-19 21:59:13 -07:00
printzlau
1cb2a6add0 automatically use bundled certificate it set to auto (#6707)
* automatically use bundled certificate if certificate-parameter is set to 'auto' and seperate this from which port is specified

* Fix travis error and long lines

* Update __init__.py
2017-03-19 14:51:53 -07:00
Greg Dowling
acf75b5253 Revise power and energy units and property names. (#6212)
* Revise power and energy units and property names.

* Add change for new wemo parameter.
2017-03-19 22:02:11 +01:00
Adam Mills
970bde9e99 Fix Kodi when websocket is disabled (#6706) 2017-03-19 21:38:12 +01:00
Adam Mills
796143a6c6 Kodi use websocket loop task created by library (#6703) 2017-03-19 12:46:14 -07:00
Paulus Schoutsen
5569ae38f1 Bump PyChromecast to 0.8.1 (#6702) 2017-03-19 11:53:58 -07:00
John Mihalic
7eaad4fb3a Fix longitude (#6697) 2017-03-19 11:00:13 -07:00
Fabian Affolter
35c679a956 Upgrade distro to 1.0.3 (#6693) 2017-03-19 15:59:07 +01:00
martinfrancois
678f273002 Rflink: added support for lights with toggle type (#6521)
* added support for lights with toggle type

* fixed style errors

* introduced tests for the toggle type

it's not passing yet because of an assertionerror at line 407

* updated to reflect tristate of "state"

* Format code according to pep8

Added line break for import that was too long.

* fixed lint, replaced if statement with 'var = bool(test)'

* changed implementation of state check according to bug on 6bceb04ca1 (r106758784)
2017-03-18 21:34:17 +01:00
Tyler Crumpton
4e91c65d6e Update Torque component to match recent API. (#6671) 2017-03-18 11:25:38 +01:00
Robbie Trencheny
f6106706e5 Merge pull request #6672 from robbiet480/new-plex-fix
Fixed Show All Controls feature
2017-03-17 17:34:26 -07:00
JesseWebDotCom
ecf337b123 Fixed Show All Controls feature 2017-03-17 17:22:38 -07:00
Martin Nöhrer
f5d8327d9a Fix hass script execution on Windows (#4977). (#6601)
* Fix hass script execution on Windows (#4977).

hass.exe returned ERRNO2 on a windows machine and must be started using
package loading. This fix adapts the command line options for
`setup_and_run_hass()` to start
either a script with `python homeassistant/__main__.py` or with
`Scripts/hass.exe`

* Fix code style
2017-03-17 17:07:36 -07:00
John Mihalic
30d4c54187 Update Emby component to async (#6664)
* Update Emby component to async

* Address comments

* Make SSL default

* Bump library

* Port based on SSL, use available property
2017-03-17 15:55:07 +01:00
David Straub
edf20f542a Phone book lookup support for Fritz!Box call monitor (#6474)
* Update fritzconnection dependency in fritz and fritzbox_netmonitor components

* Add phone book name lookup support to FritzBox call monitor

* Updated requirements_all.txt

* Requested changes to FritzBox call monitor

* Listen to HOME_ASSISTANT_STOP and close thread

* Safe CPU time
2017-03-17 14:40:12 +01:00
Jay Love
9778000e9a Add new media_player platform: Volumio Media Player (#6556)
* Add new media_player platform: Volumio Media Player

Volumio media player is a rpi music player, this platfor adds http based control of the player.

* Modify mute command to accept boolean

* Adjust mute call to reset volume after unmute
Remove references to volimi"a"

* Use yield from calls in mute and volume calls

Trying to speed up the indication of mute and volume level changes in UI, but doesn't seem to do much.

* Adjust async_add_devices call
2017-03-16 23:32:52 -07:00
miniconfig
b5149dfba6 Added support for multiple efergy sensors in the same household. (#6630)
* Added support for multiple efergy sensors in the same household.
Also added inital tests for the efergy platform.

* Fixed current_values units.
Changed name to include efergy_ prefix.
2017-03-16 23:22:10 -07:00
John Mihalic
ced3cd2616 Refactor Neurio to add Daily Power Sensor (#6662)
* Refactor Neurio to add Daily Power Sensor
2017-03-16 23:20:14 -07:00
RickyTaterSalad
7050236a61 add latitude and longitude configuration to darksky sensor (#6191)
* Optional latitude and longitude to darksky sensor

allow configuration of latitude and longitude in the darksky sensor.
falls back to home assistant coordinates if latitude/longitude not
specified.

* lat/long as inclusive on schema. removed None check for lat/long in setup_platorm

altered schema to require latitude and longitude configured as a pair.
removed None check on latitude and longitude since values will fall back
to hass config if not present

* adhere to line limit of 79 characters

adhere to line limit of 79 characters
2017-03-16 23:04:01 -07:00
Pascal Vizeli
c8e1ffad89 Pump Android ip webcam to 0.6 (#6665)
* Pump Android ip webcam to 0.5

* update to 0.6
2017-03-16 22:19:48 +01:00
hawk259
e3edff8a72 Add configurable timeout option to camera.synology (#6655) 2017-03-16 21:26:35 +01:00
Sebastian
d6fd0f405e Corrected help text for refresh_node (#6659)
Changed entity_id to node_id.
2017-03-16 21:50:01 +02:00
Fabian Affolter
1ab47b5d2b Check if droplet exists (#6663)
* Check if droplet exists

* Add droplet to message and remove else
2017-03-16 19:59:34 +01:00
Fabian Affolter
a2365eccf6 Upgrade aiohttp to 1.3.5 (#6660) 2017-03-16 18:04:00 +01:00
Fabian Affolter
c46ba3446d Upgrade astral to 1.4 (#6332)
* Upgrade astral to 1.4

* Update test for norway
2017-03-16 17:38:46 +01:00
JesseWebDotCom
5714f156c3 Support for non-clients, NVidia shield, dynamic grouping, extra metad… (#6054)
* Support for non-clients, NVidia shield, dynamic grouping, extra metadata, and more

* Fixed import orderdering, line lengths, and comment violations

* Local player check and season fixes

* Honor entity_namespace when using custom entity ids

* Semi compatibility with channels, force controls option added

* media_position_updated_at fix - only update when media is playing

* Fix: controls now work as expected on 1) casted sessions and 2) client sessions when client and PMS reside on the same sever

* Made PEP8 compliant

* Made PEP8 compliant

* Made PEP8 compliant, hopefully

* Better Tivo compatibility

* Added frozen detection and remediation

* PlayMedia EPISODE now supports season number and episode number (instead of episode index)

* Fix: Dynamic groups now exclude hidden devices

* Fix: Dynamic groups now exclude hidden devices

* Implemented arsaboo suggested formatting

* Implemented pylint command line suggested fixes

* Implemented Travis CI build suggested fixes

* Sorted Imports using Importanize

* Grouped request imports

* Removed dynamic groups, network calls from properties, and other cleanup

* Balloob recommendations and Plex Protocol Capabilities checks

* Remove deprecated disable-msg in favor of disable

* Removed position related items (seek, frozen detection, etc)

* Removed unused datetime
2017-03-16 09:09:46 -07:00
joe248
959dd29c90 round output values (#6657) 2017-03-16 15:36:44 +01:00
John Arild Berentsen
e75a66ed20 Add Zwave sensors test (#6640)
* Test for zwave sensor

* Add test for ZWave sensors

* Hound...

* Hound...

* Review changes
2017-03-16 08:25:37 -04:00
Fabian Affolter
3e72aa8643 Upgrade python-digitalocean to 1.11 (#6653) 2017-03-16 11:14:36 +01:00
John Arild Berentsen
5aaa1f8404 Add test for Z-wave switch (#6619)
* Add test for Z-wave switch

* Changes for new tests
2017-03-16 11:05:51 +01:00
Paulus Schoutsen
7292e564f8 Merge pull request #6652 from home-assistant/release-0-40-1
0.40.1
2017-03-15 23:47:10 -07:00
Wolf-Bastian Pöttner
509cfb6433 Added workday sensor (#6599)
* Added workday sensor

* Added unit tests
2017-03-15 23:46:13 -07:00
Pascal Vizeli
acdab67c1b Bugfix RFLINK remove group (#6580)
* Bugfix RFLINK remove group

* Remove group hack from lutron too

* fix tests

* fix lint

* fix lint
2017-03-15 23:19:33 -07:00
deisi
d7addf59cd Fix #6534 (#6598)
* Fix #6534

Makes sure 0 is not passes to `color_temperature_kelvin_to_mired`.

* Update osramlightify.py

* Update osramlightify.py
2017-03-15 23:19:24 -07:00
Yum
ccf9edf815 since knx_2_float can't handle 0, bypass converting 0 value from knx to float (#6626) 2017-03-15 23:18:55 -07:00
Johann Kellerman
2fd3c186e2 Update SMA solar sensor to work with the new add_devices callback (#6602) 2017-03-15 23:18:11 -07:00
Dale Higgs
719199da45 Update pyecobee version to 0.0.7 (#6593) 2017-03-15 23:17:44 -07:00
Thibault Cohen
a3cd7d653d Fix hydroquebec (#6574) 2017-03-15 23:17:17 -07:00
Andrey
aeeb927e19 Fix for the case of zwave value used in several devices. (#6577) 2017-03-15 23:16:50 -07:00
Jesse Newland
a3a14f9ea4 Don't start the push updater if the Apple TV is 'off' (#6552)
Add an optional extended description…
2017-03-15 23:16:32 -07:00
Tyler Page
f4e7b231bc Fix wake_on_lan ping with None as host (#6532)
* Update configuration validation

With the new update, wake_on_lan requires a host key in the configuration

* cast self._host to str as requested

* Changed host key back to optional
2017-03-15 23:15:56 -07:00
Paulus Schoutsen
5f68735375 Version bump to 0.40.1 2017-03-15 23:10:50 -07:00
Pascal Vizeli
774fd19638 Bugfix RFLINK remove group (#6580)
* Bugfix RFLINK remove group

* Remove group hack from lutron too

* fix tests

* fix lint

* fix lint
2017-03-15 23:08:47 -07:00
Paulus Schoutsen
e265401cd0 self.loop.create_task -> self.add_job (#6632)
* self.loop.create_task -> self.add_job

* Core to use create task
2017-03-16 06:58:54 +01:00
deisi
5b3dc7f2a5 Fix #6534 (#6598)
* Fix #6534

Makes sure 0 is not passes to `color_temperature_kelvin_to_mired`.

* Update osramlightify.py

* Update osramlightify.py
2017-03-15 22:58:06 -07:00
Anders Melchiorsen
9ef084d903 Move LIFX to aiolifx for driving the bulbs (#6584)
* Move LIFX to aiolifx for driving the bulbs

* Fix whitespace

* Fix more whitespace

* Fix lint

* Define _available in init

* Add @callback decorators

* Use hass.async_add_job

* Rename class
2017-03-15 22:50:33 -07:00
Robbie Trencheny
95b1e257bb Merge pull request #6633 from home-assistant/deprecate-event-forwarding
Deprecate event forwarding
2017-03-15 22:27:49 -07:00
Adam Mills
b06cf87c74 Kodi: Fix episode media type classification (#6645) 2017-03-15 22:07:30 -07:00
Adam Mills
326337777a Add ZWave cover tests (#6648) 2017-03-15 22:06:37 -07:00
mvillarejo
2c8a06bfbe media_player.kodi extra attributes for tvshow and music media (#6622)
* media_player.kodi extra attributes for tvshow and music media

* removed extra whitespaces/CR

* Kodi - add extra attributes #6250 (removed music attributes)

* Restored music attributes, this is ready for merge

* linting amended

* Fix Kodi artist support

* Copy-paste error

* Fix for non-music artist lookup

Kodi returns an emtpy list on videos, so we need to be able to
handle that as well.
2017-03-15 19:51:31 -04:00
Pascal Vizeli
198a234468 aioHttp 1.3.4 (#6643) 2017-03-15 22:30:46 +01:00
Paulus Schoutsen
e94aa3afe9 Deprecate event forwarding 2017-03-15 08:38:26 -07:00
Paulus Schoutsen
96e22c7b41 Remove event decorators (#6634) 2017-03-15 14:46:57 +01:00
Nathan Henrie
33450c726d Use sqlite's WAL mode to avoid database is locked errors (#6519)
* Use sqlite's WAL mode to avoid `database is locked` errors

- Relevant issue: https://github.com/home-assistant/home-assistant/issues/4780

Code:

- http://stackoverflow.com/a/23661501/1588795
- http://docs.sqlalchemy.org/en/rel_0_9/dialects/sqlite.html#foreign-key-support
- https://github.com/g2p/bedup/pull/86/files

* Only set WAL if using sqlite

* Reorder imports

* Fix pylint warnings
2017-03-15 00:14:12 -07:00
Yum
97b9d3bd21 since knx_2_float can't handle 0, bypass converting 0 value from knx to float (#6626) 2017-03-14 20:25:52 -07:00
Adam Mills
fff589eeab Correctly flag Kodi media types (#6628) 2017-03-14 20:25:15 -07:00
Adam Mills
5e5d2e8ab8 Tests for ZWave climate (#6629)
But wait, there's more! Also a few fixes discovered writing the tests.
2017-03-14 20:24:35 -07:00
Paulus Schoutsen
1a7ffdca52 Add "Refactor zwave discovery to entity schema" (#6565)
* Revert "Revert "Refactor zwave discovery to entity schema (#6445)" (#6564)"

This reverts commit 58826b264a.

* Update zwave tests for enitity schema

* Fix merge error

* Switch dict_id to id(self)
2017-03-14 19:55:33 -04:00
Erik Eriksson
cada74df22 Merge pull request #6583 from molobrakos/voc-fix
Bump VOC version (fixes heater bug)
2017-03-14 23:37:32 +01:00
Johan Bloemberg
bd3fbe8363 Upgrade to dsmr_parser 0.8, supporting protocol 3 and 5. (#6600)
* Upgrade to dsmr_parser 0.8, supporting protocol 3 and 5.

* Update tests for new import.
2017-03-14 20:16:43 +01:00
Daniyar Yeralin
4d9c7d9684 Update mpd.py (#6553)
* Update mpd.py

Introducing new parameter "Name"

* Update mpd.py

Change `CONF_LOCATION` to `CONF_NAME`
2017-03-14 20:10:35 +01:00
ArrayLabs
0bf66384ed Cover myq fix update pymyq (#6595)
* update pymyq to 0.0.8

update to correct wrong version in setup.py

* update pymyq to 0.0.8

update to correct wrong version in setup.py
2017-03-14 20:06:30 +01:00
tflack
c7798ef43c Define db for SHOW DIAGNOSTICS query since some users will not have a… (#6566)
* Define db for SHOW DIAGNOSTICS query since some users will not have admin perms

* fix white space error from CI
2017-03-14 11:46:46 -07:00
hawk259
f4d8095e54 Add configurable timeout option to notify/smtp (#6609)
* Add configurable timeout option to notify/smtp

* Updated smtp test to include timeout param

* fixed 80 column style issue
2017-03-14 19:00:16 +01:00
Pascal Vizeli
5529d77c62 Prevent entities running multiple updates simultaneously (#6511)
* Protect entity for multible updates on same time.

* Address all comments / make update more robust

* fix unittest

* fix lint

* address comments
2017-03-14 09:26:55 -07:00
Erik Eriksson
c4e151f621 Error handling when connection refused (#6614)
Add an optional extended description…
2017-03-14 10:08:40 +01:00
Fabian Affolter
f58941a0d4 Upgrade googlemaps to 2.4.6 (#6611) 2017-03-14 07:54:19 +01:00
Fabian Affolter
bca673f039 Upgrade py-cpuinfo to 0.2.7 (#6610) 2017-03-14 07:54:10 +01:00
Fabian Affolter
2687f2f623 Fix link (#6612) 2017-03-14 07:53:48 +01:00
Johann Kellerman
134b3d2f3b Update SMA solar sensor to work with the new add_devices callback (#6602) 2017-03-14 06:39:30 +02:00
Dale Higgs
f450c1351c Update pyecobee version to 0.0.7 (#6593) 2017-03-13 21:19:51 +01:00
Fabian Affolter
c6b10f3703 Upgrade Sphinx to 1.5.3 (#6587) 2017-03-13 21:05:27 +01:00
Fabian Affolter
4a08067b9c Upgrade psutil to 5.2.0 (#6585) 2017-03-13 21:05:07 +01:00
Fabian Affolter
9c37437a59 Upgrade sqlalchemy to 1.1.6 (#6591) 2017-03-13 21:02:28 +01:00
Fabian Affolter
9330142987 Upgrade pyasn1 to 0.2.3 (#6588) 2017-03-13 21:01:45 +01:00
Fabian Affolter
2bbaac44d4 Upgrade async_timeout to 1.2.0 (#6590) 2017-03-13 21:01:25 +01:00
Thibault Cohen
253dee8e4d Fix hydroquebec (#6574) 2017-03-13 18:54:23 +01:00
Andrey
5722cf53bf Fix for the case of zwave value used in several devices. (#6577) 2017-03-13 12:19:45 -05:00
Pascal Vizeli
5d301590c3 Remove dispatcher camera (#6579) 2017-03-13 17:54:28 +01:00
Erik
353f5d6b49 bump voc version (fixes heater bug) 2017-03-13 17:28:27 +01:00
Jesse Newland
11da7bed12 Don't start the push updater if the Apple TV is 'off' (#6552)
Add an optional extended description…
2017-03-13 14:23:15 +01:00
Kevin Fronczak
a358c8e10d Upgraded blinkpy version, increased Throttle time for camera (#6561) 2017-03-13 00:12:48 -07:00
Paulus Schoutsen
58826b264a Revert "Refactor zwave discovery to entity schema (#6445)" (#6564)
This reverts commit 56abc7f9b4.
2017-03-12 23:35:10 -07:00
Adam Mills
56abc7f9b4 Refactor zwave discovery to entity schema (#6445)
* Refactor zwave discovery to entity schema

* Address PR concerns

* Split DISCOVERY_SCHEMAS into separate file

* Only check cover reverse workaround once
2017-03-12 23:13:34 -07:00
Adam Mills
55d60a6a13 ZWave binary sensor tests (#6555)
* ZWave binary sensor tests

* Test fixes

* Improve coverage of features
2017-03-12 22:08:53 -07:00
Dennis de Greef
5183cb5903 Be able to select mqtt:tls_version for Python < 3.6 (#6442)
* Be able to select tls_version

* This test should always assert this value, not only in 3.6

* Disable linting on future property (py36)

* Only allow TLS 1.0, 1.1 and 1.2

* Fix line length issue

* Fix check config tests

* Allow auto as a TLS version
2017-03-12 22:02:59 -07:00
Tyler Page
0aa8933df6 Fix wake_on_lan ping with None as host (#6532)
* Update configuration validation

With the new update, wake_on_lan requires a host key in the configuration

* cast self._host to str as requested

* Changed host key back to optional
2017-03-12 20:46:58 +01:00
siebert
fc46a24996 Fix gen_requirements_all.py script for Windows. (#6547) 2017-03-12 21:08:49 +02:00
Paulus Schoutsen
5be58bd056 Simplify Android IP webcam discovery (#6528) 2017-03-12 18:56:48 +01:00
Lewis Juggins
4a423e63f3 Version bump to 0.41.0.dev0 2017-03-12 08:34:35 +00:00
Paulus Schoutsen
a8b32edc8e Merge pull request #6509 from home-assistant/release-0-40
0.40
2017-03-11 11:08:40 -08:00
Greg Dowling
4a5b9db394 Discovery is a dict rather than an array. (#6525) 2017-03-11 11:06:05 -08:00
Greg Dowling
9c23178457 Append vera device id to entity id - but not name. (#6523)
* Append vera device id to entity id - but not name.

* Tidy.

* Tidy.

* Tidy after review.

* Re-order.
2017-03-11 11:06:05 -08:00
Paulus Schoutsen
764d31efcb Remove mint finance sensor (#6522) 2017-03-11 11:06:05 -08:00
Anders Melchiorsen
fc90ccea36 Fix colortemp conversion for osramlightify (#6516)
* Fix colortemp conversion for osramlightify

Copied from the LIFX fix in 75df4be733.

* Fix style

* Updates from review

@armills:

While we're doing cleanup here, can you just change self._brightness,
self._rgb, self._name, self._temperature, and self._state assignments in
__init__ to None? These will get overwritten when self.update() is called, so
it's safer/cleaner to initialize them to None since it shouldn't matter if
everything is working.
2017-03-11 11:06:05 -08:00
Martin Hjelmare
aab63ea22a Fix mysensors gateway windows setup (#6500) 2017-03-11 11:06:05 -08:00
Adam Mills
157ab77232 Update Kodi notifier to async (#6497)
* Update Kodi notifier to async

* Change Kodi CONF_SSL to CONF_PROXY_SSL
2017-03-11 10:41:05 -08:00
Anders Melchiorsen
9a86ccaaea Fix colortemp conversion for osramlightify (#6516)
* Fix colortemp conversion for osramlightify

Copied from the LIFX fix in 75df4be733.

* Fix style

* Updates from review

@armills:

While we're doing cleanup here, can you just change self._brightness,
self._rgb, self._name, self._temperature, and self._state assignments in
__init__ to None? These will get overwritten when self.update() is called, so
it's safer/cleaner to initialize them to None since it shouldn't matter if
everything is working.
2017-03-11 10:40:16 -08:00
Greg Dowling
32dd815852 Discovery is a dict rather than an array. (#6525) 2017-03-11 10:39:26 -08:00
Boris K
9ac3928600 Add type configuration in history_stats (#6430) 2017-03-11 10:38:18 -08:00
William Scanlon
62e57456e1 Wink scene(shortcut) support (#6147)
* Wink scene(shortcut) support

* Scenes to Scene

* Moved wink scenes from switches to scenes

* Updated python-wink version
2017-03-11 10:18:29 -08:00
Róbert Nagy
11f11481b2 Force update support for MQTT sensor (#6492) 2017-03-11 10:07:52 -08:00
Greg Dowling
10f5e9744b Append vera device id to entity id - but not name. (#6523)
* Append vera device id to entity id - but not name.

* Tidy.

* Tidy.

* Tidy after review.

* Re-order.
2017-03-11 10:06:46 -08:00
Paulus Schoutsen
b2a2193ba3 Remove mint finance sensor (#6522) 2017-03-11 01:02:32 -08:00
Paulus Schoutsen
c8b2ba6559 Version bump to 0.40 2017-03-10 23:09:44 -08:00
Paulus Schoutsen
1496f1a570 Update frontend 2017-03-10 22:52:16 -08:00
Paulus Schoutsen
493c0bbb4c Update frontend 2017-03-10 22:51:44 -08:00
Martin Hjelmare
13dd17b2ab Fix mysensors gateway windows setup (#6500) 2017-03-11 03:30:23 +01:00
Pascal Vizeli
0ef1c3af34 Android webcam better error handling / pump library 0.4 (#6518) 2017-03-10 23:11:16 +01:00
Pascal Vizeli
44da43065f Android webcam better error handling / pump library 0.4 (#6518) 2017-03-10 23:10:35 +01:00
Pascal Bach
ffb1613d55 [packaging] Include LICENSE.md in tarball (#6514) 2017-03-10 19:59:38 +00:00
Pascal Vizeli
b0a2909835 Bugfix rpi_rf cleanup (#6513)
Add an optional extended description…
2017-03-10 14:57:03 +01:00
Pascal Vizeli
b5fb558c62 Bugfix rpi_rf cleanup (#6513)
Add an optional extended description…
2017-03-10 14:56:13 +01:00
Robbie Trencheny
846a0513c7 Don't allow sending to invalid iOS targets (#6115)
* Don't allow sending to invalid targets

* Fix valid target check
2017-03-10 12:32:43 +01:00
Craig J. Ward
0f1cad24ce Insteon lib (#6505)
* use lib with caching to reduce collisions

* use 0.43

* change requirements

* update the  lib to 0.44

* update req

* fix typo

* just keep checking

* just keep checking - switch

* use 0.45 with file cache

* requirements

* Update requirements_all.txt

* Update insteon_local.py

* Update requirements_all.txt

* Update insteon_local.py

* update library

* fix lint
2017-03-10 11:17:09 +01:00
Caleb
24630b1ebe Update to Pyunifi2.0 (#6490)
* Updated pyUnifi

* Missing comma

* Security opt-out, not opt-in

* Adjust minimal values

* Update to pyUnifi 2.0
2017-03-10 11:16:51 +01:00
Caleb
b705b3ddb9 Update to Pyunifi2.0 (#6490)
* Updated pyUnifi

* Missing comma

* Security opt-out, not opt-in

* Adjust minimal values

* Update to pyUnifi 2.0
2017-03-10 11:15:21 +01:00
Craig J. Ward
330d352d3a Insteon lib (#6505)
* use lib with caching to reduce collisions

* use 0.43

* change requirements

* update the  lib to 0.44

* update req

* fix typo

* just keep checking

* just keep checking - switch

* use 0.45 with file cache

* requirements

* Update requirements_all.txt

* Update insteon_local.py

* Update requirements_all.txt

* Update insteon_local.py

* update library

* fix lint
2017-03-10 11:14:31 +01:00
Pascal Vizeli
bdaae6f844 Bugfix android camera autodiscovery settings (#6510)
Add an optional extended description…
2017-03-10 10:14:05 +01:00
Pascal Vizeli
49308bec13 Bugfix android camera autodiscovery settings (#6510)
Add an optional extended description…
2017-03-10 10:10:35 +01:00
Paulus Schoutsen
edd96c2b04 Merge remote-tracking branch 'origin/master' into dev 2017-03-09 21:32:04 -08:00
Robbie Trencheny
11c4d3892f Merge pull request #6001 from jumpkick/patch-2
Improvements for WeMo Insight switches
2017-03-09 21:14:33 -08:00
Robbie Trencheny
75817ad46d Merge pull request #6361 from GreenTurtwig/dev
Updated to catch timeout error
2017-03-09 20:39:20 -08:00
Robbie Trencheny
780cdd5f90 Merge pull request #6389 from Deinara/discord_connect_fix
Discord connect fix
2017-03-09 19:57:29 -08:00
Robbie Trencheny
d70eaeb118 Merge pull request #6407 from jvolkman/patch-1
Small typo fix in setup_docker_prereqs
2017-03-09 19:55:57 -08:00
Robbie Trencheny
9e9c6d0184 Make states constants 2017-03-09 19:55:18 -08:00
Robbie Trencheny
2cdc0febf5 Merge pull request #6494 from armills/kodi-command-exceptions
Catch exceptions on kodi commands
2017-03-09 19:50:53 -08:00
Robbie Trencheny
c721ec7ab0 Merge pull request #6507 from amelchio/longer-light-transitions
Increase upper limit on light transitions (#2843)
2017-03-09 19:50:22 -08:00
Robbie Trencheny
4e63e8328e Merge pull request #6506 from happyleavesaoc/enhance-moon
more moon states
2017-03-09 19:45:40 -08:00
Robbie Trencheny
8f2009a187 Merge pull request #6488 from pvizeli/pydroid-ipcam
Android IP Cam support
2017-03-09 19:41:23 -08:00
Adam Mills
529eee994b Include functools.wraps 2017-03-09 19:52:45 -05:00
Christiaan Blom
3f7dd7ed9a Added an extra space 2017-03-10 00:33:29 +01:00
Christiaan Blom
b952cfe705 Added pylint ignore message and re-added .close() 2017-03-10 00:21:26 +01:00
Anders Melchiorsen
b9cf4df557 Increase upper limit on light transitions (#2843)
This increases the global limit to 6535 seconds (1h48m55s) because that is
supported by all light platforms.

Some platforms support even longer transition times so the limit should
actually be platform specific.
2017-03-09 23:59:35 +01:00
happyleaves
7892297240 more moon states 2017-03-09 16:54:04 -05:00
Pascal Vizeli
20fcd1f0e2 Bugfix mqtt socket memory error (#6501)
* Bugfix mqtt socket memory error

* Fix tests

* Fix lint
2017-03-09 06:31:43 -08:00
pvizeli
8bbf13ef9f Fix lint 2017-03-09 15:10:39 +01:00
Paulus Schoutsen
855756cb2a Add first pass at Z-Wave light tests (#6483)
* Add first pass at Z-Wave light tests

* Remove unused SIGNAL_VALUE

* Lint

* Update test_init.py
2017-03-09 14:35:04 +01:00
pvizeli
bbcfb9158a fix lint 2017-03-09 12:03:08 +01:00
pvizeli
bcd4def0ae pump version 0.3 / make a lot of improvments 2017-03-09 12:00:50 +01:00
Robbie Trencheny
ddc260b628 Add required changes to support MQTT discovery that I previously missed. See #6481. 2017-03-08 23:57:54 -08:00
Robbie Trencheny
06bc062221 MQTT should load the provided platform not DOMAIN
See #6481
2017-03-08 23:53:17 -08:00
Pascal Vizeli
21f3b62d09 fix coverage 2017-03-09 01:03:15 +01:00
Pascal Vizeli
185ccc4fc4 Fix some things 2017-03-09 01:00:57 +01:00
Adam Mills
2d337fd29a Catch exceptions on kodi commands 2017-03-08 15:54:51 -05:00
Paulus Schoutsen
c625e219c7 Not always asume manufacturername is present (#6484) 2017-03-08 08:57:38 -08:00
pvizeli
b1736994b7 fix lint 2017-03-08 17:57:22 +01:00
pvizeli
21feff5fd8 add available 2017-03-08 17:52:49 +01:00
pvizeli
93118fcade Android IP Cam support 2017-03-08 17:48:55 +01:00
ArrayLabs
5e1c74b430 Update pymyq requirement (#6486)
* update pymyq to 0.0.7

* update pymyq requirement

Adds additional state for stopped door.
2017-03-08 16:47:43 +01:00
Reed Riley
3d3a0a7a4f Improved iCloud 2FA support. (#5984) 2017-03-08 12:07:34 +01:00
Colin O'Dell
fdd1957750 Allow configurable conditions for Pi-Hole sensor (#6465)
* Allow configurable conditions for Pi-Hole sensor

* Include all three conditions by default

* Share Pi-Hole API data across all sensors; eliminate redundant API calls
2017-03-07 23:20:30 -08:00
Robbie Trencheny
2b97449d98 Expand MQTT lights (#6481)
* Add effect support to MQTT Light

* Use effect state topic for supported_features

* Dont use rainbow as default color

* Add color_temp support to MQTT JSON Light

* Add effect to MQTT JSON light

* Support lights in MQTT discovery

* Allow discovered devices to set their platform

* Add white value support to MQTT Light

* Add white value support to MQTT JSON Light

* Remove blank line

* Add color_temp support to MQTT Template light

* Add white value support to MQTT Template Light

* Remove unused SUPPORT_MQTT_TEMPLATE and stale unused flash and transition code from MQTT Template

* Add XY Color to MQTT Light Platform

* Fix syntax

* Fix more syntax errors

* Revert "Remove unused SUPPORT_MQTT_TEMPLATE and stale unused flash and transition code from MQTT Template"

This reverts commit c03798cb63.

* MQTT Template supports flash and transition but doesnt allow templating of the values

* Add XY color support to MQTT JSON

* Proper variable names

* Only allow whitelisted MQTT platforms to be loaded via MQTT Discovery

* Minor tweaks.
2017-03-07 23:01:36 -08:00
Pascal Vizeli
c937a7bcb0 Add support for remove services / Reload script support (#6441)
* Add support for remove services / Reload script support

* Reload support for scripts

* Add more unittest for services

* Add unittest for script reload

* Address paulus comments
2017-03-07 22:51:34 -08:00
Pascal Vizeli
e7f442d66b Add dispatcher camera for internal image. (#6471)
* Add dispatcher camera for internal image.

* fix lint

* Add unittest

* Update dispatcher.py
2017-03-07 22:37:23 -08:00
siebert
2c5d3387f2 Fix wake_on_lan ping for Linux. (#6480) 2017-03-07 20:57:35 -08:00
Paulus Schoutsen
bb4f23f8e7 Add warning for slow platforms/components (#6467)
* Add warning for slow platforms/components

* Add test for slow component setup.

* Add test for slow platform setup

* Fix tests on Py34
2017-03-07 20:31:57 -08:00
Kevin Fronczak
629b2e81ba Support for Blink Camera System (#6444)
* Passing pep8, no tests yet

* Fixed some issues with the request throttling

* Removed ability to set throttle time because it was causing more issues than it was worth

* Added blink to .coveragerc

* Changed blinkpy version

* Removed global var, fixed per PR requests

* Added services for camera, migrated switch to binary_sensor

* Added schema for service, fixed naming, removed unused function
2017-03-07 23:26:53 +01:00
Johan Bloemberg
3508f74fb2 Remove connection status state. (#6475)
Current implementation of connection status doesn't follow convention and is not properly configurable. Might be added again in the future as a full fledged entity or some other way.

For now users can rely on error logging to determine connection status.
2017-03-07 23:20:27 +01:00
Kevin Siml
d16bc632da fix issue (#6470)
* fix issue

fix issue: https://community.home-assistant.io/t/error-in-new-notification-pushsafer/13308

* Update pushsafer.py

* Update requirements_all.txt

* Update pushsafer.py

* Update pushsafer.py

* Update pushsafer.py
2017-03-07 21:18:28 +01:00
Paulus Schoutsen
44d4987536 Allow testing against uvloop (#6468) 2017-03-07 10:11:41 +01:00
Paulus Schoutsen
470702261a Upgrade netdisco to 0.9.2 (#6466) 2017-03-06 22:35:49 -08:00
Josh Anderson
5fb7aa212b Send a logo with webostv notifications (#6380)
* Update to pylgtv 0.1.4

* Send icon with webostv notifications

Default to the homeassistant logo, but allow customizing it on the
component and for individual notifications
2017-03-06 20:56:31 -08:00
Barry Williams
9522fe3a92 Bumped version number for supporting lib (#6462) 2017-03-06 20:38:33 -08:00
Markus Peter
ff3c90fb80 KWB Easyfire support (#6018)
* KWB Easyfire Support

* requirements, coverage

* Initialization fun

* lint

* requirements bump

* lint

* Second best validation ...

* changes

* reworked validation
2017-03-06 17:37:29 +01:00
Paulus Schoutsen
90ad54da7d Shorten recorder connection init (#6432)
* Wait up to 9 seconds

* Set number of recorder retries to 8

* Do not sleep when reporting last connection error if no retries left

* Make sure we clean up old engine if connection is retrying

* Update __init__.py
2017-03-06 12:20:12 +01:00
Marcelo Moreira de Mello
2baa838ba7 Added unittest for Ring sensor (#6447)
Add an optional extended description…
2017-03-06 12:15:08 +01:00
Pascal Vizeli
a8add06a40 Bugfix samsungtv discovery (#6438) 2017-03-05 23:52:15 +01:00
Dennis de Greef
1b23b32817 Use bundled certificates if port matches mqtts (#6429)
* Use bundled certificates if port matches mqtts

* Move import requests.certs to top, since it's used in more places

* Add happy and non-happy path tests for default certificate bundle on mqtts port
2017-03-05 14:08:29 -08:00
Andrey
eaaa0442e2 Add a Z-wave workaround to do full refresh on update (#6403)
* Add Zwave refresh services

* services file

* Use dispatcher

* Add zwave prefix to signal

* Add a Z-wave workaround to do full refresh on update
2017-03-05 12:55:52 -08:00
Job Vermeulen
bc9f2d21c4 Tado device_tracker exception when mobile device has geofencing enabled but location is currently unknown. (#6401) 2017-03-05 21:38:14 +01:00
Adam Mills
1a139234af Revert "Use dynamic port allocation for tests" (#6436) 2017-03-05 21:14:21 +01:00
Andrey
d5435cf066 Rename _scheduled_update to _update_scheduled (#6434) 2017-03-05 10:53:47 -08:00
Andrey
46ec6d6dce Delay zwave updates for 100ms to group them. (#6420)
* Add Zwave refresh services

* services file

* Use dispatcher

* Add zwave prefix to signal

* Delay zwave updates for 100ms to group them.

* Fixes

* lint

* Access _scheduled_update from loop thread only.

* More async

* Some optimizations

* Fix
2017-03-05 09:29:59 -08:00
Anders Melchiorsen
660e777f01 Ignore deleted mails in IMAP unread count (#6394) (#6395)
Message deletion in IMAP is a two step process: first delete, then expunge.
Deleting a message just sets a flag that usually makes the mail client hide
the message. It is the expunge that actually removes the message.

Thus, exclude the deleted messages so that the unread count matches up with
that of most mail clients.
2017-03-05 08:15:25 -08:00
Igor Shults
de038bae65 Don't log username and password in camera url (#6390)
* Don't log username and password in camera url

* Attempt fix of tox issues

* Attempt to fix indentation issue
2017-03-05 08:07:09 -08:00
Anders Melchiorsen
7774f0ae53 Set new color before turning LIFX bulbs on (#6402)
A LIFX bulb maintains its previous color even when the light is off.
For example, if the previous color is blue and the bulb is turned on
and then set to a red color, it will transition through purple colors.

After this commit, the target color is set while the bulb is still
turned off. This overrides the previous color and brightness that the
bulb remembered. The light is then turned on with the requested
transition duration.

For the example, this gives the expected result of only going through
red colors.
2017-03-05 11:11:33 +01:00
Paulus Schoutsen
7655b6271d Better restore_state warnings (#6418) 2017-03-05 10:54:49 +01:00
Paulus Schoutsen
10bf659773 Fix unnecessary warning for ip bans.yaml (#6417) 2017-03-05 10:53:21 +01:00
Paulus Schoutsen
e8a22cb4a8 Tweak recorder/restore_state (#6412)
* Tweak recorder/restore_state

* Lint
2017-03-05 10:52:08 +01:00
Paulus Schoutsen
2650c73a89 Split bootstrap into bs + setup (#6416)
* Split bootstrap into bs + setup

* Lint
2017-03-05 10:41:54 +01:00
Thibault Cohen
bdf948d866 Add Mint finance sensor (#6132)
* Add Mint finance sensor

* Add retry

* Fix PR comments

* Upgrade mintapi version

* Update mint_finance.py

* Doc tweak

* Update mint_finance.py
2017-03-05 00:08:58 -08:00
Marcelo Moreira de Mello
928e025910 Added sensors to support Ring.com devices (#6419) 2017-03-05 00:03:00 -08:00
Teemu R
96aae1292b switch.tplink: catch exceptions coming from pyHS100 to avoid flooding the logs when the plug is not available (#6400) 2017-03-05 08:44:34 +01:00
Pascal Vizeli
c0bf3d7f32 Restore flow on device_tracker platform (#6374)
* Restore flow on device_tracker platform

* fix flow

* fix lint
2017-03-05 08:06:53 +01:00
Paulus Schoutsen
307514e3a7 Prevent more I/O in apns (#6413) 2017-03-04 19:57:04 -08:00
Paulus Schoutsen
b939626497 Fix tests no internet (#6411)
* Fix honeywell tests without internet

* Fix device tracker without internet

* Fix MFI using internet during tests

* Remove I/O from apns tests
2017-03-04 17:15:20 -08:00
Johann Kellerman
1522e67351 Restore for automation entities (#6254)
* Restore for automation entities

* coroutine

* no clue what i'm doing now

* Still passes nicely in py 3.4
2017-03-04 15:19:01 -08:00
Pascal Vizeli
8232f1ef65 Cleanup async handling (#6388)
* Cleanups unneeded blocks

* Cleanup bootstrap

* dedicated update_ha_state

* Fix imap_email_content

* fx tests

* Fix lint & spell
2017-03-04 15:10:36 -08:00
Jeremy Volkman
78f5a8a6f8 Small typo fix in setup_docker_prereqs 2017-03-04 12:39:25 -08:00
Daniel Høyer Iversen
3044aecbe9 flux led lib (#6404) 2017-03-04 21:33:24 +01:00
siebert
a5081ac307 Fix wake_on_lan for german version of Windows 10 (#6397) (#6398) 2017-03-04 09:58:01 -08:00
Lev Aronsky
f396a4593e Add keep-alive feature to the generic thermostat (#6040)
* Add keep-alive feature to the generic thermostat

* Comply with maximum line lengths

* Added tests for the keep-alive functionality
2017-03-04 09:42:43 -08:00
Andrey
aac9f972cf Add Zwave refresh services (#6377)
* Add Zwave refresh services

* services file

* Use dispatcher

* Add zwave prefix to signal
2017-03-04 09:13:24 -08:00
Thibault Cohen
aaa0944595 Add multi contracts support for Hydroquebec (#6392) 2017-03-04 09:11:58 +01:00
Paulus Schoutsen
6cca127bbf Merge pull request #6384 from home-assistant/release-0-39-3
0.39.3
2017-03-03 19:24:29 -08:00
Christiaan Blom
c1f3ce78e1 Edit docstring 2017-03-04 01:48:47 +01:00
Christiaan Blom
887b53b794 Changes for Travis bot. Unused variable 'on_ready' will likely remain reported 2017-03-04 01:31:19 +01:00
Christiaan Blom
a444df3fde tweaks 2017-03-04 01:03:10 +01:00
Christiaan Blom
b038a1650e Resolved issue #5688 2017-03-03 23:15:03 +01:00
joe248
483556ac5b Comed Hourly Pricing sensor (#6378)
* Add ComEd RRTP price sensor

* Update wording to reflect ComEd's naming change from 'RRTP' to 'Hourly Pricing'

* Changed name of sensor source file

* Cleanup based on requested changes

* More cleanup

* small cleanups
2017-03-03 23:14:22 +01:00
Paulus Schoutsen
3e9e388745 Version bump to 0.39.3 2017-03-03 13:15:07 -08:00
Colin O'Dell
ab42acf4d7 Don't initialize components which have already been discovered (#6381)
* Don't initialize components which have already been discovered (fixes #5588)

* Don't log that we've found a service unless we know it's not a duplicate

* Encode discovery data hash with JSON

This also solves the issue of trying to hash non-hashable objects like dicts

* Add test for duplicate device discovery
2017-03-03 13:13:04 -08:00
Colin O'Dell
0489ae53c4 Don't initialize components which have already been discovered (#6381)
* Don't initialize components which have already been discovered (fixes #5588)

* Don't log that we've found a service unless we know it's not a duplicate

* Encode discovery data hash with JSON

This also solves the issue of trying to hash non-hashable objects like dicts

* Add test for duplicate device discovery
2017-03-03 13:11:40 -08:00
John Mihalic
35fcc299c0 Update Hikvision Binary Sensors to latest library, remove pyDispatcher (#6231)
* Update pyHik version, remove pyDispatcher in favor of callbacks

* Fix naming

* Fix lint blank line

* Move stream thread start to HOMEASSISTANT_START event

* Bump library version to cleanup shutdown

* Fix requirements
2017-03-03 15:11:30 +01:00
Valentin Alexeev
568c549353 Update pwaqi to 3.0 to use public API (#6376)
The underlying PWAQI library version 3.0 is now using public API to
access AQICN data.
2017-03-03 14:50:54 +01:00
Paulus Schoutsen
edf130b341 Z-Wave prevent I/O event loop (#6369)
* Prevent Z-Wave I/O in event loop

* Move value_handler to util class.

* Add docstring
2017-03-03 14:47:59 +02:00
Pascal Vizeli
ed9e93c29f Migrate mqtt tracker and arwn sensor to async / cleanup owntrack (#6373)
* Migrate mqtt tracker and arwn sensor to async / cleanup owntrack

* Fix tests / lint
2017-03-03 12:09:10 +01:00
Pascal Vizeli
55f8ec8866 Fix possibility that have multible topic subscribe mqtt (#6372) 2017-03-03 10:05:52 +01:00
Pascal Vizeli
3e70154695 OwnTrack Async (#6363)
* Migrate owntrack to async

* fix tests
2017-03-03 09:23:58 +01:00
Andrey
aa17481c94 Add Z-Wave battery level as a sensor. (#6341) 2017-03-03 09:19:06 +02:00
happyleavesaoc
b53bc24a63 twilio component (#6348)
* twilio component

* add http dependency to twilio

* fire->async_fire
2017-03-03 08:14:51 +01:00
Johann Kellerman
fbd0bf77c7 [recorder] Catch more startup errors #6179 (#6192)
* [recorder] Catch more startup errors #6179

* Rebase on new recorder
2017-03-02 22:44:52 -08:00
Jose Juan Montes
4da2156ebf Return None instead of raising ValueException from as_timestamp template function. (#6155) 2017-03-02 22:18:01 -08:00
Open Home Automation
8a67fcfee3 Added IPv4 data collector (#6304)
* Added IPv4 data collector

* Formatting

* Bugfix: data is in kBit/s not kByte/s
2017-03-02 22:16:50 -08:00
Pascal Vizeli
08f9793175 Restore for input_slider (#6360) 2017-03-02 08:36:26 -08:00
Pascal Vizeli
a5b2fc9759 Bugfix new async_add_devices function (#6362) 2017-03-02 17:27:45 +01:00
Micha LaQua
3fa8aff78e snmp: upgrade pysnmp to 4.3.4 (#6359)
* snmp: upgrade pysnmp to 4.3.4

fixes https://github.com/home-assistant/home-assistant/issues/6238

* snmp: v4.3.4: add missing definition changes
2017-03-02 16:12:44 +01:00
Rowan
09ff9cb08e Updated to catch timeout error 2017-03-02 14:58:35 +00:00
Jan Losinski
c32300a386 Bump limitlessled dependency to 1.0.5. (#6334)
This fixes issue #6295.
2017-03-02 14:18:44 +01:00
Pascal Vizeli
55dc483c91 Template switch change flow / add restore (#6356)
* Template switch change flow / add restore

* fix tests

* fix binary_sensor template
2017-03-02 14:09:53 +01:00
Andrey
597ae2e716 Zwave: Add remove/replace failed node services. (#6248)
* Zwave: Add remove/replace failed node services.

* Fix text
2017-03-02 12:36:40 +01:00
Pascal Vizeli
50887e7e2c Move dispatcher out of init. (#6355) 2017-03-02 10:20:57 +01:00
Alan Fischer
8743f23f13 Fix calendar authentication text, and handle calendar events without summaries. (#6337)
* Fixed google authorization text

* Let calendar handle events without a summary
2017-03-02 00:22:38 -08:00
Jeff Wilson
72fe50bef6 Fix command sudo not found error in dev Dockerfile (#6346) 2017-03-02 00:14:20 -08:00
Pierre Ståhl
bae6333c26 Use push updates in Apple TV (#6323)
* Use push updates in Apple TV

* Fix review comments
2017-03-02 00:12:55 -08:00
martinfrancois
a08539d88d Added support for multiple codes executed in a row (#5908)
* Added support for multiple codes executed in a row

now codes can be specified either by simply providing a single code, which will then be sent like usual, or multiple codes can be executed in a row, specified in a comma delimited format in the configuration.yaml. For example: 111111,222222,333333,444444 would mean 111111 would be sent first, followed by 222222 and 333333 and 444444.

* rpi_rf: added line breaks to not exceed 79 characters per line

* include validation for correct formatting of codes

added regex which only allows either a single number (like 1252456245) or a sequence of commas followed by another number.

* added line breaks to not exceed 79 characters per line

* fix for 'continuation line under-indented for visual indent'

* another try at 'continuation line under-indented for visual indent'

* changed from regex to list for easier maintainability

* removed unnecessary splitting of strings
2017-03-02 00:10:49 -08:00
Adam Mills
bf7aecce90 Use dynamic ports for test instances (#6232) 2017-03-02 00:07:50 -08:00
Paulus Schoutsen
e2aa024a05 Update coveragerc 2017-03-02 00:06:26 -08:00
dramamoose
edd5db296d Update Formulas in Convert XY to RGB (#6322)
* Update to Current RGB D65 Conversion

As per Philips Hue https://developers.meethue.com/documentation/color-conversions-rgb-xy

* Update the source of the XYZ to RGB formulas

* Fix Whitespace

* Update Whitespace

* Update Tests for new Formulas

* Update Tests

* Update XY_Brightness_to_hsv tests

* Update test_color.py
2017-03-02 08:54:45 +01:00
Duoxilian
e14d6f11c6 Additional support for ecobee hold mode (#6258)
* Integrate suggestion in #5590 by nordlead2005. This change has been
sitting in limbo for over a month, but it is a good idea. I don't
mean to step on nordlead2005's toes, but we need to make progress.

* Use defined constant for TEMPERATURE_HOLD

* Integrate handling of vacation into hold mode. Canceling vacation
hold requires an update to the external pyecobee library. Creation
of vacation is not supported (it would be straightforward in the code,
but a complex user interface would be required, similar to what is
now done in the ecobee thermostat).

* Add capability to retrieve list of defined climates from ecobee.

* The mode() method used to return the system mode in internal
representation. However, the user sees a different notation in
the ecobee thermostat. Seeing some internal name is particularly
weired with user-defined climates, where these are named "smart1",
"smart2", etc., instead of the name the user has defined. Return
the user-defined name instead. This change might break some user
interfaces but is easily remedied (e.g., use "Away" instead of
"away").

* Simplify is_away_mode_on().

* Correction of erroneously indented else statement.

* Change comment as flake8 gets confused.
2017-03-01 23:52:31 -08:00
Pascal Vizeli
f3870a8a48 Template binary_sensor change flow / add restore (#6343)
* Template binary_sensor change flow / add restore

* fix lint
2017-03-02 08:50:41 +01:00
Thibault Cohen
31bf5b8ff0 Improve Honeywell US climate component (#5313)
* Improve Honeywell US climate component

* Fix tests

* Fix tests

* Add cool_away_temp and heat_away_temp for honeywell US

* Fix honeywell tests

* Fix PR comments
2017-03-01 23:49:49 -08:00
Paulus Schoutsen
a7ae456a06 Merge remote-tracking branch 'origin/master' into dev 2017-03-01 23:44:11 -08:00
Reed Riley
c03022efa3 Add fallback for name if userdevicename isn't set using old serialnumber logic (#6265)
Add an optional extended description…
2017-03-02 08:41:31 +01:00
Mitko Masarliev
46f5a65e68 Update Adafruit_Python_DHT to support new raspberry kernel (#6325)
* Update Adafruit_Python_DHT to support new raspberry kernel

* update Adafruit Python DHT
2017-03-02 08:39:33 +01:00
Alexander Fortin
44ec6b056e Update Vagrant provision.sh (#6236)
- Bugfix: with f63a79ee we removed `script/home-assistant@.service`
  systemd unit file, which is used by Vagrant box to start/stop hass
- simplify interaction with Vagrant, provision.sh now is the only
  entry point and doesn't need the user to touch/remove files in
  order to change provisioner behavior
2017-03-01 23:15:30 -08:00
Andrey
354007f265 Zwave optimize value_added (#6210)
* Make zwave devices listen on less network changes.

* Convert more platforms

* Remove printouts.

* Fix copy-paste

* Change default dependent list to empty list
2017-03-01 22:41:19 -08:00
Pascal Vizeli
6cb8a36cf1 Template sensor change flow / add restore (#6336) 2017-03-02 07:38:19 +02:00
Fabian Affolter
435f253be8 Upgrade py-cpuinfo to 0.2.6 (#6335) 2017-03-02 05:58:03 +01:00
Fabian Affolter
0fe41ffb00 Upgrade TwitterAPI to 2.4.5 (#6351) 2017-03-02 05:57:51 +01:00
Martin Hjelmare
bafa0cc3b8 Fix mysensors callback race (#6311)
* Fix possible race at startup in mysensors callback

* Update devices via persistence before starting gateway to avoid
  two threads calling the same callback at the same time.

* Call add_devices max once per callback
2017-03-01 23:09:27 +01:00
Erik Eriksson
e23aa1ccf8 sensor.dovado: compute state in update (#6340) 2017-03-01 22:57:37 +01:00
Paulus Schoutsen
a9db6b16eb Merge pull request #6339 from home-assistant/release-0-39-2
0.39.2
2017-03-01 12:43:00 -08:00
Paulus Schoutsen
bf30f2e9e8 Version bump to 0.39.2 2017-03-01 09:29:34 -08:00
Paulus Schoutsen
ee9d50c0a5 Bump netdisco to 0.9.1 (#6338) 2017-03-01 09:29:14 -08:00
Paulus Schoutsen
6736534a52 Discovery fix (#6321)
* Fix incorrect import

* Create own discovery service

* Fix tests

* Fix hdmi_cec bad import
2017-03-01 09:28:49 -08:00
Paulus Schoutsen
4ccd819ec5 Bump netdisco to 0.9.1 (#6338) 2017-03-01 09:05:05 -08:00
Pascal Vizeli
52b1e13aca Bugfix ZigBee / Move from eventbus to dispatcher (#6333)
* Bugfix ZigBee / Move from eventbus to dispatcher

* fix lint
2017-03-01 08:57:53 -08:00
Pascal Vizeli
67f3910f03 Bugfix ZigBee / Move from eventbus to dispatcher (#6333)
* Bugfix ZigBee / Move from eventbus to dispatcher

* fix lint
2017-03-01 08:57:23 -08:00
Paulus Schoutsen
64cb3390ea Test against 3.6-dev (#6324) 2017-03-01 08:53:40 -08:00
Paulus Schoutsen
0ac4a152be Discovery fix (#6321)
* Fix incorrect import

* Create own discovery service

* Fix tests

* Fix hdmi_cec bad import
2017-03-01 07:38:49 -08:00
Pascal Vizeli
4e96e461f7 Cleanup component track_point_in_utc_time usage (#6330) 2017-03-01 07:37:48 -08:00
Stefano Scipioni
30bed8341a Telegram webhooks new text event (#6301)
* new TELEGRAM_TEXT

* telegram command event renamed in 'telegram_command'

* fire telegram_text event anyway
2017-03-01 12:15:16 +01:00
Erik Eriksson
d17733427b Merge pull request #6329 from molobrakos/dovado
sensor.dovado: Upgraded library version
2017-03-01 12:02:58 +01:00
Erik Eriksson
782d2a30cd Merge pull request #6328 from molobrakos/eliqonline
sensor.eliqonline: Change to more appropriate icon
2017-03-01 11:52:44 +01:00
Paulus Schoutsen
84f30d9ef8 Bootstrap tweaks tests (#6326)
* Update strings/fix component not found message.

* Fix tests

* More tweak text
2017-02-28 23:42:31 -08:00
Johann Kellerman
ac49298c8d Log errors when loading yaml (#6257) 2017-03-01 06:56:23 +02:00
jumpkick
a0256e1947 Rollback netdisco to 0.8.2 to resolve #6165 (#6314)
* Rollback netdisco to 0.8.2 to resolve #6165

* Rollback netdisco to 0.8.2 to resolve #6165
2017-02-28 20:37:56 -08:00
ericgingras
7bc2e1238d Convert kpH and mpH to kph and mph (#6316)
There is no reason for the H to be capitalized. Changing it to lowercase increases consistency with other components and allows for use of the min/max sensor, which throws an error if the units of measurement are not the same.
2017-03-01 05:34:40 +01:00
Pascal Vizeli
41f558b181 Bootstrap / Component setup async (#6264)
* Bootstrap / Entiy setup async

* Cleanup add_job stuff / return task/future object

* Address paulus comments / part 1

* fix install pip

* Cleanup bootstrap / move config stuff to config.py

* Make demo async

* Further bootstrap improvement

* Address Martin's comments

* Fix initial tests

* Fix final tests

* Fix bug with prepare loader

* Remove no longer needed things

* Log error when invalid config

* More cleanup

* Cleanups platform events & fix lint

* Use a non blocking add_entities callback for platform

* Fix Autoamtion is setup befor entity is ready

* Better automation fix

* Address paulus comments

* Typo

* fix lint

* rename functions

* fix tests

* fix test

* change exceptions

* fix spell
2017-02-28 20:33:19 -08:00
Adam Mills
383b0914b3 Version bump to 0.40.0.dev0 2017-02-28 11:01:19 -05:00
Krasimir Zhelev
be297c4c7e Frontier silicon (#6131)
* added frontier_silicon constant

* added the frontier_silicon component

* cleaning up according to travis

* trying to satisfy pylint

* trying to satisfy pylint

* fsapi version 0.0.6

* with fsapi version 0.0.7

* added fsapi dependency

* yielding the FSAPI

* Removing white space from docstring

* Removing white space from an empty line

* Switching to sync

* clean up white spaces and rename device to FSAPIDevice

* added frontier_silicon constant

* added the frontier_silicon component

* cleaning up according to travis

* trying to satisfy pylint

* trying to satisfy pylint

* fsapi version 0.0.6

* with fsapi version 0.0.7

* added fsapi dependency

* yielding the FSAPI

* Removing white space from docstring

* Removing white space from an empty line

* Switching to sync

* clean up white spaces and rename device to FSAPIDevice

* changed info to debug

* added frontier_silicon constant

* added the frontier_silicon component

* cleaning up according to travis

* trying to satisfy pylint

* trying to satisfy pylint

* fsapi version 0.0.6

* with fsapi version 0.0.7

* added fsapi dependency

* yielding the FSAPI

* Removing white space from docstring

* Removing white space from an empty line

* Switching to sync

* clean up white spaces and rename device to FSAPIDevice

* added the frontier_silicon component

* trying to satisfy pylint

* fsapi version 0.0.6

* remove white space

* generated requirements

* added the frontier_silicon component

* cleaning up according to travis

* trying to satisfy pylint

* trying to satisfy pylint

* fsapi version 0.0.6

* with fsapi version 0.0.7

* added fsapi dependency

* yielding the FSAPI

* Removing white space from docstring

* Removing white space from an empty line

* Switching to sync

* clean up white spaces and rename device to FSAPIDevice

* trying to satisfy pylint

* changed info to debug

* added the frontier_silicon component

* fsapi version 0.0.6

* generated requirements

* pylint

* moved import requests to the method where it is being used

* add a basic unit test

* cleaned up source code

* added frontier_silicon constant

* added the frontier_silicon component

* added basic test

* added fsapi to requirements_all.txt

* added coverage omit, though a basic test was included

* added MEDIA_TYPE_MUSIC for artist and album

* removed duplicate cons

* switched fsapi call to a property, removed unecessary comment

* detailed docstring for fs_device

* added a space for the info_name - info_text separator

* reduced proeprty (fsapi) access for volume down/up
2017-02-28 09:23:07 -05:00
Pascal Vizeli
aa1f64bed6 Migrate calendar setup to async. (#6305) 2017-02-28 10:49:06 +01:00
Adam Mills
faf8bbcf13 Fix toggle and media_play_pause post async (#6291) 2017-02-27 19:55:34 -08:00
Open Home Automation
0fa259089d Influx fix (#6289)
* Fix: replace influxdb query by another query that is more lightweight and won't timeout

* Fix: replace influxdb query by another query that is more lightweight and won't timeout
2017-02-27 19:54:43 -08:00
Alan Fischer
f7c7073cd7 Updated pyitachip2ir (#6296)
* Updated pyitachip2ir

* Updated requirements_all.txt
2017-02-27 19:52:32 -08:00
Boris K
d7bf3920a5 improve history_stats accuracy (#6294) 2017-02-27 19:52:10 -08:00
Andrey
7ee75d67c5 Add temperature support for MH-Z19 CO2 sensor. (#6169)
* Add temperature support for MH-Z19 CO2 sensor.

* Remove debug printout

* More tests

* Minor fixes
2017-02-27 21:19:11 +02:00
arjenfvellinga
d7db3aba36 Prevent duplicate names on Vera devices by appending the device id (#6100)
* Prevent duplicate names by prepending device id to it.

* Always append device id, not conditionally.

* Moved naming of devices

* flake8
2017-02-27 18:57:39 +00:00
Lindsay Ward
7f99e99dad Update library version for Yeelight Sunflower lights platform (fix for packaging problem with 0.0.7) (#6233) 2017-02-27 13:47:51 -05:00
Greg Dowling
fbea5b4cac Merge pull request #6278 from home-assistant/fix_vera_thormostat_bug
Fix vera thermostat bug
2017-02-27 10:55:33 +00:00
Daniel Perna
e6c88c05ad [sensor.dnsip] New Sensor: DNS IP (#6214)
* Added DNS IP sensor

* Removed unused import

* Added coverage

* fixed flake

* Applied suggested changes

* Removed debug code

* Switched to aiodns

* Raised scan interval

* Updating state with entity creation

* Lint

* Updated requirements_all
2017-02-27 10:45:32 +00:00
pavoni
757813411d Fix vera thermostat mode set bug 2017-02-27 10:18:22 +00:00
TimV
7dc05785cc Analog modem callerid support (#5840)
* analog-modem-callerid

* analog-modem-callerid

* analog-mod

* Updates from latest review

* Updates from latest review
2017-02-26 21:38:47 -08:00
Wolf-Bastian Pöttner
d7af43b87d Add support for MAX!Cube thermostats and window shutter sensors (#6105) 2017-02-26 21:35:33 -08:00
groth-its
6ea74ce740 Fix for OSRAM lights connected to hue bridge (#6122)
* Fix for OSRAM lights connected to hue bridge

Do not send command "effect = none" to OSRAM lights
Osram lights connected to a hue bridge do not seem to handle "effect =
none" very well. Most of the times they jump to the selected color and
then change to red within a second.

Osram lights connected to a hue bridge do not handle xy values outside
of their gamut. Since they just stay at their old color value, handling
the UI is very unpredictable. Sending HSV values to the lights fixes this.

* Add tests for new util methods
2017-02-26 21:28:31 -08:00
Nate
d5bdf7783e light.transition now supports float instead of int in order to be able to perform faster transitions (#6163) 2017-02-26 21:21:12 -08:00
Jose Juan Montes
65d255a626 Local file camera now supports yet inexisting files. (#6157) 2017-02-26 21:16:11 -08:00
Jeff Wilson
53a735a329 Properly report features for each hue bulb type (#6271) 2017-02-26 20:59:23 -08:00
Paulus Schoutsen
68713822fd Merge pull request #6272 from home-assistant/release-0-39-1
0.39.1
2017-02-26 20:48:57 -08:00
Pascal Vizeli
3d26ac3323 Bugfix mqtt paho client to speend time (#6266) 2017-02-26 20:31:11 -08:00
Paulus Schoutsen
d487960ad8 Config fix (#6261) 2017-02-26 20:31:11 -08:00
Pascal Vizeli
9403cdd2a5 Bugfix mqtt socket error (#6256) 2017-02-26 20:31:11 -08:00
Paulus Schoutsen
1fb1a32c9a Version bump to 0.39.1 2017-02-26 20:30:21 -08:00
Pascal Vizeli
31ddcc6278 Bugfix mqtt paho client to speend time (#6266) 2017-02-26 15:28:54 -08:00
Paulus Schoutsen
d789de9ea2 Config fix (#6261) 2017-02-26 15:28:12 -08:00
Scott Henning
e2014eb153 Notify ciscospark (#6130)
* Adding ciscospark notifier

* Adding ciscospark notifier

* CI cleanup.

* houndci-bot changes

* ok --- a bunch of code verify changes
2017-02-26 15:04:30 -08:00
Pascal Vizeli
5932446508 Bugfix mqtt socket error (#6256) 2017-02-26 14:43:02 -08:00
Paulus Schoutsen
61909e873f Feature/reorg recorder (#6237)
* Re-organize recorder

* Fix history

* Fix history stats

* Fix restore state

* Lint

* Fix session reconfigure

* Move imports around

* Do not start recording till HASS started

* Lint

* Fix logbook

* Fix race condition recorder init

* Better reporting on errors
2017-02-26 14:38:06 -08:00
Pascal Vizeli
48cf7a4af9 Move ffmpeg to dispatcher from hass.data entity store. (#6211)
* Move ffmpeg to dispatcher from hass.data entity store.

* fix lint

* address paulus comments

* add more unittest for better coverage
2017-02-26 14:31:46 -08:00
Pierre Ståhl
9490cb4c8f Add service to change log levels (#6221)
* Add service to change log levels

* Fix review comments
2017-02-26 14:15:44 -08:00
Paulus Schoutsen
86d4d10176 Ensure we properly close HASS instances. (#6234) 2017-02-26 14:05:18 -08:00
Philipp Schmitt
7b3b755aaf Fix livebox-play interactions for Python < 3.6 (#6243) 2017-02-26 14:04:22 -08:00
Paulus Schoutsen
f5a1cd5b3c Merge pull request #6229 from home-assistant/release-0-39
Fix recorder async (#6228)
2017-02-25 15:23:55 -08:00
Paulus Schoutsen
7b9f7889d2 Fix recorder async (#6228) 2017-02-25 15:22:23 -08:00
Paulus Schoutsen
9afcbaed1d Fix recorder async (#6228) 2017-02-25 15:21:40 -08:00
Paulus Schoutsen
58f9455604 Merge pull request #6227 from home-assistant/release-0-39
Release 0 39
2017-02-25 15:04:54 -08:00
Paulus Schoutsen
596f7b99f6 Update frontend 2017-02-25 15:03:54 -08:00
Johann Kellerman
94183e1992 No wait for start and more async 2017-02-25 15:03:54 -08:00
Johann Kellerman
0e5df9b641 Allow 4.5min startup time for recorder 2017-02-25 15:03:54 -08:00
Paulus Schoutsen
3a7cc9bb45 Update frontend 2017-02-25 15:03:24 -08:00
Paulus Schoutsen
ecd1da6525 Merge pull request #6167 from kellerza/recorder_timer
Recorder async & remove start_recording event
2017-02-25 15:01:29 -08:00
Paulus Schoutsen
a19a285bb0 Merge pull request #6199 from home-assistant/release-0-39
0.39
2017-02-25 14:36:17 -08:00
Andrey
eb36174b51 Make glob preserve order (#6224) 2017-02-25 14:35:27 -08:00
Fabian Affolter
6e51f7d987 Update regex (#6216) 2017-02-25 14:35:27 -08:00
Lindsay Ward
4ba9020859 Update Yeelight Sunflower light platform to 0.0.6 (#6208)
Add an optional extended description…
2017-02-25 14:35:27 -08:00
Paulus Schoutsen
505725f9d3 Fix reporting on bad login (#6201) 2017-02-25 14:35:27 -08:00
Paulus Schoutsen
2566d01aaa Remove automatically reloading group config (#6197) 2017-02-25 14:35:27 -08:00
Johann Kellerman
477f621705 Bugfix restore startup state (#6189) 2017-02-25 14:35:27 -08:00
Pascal Vizeli
7fcc3ae00a Refactory of envisalink (#6160)
* Refactory of envisalink

* remove event buss

* init dispatcher from hass.

* Move platform to new dispatcher

* fix lint

* add unittest & threadded functions

* fix copy & past error
2017-02-25 14:35:27 -08:00
Fabian Affolter
9f2719bb1f Update regex (#6216) 2017-02-25 12:55:01 -08:00
Andrey
85d0f2e861 Make glob preserve order (#6224) 2017-02-25 12:54:04 -08:00
Paulus Schoutsen
a44d849405 Version bump to 0.39 2017-02-25 12:53:23 -08:00
Johann Kellerman
5d007e636b No wait for start and more async 2017-02-25 17:51:37 +02:00
Johann Kellerman
7cd6f9038c Allow 4.5min startup time for recorder 2017-02-25 17:28:53 +02:00
Fabian Affolter
a80fd2f243 Fix link (#6219) 2017-02-25 13:24:43 +01:00
Erik
2487d27c45 sensor.eliqonline: Change icon 2017-02-25 12:51:48 +01:00
Erik
be7162a0df sensor.dovado: Upgraded library version 2017-02-25 12:50:10 +01:00
Andrey
c5a8372f13 Update flake8 and pylint to latest (#6217) 2017-02-25 09:44:22 +01:00
Pascal Vizeli
81ca978413 Move mqtt from eventbus to dispatcher / add unsub for dispatcher (#6206)
* Move mqtt from eventbus to dispatcher / add unsub for dispatcher

* Fix lint

* Fix test

* Fix lint v2

* fix dispatcher_send
2017-02-24 17:11:50 -08:00
Paulus Schoutsen
d6818c7015 Fix reporting on bad login (#6201) 2017-02-24 16:33:58 -08:00
Greg Dowling
df5866dd95 Merge pull request #6213 from home-assistant/bump_pyloopenergy
Bump pyloopenergy - catch socketIO exceptions.
2017-02-24 22:16:03 +00:00
pavoni
34ee2b1ae9 Bump pyloopenergy - catch socketIO exceptions. 2017-02-24 22:04:41 +00:00
Zac Hatfield Dodds
8ca897da57 Zamg weather (#5894)
* Fast & efficient updates for ZAMG weather data

ZAMG updates on the hour, so instead of checking every half-hour we can
check each minute - only after the observations are taken until
receiving them.

* sensor.zamg: test instead of whitelist for station_id

* Autodetect closest ZAMG station if not given

* ZAMG weather component, based on the sensor

* Review improvements

* Update to new ZAMG schema, add logging

Turns out it wasn't a typo, but rather an upstream schema change.  Added
better error handling to ease diagnosis in case it happens again.

* No hardcoded name
2017-02-24 22:45:46 +01:00
Lev Aronsky
c7fcd98cad Test the temperature returned by RM2 (#6205)
* Test the temperature returned by RM2
* Validate fields via voluptuous
* Fixed range for humidity
2017-02-24 20:54:31 +01:00
Erik Eriksson
8aa3124aa6 sensor.speedtest: provide a default icon (#6207) 2017-02-24 18:40:52 +01:00
Andrey
b27ba9660b Some zwave cleanup (#6203) 2017-02-24 16:17:27 +02:00
Lindsay Ward
9f04b55572 Update Yeelight Sunflower light platform to 0.0.6 (#6208)
Add an optional extended description…
2017-02-24 14:13:55 +01:00
Daniel Høyer Iversen
c4f4a9a158 minor broadlink fix (#6202) 2017-02-24 09:49:42 +01:00
Paulus Schoutsen
e2e8b43902 Default config to setup group editor (#6198) 2017-02-23 22:53:16 -08:00
Paulus Schoutsen
3a35642dc1 Remove automatically reloading group config (#6197) 2017-02-23 22:40:21 -08:00
Paulus Schoutsen
34a7aa2376 Extend test for group config 2017-02-23 21:57:48 -08:00
Paulus Schoutsen
58eb32bce4 Random test fixes (#6195)
* Store persistent errors in hass (speeds up tests)

* Fix sleepiq test dependency on test order

* Fix sleepiq validation
2017-02-23 21:44:47 -08:00
Johann Kellerman
c940d26f07 Bugfix restore startup state (#6189) 2017-02-23 20:06:21 -08:00
jumpkick
fc5e25a07b Incorporate comment suggestions
- Separate attribs from coffeemaker condition
- Set power units for threshold to mW to be consistent with others
- Adjust on-time labels to be more clear
2017-02-23 18:03:49 -05:00
Andrey
1d32bced1c Create zwave devices on OZW thread and only add them during discovery (#6096)
* Create zwave devices on OZW thread and only add them during discovery.

* Read and write devices dict from loop thread.

* More async

* replace callback with coroutine

* import common function instead of callin git
2017-02-23 13:06:28 -08:00
Pascal Vizeli
f2a2d6bfa1 Refactory of envisalink (#6160)
* Refactory of envisalink

* remove event buss

* init dispatcher from hass.

* Move platform to new dispatcher

* fix lint

* add unittest & threadded functions

* fix copy & past error
2017-02-23 13:02:56 -08:00
Colin O'Dell
4f990ce488 Use H2 headers to split up the different sections (#6183)
Using headers makes it easier to visually differentiate between the different sections
2017-02-23 12:58:18 -08:00
Pascal Vizeli
106b7a9d8f Cleanup run_callback_threadsafe (#6187)
* Cleanup run_callback_threadsafe

* fix spell

* Revert image_processing, they need to wait for update
2017-02-23 12:57:25 -08:00
Pascal Vizeli
1cd1facbd0 Add device_class to image_processing (#6186)
* Add image_processing device_class

* Fix comments

* address comments
2017-02-23 17:33:54 +01:00
Pascal Vizeli
b725eaf67f Homematic icon map / upper case on services (#6178)
* Set upper on service / add sensor icon mapper

* Add more icons

* fix id
2017-02-23 15:31:32 +01:00
Colin O'Dell
89807f24ad QNAP update (#6182)
* Bump qnapstats library to 0.2.3

* Expose the new timeout setting

* Show persistent notification if QNAP fails to set up

This sitaution will usually occur if the server configuration is wrong or the
timeout is set too low.  In both cases `api.update()` will fail, which is a
problem because we cannot initialize many of the sensors without having this
data.

* Add new system_temp condition to QNAP sensor
2017-02-23 15:01:25 +01:00
Erik Eriksson
7935c54420 's' is SI symbol for seconds (#6181) 2017-02-23 14:57:51 +01:00
Erik Eriksson
46d0d38444 Merge pull request #6180 from home-assistant/molobrakos-patch-1
volvooncall: icon and unit were mixed
2017-02-23 13:28:03 +01:00
Erik Eriksson
5da110d764 volvooncall: icon and unit were mixed 2017-02-23 13:27:17 +01:00
Erik Eriksson
c88527ce79 Merge pull request #6177 from molobrakos/volvooncall
volvooncall: support for naming vehicle and selecting what attributes to display
2017-02-23 13:00:11 +01:00
Erik Eriksson
6127173d2a cache name in entity so we can display it even if the connection is lost (#6176)
update tellduslive dependency
check return value from update
2017-02-23 12:37:25 +01:00
Erik
1c6ba989a9 Support for naming vehicle. Support for selecting what resources to display 2017-02-23 12:00:51 +01:00
Erik Eriksson
827e3c4395 Merge pull request #6162 from molobrakos/nut
sensor.nut: Handle multiple statuses returned
2017-02-23 11:56:25 +01:00
Pierre Ståhl
eefedaf332 Make it possible to ignore platforms in discovery (#6048)
* Make it possible to ignore platforms in discovery

* Add tests for discovery component

* small cleanups
2017-02-23 11:54:35 +01:00
Fabian Affolter
ac1e811dcd Upgrade slacker to 0.9.42 (#6173) 2017-02-23 10:56:35 +01:00
Fabian Affolter
49b4cd3c41 Upgrade fuzzywuzzy to 0.15.0 (#6175)
Add an optional extended description…
2017-02-23 10:56:00 +01:00
jumpkick
ef87d4dad4 Update device_state_attributes only
This gets rid of the other stuff and just updates device_state_attributes, leaving the default properties alone.
2017-02-23 04:54:09 -05:00
Barry Williams
960af20cc9 Added Openhome Support (#6153)
* Added Openhome Support

* added to coveragerc

* PR suggestions

* revert accidental deletion

* More PR suggestions and a lint fix

* Removed semicolons
2017-02-22 17:01:06 -05:00
Daniel Høyer Iversen
6c91e04852 Refactor broadlink (#6168)
* refactor broadlink

* typo
2017-02-22 22:11:49 +01:00
Johann Kellerman
74837dbf45 Restore for device_tracker (#6150) 2017-02-22 22:55:11 +02:00
Erik Eriksson
3b693d5e70 generic camera: improved exception handling (#6158)
Avoid unhandled exception and stack trace when server closes connection by changing from handle ClientDisconnectedError to DisconnectedError. Also added HttpProcessingError, which was missing.
2017-02-22 07:43:52 -08:00
Erik
23dd76cdc5 Handle UPS:es that returns more than one status (e.g. 'OL CHRG'). 2017-02-22 14:38:00 +01:00
Greg Dowling
896e0476ff Bump pywemo version. Improves notifications for insight devices. (#6159)
Add an optional extended description…
2017-02-22 12:23:25 +01:00
Pascal Vizeli
b0d3bbed79 Convert mqtt platforms to async (#6145)
* Convert mqtt platforms to async

* fix lint

* add more platforms

* convert mqtt_eventstream

* fix lint / add mqtt_room

* fix lint

* fix test part 1

* fix test part 2

* fix out of memory bug

* address comments
2017-02-22 09:43:22 +01:00
Erik Eriksson
65ed85c6eb volvooncall: fix missing property. see vehicle when discovered. (#6144) 2017-02-22 00:24:42 -08:00
Johann Kellerman
aee8758fc1 Restore input_select and test helper proposal (#6148)
* Restore input_select and test helper proposal

* DB still active
2017-02-22 00:15:48 -08:00
Pascal Vizeli
8983b826c4 Bugfix automation state linsteners (#6120)
* Bugfix automation state linsteners

* address paulus comments.

* fix lint

* fix lint v2
2017-02-22 00:02:37 -08:00
Johann Kellerman
11d3093a30 Restore: migrate fastdotcom and speedtest to restore (#6149) 2017-02-21 18:10:09 -08:00
Erik Eriksson
15e8a22100 dovado: GiB -> GB (#6143) 2017-02-21 18:54:20 -05:00
Pascal Vizeli
10fb30e924 Update jinja to 2.9.5 (#6146) 2017-02-21 09:05:44 -08:00
Justin Dray
b7b1429ac7 Add support for waking up Samsung TVs over the network (#6114)
* Add support for waking up Samsung TVs over the network

* Return the correct supported features for samsungtv

* Update requirements_all
2017-02-21 16:57:29 +01:00
Daniel Høyer Iversen
9f4a9585d2 miflora lib version (#6142) 2017-02-21 14:43:17 +01:00
Lev Aronsky
c1be5ede1c Add 'entity_picture' to Darksky component (#6141) 2017-02-21 00:01:44 -08:00
David McNett
3beb87c54d New component 'insteon_plm' and related platforms (#6104)
* Connect to PLM and process simple protocol callbacks

* Baseline commit

* Connect to PLM and process simple protocol callbacks

* Baseline commit

* Connection working again

* Async add devices is working via callback now

* Beginning to interface with PLM library for control and state

* Deal with brightness in 255 levels with library

* Change sub names to match API changes

* Remove PLM-level update callback

* Support dimmable based on underlying PLM device attributes

* Expand to non-light platforms

* Stubs for turn on and off

* Current version of Python library

* Amend to use switch device attributes

* Use asyncio endpoints for control

* Add logging line

* Bump module version to 0.7.1

* Auto-load platforms, display device info/attributes

* Unify method name for getting a device attribute

* Require Current version of insteonplm module

* Import the component function in each platform in the balloob-recommend manner

* For consistency, handle switch state as onlevel just like lights

* Use level 0xff for on state, even with binary switches

Observing the behavior of a 2477S switch, it looks like even the non-dimmable
devices use 0x00 and 0xff for off/on respectively.  I was using 0x01 for on
previously, but that yields unnecessary state change callbacks when message
traffic ends up flipping the onlevel from 0xff to 0x01 or 0x01 to 0xff.

* Use sensorstate attribute for sensor onoff

* Move new device callback to devices attribute

* Add support for platform override on a device

* Bump version of insteonplm module

* Default overrides is an empty list

* Avoid calling private methods when doing common attributes

* Remove unused CONF_DEBUG for now

* flake8 and pylint code cleanup

* Move get_component to local function where it is needed

* Update to include insteonplm module.

* New files for insteon_plm component

* Legitimate class doctring instead of stub

* Docstring changes.

* Style changes as requested by @SEJeff

* Changes requested by @pvizeli

* Add @callback decorator to callback functions

* Opportunistic platform loading triggered by qualifying device detection

Instead of loading all the constituent platforms that comprise the insteon_plm
component, instead we defer and wait until we receive a callback for a device
that requires the platform.
2017-02-21 08:53:39 +01:00
Johann Kellerman
fdc373f27e Restore_state helper to restore entity states from the DB on startup (#4614)
* Restore states

* feedback

* Remove component move into recorder

* space

* helper

* Address my own comments

* Improve test coverage

* Add test for light restore state
2017-02-20 23:40:27 -08:00
Matt N
2b9fb73032 zoneminder: Add camera mjpeg stream support (#6098) 2017-02-20 22:17:11 -08:00
Paulus Schoutsen
36cda8c6b2 Merge remote-tracking branch 'origin/master' into dev 2017-02-20 21:57:37 -08:00
Paulus Schoutsen
041f1edd35 Update frontend 2017-02-20 21:56:38 -08:00
Paulus Schoutsen
32873508b7 Add initial group config (#6135) 2017-02-20 21:53:55 -08:00
Paulus Schoutsen
addd955a6b Version bump to 0.38.4 (#6137) 2017-02-20 21:52:36 -08:00
Paulus Schoutsen
022afcf050 Merge pull request #6136 from home-assistant/release-0-38-4
0.38.4
2017-02-20 21:50:00 -08:00
Paulus Schoutsen
7ce2b9e018 Update frontend 2017-02-20 21:35:10 -08:00
Paulus Schoutsen
f256d1fe2f Bump netdisco to 0.8.3 2017-02-20 21:30:38 -08:00
Pascal Vizeli
1910440a3c Update aiohttp to 1.3.3 (#6129) 2017-02-20 21:29:38 -08:00
Lewis Juggins
1d4c3febee [google] suppress file_cache warning (#6128) 2017-02-20 14:14:45 -08:00
Pascal Vizeli
1d7ab0fa95 Cleanup some async stuff (#6127)
* Cleanup some async stuff

* change to schedule_update_ha_state()

* fix media player

* fix zigbee
2017-02-20 13:24:03 -08:00
Stefano Scipioni
14cf5b884b fixed error caused by POST call with no 'message' inside (for example… (#6038)
* fixed error caused by POST call with no 'message' inside (for example in edited messages)

* avoid assert
2017-02-20 21:15:45 +01:00
arraylabs
3d34368e6e myq cover support gates (#6123)
* update myq to 0.0.6

* update req to 0.0.6

Adds support for gates
2017-02-20 18:25:29 +01:00
Pascal Vizeli
e425801fe0 Homematic cleanup & hass best praxis (#6121) 2017-02-20 17:07:33 +01:00
John Arild Berentsen
73a4c09597 Set configurable refresh for zwave light to 5 seconds default. (#5957)
* Set configurable refresh value delay to 5 seconds

* Revert "Remove configurable refresh value delay, and fix it to 5 seconds"

This reverts commit edc2dc35d165e5e13b0f3cf4df40493a7ce764f1.

* Use default value of 5 sec for refresh, and still configurable

* Make default delay 5secs, but needs to be activated
2017-02-20 15:49:34 +01:00
Pascal Vizeli
1a4b62909b Pump ffmpeg to 1.5 (#6119) 2017-02-20 15:12:09 +01:00
Scott Bradshaw
37a8035c54 Added support for alternate SSH ports in AsusWRT (#4832) (#6109)
* Added support for alternate SSH ports in AsusWRT (#4832)

* Always set the SSH port in SSH arguments

* Removed whitespace

* Adding port=22 to the mock calls

* Changed config.get(CONF_PORT)  to config[CONF_PORT] per feedback from @pvizeli
2017-02-20 09:06:50 +01:00
Paulus Schoutsen
25408941de Mqtt fixes (#6116)
* Fix MQTT stop

* MQTT: Make sure to have connection setup at end of MQTT setup.

* Fix MQTT connect
2017-02-19 22:43:10 -08:00
Paulus Schoutsen
b969fea900 Z-Wave config panel fix (#6113) 2017-02-19 22:25:03 -08:00
Robbie Trencheny
2cc6fe6609 Fix links in template
Closes #6112
2017-02-19 21:00:54 -08:00
Tom Matheussen
66d8787d47 Weather platform Forecast (#4721)
* Added forecast functionality to the weather platform, updated OWM to get forecast data

* style fixes

* Changed returned forecast data to a more managable dict

* Fixed line length

* forecast will always be collected, data returned from owm is based on metric setting

* use list comprehension to create the forecast data

* Added forecast data to the weather demo

* Create dict directly in list comprehension

* Minor variable change in weather demo platform

* Convert forecast temperatures in weather component

* set forecast attributes as constants

* Style fixes and tests

* Copied forecast_entry instead of mutating data
2017-02-19 16:42:12 -08:00
Pascal Vizeli
5d8e219448 Update aiohttp handling with upc connect (#6108)
* Refactor upc connect

* fix aiohttp cleanup

* fix test

* fix tests

* allow status code for login
2017-02-19 23:25:45 +01:00
Daniel Høyer Iversen
58f813b518 broadlink (#6101) 2017-02-19 17:45:57 +01:00
normakm
dee4c85c32 Add support for aliased owfs sensors (#6043)
* Support aliased owfs sensors

Current implementation does not support OneWire OWFS sensors that are aliased by OWFS alias.txt file:
http://owfs.org/index.php?page=aliases
Assumption is that folder name == sensor address

This change reads the supported families from owfs "family" file and adds both aliased and unaliased sensors.
(this approach also skips the "management" folders.. eg simultaenous, bus, alarm, statistics etc. For example when adding "simultaneous" as sensor (it also has "temperature" file) then owfs crashes)

* Update onewire.py

lint suggested style fixes

* Update onewire.py

Empty line removed

* Update onewire.py

comments removed
2017-02-19 01:59:44 -08:00
William Scanlon
a4318c3125 Added tamper detection to Wink devices. (#6072)
* Added tamper detection to wink devices.
2017-02-18 23:00:27 -05:00
Adam Mills
5f095b5126 Add supported_features to cover component (#6082) 2017-02-18 18:11:03 -08:00
William Scanlon
3cb1a5dd89 SimpliSafe updates (#6034)
* SimpliSafe updates

* Check login status

* Fixed requirements_all.txt
2017-02-18 17:47:52 -08:00
Kevin Siml
dfbef45e49 Add pushsafer.com notification service (#6050)
* Add pushsafer.com notification service

* Add pushsafer.com notification service

* Add pushsafer.com notification service

* Add pushsafer.com notification service

* Update pushsafer.py

* Update pushsafer.py

* Update pushsafer.py

* Update README.rst
2017-02-18 17:36:28 -08:00
Erik Eriksson
9e73115337 Updated volvooncall library + support sensors, heater and lock (#6052) 2017-02-18 17:09:25 -08:00
Andrey
beb8b4b11f Zwave: add power_consumption attribute (#6067)
* Zwave: Pull power consumption value into attribute.

* Zwave: Add power_consumption attribute.

* fix condition

* Update __init__.py

* Update

* Simplify class condition

* Handle empty class_id
2017-02-18 16:51:13 -08:00
dramamoose
003815c91a Update FLUX_LED by adding Effects (#6083)
* Add FLUX_LED Effects

Add add the various supported FLUX_LED effects

* Correct Flux_LED Issues

* Whitespace Changes

* Feed the Hound

* Feed the hound better food
2017-02-18 18:45:21 -05:00
Pascal Vizeli
e1cbd6b4c0 MQTT convert to async (#6064)
* Migrate mqtt to async

* address paulus comment / convert it complet async

* adress paulus comment / remove future

* Automation triggers should be async

* Fix MQTT async calls

* Show that event helpers are callbacks

* Fix tests

* Lint
2017-02-18 14:17:18 -08:00
Lindsay Ward
fa2c1dafdf Add platform for Yeelight Sunflower lights (#6060) 2017-02-18 14:05:55 -08:00
Erik Eriksson
76d1ee9fc2 Support for Pocket Casts (#6084) 2017-02-18 13:52:37 -08:00
Paulus Schoutsen
f29ee24b72 Do not allow config dependency (#6036)
* Do not allow config dependency

* Prevent config in discovery

* Migrate to blacklist
2017-02-18 11:31:37 -08:00
Adam Mills
b277fd55f9 [media_player.kodi] Fix for when no item id is provided (#6088) 2017-02-18 19:09:17 +00:00
kitcorey
75df4be733 Fix colortemp conversion for lifx lights (#6087) 2017-02-18 20:42:57 +02:00
Adam Mills
86a1b0a6c6 Websocket push notifications for Kodi (#6063)
* Websocket push notifications for Kodi

* Only create ws server if ws enabled

* Fix conditional websocket server creation
2017-02-18 00:26:07 -08:00
John Arild Berentsen
799fbe42f8 zwave refactor, don't use ozw values directly in properties. (#5961)
* First round of not using values directly

* Round two

* lint

* Round four

* Conflict

* Round five

* Update zwave.py

* round six

* Docstring

* flakywakie

* Fetch values in constructor

* Blank line removal

* Set attributes in callback

* Docstring

* Round seven

* Ughgit add homeassistant/components/lock/zwave.py!

* Sloppy code
2017-02-17 23:56:05 -08:00
Andrey
c1eed148cc Clean up value_added in zwave light. (#6074) 2017-02-17 23:54:45 -08:00
Erik Eriksson
62fe9f955e update dovado version (#6081) 2017-02-18 08:15:32 +01:00
Daniel Høyer Iversen
b857f838df Broadlink (#6051)
* Add fail checking of broadlink data
2017-02-18 07:38:50 +01:00
Philipp Schmitt
c2dc940819 Update liveboxplaytv and catch connection errors (#6056)
* Update liveboxplaytv and catch connection errors

* Implement @pvizeli's suggestion

* lint
2017-02-17 21:40:19 +01:00
Fabian Affolter
ca9eb31d1d Upgrade aiohttp to 1.3.2 (#6059) 2017-02-17 21:39:29 +01:00
William Scanlon
8a5fe38d69 Slugify trackr device_id (#6062)
* Slugify trackr device_id

* Removed replace
2017-02-17 21:39:05 +01:00
Andrey
91c3a49a5b Zwave: Add forgotten service file (#6073)
* add print

* Add 'print_node' service to zwave.

* Add forgotten service file
2017-02-17 22:09:38 +02:00
Andrey
1f72506f9b Add 'print_node' service to zwave (#6069)
* add print

* Add 'print_node' service to zwave.
2017-02-17 22:03:55 +02:00
Adam Mills
843840b963 Add effect_list to hue light (#6065) 2017-02-17 20:37:45 +02:00
Andrey
bb64560089 Zwave: Make different messages for ignores by woraround and device config. (#6061) 2017-02-17 16:19:21 +01:00
Walker Boyle
ba305ee71c Add aurora sensor (#6003)
* Add aurora sensor

* allow custom forecast threshold for aurora binary sensor

* move AuroraGateway functionality to Aurora data object to conform with HA standards
2017-02-17 09:13:52 +01:00
Andrey
905f4bf994 Support zwave glob & domain device settings. (#6046)
* Support zwave glob & domain device settings.

* data[DATA_DEVICE_CONFIG].get() now always return non-None

* Update test

* Update tests2

* Lint fix
2017-02-16 15:19:22 -08:00
Pascal Vizeli
a496a7c792 Protect device_tracker scan interval / TTS logging (#6041)
* Protect device_tracker scan interval / TTS logging

* clear pass
2017-02-16 07:13:33 -08:00
Jose Juan Montes
714ba31b75 Mediaplayer clementine remote (#5877)
* Added Clementine Music Player Remote component.

* Remove stale stuff
2017-02-16 15:34:34 +01:00
Pascal Vizeli
2574b915dd Fix name in logging message (#6039)
Add an optional extended description…
2017-02-16 10:30:12 +01:00
Thibault Cohen
1eceb405ce [WIP] Hydroquebec plugin now use pyhydroquebec lib (#6000)
* Hydroquebec plugin now use pyhydroquebec lib

* Fix logger message

* Fix platform name
2017-02-16 10:22:21 +01:00
Thibault Cohen
8bef7d84bb Add Ebox sensor component (#5998)
* Add Ebox sensor component

* Fix PR #5998 comments

* Fix logger message
2017-02-16 09:29:43 +01:00
Paulus Schoutsen
75e41a21c9 Clean up mock_coro (#6037) 2017-02-15 23:19:34 -08:00
Jon Caruana
9c176ad85a LiteJet: Lights should have the option to dim in the UI. (#6031)
* LiteJet: Lights should have the option to dim in the UI.

* Fix lint error.
2017-02-15 22:41:03 -08:00
Paulus Schoutsen
0f1a254f3b Update frontend 2017-02-15 22:33:52 -08:00
Pascal Vizeli
6674a8ad57 [Device Tracker] Remove coro (#6014)
* Remove coro and make flow faster.

* fix lint

* address comments
2017-02-15 19:52:06 -08:00
Paulus Schoutsen
235d0057b1 Simplify customize (#6007)
* Simplify customize

* Maintain glob order

* Have glob overrule domain
2017-02-15 19:47:30 -08:00
Adam Mills
eb9400de4c cmus remove IO from properties (#6030) 2017-02-15 19:13:25 -08:00
Thibault Cohen
4addcccfac Update to pyfido 0.1.4 (#6033) 2017-02-15 19:12:29 -08:00
jumpkick
f6e46aecf5 Update wemo.py 2017-02-15 17:32:45 -05:00
jumpkick
e9cf5f6f42 Update wemo.py 2017-02-15 16:58:11 -05:00
jumpkick
e221c8a37d Update wemo.py 2017-02-15 16:57:16 -05:00
jumpkick
b163544e3c Back to you travis.... 2017-02-15 16:47:02 -05:00
jumpkick
a718e92708 Update wemo.py
trailing whitespace... (argh... the bot should just trim it)
2017-02-15 15:40:02 -05:00
jumpkick
44d274e428 Update wemo.py
* continuation line under-indented for visual indent
2017-02-15 15:38:41 -05:00
jumpkick
c404fb7142 Update wemo.py
* Reordered datetime import
* Spaces by 4
2017-02-15 15:34:42 -05:00
Thibault Cohen
5895f431b4 [WIP] Add Fido sensor (#5997)
* Add Fido sensor

* Fix PR #5997 comments

* Make error message usable
2017-02-15 21:21:38 +01:00
Erik Eriksson
0d06454a94 eliqonline lib upgrade (#6021) 2017-02-15 19:02:58 +01:00
Pierre Ståhl
fdb6dd81ce Add fake support for turn on/off for Apple TV (#5962)
* Add fake support for turn on/off for Apple TV

When the device is "turned off", no requests are sent to the device.
When the setting "start_off" is set to true, the device starts in off
state.

* Fix async comments

* Clean up supported features
2017-02-15 09:10:48 -08:00
Johan Bloemberg
2d33ee6258 Reconnect robustness, expose connection state. (#5869)
* Reconnect robustness, expose connection state.

- Expose connection status as rflink.connection_status state.
- Handle alternative timeout scenario.
- Explicitly set a timeout for connections.
- Error when trying to send commands if disconnected.
- Do not block component setup on gateway connection.

* Don't use coroutine where none is needed.

* Test disconnected behaviour.

* Use proper conventions for task creation.

* Possibly fix test race condition?

* Update hass import style
2017-02-15 16:10:19 +01:00
George.M
b1fa178df4 Added a config flag[Boolean] to declare if SenseHAT is attached (#5883)
* Added a config flag[Boolean] to declare if SenseHAT is attached to RaspberryPi

* Hound found a line too long violation - fix
2017-02-15 11:11:55 +01:00
Robbie Trencheny
cf99551110 Merge pull request #6008 from tdickman/dev
Fix abreviation for miles in darksky sensor
2017-02-14 23:57:33 -08:00
happyleavesaoc
58e707a264 Limitless light: bump version; fix conf (#6006) 2017-02-15 08:45:04 +02:00
Paulus Schoutsen
c1988acb36 Merge pull request #6010 from home-assistant/merge-master
Merge master
2017-02-14 21:55:30 -08:00
Paulus Schoutsen
7776bfefc2 Merge branch 'master' into merge-master 2017-02-14 21:53:07 -08:00
Paulus Schoutsen
ad95b2715e Merge pull request #6009 from home-assistant/release-0-38-3
0.38.3
2017-02-14 21:48:49 -08:00
Pascal Vizeli
d6f525a23f Bugfix sonos favorite_source after lost connection (#5996) 2017-02-14 21:38:56 -08:00
happyleavesaoc
b1eb3243bd timeMin fix (#5983)
Add an optional extended description…
2017-02-14 21:38:56 -08:00
William Scanlon
9bcc692ff2 Fix #5979 (#5980) 2017-02-14 21:38:56 -08:00
Fabian Affolter
91d2ba609e Remove unit of measurement 2017-02-14 21:38:43 -08:00
Martin Hjelmare
bbc5c3a300 Fix mysensors platforms version requirement (#5942)
* Notify and device tracker platforms require mysensors version 2.0 or
  greater.
2017-02-14 21:37:54 -08:00
Andrey
04f3fe0ba3 Point-fix zwave getter not to ignore label (#5938) 2017-02-14 21:37:32 -08:00
William Scanlon
ea26aa2c81 Fixed typos in wink climate (#5936) 2017-02-14 21:37:17 -08:00
Tom Dickman
71dc41655c Fix abreviation for miles in darksky sensor 2017-02-14 23:06:06 -06:00
jumpkick
29c7987453 Improvements for WeMo Insight switches
* Changes current power units to watts
* Adds power on times and additional totals
2017-02-14 18:29:23 -05:00
Pascal Vizeli
80bc2666ac Make homematic climate dynamic for datapoints. (#5993)
* Make homematic climate dynamic for datapoints.

* Code cleanup

* Add more option

* add options

* Pump version 0.1.22

* optimaze
2017-02-14 23:19:57 +01:00
arraylabs
039559882b myq-cover updated to new requirement file, changed error message to be more informative (#5995) 2017-02-14 12:03:50 -08:00
Adam Mills
2993a4a7a5 Add object-assign polyfill support to polymer (#5994)
* Add object-assign polyfill support to polymer

* Conditionally load compatibility.js

* Remove compatibility preload

* Include newly compiled files

* Update compiled frontend with latest polymer
2017-02-14 12:00:45 -08:00
Pascal Vizeli
30ad8bcc80 Bugfix sonos favorite_source after lost connection (#5996) 2017-02-14 11:59:54 -08:00
Andrey
67d35e6454 Point-fix zwave getter not to ignore label (#5938) 2017-02-14 11:59:34 -08:00
Paulus Schoutsen
409b74b780 Update hassbian component with real output (#5989) 2017-02-14 09:34:17 -08:00
Pascal Vizeli
4b8e6e36b6 Make EntityComponent update process more robust. (#5943)
* Make EntityComponent update process more robust.

* address paulus comments

* Add platform to log message.
2017-02-14 09:32:40 -08:00
Fabian Affolter
cd9f3fa215 Upgrade pylast to 1.8.0 (#5991) 2017-02-14 13:10:38 +01:00
Sören Oldag
a06f89085d Added limitlessled support for bridge v6 and RGBWW bulbs. (#5958)
* Added limitlessled support for bridge v6 and RGBWW bulbs.

* Fix minor code style issue.

* Updated requirements_all.txt
2017-02-14 11:12:32 +01:00
happyleavesaoc
1bdd8e235a timeMin fix (#5983)
Add an optional extended description…
2017-02-14 10:30:16 +01:00
Erik Eriksson
39ca1a5a0d install libsodium to enable decryption of encrypted owntracks payload (#5976) 2017-02-13 23:59:09 -08:00
PetePriority
e17410c9a1 Added fritzbox_netmonitor.py (#5469)
* Added fritzbox_netmonitor.py

* Implemented changes
2017-02-13 23:58:23 -08:00
Fabian Affolter
f82ac0af60 Enable sensor for discovery (#5974)
* Enable sensor for discovery

* Remove blank line
2017-02-13 23:54:13 -08:00
Paulus Schoutsen
462b47c725 Update frontend (#5987) 2017-02-13 22:25:26 -08:00
Paulus Schoutsen
52567b1a48 Fix Z-Wave node config (#5986) 2017-02-13 22:16:39 -08:00
Andrey
ffb46ab541 Add 'days' flag to history fetch urls. (#5895)
* Add 'days' flag to history fetch urls.

* Fix unrenamed variable

* Switch to end_time param instead of days

* Checkthat end_time is parsed
2017-02-13 22:10:39 -08:00
Paulus Schoutsen
0effe14619 Z-Wave file name fix (#5985) 2017-02-13 21:58:16 -08:00
Andrey
e70b7ab509 Allow printing the number of states returned by history and time it took to extract. (#5973) 2017-02-13 21:48:53 -08:00
Paulus Schoutsen
36c196f9e8 Add initial Z-Wave config panel (#5937)
* Add Z-Wave config panel

* Add config to Z-Wave dependencies

* Lint

* lint

* Add tests

* Remove temp workaround

* Lint

* Fix tests

* Address comments

* Fix tests under Py34
2017-02-13 21:34:36 -08:00
Robbie Trencheny
6005933451 Merge pull request #5975 from fabaff/unit-moon
Remove unit of measurement
2017-02-13 18:08:49 -08:00
William Scanlon
41c2392f8b Fix #5979 (#5980) 2017-02-13 21:08:37 -05:00
Fabian Affolter
e866eeb518 Remove unit of measurement 2017-02-13 23:04:25 +01:00
Paulus Schoutsen
32fc164df3 Clean up HDMI_CEC [Breaking change] (#5932) 2017-02-13 13:52:11 -08:00
Gert-Jan van de Streek
5cad539859 Fix slow status updates from the knx bus (#5963)
* Fix slow status updates from the knx bus

The data set in the entity was an array, not the value.

@fixes https://github.com/home-assistant/home-assistant/issues/4407

* speed up status update
2017-02-13 22:48:48 +01:00
Josh Anderson
401263519d Only try to pair notify.webostv when not paired (#5967)
This allows the notify.webostv component to successfully register when
the TV is not currently powered on as long as a pairing record exists.
2017-02-13 22:29:18 +01:00
Andrey
0feb1c3e28 Add workaround for ignoring zwave devices and reversing cover open/close (#5922) 2017-02-13 20:59:42 +02:00
Paulus Schoutsen
b2d1774293 Fix Z-Wave (#5955) 2017-02-13 08:54:11 -08:00
Stuart Mumford
a8dc559519 Add support for the Open Energy Monitor Thermostat (#5583)
* Add support for the Open Energy Monitor Thermostat

* Fix linting errors

* Define an update method and local state

* fix linter

* Small tweaks.

Update oemthermostat version, default name and docstrings

* Fail to setup oem platform if connection fails.

* update requirements

* More tweaks to auth and exceptions

* Remove target temp
2017-02-13 16:45:04 +01:00
Philipp Schmitt
6d7041cd42 Reduce battery drain on Nuki Lock (#5945) 2017-02-13 14:43:12 +01:00
Valentin Alexeev
2ffdf1fdcd Bugfix/waqi sensor pwaqi version bump (#5944)
* Bump pwaqi to 1.4 to fix a typo in the underlying library.

* Update WAQI sensor to use pwaqi 2.0 which relies on AQICN public API.
This is a breaking change as the component now requires 'token' parameter.

* Fix lint
2017-02-13 14:28:40 +01:00
Fabian Affolter
f77eda2981 Upgrade thingspeak to 0.4.1 and use the correct API key (#5906) 2017-02-13 11:25:28 +01:00
Martin Hjelmare
b6404d70ec Fix mysensors platforms version requirement (#5942)
* Notify and device tracker platforms require mysensors version 2.0 or
  greater.
2017-02-13 11:23:28 +01:00
Fabian Affolter
9a5618fe96 Upgrade TwitterAPI to 2.4.4 (#5940) 2017-02-13 11:20:37 +01:00
arraylabs
bc1d14f9c3 Added myq cover component (#5886)
Add an optional extended description…
2017-02-13 11:20:07 +01:00
Alan Fischer
18f38229b2 iTach Remote Platform (#5660)
* Added itach remote device

* Added coverage & requirements

* Updated requirements

* Added schema, inline commands, and platform_setup failure if itach not found

* Removed unnecessary optional parameter

* Removed filename option for itach remote
2017-02-13 11:10:34 +01:00
Robbie Trencheny
feb2ebbc03 Fix AWS Lambda breakage after #5824 (#5935)
Add an optional extended description…
2017-02-13 09:27:50 +01:00
Paulus Schoutsen
7b56fe2af6 Update frontend (#5939) 2017-02-13 00:00:41 -08:00
Paulus Schoutsen
8ca3ca8564 Z-Wave: Rename customize to device_config [Breaking change] (#5933)
* Z-Wave: Rename customize to device_config

* Fix light

* Make entity id not required
2017-02-12 23:55:27 -08:00
Paulus Schoutsen
7401ec96b5 Version bump to 0.38.3 2017-02-12 23:31:04 -08:00
Pascal Vizeli
41849eab06 Core cleanup: two stage shutdown (#5876)
* Core cleanup: two stage shutdown

* fix spell

* fix

* add async logger to close

* change aiohttp to use CLOSE

* address paulus comments

* Fix tests

* Add unittest
2017-02-13 06:24:07 +01:00
William Scanlon
4623d1071e Fixed typos in wink climate (#5936) 2017-02-12 19:34:13 -08:00
Paulus Schoutsen
a37a3af126 Merge pull request #5928 from home-assistant/release-0-38-2
0.38.2
2017-02-12 15:49:58 -08:00
John Arild Berentsen
1a0a8f106e Bugfix for #5900 (#5901) 2017-02-12 15:47:20 -08:00
John Arild Berentsen
6311f21d31 Bugfix for #5900 (#5901) 2017-02-12 15:47:04 -08:00
Andrey
f4372a7df5 Fix getters that ignored labels. (#5903)
* Fix getters that ignored labels.

* Try 5 times for changed dict

* fix lint

* Add decorator with retrying functions.

* Fix lint

* use retries instead of decorator
2017-02-12 15:42:09 -08:00
Andrey
9b0a3e4c5a force_update zwave sensors. (#5844)
* force_update zwave sensors with polling_intensity.

* use bool to cast

* Make all zwave sensors force_update=True
2017-02-12 14:10:56 -08:00
Andrey
35118b6d9c Make hdmi_cec work with the new customize (#5916) 2017-02-12 14:02:45 -08:00
Fabian Affolter
8991fcf835 Fix name (#5912) 2017-02-12 14:02:45 -08:00
happyleavesaoc
15ef55a4c8 bump myusps version (#5911) 2017-02-12 14:02:45 -08:00
Philipp Schmitt
d3c444ff10 [lock.nuki] Fix Nuki lock for Python 3.4 and 3.5 (#5899) 2017-02-12 14:02:45 -08:00
Paulus Schoutsen
153e354002 Version bump to 0.38.2 2017-02-12 14:01:26 -08:00
Paulus Schoutsen
da5823becb Make check ha config file work with custom config dir 2017-02-12 14:00:06 -08:00
Paulus Schoutsen
8d0731e9fc Merge branch 'master' into dev 2017-02-12 13:58:09 -08:00
Pierre Ståhl
3a262cd7e0 Fix artwork in Apple TV platform (#5874) 2017-02-12 22:34:02 +01:00
Pascal Vizeli
9aac2113b6 Add 'wait_template' to script commands / Refactory track_template (#5827)
* Add 'wait' to script commands.

* Add track_template + unittest / rename wait_template

* fix lint & test

* Fix handling / change automation-template / add tests

* address paulus comments
2017-02-12 13:27:53 -08:00
happyleavesaoc
5f0b2a7d15 [WIP] gstreamer media player (#5839)
* gstreamer media player

* gstreamer meta
2017-02-12 13:00:27 -08:00
happyleavesaoc
64cb65a04e fedex sensor (#5891)
* fedex sensor

* fix fedex requirement
2017-02-12 12:47:27 -08:00
happyleavesaoc
3f675afd5b ups sensor (#5890) 2017-02-12 12:47:12 -08:00
Colin O'Dell
289767522b Update qnapstats library; add support for new verify_ssl config (#5919) 2017-02-12 12:38:29 -08:00
Per Sandström
675dd04e97 vasttrafik: update token on read error (#5875) 2017-02-12 11:57:29 -08:00
Pierre Ståhl
e5085bf620 Add media_image to media_player component (#5754) 2017-02-12 11:42:56 -08:00
Paulus Schoutsen
780173befb Update frontend (#5923) 2017-02-12 11:35:36 -08:00
Paulus Schoutsen
dab6d011ca Add check_config API (#5898)
* Add check_config API

* Add config panel to default config

* Add tests

* Lint

* lint
2017-02-12 11:31:46 -08:00
Andrey
dc6a28a8b2 Make hdmi_cec work with the new customize (#5916) 2017-02-12 11:19:15 -08:00
Fabian Affolter
b2fae212cb Fix name (#5912) 2017-02-12 11:16:06 -08:00
Greg Dowling
9c400de64b Bump pywemo - fix for latest bridge firmware. (#5921) 2017-02-12 11:14:23 -08:00
Adam Mills
e4bbe37112 Add device_class support to cover component (#5881) 2017-02-12 11:08:06 -08:00
Jose Juan Montes
2103bfc824 Fixed proximity zone incorrectly using name instead of zone setting. (#5862)
* Fixed proximity zone incorrectly using name instead of zone setting.

* Fixed proximity tests to suit change.
2017-02-12 11:03:53 -08:00
Pascal Bach
f8be731891 [google] Update google component dependencies (#5904) 2017-02-12 17:55:17 +00:00
happyleavesaoc
4af9d0f9ea bump myusps version (#5911) 2017-02-12 18:49:02 +01:00
Philipp Schmitt
533d28ce40 [lock.nuki] Fix Nuki lock for Python 3.4 and 3.5 (#5899) 2017-02-12 10:22:55 +00:00
Paulus Schoutsen
b59b42db2c 0.38.1 (#5889)
* Upgrade AppleTV dep to 0.1.4

* Version bump to 0.38.1

* Update logbook in frontend
2017-02-11 19:58:20 -08:00
Paulus Schoutsen
a25e394a11 Upgrade AppleTV dep to 0.1.4 2017-02-11 19:25:20 -08:00
Paulus Schoutsen
44311193ef Add config component and hassbian example panel (#5868)
* Add hassbian panel

* Rename to generic config panel

* Allow loading hassbian as test

* Add tests

* Update frontend

* Lint

* Lint
2017-02-11 17:29:05 -08:00
Robbie Trencheny
2b2c1562a5 Version bump to 0.39.0.dev0 2017-02-11 14:39:35 -08:00
Robbie Trencheny
e0f1c8ac67 Merge pull request #5833 from home-assistant/release-038
Release 0.38
2017-02-11 14:38:12 -08:00
Johann Kellerman
abaf9e53c2 Component set add unsing OR (#5880) 2017-02-11 23:27:06 +02:00
Paulus Schoutsen
5ad934907a Revert "Stop using entity_picture that is known to be bad." (#5882) 2017-02-11 13:10:28 -08:00
Fabian Affolter
88653e66c8 Style updates (#5878)
* Use consts, update quoting, and update comments

* Update log message

* Update docstrings

* Update log messages

* Update log messages

* Update style

* Fix typo

* Add newline

* Fix indent

* Fix line too long
2017-02-11 11:29:37 -08:00
Andrey
b981bfba7e Stop using entity_picture that is known to be bad. (#5856)
* Stop using entity_picture that is known to be bad.

* Only abandon image on 400 or 404 response

* Return is_permanent_failure as a third part of response

* Add debug printout

* Fix lint

* Fix lint
2017-02-11 20:33:41 +02:00
Fabian Affolter
2711c12928 Upgrade psutil to 5.1.3 (#5873) 2017-02-11 14:48:54 +01:00
Petr Vraník
0aad6c72d2 version bump (#5871) 2017-02-11 13:53:45 +01:00
Daniel Høyer Iversen
d32949b099 rfxtrx 0.17 (#5870) 2017-02-11 10:55:38 +01:00
Jose Juan Montes
f5c58748b7 Adds play URL support to mpd (makes it work with tts). (#5863)
* Adds play URL support to mpd (makes it work with tts).

* Removed extra line at the end of the file.
2017-02-11 10:07:31 +01:00
Paulus Schoutsen
3a7309ab62 Update frontend (#5866) 2017-02-10 21:06:42 -08:00
Paulus Schoutsen
d8a34877d4 Version bump to 0.38 2017-02-10 20:55:52 -08:00
Marcelo Moreira de Mello
3fb70afb14 Avoid traceback for Amcrest cameras/firmware that does not have the software_information API call (#5865)
* Avoid traceback for Amcrest cameras/firmware that does not have the software_information API call

* Make lint happy
2017-02-10 20:55:34 -08:00
Johan Bloemberg
bb043c47f8 Rflink update and small refactor. (#5789)
* Use same pattern for device defaults in both platforms.

* Update Rflink that passes loop downstream.

* Update requirements.
2017-02-10 20:55:34 -08:00
Paulus Schoutsen
849ae9903c Recorder run can be None (#5854) 2017-02-10 20:55:34 -08:00
Johann Kellerman
66088377e1 [recorder] Run end model changed in session scope (#5858) 2017-02-10 20:55:34 -08:00
Paulus Schoutsen
0e6ab3ace6 Update frontend (#5855) 2017-02-10 20:55:34 -08:00
Pascal Vizeli
eaa6392535 Fix check_config script. (#5853) 2017-02-10 20:55:34 -08:00
Petr Vraník
a071cd21f2 version bump (#5846)
Add an optional extended description…
2017-02-10 20:55:33 -08:00
Teemu R
0f6aed16a2 bump python-yeelight version (#5850)
Add an optional extended description…
2017-02-10 20:55:33 -08:00
Christian Brædstrup
cee389f621 D-Link switch version bump of external library (#5843) 2017-02-10 20:55:33 -08:00
Andrey
2b62e9f008 Fix zwave helper getter not to fail on some None results. (#5845) 2017-02-10 20:55:33 -08:00
Adam Mills
3d7b79f523 [recorder] Add tests for full schema migration (#5831)
* [recorder] Add tests for full schema migration

* Remove leftover code

* Fix duplicate creation of sqlalchemy Index object

* It's that kind of day...

* Improve models_original docstring
2017-02-10 20:55:33 -08:00
Philipp Schmitt
7bf7c727d1 Refactoring and JSON decode error handling (#5826)
* Refactoring and JSON decode error handling

* Catch ValueError instead of simplejson.scanner.JSONDecodeError
2017-02-10 20:55:33 -08:00
Pascal Vizeli
3f87d28616 Update aiohttp 1.3.1 (#5838) 2017-02-10 20:55:33 -08:00
Pierre Ståhl
7259082de5 Reuse default aiohttp session (#5836) 2017-02-10 20:55:33 -08:00
Pierre Ståhl
60f85b1e09 Handle connection errors when connecting to Apple TVs (#5829)
* Handle connection errors when connecting to Apple TVs

Also bump pyatv to 0.1.2 which fixes a request leak.

* Fix pylint error

* Fix import order
2017-02-10 20:55:33 -08:00
Erik Eriksson
0fdf1391e2 Don't thow exception if connection to server is lost (#5775) 2017-02-10 20:55:33 -08:00
Marcelo Moreira de Mello
75887e6069 Avoid traceback for Amcrest cameras/firmware that does not have the software_information API call (#5865)
* Avoid traceback for Amcrest cameras/firmware that does not have the software_information API call

* Make lint happy
2017-02-10 20:51:19 -08:00
Adam Mills
e877d572f5 binary_sensor sensor_class to entity device_class (#5860)
* binary_sensor sensor_class to entity device_class

* Linter fixes

* Should be it
2017-02-10 20:46:15 -08:00
Johan Bloemberg
67957cbfa8 Rflink update and small refactor. (#5789)
* Use same pattern for device defaults in both platforms.

* Update Rflink that passes loop downstream.

* Update requirements.
2017-02-11 00:24:07 +01:00
Paulus Schoutsen
b10d20bcab Recorder run can be None (#5854) 2017-02-10 12:55:59 -08:00
Johann Kellerman
cbf3a2ecae [recorder] Run end model changed in session scope (#5858) 2017-02-10 22:22:15 +02:00
Paulus Schoutsen
23ff2eb79c Update frontend (#5855) 2017-02-10 09:30:13 -08:00
Paulus Schoutsen
6ffab53377 Core: cleanup timer (#5825)
* Minor core cleanup

* Cleanup timer

* Lint

* timeout with correct loop

* Improve timer thanks to pvizeli

* Update core.py

* More tests
2017-02-10 09:00:17 -08:00
Erik Eriksson
c7c3b30e0a Do not call state if device isn't available (#5835) 2017-02-10 08:59:58 -08:00
Andrey
0b5191a247 Add support for zwave wakeup setting. (#5849)
* Add support for zwave wakeup setting.

* rename wakeup
2017-02-10 08:54:48 -08:00
Pascal Vizeli
4e8d20328a Fix check_config script. (#5853) 2017-02-10 08:51:08 -08:00
Pascal Vizeli
8785e5826e telegram small cleanup/style (#5852) 2017-02-10 16:39:02 +01:00
Teemu R
1da6181491 bump python-yeelight version (#5850)
Add an optional extended description…
2017-02-10 14:45:31 +01:00
Christian Brædstrup
a150a69cca D-Link switch version bump of external library (#5843) 2017-02-10 12:00:28 +01:00
Andrey
5bd54f69cc Fix zwave helper getter not to fail on some None results. (#5845) 2017-02-10 12:30:44 +02:00
Mark Oude Veldhuis
0d76d72b9f Add support for multiple devices to Tado device tracker (#5810)
* Add support for multiple devices to Tado device tracker

* Hound did not agree with my usage of spaces

* Two blank lines were expected

* Keep CONF_HOME_ID in the Tado file

* Make home_id optional

* Work with different API URLs depending on home_id being present

* Remove CONF_HOME_ID from HA's const.py file

* Missed removing CONF_HOME_ID from the import
2017-02-09 18:50:14 -08:00
Boris K
5ecef6aaac Add history_stats sensor (#5610)
* Add new sensor/history_stats component

* Add real unit tests

* Code style changes requested for pull request

* Remove time aliases & allow datetime values

* Reformat unit tests

* Remove all async behavior in history_stats

* Change duration format
2017-02-09 18:47:12 -08:00
Adam Mills
be08bf0ef7 [recorder] Add tests for full schema migration (#5831)
* [recorder] Add tests for full schema migration

* Remove leftover code

* Fix duplicate creation of sqlalchemy Index object

* It's that kind of day...

* Improve models_original docstring
2017-02-09 18:17:17 -08:00
Philipp Schmitt
4c5e6399e9 Refactoring and JSON decode error handling (#5826)
* Refactoring and JSON decode error handling

* Catch ValueError instead of simplejson.scanner.JSONDecodeError
2017-02-09 17:57:19 -08:00
Pascal Vizeli
2e8e5a35b5 Update aiohttp 1.3.1 (#5838) 2017-02-09 17:31:20 -08:00
Pierre Ståhl
841321f154 Reuse default aiohttp session (#5836) 2017-02-09 23:07:46 +01:00
Stefano Scipioni
ebfff6a907 Telegram webhooks (#5793)
* new component telegram_webhooks

* keyboard support in telegram notify

* telegram_webhooks has no tests

* requirement like notify/telegram

* ops, requirements_all.txt needed for travis

* ops, requirements_all.txt is generated by script/gen_requirements_all.py

* check telegram trusted networks in web handler

* raise an event now

* use of hass.config.api.base_url

* more readable

* small cleanups

* Small style change for HA guideline

* fix lint

* revert return to origin
2017-02-09 23:05:28 +01:00
Pierre Ståhl
ecbbb06b2f Handle connection errors when connecting to Apple TVs (#5829)
* Handle connection errors when connecting to Apple TVs

Also bump pyatv to 0.1.2 which fixes a request leak.

* Fix pylint error

* Fix import order
2017-02-09 22:25:06 +01:00
Paulus Schoutsen
c54517de90 Convert config.components to a set (#5824) 2017-02-09 20:21:57 +02:00
Erik Eriksson
f3b9fa2f41 Don't thow exception if connection to server is lost (#5775) 2017-02-09 09:00:18 -08:00
Paulus Schoutsen
e5256ccf1f Merge remote-tracking branch 'origin/master' into dev 2017-02-09 08:54:40 -08:00
John Arild Berentsen
298575f7cb Adding helper for get and set values (#5743)
* cleanup

* Update __init__.py

* Update __init__.py

* Update __init__.py
2017-02-09 13:40:35 +01:00
Paulus Schoutsen
c550a316a4 Make device sun light trigger async (#5823) 2017-02-09 00:10:53 -08:00
Paulus Schoutsen
4398b8b5c6 Deprecate event decorators (#5822) 2017-02-09 00:10:38 -08:00
Pascal Vizeli
2cbed9cd96 Move signal handling out of core to bootstrap (#5815)
* Move signal handling out of core to bootstrap

* Fix tests
2017-02-08 21:58:45 -08:00
Paulus Schoutsen
7eb4bdc37b Upgrade aiohttp to 1.3 (#5821) 2017-02-08 21:27:36 -08:00
Paulus Schoutsen
ebceca36ec Update frontend (#5820) 2017-02-08 20:55:15 -08:00
Paulus Schoutsen
03fe5b04b5 Remove non-working webfont preload (#5819) 2017-02-08 20:31:36 -08:00
Duoxilian
7fa08059dc Support away_mode as permanent hold and hold_mode as temporary hold. (#5725)
* Support away_mode as permanent hold and hold_mode as temporary hold.

* Add comments to explain code better. Remove indefinite hold preference
to be consistent with 'away_mode'.
2017-02-08 20:04:09 -08:00
John Arild Berentsen
fdcf5fe233 Bugfixes (#5740)
* wrong data for lock alarm_type

* missing whitespace

* Not possible to set codes starting with 0
2017-02-08 19:59:47 -08:00
Johann Kellerman
415500de23 [recorder] Protect against running in the event loop (#5812) 2017-02-08 19:58:43 -08:00
William Scanlon
628b169393 Fixed call to object_id() (#5814) 2017-02-08 19:57:58 -08:00
Sean Dague
49f2540730 Enhancements to ARWN platform (#5816)
* Fix arwn platform discover_sensors

The discover_sensors function can return either singletons or a list
of sensors. However the consumer was always expecting a list. This
fixes it to work in both cases.

* Add custom icons to arwn sensors.

This adds some custom icons for different kinds of weather sensors
that the arwn platform returns. Makes it a little easier to see what's
going on.
2017-02-08 19:56:44 -08:00
Teagan Glenn
76db4cc099 Change medium state for filtering (#5817) 2017-02-08 19:55:48 -08:00
Pascal Vizeli
d29b7f6910 Ffmpeg update 1.4 (#5813)
* Pump ffmpeg version

* update entity

* next 1.4
2017-02-08 23:18:23 +01:00
Johann Kellerman
612aa1cf21 Initial (#5811) 2017-02-08 13:16:39 -08:00
Andreas Cambitsis
4f20a2d3ea Upgrade Russound integration to v0.1.7 (#5756)
* Bumped up version to use 0.1.7 of Russound integration module.
Fixed bug arising from not supporting TURN_ON state (fixes issue https://github.com/home-assistant/home-assistant/issues/5012)
Implemented state support in 0.1.7 such that component state is returned from the actual AMP. (Still uses polling model though).
Tested it with home-assitant users @laf (original developer of the module) and @hofsta.  Works fine with their Russounds.

* Made styling / compliance changes and updated correct version of russound module on requirements_all.txt.

* Changed handling of properties to be compliant with https://github.com/home-assistant/home-assistant/issues/4210
(Specifcailly added member variables for state, volume and source to cache these values, and introduced Update() method to set their values).

Now returns None if the selected source index that is returned from russound is greater than the length of the specified source list in the yaml config.
Removed unnecesary comment.

* Removed blank line after docstring.

* Removed updated() in class init and added True paramter to add_devices in setup_platform.

* Dropped the no longer needed self.update()
2017-02-08 15:53:59 -05:00
Teemu R
061985bc65 Add available property and typing hints (#5593)
* light.demo: add available property, add typing hints

* light.demo: keep all lights available, fix init ordering

* Fix issues raised during review

* Update demo.py
2017-02-08 12:13:07 -08:00
Andrey
4b15946a9b Make sure workaround_component is not none (#5808) 2017-02-08 21:11:36 +02:00
Pascal Vizeli
881d53339b [Image_Processing][Breaking Change] Cleanup Base face class add support for microsoft face detect (#5802)
* [Image_Processing] Cleanup Base face class add support for microsoft face detect

* fix lint

* add unittest for micosoft detect

* fix test
2017-02-08 09:19:40 -08:00
Pascal Vizeli
3f82ef64a1 Move core service from core to components (#5787)
* Move core servcie from core to components

* add new handler for signals/exception

* Static persistent id

* Move unittest

* fix coro/callback

* Add more unittest for new services

* Address comments

* Update __init__.py
2017-02-08 09:17:52 -08:00
Daniel Høyer Iversen
08efe2bf6d Improve warning message in template rendering (#5806)
* improve warning message when template is none

* improve error message when template is none

* improve error message when template is none

* improve error message when template is none
2017-02-08 09:07:43 -08:00
Johann Kellerman
db6c166abe Update sma.py (#5807) 2017-02-08 09:07:03 -08:00
George.M
8951e1bdc0 The word router was misspelt (#5803)
fixed as this message is user facing
2017-02-08 12:28:45 +01:00
Pierre Ståhl
250523c1d8 Add discovery suppport to Apple TV (#5801)
Add an optional extended description…
2017-02-08 12:17:23 +01:00
Philipp Schmitt
2dab6cbb0e Mailgun notify service (#5782)
* Mailgun notify service

* Update dependency to version 1.3

- The provided credentials (including the domain) are now checked during
startup, as requested by @balloob
- The domain name is now optional
- There's a new config item "sandbox" which indicates whether to use the
sandboxed domain in case the domain is not set

* Fix a few lint issues

* Disable lint check no-value-for-parameter
2017-02-07 22:22:19 -08:00
Johan Bloemberg
0e6dd39c15 Add support for fluxled discovery. (#5784)
* Add support for fluxled discovery.

* Make use of device type/protocol auto detection.
2017-02-07 21:49:36 -08:00
Johann Kellerman
490ef6afad WIP: [component/recorder] Refactoring & better handling of SQLAlchemy Sessions (#5607)
* Refactor recorder and Sessions

* Cover #4352

* NO_reset_on_return

* contextmanager

* coverage
2017-02-07 21:47:41 -08:00
Paulus Schoutsen
bdebe5d53c Update frontend (#5800) 2017-02-07 21:30:24 -08:00
Adam Mills
ecfe8e0a9a Formalize supported_features as entity property (#5794)
* Formalize supported_features as entity property

* Remove extra emulated_hue conditions

* Generate log message in executor
2017-02-07 20:42:45 -08:00
Jeff Wilson
4fa4d7347f Fix climate.set_fan_mode yaml (#5799) 2017-02-07 20:38:16 -08:00
Andrey
1b54218d46 Create a file for zwave workarounds. (#5798)
* Create a file for zwave workarounds. Add sensor->binary_sensor for fgfs101 (#2)

* Don't use default None
2017-02-07 20:37:11 -08:00
Robbie Trencheny
b8a0792424 Bump netdisco to 0.8.2 2017-02-07 14:11:51 -08:00
Josh Wright
35f6dbc9dc Update python-nest dependency version (#5795)
The nest-cam changes have now been merged into the upstream library, so
there is no need to track a specific branch.

Updating to 3.1.0 also fixes a structure parsing bug I was experiencing.
2017-02-07 22:55:49 +01:00
Fabian Affolter
12bc7c7316 Upgrade pyasn1 to 0.2.2 (#5796) 2017-02-07 22:55:21 +01:00
Pascal Vizeli
acdda1f42b Revert last change on TTS cache load for more speed (#5797) 2017-02-07 22:54:52 +01:00
Martin Hjelmare
45a7c27280 Add mysensors device tracker and platform discovery (#5781)
* Add mysensors device_tracker platform

* Add discovery of device_tracker platforms

* Enable discovery of device_tracker platforms that are not
  DeviceScanner.
* Update signature of setup_scanner function in all affected platforms.
* Add test.
* Use discovery for mysensors device_tracker platform.

* Remove gps accuracy

* Small change to core like schema

* fix depency
2017-02-07 20:47:11 +01:00
Fabian Affolter
c7fd28c10f MQTT discovery (#5724)
* Change implementation

* Re-write

* Remove unused consts

* Update discovery.py

* Add tests

* fix other tests

* Fix check_config script test

* Lint

* Lint
2017-02-07 09:13:24 -08:00
Robbie Trencheny
45507cd9d1 TTS ID3 support (#5773)
* Add support for writing ID3 tags to the file for improved display in media players

* Lint and async fixes

* Use mutagen instead of taglib

* Fix tests

* Add fallback for album

* Requested changes

* move import

* Fix album name

* Change default options handling

* Move to member function / minor fix

* fix style

* fix lint

* change mutagen handling

* fix lint / add name to bytesio

* Update __init__.py

* Fix test, some cleanups

* Add mutagen exeption handling, fix tests

* fix mutagen taging
2017-02-07 12:07:11 +01:00
Trevor
063c0e8f44 Add icon_template to template sensor (#5766)
* Add icon_template to template sensor

* Update test_template.py

* Update test_template.py again

* Update template.py

* Update test_template.py

* Update test_template.py
2017-02-07 01:51:44 -08:00
Trevor
f0da576315 Fix Hue groups with same names (#5737)
* Revert "Fix hue lightgroups not syncing state (#5702)"

* Use light_id in unique_id for Hue groups

* Make sure HueLight unique_id is unique

* Update hue.py

* Update hue.py

* Update hue.py
2017-02-07 01:51:05 -08:00
andrey-git
f774538e66 Check config before restarting (#5609)
* Check config before restarting.

* Make check_config on restart async

* don't check if notification service exists

* Use .communicate()

* Reduce the number of notifications. Add tests.
2017-02-07 01:19:08 -08:00
Hermann Kraus
51810620fb Check for command topics when determinig the capabilities of an MQTT light. (#5770)
Previous code used the state topic which is obviously wrong:
- The state topic is already used to select optimistic mode.
- A light with only the state topic but no command topic would still announce the capability.
2017-02-07 01:13:00 -08:00
Pierre Ståhl
c7e282257a Initial support for Apple TV (#5698)
* Initial support for Apple TV

* hash_wip

* Add media_play support to Apple TV
2017-02-07 00:55:19 -08:00
Jesse Osiecki
9a2c84ee8a Added error checking to the MIMEImage encoding for smtp.py (#5753)
* Added error checking to the MIMEImage encoding for smtp.py

Added fallback to file attachment rather than inline image for images
without a known MIME

* PEP8 reqs to fix previous commit
2017-02-07 00:43:03 -08:00
Alessandro Mogavero
86da4f511d Improve Sky Hub error handling (#5762)
* Added error handling in function _get_skyhub_data

* Error line split for readability
2017-02-07 00:28:33 -08:00
Pascal Vizeli
48161697f8 Sonos fix favorite, coordinator, cleanup update (#5778)
* Sonos fix favorite, coordinator, cleanup update

* Bugfix snapshot restore
2017-02-07 00:27:55 -08:00
Stéphane Bidoul (ACSONE)
7927a6b588 add min and max jinja filters (#5765) 2017-02-07 00:25:47 -08:00
ray0711
1546ec7778 Fix brightness slider for mqtt template lights (#5780)
Add the missing supported_features declaration.
2017-02-07 09:52:07 +02:00
Marcelo Moreira de Mello
305d2612cf Fix attribute error for media_player/roku if roku device is unreachable and shows a persistent notification (#5785) (#5786) 2017-02-06 22:00:20 -08:00
Andrzej
34c7bac9b4 Update package.py (#5783) 2017-02-06 22:16:17 +01:00
Pascal Vizeli
2b124a008c Migrate lock component to async (#5748) 2017-02-06 21:25:34 +01:00
Alberto Arias Maestro
32dc276c53 Add support for position on wink cover (#5751)
Add support for position property for wink covers and fix state when stopped in the middle.
2017-02-06 15:43:36 +02:00
Adrián López
4cc711357a Allow to use data for enhanced messages (#5763)
Add notification data field to the message send to Facebook.
Allows to construct richer messages like cards, quick replies, attach
images, videos, etc
2017-02-06 14:01:41 +01:00
andrey-git
26a3ecc9d0 Merge pull request #5718 from benvm/modbus_write_register_array
Modbus write_register doesn't accept list
2017-02-06 13:55:48 +02:00
Johan Bloemberg
264bdc9d56 Make brightness display work for rgb devices. (#5675)
* Make brightness display work for rgb devices.

Non rgbw devices return 255 for getWarmWhite255. This is part 2 to make the brightness slider work for these devices.

https://github.com/Danielhiversen/flux_led/pull/25

* Query brightness property which return WW level or RGB brightness equivalent.

https://github.com/Danielhiversen/flux_led/pull/25
2017-02-06 11:32:51 +01:00
Daniel Høyer Iversen
150c8ac11c flux led o.13 (#5774) 2017-02-06 11:32:37 +01:00
Yannic-HAW
4a341ff55f - added send packet service to send ir packets directly from scripts (no need to define a switch for each command) (#5768)
- changed ip suffix of SERVICE_LEARN to use _ instead of . as ip seperator to avoid errors if used in yaml
2017-02-06 07:53:58 +01:00
Martin Hjelmare
0d89f2bc69 Update mysensors sensors (#5764)
* Add V_DIRECTION type for S_WIND.
* Add more predefined units of measurement.
2017-02-05 21:07:30 +01:00
Pascal Vizeli
2a139d6bc7 Add unittest for multible entities in one line (#5759) 2017-02-05 14:24:38 +01:00
Fabian Affolter
91bebca0b6 Upgrade pysnmp to 4.3.3 (#5757) 2017-02-05 11:22:32 +01:00
Philipp Schmitt
573fc651dc Store the key file in the config dir (#5732)
* webostv: Store the key file in the config dir

* Update the pylgtv source to use the repo by @TheRealLink

* Add missing config parameter
2017-02-05 10:39:04 +01:00
Fabian Affolter
d88c903537 Upgrade pyasn1 to 0.2.1 (#5755) 2017-02-05 10:16:57 +01:00
Martin Hjelmare
82c99f81fc Fix validation of serial port on windows (#5749)
* Fix validation of serial port on windows

* Use pyserial to check serial ports.
* Check that persistence file ends with either `.json` or `.pickle`.

* Change fix to not rely on pyserial

* Use generator expr instead of list comprehension
2017-02-04 21:54:20 -08:00
Fabian Affolter
02dfd9660e Upgrade zeroconf to 0.18.0 (#5746) 2017-02-04 20:52:11 +01:00
Fabian Affolter
6164b61e14 Upgrade psutil to 5.1.2 (#5745) 2017-02-04 20:51:49 +01:00
Fabian Affolter
4cb20ce6d9 Upgrade astral to 1.3.4 (#5744) 2017-02-04 20:51:22 +01:00
Joeboyc2
0ea81c1269 Change CONF_DEFAULT_COLOR CV type (#5700)
* Change CONF_DEFAULT_COLOR CV type

Changed  vol.Optional(CONF_DEFAULT_COLOR, default=DEFAULT_COLOR) from cv.string to cv.ensure_list

This allows the optional parameter default_color to be picked up correctly and to function

the option needs to be specifed as follows:

    default_color: [0,255,0]

Solution provided by @scossa2020 in issue #5338
https://github.com/home-assistant/home-assistant/issues/5338

* Update hyperion.py
2017-02-03 23:36:25 -08:00
Fabian Affolter
b29c167dde Upgrade psutil to 5.1.1 (#5736) 2017-02-03 09:09:14 -08:00
William Scanlon
25a68f3ce9 Update python-wink version (#5734) 2017-02-03 16:37:00 +01:00
Fabian Affolter
c0dcef6c3e Add wind bearing (#5730) 2017-02-03 09:44:07 +01:00
Fabian Affolter
6786f83c26 Upgrade pyowm to 2.6.1 (#5729) 2017-02-03 09:43:29 +01:00
Philipp Schmitt
7506569db9 Support for the Orange Livebox Play TV appliance (#5533)
* Support for the Orage Livebox Play TV appliance

* Add liveboxplaytv to coveragerc

* Minor refactoring

* Update requirements

* Adjust comments

* Fix alignment

* Fix some coding-style issues highlighted by Travis CI

* The livebox play TV does not support playing media

* Lint: shorten line

* Remove unused callback function

* Remove redundant backslash

* Implement changes requested by balloob

* Don't error out if channel name or media url could not be retrieved

* Support current program (media title property)

* Remove unnecessary check

* Clean up: Remove another unnecessary check, _CONFIGURING variable and _playing attribute

* Update liveboxplaytv dependency to version 1.4.4

* Fix liveboxplaytv requirement

* Improve media state (support for playing and pause state)

* Update liveboxplaytv.py
2017-02-02 23:52:52 -08:00
Fabian Affolter
f9ede73a55 Add moon sensor (#5726)
* Add moon sensor

* Update moon.py
2017-02-02 23:43:03 -08:00
Joseph Piron
4aa7f030e8 Adds average load to systemmonitor (#5686)
* Adds average load to systemmonitor

* split the values in 3 sensors

* hound ok
2017-02-02 23:33:15 -08:00
Wolf-Bastian Pöttner
e831a2705e Add support for FRITZ!DECT wireless switches based on fritzhome (#5541) 2017-02-02 23:29:18 -08:00
Ryan Kraus
537355924f Alert Component (#5201) 2017-02-03 07:20:51 +02:00
miniconfig
dbc2f6b9cd Merge pull request #5658 from miniconfig/openevse
Added new sensor component to monitor OpenEVSE chargers.
2017-02-02 23:52:11 -05:00
Adam Mills
6a64e79d7b [recorder] Index events time_fired to improve logbook performance (#5633)
* Index events time_fired to improve logbook perf.

* Updated implementation to track schema versions

* Added tests for schema migration support logic

* Rename check_schema to migrate_schema
2017-02-02 22:04:14 -05:00
miniconfig
4b62a0d924 Updated openvse sensor component to use new structure of openevsewifi library. 2017-02-02 21:46:35 -05:00
Valentin Alexeev
dfb991ce19 Bump pwaqi to 1.4 to fix a typo in the underlying library. (#5716) 2017-02-02 12:59:52 -08:00
Pascal Vizeli
f63874eb8c Migrate cover to async. (#5717) 2017-02-02 12:39:13 -08:00
Colin O'Dell
bc65452efb QNAP Sensor (#5666)
* Implement the QNAP sensor

* Add sensors immediately

* Remove unnecessary check

* Use CONF_SSL instead of CONF_PROTOCOL
2017-02-02 12:29:04 -08:00
Pascal Vizeli
2fc3dfff67 Migrate fan component to async. (#5723)
* Migrate fan component to async.

* Fix lint
2017-02-02 12:07:00 -08:00
Daniel Høyer Iversen
574384f446 update miflora lib and allow specification of bluetooth adapter (#5720) 2017-02-02 17:08:10 +01:00
Daniel Høyer Iversen
ee551e2a9c up rfxtrx lib (#5721) 2017-02-02 16:18:16 +01:00
Duoxilian
219337a574 Cleanup climate and ecobee (#5616)
* Remove redundant input validation which is already accomplished through
defined schemata.

* Rely on defined state attributes for hold mode.

* Remove misleading comment. This comment seems to assume that sleep
mode is a hold; it is a schedule instead. The code snippets in the
comment could never work.

* Remove use of constants for hold mode. Will be made irrelevant
by a planned change by nordlead2005.
2017-02-02 15:28:32 +01:00
Philipp Schmitt
ff65c2a114 Support for Nuki.io smart locks (#5715)
* Support for Nuki.io smart locks

* Update requirements and add lock.nuki to .coveragerc

* lint: Re-organize imports

* Schedule a state update instead of calling directly update_ha_state

* Remove update requests altogether

* Make sure there is no IO inside properties

* Fix: nuki lock are all initialized as "lock.unnamed_device"

* Update pynuki to 1.2 to avoid an extra REST API call for each lock init
2017-02-02 15:15:27 +01:00
Ben Van Mechelen
0ea9d935af Modbus write_register accept list 2017-02-02 10:23:13 +01:00
William Scanlon
80a794e587 Wink AC and addidtional sensor support (#5670)
* Added door bell sensors

* Initial support for AC units.

* Added new device service

* Quirky Aros AC unit support

* Use super() everywhere and error checking for token request.

* Ignore camera sensors during setup of alarms.

* Added manufacturer/device attributes to all wink devices.

* Fixed style errors

* Fixed remaining lint errors.
2017-02-01 22:43:12 -08:00
Trevor
b5f285a789 Fix OwnTracks state names (#5454)
* Fix OwnTracks state names (#5453)

* Update owntracks.py

* Update tests
2017-02-01 22:06:02 -08:00
Paulus Schoutsen
6e94f0d7cd Upgrade zeroconf dep" (#5706) 2017-02-01 21:48:30 -08:00
Pascal Vizeli
eefb603f17 Cleanup media_player universal platform / blocking platform. (#5671)
* Cleanup media_player universal platform / blocking platform.

* fix comments

* fix unittest

* fix lint

* fix unittest lint

* fix coro

* fix test

* fix tests part 2
2017-02-01 21:45:19 -08:00
Pascal Vizeli
10a104271e Cleanup climate platform for async update_ha_state / migrate generic thermostat (#5679)
* Cleanup climate from blocking stuff / migrate generic

* Migrate generic thermostat

* fix tests

* fix lint
2017-02-01 21:44:05 -08:00
Paulus Schoutsen
686c8466a0 Merge pull request #5707 from home-assistant/release-0-37-1
0.37.1
2017-02-01 21:34:52 -08:00
Paulus Schoutsen
181943e139 Version bump to 0.37.1 2017-02-01 21:19:45 -08:00
Trevor
e05c1bc160 Fix hue lightgroups not syncing state (#5702) 2017-02-01 21:19:28 -08:00
Johan Bloemberg
96745abf5d Prevent infinite loop in crossconfigured mqtt event streams (#5624)
* Prevent events about MQTT messages received to cause infinite loop when two HA instances are crossconfigured for mqtt_eventstream.

* Fix linting

* Publish all MQTT received events except incoming from eventstream. Also make it configurable.
2017-02-01 21:19:28 -08:00
John Arild Berentsen
17c4f4d391 [lock.zwave] Bugfix Zwave lock (#5619)
* Bugfix state

* remove debug
2017-02-01 21:19:28 -08:00
Pascal Vizeli
9ed8ee1261 Bugfix sonso source input (#5699) 2017-02-01 21:19:28 -08:00
Pascal Vizeli
df7ca22656 Fix bug for UNREACH devices / Variable handling and update. (#5689)
* Fix bug for UNREACH devices / Variable handling and update.

* fix track_time

* update after data after creation

* add message output

* change unreach

* change unreach code

* Revert "change unreach code"

This reverts commit f58430de3c.

* update pyhomematic
2017-02-01 21:19:28 -08:00
Hugo Dupras
9716cd3f48 Hotfix for netatmo cameras (#5644)
* Fix for missing netatmo tags in 0.37

Also fix issue with SSL certificate for vpn_url

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Netatmo welcome: vpn_url can be empty

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* add config floag to disable SSL verification for vpn_url

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Import CONF_VERIFY_SSL from const
2017-02-01 21:19:28 -08:00
Pascal Vizeli
6ee7878236 Bugfix async blocking loop with xml parser. (#5694) 2017-02-01 21:19:28 -08:00
Pascal Vizeli
bc7fd5611e Bugfix sonos group coordinator (#5691)
* Bugfix sonos group coordinator

* Fix tests
2017-02-01 21:19:28 -08:00
Erik Eriksson
27a91b357e Upgraded tellduslive (#5664) 2017-02-01 21:19:28 -08:00
Marcelo Moreira de Mello
26d0fd772b Fixes issue #5627 by bumping external Amcrest module to version 1.1.4 (#5662)
Add an optional extended description…
2017-02-01 21:19:27 -08:00
Daniel Høyer Iversen
a168bf64b6 bug fix in hue (#5623) 2017-02-01 21:19:27 -08:00
David-Leon Pohl
db09ef0a6f Fixes: Pilight Switch rejects alphanumeric IDs #5119 (#5601) 2017-02-01 21:19:27 -08:00
Trevor
647a93801c Fix hue lightgroups not syncing state (#5702) 2017-02-01 21:06:11 -08:00
Johann Kellerman
2fcaf8bda6 [sensor/sma] handle units correctly (#5657) 2017-02-01 21:01:06 -08:00
Johan Bloemberg
ae1f59970d Prevent infinite loop in crossconfigured mqtt event streams (#5624)
* Prevent events about MQTT messages received to cause infinite loop when two HA instances are crossconfigured for mqtt_eventstream.

* Fix linting

* Publish all MQTT received events except incoming from eventstream. Also make it configurable.
2017-02-01 21:00:05 -08:00
John Arild Berentsen
68d6bcd3ed [lock.zwave] Bugfix Zwave lock (#5619)
* Bugfix state

* remove debug
2017-02-01 20:57:57 -08:00
Pascal Vizeli
b2180fba63 Bugfix sonso source input (#5699) 2017-02-02 00:02:24 +01:00
Pascal Vizeli
b5b1d72ab6 Fix bug for UNREACH devices / Variable handling and update. (#5689)
* Fix bug for UNREACH devices / Variable handling and update.

* fix track_time

* update after data after creation

* add message output

* change unreach

* change unreach code

* Revert "change unreach code"

This reverts commit f58430de3c.

* update pyhomematic
2017-02-01 23:55:16 +01:00
Daniel Høyer Iversen
2a5ccff82e up rfxtrx lib (#5687) 2017-02-01 19:47:18 +01:00
Paulus Schoutsen
bdc62730bd Update frontend (#5696) 2017-02-01 09:03:35 -08:00
Hugo Dupras
676519d0cb Hotfix for netatmo cameras (#5644)
* Fix for missing netatmo tags in 0.37

Also fix issue with SSL certificate for vpn_url

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Netatmo welcome: vpn_url can be empty

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* add config floag to disable SSL verification for vpn_url

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Import CONF_VERIFY_SSL from const
2017-02-01 17:33:32 +01:00
Pascal Vizeli
a72d32b9af Bugfix async blocking loop with xml parser. (#5694) 2017-02-01 17:20:52 +01:00
Pascal Vizeli
32f8622bba Bugfix sonos group coordinator (#5691)
* Bugfix sonos group coordinator

* Fix tests
2017-02-01 16:53:02 +01:00
Johan Bloemberg
cabc4dff03 Use same pattern for device defaults in both platforms. (#5682) 2017-02-01 10:42:50 +01:00
Paulus Schoutsen
987f59e8d8 Update frontend (#5685) 2017-02-01 00:47:02 -08:00
Johan Bloemberg
7be3414785 Only set LANG=C.UTF8 during install. (#5648) 2017-01-31 19:30:53 -08:00
Paulus Schoutsen
8334bc908c Update frontend (#5683) 2017-01-31 19:29:07 -08:00
Michaël Arnauts
8247acb7b9 Move docker installation scripts to virtualization/Docker path. Splits out openalpr to seperate script. (#5676) 2017-01-31 19:02:06 -08:00
Erik Eriksson
89ec752064 Upgraded tellduslive (#5664) 2017-01-31 11:08:11 -08:00
Mathew Peterson
d65f07860c Refactors script/setup_docker_prereqs (#5506)
* Refactors script/setup_docker_prereqs

Refactors script/setup_docker_prereqs to allow toggling of packages
to being installed

* Adds support for openalpr to Docker

* Updates Dockerfile

Comments ENV directives in order to preserve cache.

* Fixes incorrect position of echo

* Fixes telldus installer by updating apt before pkg install
2017-01-31 18:11:51 +01:00
Johan Bloemberg
bbda2a72f4 Rflink 433Mhz gateway platform and components (#4547)
* Initial sketches of rflink component.

* Add requirement.

* Properly load configuration.

* Bump rflink for graceful parse errors and protocol callback.

* Cleanup, documentation and linting.

* More documentation, first sensor implementation (temp & hum).

* Add brightness/dim support for newkaku protocol.

* Use separate class for dimmables.

* Make sure non-dimmable newkaku devices are turned on.

* Move some code around, add switches. Support loading from config.

* Fix bug in ignoring devices.

* Fix initial state assumption.

* Improve reliability on invalid conditions.

* Allow configuration of group for new devices.

* Sensor icons.

* Fix parsing negative numbers.

* Correct icon.

* Allow sending commands serial.

* Pluralize.

* Allow adding sensors from config.

* Fix ignoring devices and bugs in previous commit.

* Share know devices so devices from configuration don't get added as lights.

* Lookup unit from value_key.

* Remove debug.

* Start implementing event protocol in place of packet protocol.

- Added first test suite for sensors.
- This currently breaks light and switch.

* Refactor switch component to fit new rflink changes. Add test suite.

* Fix style.

* Refactor and test lights. Bring coverage to 100%.

* Use non-broken and production tested rflink module.

* Update requirements.

* Bump for logging.

* Improve readability.

* Do not use global variable but keep known device state in intended place.

* Improve docs.

* Make icon support generic.

* Disable overriding icons in config, as it belongs in customization. Only keep custom icon for entities that are able to detect a icon based on the thing they represent (sensors in this case).

* Implement configuration schema, overall refactor of magic values.

* Fix bug in config/test wait_for_ack.

* Small refactors.

* Move command logic into separate class.

* Convert command sending logic to class based pattern instead of using the event bus.

* Start not using bus for rflink event propagation to platforms.

* Do not use event bus for all entity types.

* Fire an event on the bus for every switch incoming rflink command.

* Resolve lint errors, remove some old code.

* Known devices no longer need to be registered separately.

* Log bus events.

* Event callback is a..... callback.

* Use full entity id for events.

* Move event sending to entity.

* Log incoming events.

* Make firing events optional inline with rfxtrx.

* Add foundation for signal repetition.

* Add signal repetition config and tests.

* Make plain switchable type explicitly configurable.

* Enable default entity settings for automatically added entities as well.

* Prevent default configuration leaking accross entities.

* Make sure device defaults don't get overwritten by defaults further down.

* Don't let fast state switching and repetitions turn your house into a disco.

* Make repetitions more responsive.

* Disable on/off fallback on dimmables as it currently doesn't play nice with repetitions.

* Use rflink that allows send_command_ack to be safely cancelled.

* Reduce duplication and make repeat work for non-ack.

* Implement reconnection logic.

* Improve reconnection logic.

* Also cancel repetitions when entity state is changed due to external command.

* Update requirements.

* Fix linting.

* Fix spelling.

* Don't lie.

* Fix lint.

* Support for automatically creating protocol translation (fixes spaces in device names).

* Returned support for dimmable and on/off entity.

* Duplicate code to fix linting issues with inheritance.

* Allow overriding unit of measurement from config.
2017-01-31 08:11:52 -08:00
Johan Bloemberg
9925b2a8e0 Load mqtt_eventstream before any other component. (#5629)
This ensures that initial state changes for components are broadcasted on the MQTT bus.
2017-01-31 08:02:28 -08:00
Michaël Arnauts
b080ae154c Add devices detected by ping as SOURCE_TYPE_ROUTER instead of GPS (#5625) 2017-01-31 08:01:14 -08:00
Adrián López
14f8bc26d1 Voice command API.AI. First import (#5462)
* Voice command API.AI. First import

* Fixes suggested by hound

* Fixing comments

* Fix pylint and pydocstyle errors

* Change how speech is defined

Also clean some unused constants, remove card type (not used), define
a message when action is not defined and improve the message when
action is unknown.

* Change how speech is defined

Clean some constants.
Improve error messages.
Delete card type, not used.

* Tests for new Api.ai component

* Use async_add_job to python compatibility. New test to measure response time

* Add async_action option to choose between waiting or not for the action to execute

* Travis-ci needs more time

* Removed timeout tests

* Removed timeout tests

* Added apiai to .coveragerc as specified by PR doc
2017-01-31 07:54:54 -08:00
Pascal Vizeli
88d9d787a6 Add unittests for FFmpeg and spliting binary sensor (#5659)
* Spliting ffmpeg binary sensor and move service to component.

* unittests for component

* add unittest for binary_sensor

* exclude camera for tests
2017-01-31 07:48:03 -08:00
Paulus Schoutsen
9ae574c7d9 Update frontend (#5669) 2017-01-31 07:39:01 -08:00
Daniel Høyer Iversen
29816f3041 Vlc (#5665)
* vlc default name
2017-01-31 13:51:02 +01:00
Teemu R
5f0138f8e4 new yeelight backend lib, new features (#5296)
* initial yeelight based on python-yeelight

* adapt yeelight's discovery code & suppress exceptions on set_default

* Support flash & code cleanups

Adds simple pulse for flashing, needs to be refined.
This commit also includes changing transition from seconds to milliseconds,
and cleans up the code quite a bit.

* cleanup code, adjust default transition to 350

* bump required version to 0.0.13

* Cleaning up and marking todos, ready to be reviewed

* Renamed back to yeelight.
* Removed effect support for now until we have some sane effects available.
* Add "breath" notification for flash, currently hidden behind a False check due to unknown issue not accepting it.
* TODO/open points are marked as such.

* Fix a typo in rgb calculation

* yeelight_<bulbtype>_<mac> for autodetected bulbs

hostname from mdns seems to vary

* Lint fixes, add music mode, fix flash

* Flash transforms now to red and back
* Fix lint warnings
* Add initial music mode.

* remove unused mode logging, move set_mode to turn_on

* Add save_on_change configuration variable

* yeelight: check if music mode is on before enabling it.

* Fix linting, bump required python-yeelight version

* More linting fixes, use import when needed instead of saving the module handle

* Use OR instead of + for features assignment

* Fix color temperature support, convert non-rgb values to rgb values in rgb()

* Fix typo on duration, thanks @qzapwy for noticing

* yeelight: fix issues from review, behave when not available

* Implement available()
* Fix transition to take seconds instead of milliseconds
* Fix default configuration for detected bulbs
* Cache values fetched in update()
* Add return values for methods

* yeelight: kwarg-given transition overrides config, slight cleanups

* change settings back to optional, request update when calling add_devices

* As future version of python-yeelight will wrap exceptions, we can handle broken connections more nicely.

* bump yeelight library version

* Remove unused import

* set the default only when settings are changed and not, e.g., when turned on by automation

* update comment & fix linting
2017-01-31 10:01:11 +01:00
Teemu R
2c31e3ea8c Cleanup modes & available, bump version requirement (#5606)
* Cleanup modes & available, bump version requirement

* check for Noneness on available
2017-01-31 09:23:05 +01:00
Marcelo Moreira de Mello
976cd545fe Fixes issue #5627 by bumping external Amcrest module to version 1.1.4 (#5662)
Add an optional extended description…
2017-01-31 09:19:49 +01:00
Adam Mills
7f3ee8a83c [docker] cec install path fixed upstream (#5651) 2017-01-30 21:27:20 -05:00
miniconfig
495b0667e9 Added new sensor component to monitor OpenEVSE chargers equipped with the WiFi Kit. 2017-01-30 15:29:56 -05:00
Daniel Høyer Iversen
3b32afda01 bug fix in hue (#5623) 2017-01-30 09:20:35 -08:00
Daniel Høyer Iversen
3a1607500e Add set_options_service for input select (#5630) 2017-01-30 09:17:57 -08:00
Matt N
1bf3eba603 yarn setup_js_dev was deleted (#5639) 2017-01-30 09:15:26 -08:00
Fabian Affolter
ab019b9747 Upgrade slacker to 0.9.40 (#5650) 2017-01-30 09:14:00 -08:00
Paulus Schoutsen
55992468b0 Update frontend (#5652)
* Return empty result when history date is in future

* Update frontend
2017-01-30 09:12:07 -08:00
Fabian Affolter
87764a51ba Use device_state_attributes() for platforms (#5649)
* Use device_state_attributes() for platforms

* Update test

* Fix lint issue
2017-01-30 16:16:49 +01:00
Pascal Vizeli
ca558f6485 Add unittest for cleanup not validate ssl stuff. (#5643) 2017-01-30 13:09:36 +01:00
Paulus Schoutsen
f1d1f7d032 Update frontend (#5642) 2017-01-30 00:57:13 -08:00
Paulus Schoutsen
c8ff1094f8 Update frontend (#5640) 2017-01-30 00:20:51 -08:00
Paulus Schoutsen
318f3c9625 Update frontend (#5638)
* Ensure fonts get loaded quicker

* Update frontend
2017-01-29 23:26:35 -08:00
Paulus Schoutsen
da4f402ebe Update frontend (#5637) 2017-01-29 18:43:39 -08:00
Paulus Schoutsen
b5047bbaad Prioritize core.js (#5636)
* Prioritize loading app core script

* change app skeleton to be small
2017-01-29 18:36:48 -08:00
Pascal Vizeli
847a5a064d Aiohttp client unittest (#5635)
* add test for cleanup

* add test for mjpeg stream
2017-01-29 16:15:40 -08:00
Pascal Vizeli
261ffbbfea Move part of image_processing tests (#5634)
* Move part of image_processing tests

* fix lint
2017-01-29 14:40:37 -08:00
Martin Hjelmare
24f828d7eb Fix mysensors RGB and W light turn on (#5608)
* RGBW light needs a white value defined.
* Log error if V_RGB is not 6 characters and V_RGBW not 8 characters.
2017-01-29 12:59:13 +01:00
Kyle Hendricks
fddab7f2b4 Fixes the AsusWRT ip neigh regex to handle the possible IPv6 "router" flag (#5605)
See the last line here: http://linux-ip.net/gl/ip-cref/ip-cref-node62.html
2017-01-29 09:37:59 +01:00
David-Leon Pohl
a9325ea663 Fixes: Pilight Switch rejects alphanumeric IDs #5119 (#5601) 2017-01-28 17:49:16 -08:00
Fabian Affolter
5ae5d9b576 Upgrade rpi-rf to 0.9.6 (#5611) 2017-01-28 17:05:24 -08:00
Paulus Schoutsen
e32f933cb6 Version bump to 0.38.0.dev0 2017-01-28 15:13:59 -08:00
Paulus Schoutsen
46aa2e7ce1 Merge pull request #5530 from home-assistant/dev
0.37
2017-01-28 15:13:43 -08:00
Paulus Schoutsen
8bcb26b90c Version bump to 0.37 2017-01-28 15:13:17 -08:00
Johann Kellerman
b48a7e4007 Bugfix customize (#5613) 2017-01-28 23:52:30 +01:00
Robbie Trencheny
0f939d6906 Merge pull request #5580 from fakezeta/Added_notify.twilio_call
Added notify.twilio_call component for Voice calling with Twilio
2017-01-28 13:57:18 -08:00
Robbie Trencheny
b7bb31cb95 Allow both http and https URLs 2017-01-28 12:46:34 -08:00
Robbie Trencheny
379ae11405 Minor style fixes 2017-01-28 12:45:52 -08:00
Robbie Trencheny
8f418831a1 Update Twilio SDK version 2017-01-28 12:45:32 -08:00
andrey-git
1fb372ffdb Apply new customize format to Zwave (#5603) 2017-01-28 22:29:51 +02:00
Robbie Trencheny
405b2fdfa0 Correct project year, update license 2017-01-28 12:29:09 -08:00
Robbie Trencheny
1aa1074054 Update LICENSE.md and CLA.md to reflect the new Apache 2.0 license 2017-01-28 12:12:34 -08:00
Paulus Schoutsen
b0d07a414b Token tweaks (#5599)
* Base status code on auth when entity not found

* Also allow previous camera token

* Fix tests

* Address comments
2017-01-28 11:51:35 -08:00
Fabian Affolter
e1412a223c Update docstring (quotes, links, content) (#5602) 2017-01-28 16:02:19 +01:00
Teemu R
72bc8fc5bf eq3btsmart: add reporting for availability (#5594)
* eq3btsmart: add reporting for availability

* Update eq3btsmart.py
2017-01-27 23:52:46 -08:00
jeremydk
b7aba525ca Emulated Hue "host-ip" fails to bind when running in docker without --net=host (#5550)
* UPNP changes to allow a separate advertised IP and Port.

* Fixing lint.

* UPNP changes to allow a separate advertised IP and Port.

* Fixing lint.

* Update __init__.py

* Moved logic for advertised ip and port into config class.

* Commenting change for clarity.

* Spacing changes for PEP8

* Spacing Changes for PEP8

* Style Changes
2017-01-27 23:42:37 -08:00
Craig J. Ward
6ede1c08ca Insteon config (#5595)
* only check for devices when not defined in config

* lint

* performance fix
2017-01-27 23:31:36 -08:00
Paulus Schoutsen
b4c3de3215 Fix switch.tplink doing I/O in event bus (#5589)
* Fix switch.tplink doing I/O in event bus

* Update tplink.py
2017-01-27 22:45:57 -08:00
fakezeta
564aad0ab8 Removed Regexp and added error logging 2017-01-28 01:35:54 +01:00
fakezeta
549c3b2c84 Minor changes to pass lint check 2017-01-28 01:06:01 +01:00
fakezeta
db85e2bc2a Checking message if valid url or a string for TTS 2017-01-28 00:51:30 +01:00
Duoxilian
b732174def Hold mode (#5586)
* Initial commit of hold_mode feature.

* Added deprecation warning for climate.away_mode

* Add tests to demo environment.
2017-01-27 08:57:18 -08:00
Pascal Vizeli
1d4e967106 sonos set coordinator after join/unjoin (#5584)
* sonos set coordinator after join/unjoin

* fix unittest
2017-01-27 15:37:16 +01:00
Lukas
5a7a84fad1 Device Tracker for Linksys Access Points (#4933)
* Implementation for Linksys Access Points

* update .coveragerc

* update requirements

* add default timeout of 10sec

* address lint issues
2017-01-26 23:27:29 -08:00
Teemu R
86dfa7ad25 [switch.flux] Allow disabling setting the brightness (#5407)
* flux: allow disabling setting the brightness

* Use separate boolean for disabling brightness adjustment

* Update flux.py
2017-01-26 23:08:08 -08:00
Paulus Schoutsen
4aab72fe7c Update MDI 2017-01-26 22:59:32 -08:00
Paulus Schoutsen
5948b5e33a Update frontend 2017-01-26 22:59:13 -08:00
Pascal Vizeli
4831f57834 Bugfix sonos / refactor of sonos function for TTS (#5571)
* Bugfix sonos / refactor of sonos function for TTS

* fix unittest

* update service yaml

* restore group of a coordinator

* use group function to evaluate

* fix state flooting

* fix comments
2017-01-26 22:50:36 -08:00
Jan Losinski
41218e5a37 [switch.pilight] Implement echo config option (#5056)
* Implement echo config option for pilight

Pilight switches can get a receive code configured. If so they act on
received codes. In the current implementation "act on" means not only
to set the internal state, but also to send the code again. If the
receiver is directly parred with the switch, to act even if HA is not
running, this causes it to receive the signal twice because the HA
sends it again.

In my case this causes a dimmer to start dimming until I hit the switch
again.

This implements a "echo" argument for the receive codes that let the
user choose if a received signal should result in any sending or not.
If not, only the status of pilight will be updated.

The echo option defaults to True, as this was the default since now.
Simply set it to halse to disable this behaviour.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Add documentation to set_state in switch/pilight.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2017-01-26 22:40:14 -08:00
nordlead2005
837994196e Added forecast support to DarkSky (#5264)
* Added forecast support to DarkSky

	modified:   homeassistant/components/sensor/darksky.py
	modified:   tests/components/sensor/test_darksky.py

* Fix async_volume_up / async_volume_down (#5249)

async_volume_up / async_volume_down should be async versions of
volume_up / volume_down, not a async version of the default variants of
volume_up / volume_down.

The previous code always called into the mediaplayers set_volume_level,
and never into volume_up / volume_down.

Signed-off-by: Anton Lundin <glance@acc.umu.se>

* adding a default icon "blind" to a PowerView blinds scene. (#5210)

* adding a default icon "blind" to a PowerView blinds scene.

* Adding icon property to define blind icon. Removed it from the state attributes dict.

* fixing lint error

* Added forecast support to DarkSky

	modified:   homeassistant/components/sensor/darksky.py
	modified:   tests/components/sensor/test_darksky.py

* Use SHA hash to make token harder to guess (#5258)

* Use SHA hash to make token harder to guess

Use hashlib SHA256 to encode object id instead of using it directly.

* Cache access token

Instead of generating a token on the fly cache it in the constructor.

* Fix lint

* Bugfix async device_tracker see callback (#5259)

* Add support for NAD receivers (#5191)

* Add support for NAD receivers

* remove self.update() in various methods

* remove setting attributes in various methods

* Change import to hass style

* Updated Config Validation, extended daily forecast to all supported types

* Fix style errors from previous commit, fix test since adding daily for all supported types

* Removed temperature from daily as it isn't supported

* Added forecast support to DarkSky

	modified:   homeassistant/components/sensor/darksky.py
	modified:   tests/components/sensor/test_darksky.py

* Updated Config Validation, extended daily forecast to all supported types

* Fix style errors from previous commit, fix test since adding daily for all supported types

* Removed temperature from daily as it isn't supported

* Revert "Bugfix camera streams (#5306)"

This reverts commit 4b43537801.

Revert "Version bump for kodi dependency (#5307)"

This reverts commit 6abad6b76e.

Revert "Add HMWIOSwitch to sensor, binary (#5304)"

This reverts commit 2c3f55acc4.

Revert "Remove GTFS default name & string change"

This reverts commit 6000c59bb5.

Revert "Update pyhomematic 1.19 & small cleanups (#5299)"

This reverts commit a30711f1a0.

Revert "[sensor] Add Dublin bus RTPI sensor (#5257)"

This reverts commit 1219ca3c3b.

Revert "Bugfix group reload (#5292)"

This reverts commit baa8e53e66.

Revert "Support for TrackR device trackers (#5010)"

This reverts commit f7a1d63d52.

Revert "Bump pywemo version."

This reverts commit dc937cc8cf.

Revert "Upgrade to voluptuous to 0.9.3 (#5288)"

This reverts commit d12decc471.

Revert "Upgrade distro to 1.0.2 (#5291)"

This reverts commit 64800fd48c.

Revert "Don't build Adafruit_BBIO - doesn't work on all platforms. (#5281)"

This reverts commit 9a3c0c8cd3.

Revert "Convert flic to synchronous platform. (#5276)"

This reverts commit eb9b95c292.

Revert "Upgrade to aiohttp 1.2 (#4964)"

This reverts commit e68e29e03e.

Revert "Fix TCP sensor to correctly use value_template (#5211)"

This reverts commit 1cf9ae5a01.

Revert "Cleanup language support on TTS (#5255)"

This reverts commit 3f3a3bcc8a.

Revert "Add last triggered to script (#5261)"

This reverts commit 467cb18625.

Revert "Bump flux_led version and make use of PyPi package (#5267)"

This reverts commit 34a9fb01ac.

Revert "Add support for NAD receivers (#5191)"

This reverts commit 3b59e169f1.

Revert "Bugfix async device_tracker see callback (#5259)"

This reverts commit 71fddd26eb.

Revert "Use SHA hash to make token harder to guess (#5258)"

This reverts commit 922308bc1f.

* Revert "Revert "Bugfix camera streams (#5306)""

This reverts commit 2ee8c44021.

* Update darksky.py
2017-01-26 22:32:45 -08:00
Johann Kellerman
f2870c3103 [core.config] Support customize in packages (#5543)
* Support customize in packages

* GMT

* Update test_config.py
2017-01-26 22:26:49 -08:00
Adam Mills
923431110a [*.zwave] Refactor of zwave value_changed (#5512)
* Refactor of zwave value_changed

* Rename update_properties to update

* Revert "Rename update_properties to update"

This reverts commit 723578e7d4.
2017-01-26 22:21:33 -08:00
John Arild Berentsen
d0538fe3aa [lock.zwave] Add set, get and clear usercodes for zwave locks (#5489)
* Add set, get and clear usercodes for zwave locks

* Fix CRLF
2017-01-26 21:45:04 -08:00
Robbie Trencheny
295a232374 Allow a protocol in the http.base_url parameter (#5557) 2017-01-26 21:43:45 -08:00
Johann Kellerman
3f2fdb97a0 check_config: Add support for packages (#5574) 2017-01-26 21:42:14 -08:00
Daniel Høyer Iversen
a465a45588 Fix for assumed state in command_line (#5578)
* Bug fix for assumed state in command_line

* command line

* command line

* command line

* command line test
2017-01-26 21:41:30 -08:00
fakezeta
e4f0b0a57f Updated requirements_all.txt 2017-01-27 01:12:28 +01:00
fakezeta
86b2db54be Merge remote-tracking branch 'home-assistant/dev' into Added_notify.twilio_call 2017-01-27 00:51:56 +01:00
fakezeta
3f13bdb1f7 Modified .coveragerc 2017-01-27 00:48:58 +01:00
fakezeta
61ad11fcd7 Added notify.twilio_call component for Voice calling with Twilio 2017-01-27 00:32:01 +01:00
John Mihalic
fb49c588e5 Handle Squeezebox issues (#5566)
* Handle Squeezebox issues

* Fix double logging
2017-01-26 18:30:42 -05:00
Pascal Vizeli
36e47473c5 pump ffmpeg version 1.2 to fix close bug (#5579) 2017-01-27 00:22:31 +01:00
Robbie Trencheny
7136fd0f0a Add an Amazon Polly TTS platform (#5169)
* Remove SPEED_MED from fan

* Add an Amazon Polly TTS platform

* Update boto library version for notify.aws_* platforms to match the tts.amazon_polly req

* Improve log line and add docstring to function

* Simplify config logic

* Remove duplicate logic

* Don't know how this got in here...

* initial options work

* Remove stale config option and only allow supported languages

* Make requested changes

* Polly is only supported in some regions

* Allow filename to contain underscores (for amazon_polly platform name), remove unnecessary default_lang, other small things

* Add options dict to service description
2017-01-26 23:22:47 +01:00
Pascal Vizeli
636e7aa31e [microsoft_face] Small error fixes (#5577)
* [microsoft_face] Small error fixes

* add array to exclusion
2017-01-26 23:18:15 +01:00
Pascal Vizeli
eadf67bd9a Update ha-ffmpeg version 1.1 (#5573) 2017-01-26 18:12:30 +01:00
Hugo Dupras
4fe54e1cbb Update Netatmo library to fix missing local_url (#5570) 2017-01-26 15:08:21 +01:00
John Mihalic
111b482be4 Update neurio library req. & fix keyerror (#5565) 2017-01-26 13:07:50 +01:00
Robbie Trencheny
2a897574a8 Merge pull request #5564 from home-assistant/readme-grammar-fix
Fix grammar in README
2017-01-25 17:39:32 -08:00
Robbie Trencheny
068369c008 Fix grammar in README 2017-01-25 15:35:52 -08:00
Robbie Trencheny
f25b34cafe Merge pull request #5558 from andrey-git/sonos
Fix empty image when Sonos is doing nothing.
2017-01-25 13:41:41 -08:00
Daniel Perna
7e7f9f6670 Merge pull request #5555 from jannau/max_shutter_contact
homematic: add MAX shutter contact class
2017-01-25 22:32:35 +01:00
Andrey
58e063a1b6 Fix empty image when Sonos is doing nothing. 2017-01-25 23:15:30 +02:00
Robbie Trencheny
7f5d6eb841 Add a is_coordinator attribute to Sonos (#5556) 2017-01-25 13:03:36 -08:00
Janne Grunau
0048267f3e homematic: add MAX shutter contact class 2017-01-25 21:15:04 +01:00
Gianluca Barbaro
9cad9c19f8 Update keyboard_remote.py (#5535)
* Update keyboard_remote.py

I added a couple of events: keyboard_remote_connected and keyboard_remote_disconnected, useful to trigger some action (for example: play a sound)
I changed the way the component refers to the keyboard: not by "descriptor", but by name.
The fact is that the udev system doesn't always give a name link in /dev/input/by-id folder and the actual /dev/input/eventX file changes automatically. 
For example, if I had my keyboard on /dev/input/event13 and then it disconnected, if something else connects to the system it will get the first input file available, that is /dev/input/event13. If the keyboard then reconnects, it will get /dev/input/event14, thus breaking the configuration.
Now it searches every time for the right input file.
The problem might be that, in case of ha upgrade, the pre-existing configuration won't work. I thing there are some guidelines here, but I am not sure.
I think it's inevitable: the initial idea to use a /dev/input/by-id/ symbolic link was good, but unfortunately it doesn't seem to work with bluetooth devices.

I haven't updated the documentation yet: I'm waiting for some ok about the change in configuration key names.

* Update keyboard_remote.py

That should do the trick.
You are right: device names can be duplicated, thus they're not reliable in case of multiple devices. Unfortunately, the only other information available is the physical address, even more complicated.
But in case you have just one keyboard remote of same model, the name works just fine. I'll put it in the documentation which, once the code is approved, I will promptly update.

* Update keyboard_remote.py

* Update keyboard_remote.py

* Update keyboard_remote.py

* Unwrap logger error
2017-01-25 13:58:34 -05:00
Pascal Vizeli
c3a55e7d82 Fix upc lint error (#5554) 2017-01-25 18:46:37 +01:00
Paulus Schoutsen
42d33ae26d Disable typing travis build 2017-01-25 09:32:39 -08:00
Johann Kellerman
d500ddac9a [script] Fix dodgy bash syntax for bootstrap (#5552) 2017-01-25 09:21:09 -08:00
Pascal Vizeli
393c7f2cf1 [device.upc_connect] Discount on STOP. (#5553)
* [device.upc_connect] Discount on STOP.

* close session it self

* Update upc_connect.py
2017-01-25 09:20:31 -08:00
thecynic
6015274ee2 Add initial support for Lutron RadioRA 2 using pylutron (#5337)
Signed-off-by: Dima Zavin <thecynic@gmail.com>
2017-01-25 09:11:37 +01:00
Oleksii Serdiuk
ca1dc202f9 ASUSWRT: Add IPv6 support when parsing neighbors (#5536)
* ASUSWRT: Add IPv6 support when parsing neighbors

The regex for IPv6 should cover most cases, but it doesn't validate
whether IP is correct. It also might fail for some edge cases.

Also, ignore 'duid xx:xx:xx:xx:xx:xx:xx:xx:xx:xx' line in leases.

Closes #2814 - ASUSWRT doesn't support ipv6

* Update asuswrt.py
2017-01-25 00:02:39 -08:00
Alessandro Mogavero
c7ff7af39d Sky hub (#5509)
* Added new platform sky_hub

* added env to virtual environment gitingore

* Removed unuseful imports

* BT home hub 5 renamed to sky hub in the comments

* Added sky_hub to .coveragerc

* Added example configuration in sky_hub docstring

* sky_hub made compliant with test style standards

* homehub functions renamed to skyhub

* Update .gitignore

* Update .coveragerc
2017-01-25 00:02:08 -08:00
Paulus Schoutsen
264310074f Update Wink requirement 2017-01-24 22:13:22 -08:00
Stu Gott
191d7b0a50 Add support for Wemo CoffeeMaker devices (#5505)
* Add support for Wemo CoffeeMaker devices

* Add CoffeeMaker to WEMO_MODEL_DISPATCH
2017-01-24 22:10:10 -08:00
Nick Touran
43e46154c6 Added new Washington State DOT sensor. (#5496)
* Added new Washington State DOT sensor.

* Minor changes from review for WSDOT.

* Update wsdot.py
2017-01-24 22:08:19 -08:00
Martin Hjelmare
a09a772f43 Add more validation for mysensors (#5493)
* Move isdevice validator under helpers.config_validation.
* Check that all persistence files are set and are unique if any is set
  by user. This is necessary to avoid file name clashes.
* Check that a set persistence file has an existing and writable
  directory.
* Check that a device is either a valid device file, "mqtt", or a valid
  domain name or ip address.
2017-01-24 22:04:44 -08:00
Pascal Vizeli
b57f5728c5 [image_processing/microsoft_face_identify] face recognition for automation (#5472)
* [image_processing/microsoft_face_verify] face recognition for automation

* Add platform for microsoft face identify

* add unittest for demo

* Add unittest for platform
2017-01-24 21:50:10 -08:00
Robbie Trencheny
c355def154 Merge pull request #5348 from freol35241/dev
Remove throttle decorator from miflora platform
2017-01-24 21:39:42 -08:00
happyleavesaoc
3d081c2564 bump dep version; add name conf (#5451) 2017-01-24 21:36:18 -08:00
snagytx
59cad0f6ef add a small sleep before reading the rpi-gpio sensor (#5446)
* add a small sleep before reading the sensor

The read of the sensor might be incorrect if it's read too soon after the setup_input call. It might be isolated to my case where I rely on the the PI internal PULL, but once I added this sleep I never get false initial read. If you think this change is appropriate please merge it.

* Update rpi_gpio.py

* Update rpi_gpio.py

* Update rpi_gpio.py
2017-01-24 21:35:12 -08:00
Jan Harkes
6adc5c318e Add missing dependency in emulated_hue component. (#5394)
* Add missing dependency in emulated_hue component.

On first startup after upgrade to 0.36, the emulated_hue componented failed to
start because the http component had installed the modules it depends on, in
this particular case 'aiohttp_cors' was missing.

* Include dependencies for the emulated_hue web server

Emulated_hue uses it's own 'web-server' component to handle hue related
discovery and config, so we need to make sure the required http modules are
made available before we are initialized.

We don't have to depend on the home-assistant http/api component because we do
not need to have the frontend to be initialized to handle emulated_hue, so we
can just import in the same set of requirements as the http component.

* Fix linting error
2017-01-24 21:29:34 -08:00
Robbie Trencheny
88e0bb6733 Merge pull request #5492 from kellerza/gen_requirements
[script] gen_requirement: Raise an error if REQUIREMENT not pinned
2017-01-24 21:23:22 -08:00
William Scanlon
47bbfc309c Support for python-wink 1.0.0 (#5534) 2017-01-24 21:11:18 -08:00
Robbie Trencheny
794852f76f Merge pull request #5497 from armills/test-port-fixes
Fix network tests to use get_test_instance_port
2017-01-24 21:10:00 -08:00
Robbie Trencheny
75c52ff9c4 Merge pull request #5545 from fabaff/waqi-pm10
[sensor.waqi] Add missing particle value and refactor attributes
2017-01-24 21:07:46 -08:00
Paulus Schoutsen
d8e5e60a08 Merge remote-tracking branch 'origin/master' into dev 2017-01-24 20:59:34 -08:00
Robbie Trencheny
9bd5378fe4 [component/ios] Discover notify.ios when iOS component loads (#5548) 2017-01-25 06:57:48 +02:00
Paulus Schoutsen
2cf2dcd9ba Emulated_hue: default type to Google [Breaking change] (#5549) 2017-01-24 20:25:08 -08:00
Johann Kellerman
e53b2fe121 [script] Only bootstrap frontend if npm installed (#5507)
* [scripts] Only bootstrap frontend if npm installed

* Message if not frontend dev possible

* yarn
2017-01-24 16:20:18 -08:00
Fabian Affolter
4462431c78 Add missing particle value and refactor attributes 2017-01-25 00:52:19 +01:00
David McNett
eb1e8ebc18 New version of anthemav python library (#5544) 2017-01-25 00:20:59 +01:00
Pascal Vizeli
92858554e6 Bugfix endless aiohttp streamreader (#5540) 2017-01-24 20:43:36 +01:00
Pascal Vizeli
c972e90580 Bugfix mjpeg camera (#5539) 2017-01-24 20:25:51 +01:00
Fabian Affolter
b2ecaa189a [binary_sensor.arest] Fix name for sensor and shorten logger messages (#5460)
* Fix name for sensor and shorten logger messages

* Use variable as name if none is given
2017-01-24 19:54:14 +01:00
ecksun
f5062b06a9 media_player.kodi: Add SSL config option (#5531)
This readds support for https for kodi, resolves issue #5527
2017-01-24 18:20:18 +01:00
Fabian Affolter
cd260d89cb Add location to attributes and option to show position on the map (sensor.iss) (#5465)
[sensor.iss] Add location to attributes and option to show position on the map
2017-01-24 10:02:17 +01:00
Aaron Polley
38d9dc996b Piglow support (#5302)
* Add support for Piglow

* Updated coverage and requirements

* Add support for Piglow

* Updated coverage and requirements

* Fix linting errors

* Fix linting errors

* Remove trailing whitespace

* Shorter lines

* Remove trailing whitespace

* Update piglow.py

* Pinned piglow version

* Remove unused method

* Remove unused imports

* Fix lint errors

* Update requirements all

* Updated Piglow to allow the component name to be changed

* Fix imports

* Pass in name

* The piglow platform now fails if it cannot detect the piglow device

* Tidy subprocess import
2017-01-24 09:41:33 +01:00
Robbie Trencheny
be2c9ccee2 Merge pull request #5529 from robbiet480/update-hdmi-cec
Update pyCEC version
2017-01-23 23:34:02 -08:00
Robbie Trencheny
dd0110e06d Update pyCEC version 2017-01-23 23:33:16 -08:00
Fabian Affolter
64fc6a08d3 Fix typos (#5522) 2017-01-23 13:25:38 -08:00
Fabian Affolter
a83b61ad58 Allow direct messaging to user (#5521) 2017-01-23 13:24:45 -08:00
andrey-git
b7e477fbba Copy val in config.py before modifying (#5520)
* Copy val before modifying

* Bad line location
2017-01-23 13:24:13 -08:00
Fabian Affolter
318b0f4f36 Upgrade beautifulsoup4 to 4.5.3 (#5519) 2017-01-23 13:23:41 -08:00
Petr Vraník
900868708e check cec message length when asking physical address (#5516)
* cec client object

* cec command structure

* autodetect source

* volume support and native source select

* switch device

* media player device

* detecting of state

* friendly names

* hdmi cec properties

* presence detection

* simplified callbacks

* stable names

* renamed methods

* code cleanup

* name with vendor

* fixed standby call name

* fake standby/poweron

* domain switch

* domain switch

* async updating

* update separated

* cec -> hass event bridge

* fixed name generation

* code cleanup

* code cleanup

* icon constants

* code cleanup

* do not register unavailable devices

* discovery of deevices

* code cleanup

* cec device discovery

* moved method implementation into child

* service descriptions

* service descriptions

* service descriptions

* changed entity init sequence

* logging cleanup

* add remove as job

* closing cec, no service schemas

* correct iterate over dictionary

* Volume by commands

* threading

* logging minimized

* get load out of main thread

* naming cleanup

* get load out of main thread

* optimized discovery

* async where possible

* cleanup logging, constructors first

* pydoc

* formatting

* no async_update from out of loop
no hiding entities
removed redundant device_state_attributes
async updating presence

* no async

* working async cec

* cec in thirdparty lib

* cec initialized oudsice

* working without SIGSEGV

* rollbacked file changed by mistake

* sending of commands

* working with ha

* using hass loop and device driven updates

* version up

* version up

* Command types in pycec, cleanup for HA integration

* Removed media player, state moved to switch

* service descriptions

* requirements: pyCEC

* line width to 79

* doc

* doc

* overindentation solved

* HDMI to uppercase

* minimal dependency on cec

* removed unwanted line

* doc wording

* margin 79

* line continuation indent

* imperative doc

* lint: indentation

* fixed overindented

* fixed overindented

* fixed overindented

* fixed overindented

* order of imports

* PEP8

* keep signature of overriding

* removed redundant blank line

* fixed update call method (#4)

* Preparation for merge to upstream (#5)

* newer version of pyCEC
* updated services.yaml
* fixed lint scrpt to operate only on python files

* pycec version up

* update services

* no coverage report

* exclude non python files from lint

* lint only on python files

* Dev (#6)

* reordered
* sending nonserialized data through hass.data
* code formatting
* code formatting
* import order

* Dev (#7)

* newer version of pyCEC
* updated services.yaml
* fixed lint scrpt to operate only on python files

* pycec version up

* update services

* no coverage report

* exclude non python files from lint

* lint only on python files

* reordered

* sending nonserialized data through hass.data

* import order

* fixed object handling

* code formatting

* Backwards compatibility of hdmi_cec (#10)

* services:
power_on
standby
active_source

* new version of pyCEC (#12)

* newer version of pyCEC

* devices config (#13)

* getting device name from config

* shutdown fix (#14)


* correct call on shutdown

* remove misplaced annotations (#15)

* Preparation for merge to upstream (#5)

* newer version of pyCEC
* updated services.yaml
* reordered
* sending nonserialized data through hass.data
* services:
power_on
standby
active_source
* code formatting
* getting device name from config
* correct call on shutdown

* pyCEC version 0.3.6 (#18)

* newer version of pyCEC
* updated services.yaml
* sending nonserialized data through hass.data
* services:
** power_on
** standby
** active_source
* getting device name from config
* correct call on shutdown
* fork new thread on multicore machines
* support both config schemas: original and new (#16)
* volume press and release support (#17)

* support for media_player (#21)

* accept hexadecimal format of commands
* support for media player
* platform customization
* type constants

* Dev (#23)

* accept hexadecimal format of commands
* support for media player
* platform customization

* TCP CEC support (#24)

* accept hexadecimal format of commands
* support for media player
* platform customization
* preparing tcp support

* volume handling (#25)

* Incorporated CR remarks (#26)

* cleanup imports
* cleanup and enhance services description
* removed unwanted file

* implemented CR remarks (#27)

* pyCEC v0.4.6
* pined dependency version
* tighten service schemas

* requirements (#28)

* incorporate remarks from users (#32)

* home-assistant-31 make mute schema better (#31)

* pycec-30 pyCEC version up (#30)

* pycec-30 pyCEC version up (#30)

* home-assistant-30 OSD display name from configuration (#30) (#33)

* Home assistant 29 (#34)

* home-assistant-29 counting from 0 (#29)

* Home assistant 31 (#35)

* home-assistant-31 add support for mute-on and mute-off (#31)

* home-assistant-31 pyCEC version up (#31)

* Home assistant 31 (#36)

* home-assistant-31 Limit OSD name to 13 chars (#31)

* home-assistant-31 Limit OSD name to 13 chars moved to CEC adapter (#31)

* home-assistant-31 version up (#31)

* home-assistant-31 formatting (#31)

* formatting

* service description

* service description

* single attribute for volume

* fixed mute on -> mute off

* moved config constant from core into component

* check cec message length when asking physical address (#38) (#38)

* cec turn on/turn off commands instead of power

* cec turn on/turn off commands instead of power
2017-01-23 13:22:39 -08:00
Fabian Affolter
d5119a0520 Use device_state_attributes (#5518) 2017-01-23 13:21:12 -08:00
Robbie Trencheny
9bc9e7fbc4 Dont set a speed when fan turns on (#5514) 2017-01-23 13:20:54 -08:00
Adam Mills
f54f68903d Fixes for rest tests (#5495)
* Fixes for rest tests

* Linter fixes

* Alternate test_setup_missing_config implementation
2017-01-23 10:17:29 -05:00
Adam Mills
8217a42960 Don't start test thread as daemon and wait until patching is done (#5494) 2017-01-23 07:03:55 +02:00
Robbie Trencheny
9442131373 Add organization docs 2017-01-22 16:21:20 -08:00
andrey-git
addc2c4340 Allow easier customization of whole domain, entity lists, globs. (#5215) 2017-01-22 21:19:50 +02:00
Johann Kellerman
699c615d23 Add url 2017-01-22 18:34:00 +02:00
Marcelo Moreira de Mello
ab19577322 Bump amcrest version and refactored to simplify code (#5499)
* Bumped version to Amcrest 1.1.3 and rebase self.base_url()

* Refactored amcrest camera and amcrest sensor to simply object reference
2017-01-22 14:22:25 +01:00
Daniel Perna
59b0491d29 Homematic fixes + device support (#5503)
* Using new MaxShutterContact class

* Skip unnecessary function calls

* Added casting for VALUE

* Some renaming to clarify what's happening

* Bumped dependency version

* Bumped version in requirements
2017-01-22 14:20:49 +01:00
Fabian Affolter
75adb7ff46 Upgrade Sphinx to 1.5.2 (#5502) 2017-01-22 11:36:29 +01:00
Adam Mills
df361dc1e1 Fix network tests to use get_test_instance_port 2017-01-21 22:15:05 -05:00
Johann Kellerman
7df51dc545 gen_requirement: Raise an error if REQUIREMENT not pinned 2017-01-22 01:37:08 +02:00
Matthew Garrett
2992cd35be Add support for Leviton Decora Bluetooth dimmer switches (#5434)
* Add support for Leviton Decora Bluetooth dimmer switches

Add support for the Decora Bluetooth smart dimmer switches from Leviton.

* Update decora.py
2017-01-21 14:14:08 -08:00
Petr Vraník
06361b1ed1 implementing users remarks (#5481)
* cec client object

* cec command structure

* autodetect source

* volume support and native source select

* switch device

* media player device

* detecting of state

* friendly names

* hdmi cec properties

* presence detection

* simplified callbacks

* stable names

* renamed methods

* code cleanup

* name with vendor

* fixed standby call name

* fake standby/poweron

* domain switch

* domain switch

* async updating

* update separated

* cec -> hass event bridge

* fixed name generation

* code cleanup

* code cleanup

* icon constants

* code cleanup

* do not register unavailable devices

* discovery of deevices

* code cleanup

* cec device discovery

* moved method implementation into child

* service descriptions

* service descriptions

* service descriptions

* changed entity init sequence

* logging cleanup

* add remove as job

* closing cec, no service schemas

* correct iterate over dictionary

* Volume by commands

* threading

* logging minimized

* get load out of main thread

* naming cleanup

* get load out of main thread

* optimized discovery

* async where possible

* cleanup logging, constructors first

* pydoc

* formatting

* no async_update from out of loop
no hiding entities
removed redundant device_state_attributes
async updating presence

* no async

* working async cec

* cec in thirdparty lib

* cec initialized oudsice

* working without SIGSEGV

* rollbacked file changed by mistake

* sending of commands

* working with ha

* using hass loop and device driven updates

* version up

* version up

* Command types in pycec, cleanup for HA integration

* Removed media player, state moved to switch

* service descriptions

* requirements: pyCEC

* line width to 79

* doc

* doc

* overindentation solved

* HDMI to uppercase

* minimal dependency on cec

* removed unwanted line

* doc wording

* margin 79

* line continuation indent

* imperative doc

* lint: indentation

* fixed overindented

* fixed overindented

* fixed overindented

* fixed overindented

* order of imports

* PEP8

* keep signature of overriding

* removed redundant blank line

* fixed update call method (#4)

* Preparation for merge to upstream (#5)

* newer version of pyCEC
* updated services.yaml
* fixed lint scrpt to operate only on python files

* pycec version up

* update services

* no coverage report

* exclude non python files from lint

* lint only on python files

* Dev (#6)

* reordered
* sending nonserialized data through hass.data
* code formatting
* code formatting
* import order

* Dev (#7)

* newer version of pyCEC
* updated services.yaml
* fixed lint scrpt to operate only on python files

* pycec version up

* update services

* no coverage report

* exclude non python files from lint

* lint only on python files

* reordered

* sending nonserialized data through hass.data

* import order

* fixed object handling

* code formatting

* Backwards compatibility of hdmi_cec (#10)

* services:
power_on
standby
active_source

* new version of pyCEC (#12)

* newer version of pyCEC

* devices config (#13)

* getting device name from config

* shutdown fix (#14)


* correct call on shutdown

* remove misplaced annotations (#15)

* Preparation for merge to upstream (#5)

* newer version of pyCEC
* updated services.yaml
* reordered
* sending nonserialized data through hass.data
* services:
power_on
standby
active_source
* code formatting
* getting device name from config
* correct call on shutdown

* pyCEC version 0.3.6 (#18)

* newer version of pyCEC
* updated services.yaml
* sending nonserialized data through hass.data
* services:
** power_on
** standby
** active_source
* getting device name from config
* correct call on shutdown
* fork new thread on multicore machines
* support both config schemas: original and new (#16)
* volume press and release support (#17)

* support for media_player (#21)

* accept hexadecimal format of commands
* support for media player
* platform customization
* type constants

* Dev (#23)

* accept hexadecimal format of commands
* support for media player
* platform customization

* TCP CEC support (#24)

* accept hexadecimal format of commands
* support for media player
* platform customization
* preparing tcp support

* volume handling (#25)

* Incorporated CR remarks (#26)

* cleanup imports
* cleanup and enhance services description
* removed unwanted file

* implemented CR remarks (#27)

* pyCEC v0.4.6
* pined dependency version
* tighten service schemas

* requirements (#28)

* incorporate remarks from users (#32)

* home-assistant-31 make mute schema better (#31)

* pycec-30 pyCEC version up (#30)

* pycec-30 pyCEC version up (#30)

* home-assistant-30 OSD display name from configuration (#30) (#33)

* Home assistant 29 (#34)

* home-assistant-29 counting from 0 (#29)

* Home assistant 31 (#35)

* home-assistant-31 add support for mute-on and mute-off (#31)

* home-assistant-31 pyCEC version up (#31)

* Home assistant 31 (#36)

* home-assistant-31 Limit OSD name to 13 chars (#31)

* home-assistant-31 Limit OSD name to 13 chars moved to CEC adapter (#31)

* home-assistant-31 version up (#31)

* home-assistant-31 formatting (#31)

* formatting

* service description

* service description

* single attribute for volume

* fixed mute on -> mute off

* moved config constant from core into component
2017-01-21 14:13:46 -08:00
Craig J. Ward
a89a4f39dc only check for devices when not defined in config (#5490)
* only check for devices when not defined in config

* lint
2017-01-21 14:00:56 -08:00
Greg Dowling
74989f7941 Bump pyvera version (add RFX device support) (#5487) 2017-01-21 12:26:57 -08:00
Stefan Jonasson
ed12f9e237 Tellstick light fix (#5482)
* Fixed crash when lights objects was inited

* Fixed initial value for tellstick lights

* Fixed problem with lights not working with the turn_on action.
2017-01-21 12:24:48 -08:00
Fabian Affolter
13d801e1c6 Upgrade sqlalchemy to 1.1.5 (#5484) 2017-01-21 12:24:23 -08:00
Fabian Affolter
f13774269d Upgrade speedtest-cli to 1.0.2 (#5483) 2017-01-21 18:26:17 +01:00
joopert
56ed00a1db update nad library version (#5478) 2017-01-21 13:24:38 +01:00
Dale Higgs
a6f341f06a Add exit code to check_config script (#5471) 2017-01-21 10:39:50 +03:00
Lupin Demid
ccd2588cf7 added speed and emotion to Yandex tts (#5431)
* Added speed and emotion  parameters. Refactored test's

* Fixed float point arfs in url and added test for float point values
2017-01-21 08:36:28 +01:00
Pascal Vizeli
2fff8a5a11 [TTS] options support for service calls (#5436)
* [TTS] Support now options like voice and age on service.

* Add unittest
2017-01-21 08:35:18 +01:00
Robbie Trencheny
074f9315d7 Fan improvements (#5457)
* Remove SPEED_MED from fan

* Correctly use the oscillation on/off payloads for MQTT fan

* Add set_direction service documentation

* Correct function name for Wink fans

* Check for existence of the correct topic

* Enable set fan speed in emulated_hue

* features -> functions

* Final emulated_hue fan fixes

* Fix linting issues

* Revert to supported features instead of supported functions

* Fix logic

* Add a test for emulated_hue fan support
2017-01-20 22:21:28 -08:00
Robbie Trencheny
2efd7d4e4a Hue improvements (#5474)
* Allow automatic removal of all Hue entities from emulated_hue

* Allow disabling of Hue groups

* Only add device state attributes if they need to be there
2017-01-20 22:20:07 -08:00
Paulus Schoutsen
14309401d0 Update frontend 2017-01-20 22:10:44 -08:00
Pascal Vizeli
b2203f7f41 [ffmpeg] Use new 1.0 version / migrate all asyncio (#5464)
* [ffmpeg] Use new 1.0 version / migrate all asyncio

* fix lint

* fix import

* Add new service to binary_sensors

* fix lint
2017-01-20 21:56:22 -08:00
Robbie Trencheny
dec2ddb393 Merge pull request #5405 from xhostplus/roku-idle
Updated Roku IDLE state
2017-01-20 21:54:04 -08:00
Robbie Trencheny
58b698400e Set Roku name to the device name instead of the serial number (#5475) 2017-01-20 21:28:29 -08:00
Robbie Trencheny
26f6a9ee20 Bump requirements 2017-01-20 20:24:00 -08:00
Robbie Trencheny
6b0a6b87de Use is_screensaver 2017-01-20 20:23:20 -08:00
Robbie Trencheny
db97ad4485 Merge pull request #5473 from stu-gott/tts-cache
TTS: Invalidate broken file cache entries
2017-01-20 17:44:32 -08:00
Stu Gott
ec4b148a71 TTS: Invalidate broken file cache entries
If a cached file cannot be read by the TTS component, then it should
be removed from the file cache--or it will remain broken.
2017-01-20 20:09:03 -05:00
John Arild Berentsen
41ee798b0f [WIP][ZWave][Lock] Further improvements to zwave lock platform (#5400)
* Further improvements to zwave lock platform

* Add missing notification

* Some improvements
2017-01-20 13:01:36 -08:00
Martin Vacula
f4d2d69a5d Beaglebone Black binary sensor (#5422)
* Configuration parameters defined

* Edge detection added

* Example configuration added and tipo corrected

* Comments updated, lint update

* Added check for input pull_mode

* Too long line

* trailing white space

* Configuration parameters defined

* Edge detection added

* Example configuration added and tipo corrected

* Comments updated, lint update

* Added check for input pull_mode

* Too long line

* trailing white space

* pylint disable import error

* read_input() changed to return boolean value, according changes in binary sensor

* example configuration in docstring changed to mention direct web link, pylint update

* read_input() updated according review
2017-01-20 12:55:28 -08:00
Petr Vraník
067e11ea5c HDMI CEC - support for devices and commands (#4781)
* cec client object

* cec command structure

* autodetect source

* volume support and native source select

* switch device

* media player device

* detecting of state

* friendly names

* hdmi cec properties

* presence detection

* simplified callbacks

* stable names

* renamed methods

* code cleanup

* name with vendor

* fixed standby call name

* fake standby/poweron

* domain switch

* domain switch

* async updating

* update separated

* cec -> hass event bridge

* fixed name generation

* code cleanup

* code cleanup

* icon constants

* code cleanup

* do not register unavailable devices

* discovery of deevices

* code cleanup

* cec device discovery

* moved method implementation into child

* service descriptions

* service descriptions

* service descriptions

* changed entity init sequence

* logging cleanup

* add remove as job

* closing cec, no service schemas

* correct iterate over dictionary

* Volume by commands

* threading

* logging minimized

* get load out of main thread

* naming cleanup

* get load out of main thread

* optimized discovery

* async where possible

* cleanup logging, constructors first

* pydoc

* formatting

* no async_update from out of loop
no hiding entities
removed redundant device_state_attributes
async updating presence

* no async

* working async cec

* cec in thirdparty lib

* cec initialized oudsice

* working without SIGSEGV

* rollbacked file changed by mistake

* sending of commands

* working with ha

* using hass loop and device driven updates

* version up

* version up

* Command types in pycec, cleanup for HA integration

* Removed media player, state moved to switch

* service descriptions

* requirements: pyCEC

* line width to 79

* doc

* doc

* overindentation solved

* HDMI to uppercase

* minimal dependency on cec

* removed unwanted line

* doc wording

* margin 79

* line continuation indent

* imperative doc

* lint: indentation

* fixed overindented

* fixed overindented

* fixed overindented

* fixed overindented

* order of imports

* PEP8

* keep signature of overriding

* removed redundant blank line

* fixed update call method (#4)

* Preparation for merge to upstream (#5)

* newer version of pyCEC
* updated services.yaml
* fixed lint scrpt to operate only on python files

* pycec version up

* update services

* no coverage report

* exclude non python files from lint

* lint only on python files

* Dev (#6)

* reordered
* sending nonserialized data through hass.data
* code formatting
* code formatting
* import order

* Dev (#7)

* newer version of pyCEC
* updated services.yaml
* fixed lint scrpt to operate only on python files

* pycec version up

* update services

* no coverage report

* exclude non python files from lint

* lint only on python files

* reordered

* sending nonserialized data through hass.data

* import order

* fixed object handling

* code formatting

* Backwards compatibility of hdmi_cec (#10)

* services:
power_on
standby
active_source

* new version of pyCEC (#12)

* newer version of pyCEC

* devices config (#13)

* getting device name from config

* shutdown fix (#14)


* correct call on shutdown

* remove misplaced annotations (#15)

* Preparation for merge to upstream (#5)

* newer version of pyCEC
* updated services.yaml
* reordered
* sending nonserialized data through hass.data
* services:
power_on
standby
active_source
* code formatting
* getting device name from config
* correct call on shutdown

* pyCEC version 0.3.6 (#18)

* newer version of pyCEC
* updated services.yaml
* sending nonserialized data through hass.data
* services:
** power_on
** standby
** active_source
* getting device name from config
* correct call on shutdown
* fork new thread on multicore machines
* support both config schemas: original and new (#16)
* volume press and release support (#17)

* support for media_player (#21)

* accept hexadecimal format of commands
* support for media player
* platform customization
* type constants

* Dev (#23)

* accept hexadecimal format of commands
* support for media player
* platform customization

* TCP CEC support (#24)

* accept hexadecimal format of commands
* support for media player
* platform customization
* preparing tcp support

* volume handling (#25)

* Incorporated CR remarks (#26)

* cleanup imports
* cleanup and enhance services description
* removed unwanted file

* implemented CR remarks (#27)

* pyCEC v0.4.6
* pined dependency version
* tighten service schemas

* requirements (#28)
2017-01-20 12:39:18 -08:00
Colin O'Dell
cb47d16282 Don't use Debian's httpredir for backports (#5392)
Hopefully this solves https://github.com/home-assistant/home-assistant/pull/5322#issuecomment-273041585
2017-01-20 12:30:09 -08:00
Adam Mills
5ff9dfa440 Use voluptuous for cast ignore-cec (#5468) 2017-01-20 12:21:27 -08:00
Adam Mills
a7e5c847fb Kodi supports volume stepping (#5467) 2017-01-20 20:52:55 +01:00
Daniel Høyer Iversen
72d63517ba Merge pull request #5420 from MrMep/patch-4
Update generic_thermostat.py
2017-01-20 18:16:40 +01:00
John Arild Berentsen
c41cf7c308 Bugfix Zwave Light: Use only supported features for devices (#5370)
* Use only supported features for devices

* Changes

* Holy Macarony!
2017-01-20 13:35:41 +01:00
Pascal Vizeli
8496975de8 Fix if none data is present for a sensor. (#5415) 2017-01-20 09:07:03 +01:00
Daniel Høyer Iversen
f669680b1e fix issue ##5398 in yr sensor (#5459) 2017-01-19 23:58:15 -08:00
Fabian Affolter
2ed0e76e7c Add elevation to as_dict and use unified style for quoting (#5448) 2017-01-19 23:55:29 -08:00
Adam Mills
1f6f9a1677 Filter new entities from logbook (#5402) 2017-01-19 23:30:47 -08:00
Ryan Kraus
5dd45efac3 Updated ISY component to not overwrite state_attributes. (#5433)
* Updated ISY component to not overwrite state_attributes.

The ISY component included an ISYDevice base class that is used by all
of the isy994 platforms. This still overwrote the state_attributes
property instead of the more appropriate device_state_attributes
property. This was also repeated in the isy994 light platform. Both of
these were addressed. This also fixes issue #5428.

* Removed custom state attributes from ISY lights.

The brightness attribute need not be manually reported by the isy994
light platform.

* Removed ISY Node cleanup.

The ISY entities don’t really need to unsubscribe themselves while hass
is shutting down. Because these updates are not sent in a thread, there
is no negative impact from shutting down without unsubscribing. This
greatly speeds up hass shutdown.

* Removed unused attribute from isy994 light platform.

* Cleaned up ISY994 light entity class.

1) Removed the state property. This property is set in the Entity base
class and shouldn’t be overridden here.
2) Set the brightness property. This is the proper way of setting the
brightness for the Light base class.
3) Removed properties that are now unused because of these changes.
2017-01-19 22:22:33 -08:00
Pascal Vizeli
fe6a8f3367 Remove old openalpr component (#5406)
* Remove old openalpr component

* update region support
2017-01-19 22:21:25 -08:00
Daniel Høyer Iversen
d1ec422eab Merge pull request #5447 from home-assistant/rfxtrx
update rfxtrx lib
2017-01-20 07:17:42 +01:00
happyleavesaoc
f17efc2168 log formats match (#5456) 2017-01-19 21:31:44 -08:00
Paulus Schoutsen
887a33c7d1 Persist emulated hue IDs (#5435) 2017-01-19 21:27:10 -08:00
HerrHofrat
dbcad34b47 Updated valid station id list (#5449) 2017-01-19 23:33:31 +01:00
Robbie Trencheny
738292f817 Ignore import error on avion 2017-01-19 13:25:35 -08:00
Robbie Trencheny
a74258db09 Block Avion from auto installing because only supported on Linux (cc #5414) 2017-01-19 13:14:48 -08:00
Daniel Hoyer Iversen
62b785c040 update rfxtrx lib 2017-01-19 22:08:55 +01:00
Gianluca Barbaro
64c9cd805a Update generic_thermostat.py 2017-01-19 21:26:12 +01:00
Matthew Garrett
3b25b5a6da Add support for Avion Bluetooth dimmer switches (#5414)
GE sell a range of Bluetooth dimmer switches based on Avi-on technology.
Add a module for controlling them. There's also a set of smart switches that
speak the same protocol, but I don't have any of those to test support with.
2017-01-19 21:07:37 +01:00
David McNett
1a82adb054 New platform media_player/anthemav (#5146)
* Initial commit of anthemav platform.  It loads but has no purpose.

* Now presents a card in the UI but the values aren't real

* Mute and volume polling/setting work now

* Source lists and selection works now.

* Reduce debug logging verbosity

* Support power on/off and skip polling for details if power is off

* Add some static tables to decode numerics from telnet commands

* Add stub for unsupported media_play

* New style anthemav uses native asyncio structure

* Add device callback for asyncio

* This is ugly but it works

* Simplify async setup and abstract class data retrieval

* Implement commands (power on and power off for now)

* Add support for scan_interval and set default to 120 seconds

* Pass-through to package handlers for volume and input selection

* Slight restructuring to satisfy anthemav 0.9

* Load anthemav package from pypi now that it's registered

* Proper app_name from a/v info

* Mispelled word

* media_player/anthemav initial commit of platform requirements

* Philio 3-in-1 Gen 4 zwave sensor needs the no-off-event workaround. (#5120)

* Add print_config_parameter service to Z-Wave (#5121)

* Add print_config_param service to z-wave

* Add print_config_parameter service to z-wave

* Add print_config_parameter service to z-wave

* Fix typos

* Fix typos

* Fix typo

* Conform to Python/project style requirements

* Making pylint happy

* Bring pip requirements in agreement with the code

* Bungled previous update

* Remove unnecessady SCAN_INTERVAL logic

I was unawre that this is performed as part of the normal platform behavior and
it's unnecessary for a platform to independently implement this logic.

* Refactor code based on @armills PR requests

* Re-add media_play stub to avoid traceback

* Align with platform reqirements

* Remove references to SCAN_INTERVAL and clean up _lookup logic

* Add DEFAULT_PORT assignment

* Code style changes and removal of vestigial structures

* CONF_NAME handling changes to allow local override to default from device

* Address PR feedback from @balloob

* Remove media_play function override

It's no longer necesary for the platform to implement a stub media_play
function override now that the Add SUPPORT_PLAY flag #5181 issue has been
resolved and merged into the dev branch.

* Rename callback function to async_ for clarity

* Use async routines for platform methods

* Convert update callback to coroutine for conformity

Underlying anthemav library now properly supports coroutine callbacks instead
of normal functions.  Converted the platform callback to a coroutine for
conformance with async operation for the device.

Special thanks to @pvizeli and @armills for their invaluable remedial Python
instruction!

* Further callback refinements

Altered the nature of callback handling based on suggestions from @pvizeli

* True not needed for local push update_ha_state

* Small style fix
2017-01-19 20:07:01 +01:00
Gianluca Barbaro
6ef9714dc1 Update generic_thermostat.py 2017-01-19 19:46:58 +01:00
Pascal Vizeli
3da25c227f lint v2 (#5444) 2017-01-19 19:33:15 +01:00
Pascal Vizeli
11083cf04b Fix lint (#5443) 2017-01-19 19:18:32 +01:00
Pascal Vizeli
8da398c0bd Proxy aiohttp websession / more rebust. (#5419) 2017-01-19 09:55:27 -08:00
Pascal Vizeli
9799631797 [camera/mjpeg] Support still image for thumbmail (#5440) 2017-01-19 09:53:08 -08:00
Touliloup
909978b0d1 [Device Tracker] Xiaomi Mi Router token refresh (#5437)
Device token is refreshed if not anymore valid (for example after router reboot).
Token refresh will only be tried once per update.
2017-01-19 15:05:37 +01:00
Gianluca Barbaro
a87d653077 Update generic_thermostat.py
As suggested, I added a callback on the heater switch state change.
Still it doesn't solve the problem.
2017-01-19 10:57:45 +01:00
Adam Mills
216ac14b3d Fix test for async media player volume helpers (#5432) 2017-01-18 19:15:51 -08:00
Pascal Vizeli
5299c92352 Bugfix volume up/down (#5426) 2017-01-18 22:52:11 +01:00
Gianluca Barbaro
72dca1da09 Update generic_thermostat.py 2017-01-18 12:39:16 +01:00
Gianluca Barbaro
b7bf07eaca Update generic_thermostat.py
After _control_heating() is executed, current_operation() is correctly called but _is_device_active() still reports the old state if the heater switch, at least in my case. The resulting climate state is incorrect until the next refresh, which apparently occurs only when _sensor_changed() gets called (it can be minutes after).

I think the state of the heater switch should be forced to update at the end of  _control_heating(), but I don't know how to do that...
A simple sleep() fixes it, but obviously is just a temporary workaround, I'm not really expecting this PR to be actually committed, unless there's no other solution.
2017-01-18 12:20:39 +01:00
Alex
3267aa8c08 WIP fritz install dependencies fix (#5399)
* updated fritzconnection dependency to 0.6 from pypi

* updated requirements_all for new dependencies of fritz platform
2017-01-18 11:01:31 +01:00
Adam Mills
eb06023aa5 Fix universal mp service call wth no child (#5411) 2017-01-17 22:15:37 -08:00
Pascal Vizeli
2a362fd1ff Asyncio notify component migration (#5377)
* Async migrate notify/platform

* convert group to async

* fix unittest
2017-01-17 22:08:03 -08:00
Paulus Schoutsen
f7ac644c11 Make SMTP tests fast 2017-01-17 22:00:23 -08:00
Paulus Schoutsen
6cd57ac02f Fix Yamaha doing I/O in event loop (#5387) 2017-01-17 21:53:03 -08:00
Paulus Schoutsen
283bcf367b Ignore python-eq3bt from auto-building 2017-01-17 21:48:33 -08:00
Paulus Schoutsen
50b326c7fc Upgrade somecomfort (#5413) 2017-01-17 21:04:56 -08:00
Fabian Affolter
4c52380519 Sync logger messages with Mi-Flora and link to docs (#5391) 2017-01-17 23:41:09 +01:00
Fabian Affolter
bfc0a6a17c Use constants (#5390) 2017-01-17 23:40:34 +01:00
Pascal Vizeli
cfc936761b Make upc more robust (#5404)
* Make upc more robust

* update unittest

* add test for parse error
2017-01-17 23:35:02 +01:00
Bill Nelson
d31f00f672 Updated Roku IDLE state 2017-01-17 13:53:35 -08:00
Whytey
298c1654f8 New zabbix (#5297)
* Hopefully a clean branch for merging

* Remove scan_interval, use defaults for now

* Fix code style error
2017-01-17 00:41:37 -08:00
R1chardTM
321a8be339 Move Nest sensors configuration to Nest component (#4983)
* Move Nest sensor config to Nest Component

* Ensure Nest Protect sensors are added without specified sensor config

* Fix pylint warnings

* Remove support for empty monitored condion list

* Remove scan interval

* Remove scan interval import

* Add Nest sensors by default with opt-out
2017-01-17 00:12:15 -08:00
anpetrov
d240ea56d8 Add Skybeacon BLE temperature/humidity sensor (#5183)
Signed-off-by: Andrey Petrov <andrey.petrov@gmail.com>
2017-01-17 00:01:11 -08:00
Johan Bloemberg
915a91dc1b DSMR: TCP, reconnecting and V4 CRC support (#5164)
* Add support for TCP connection.

* Implement reconnect logic.

* Actually register connect loop task and fix error handling.

* Fix lint, configure upstream requirement.

* Revert debug logging.

* Explicitly catch connection errors.

* Test reconnect on setup and reconnect after disconnect.

* Style.
2017-01-16 23:56:00 -08:00
Job Vermeulen
40ba4fd872 Tado device tracker support (#5046)
* Added tado device tracker

* Added tado device tracker to .converagerc

* Updated docs

* Code formatting and removed unused import

* Code formatting and removed unused import

* Respected the lint line length

* Respect pydocstyle rules

* Respect the lint line limit length

* Fixed reviewer feedback

* Changed the tracker to support async

* Respect the New line end of file rule

* Update .coveragerc
2017-01-16 23:15:11 -08:00
martst
e4a45fa857 Improved x10 state monitoring (#5115)
* Improved x10 state monitoring

* Improved x10 state monitoring

* Use update mthod to fetch state change

* Use update mthod to fetch state change

* Use update function to fetch status

* remove temp file

* Add doc string to update method
2017-01-16 23:11:02 -08:00
Giel Janssens
c72f8b1a06 Netatmo Presence (#5122)
* Netatmo Presence

* Travis

* Remove def camera_stream
2017-01-16 23:10:18 -08:00
Anton Lundin
fd5c2ad08f Denon improvements (#5251)
* denonavr: Expose input as title when in non playing modes

Signed-off-by: Anton Lundin <glance@acc.umu.se>

* denon: Pop from the intended end of the list

Pop from front of list, so we start with NSE0, then NSE1X and so on.

Signed-off-by: Anton Lundin <glance@acc.umu.se>

* denonavr: Don't provide broken media_url's

Only return a media_url if we're in a state that might provide one.

Signed-off-by: Anton Lundin <glance@acc.umu.se>

* denonavr: Only expose player support when in a player mode

This changes so the denonavr only exposes the media player support, when
in a mode that supports media playing.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-01-16 23:04:50 -08:00
Nick Touran
784b87eb2f Add listing and selection of available MPD playlists (#5237)
* Add listing and selection of available MPD playlists through input source UI.

* MPD support updating playlist list on the fly as well as at turn-on.

* Added no_throttle to force playlist update on mpd power cycle.

* Added kwargs signature to get Throttle working right.
2017-01-16 23:01:57 -08:00
Christiaan Blom
ef274c6914 New Discord notification component (#5330)
* Initial commit of discord notification component

* Fixed error where script added extra entries to .coveragerc

* Cleaned up code

* Compliance to PEP8

* removed dependencies

* readded dependencies

* changed name of client id to token for configuration

* Changes for Hound

* Incorporated Review Feedback

* Review feedback

* Updated requirements file

* Check compliance
2017-01-16 22:58:38 -08:00
Marcelo Moreira de Mello
b915cf776b Introduced Amcrest camera sensors and bump Amcrest module version (#5310)
* Introduced Amcrest camera sensors

* Makes script/gen_requirements_all.py happy

* Bump Amcrest version across all components

* - Adjusted scan_interval to 10 seconds

- Filtering HTTPError and ConnectTimeout exceptions

- Removed @Throttle decorator
2017-01-16 22:57:25 -08:00
Jesse Newland
41a6c35ea2 Install phantomjs in Docker container (#5368) 2017-01-16 22:55:42 -08:00
Tom Dickman
65bf30643a Use timezone aware timestamp in flux_update (#5378) 2017-01-16 22:55:05 -08:00
Teemu R
d62b1fc808 Make initial flux update directly when turning on (#5266) 2017-01-16 22:53:34 -08:00
Adam Mills
bae38ac17b Include .ignore file for search utilities (#5290)
* Include .ignore file for search utilities

This instructs search utilities to ignore generated html/js files.

* Panels has no js files
2017-01-16 22:52:53 -08:00
Bryce Edwards
8e17bf43e0 added upnp_bind_multicast option to emulated_hue component (#5381) 2017-01-16 22:52:21 -08:00
Tom Dickman
59f74896a0 Updated abreviation for miles in darksky sensor (#5382) 2017-01-16 22:45:44 -08:00
Paulus Schoutsen
48607d15e5 Merge pull request #5386 from home-assistant/Bug_#5374
fix bug #5374
2017-01-16 22:44:04 -08:00
Daniel Høyer Iversen
51dcd3de6d fix bug #5374 2017-01-17 07:35:09 +01:00
Paulus Schoutsen
2625fee861 Fix script release (#5345) 2017-01-16 22:25:38 -08:00
Paulus Schoutsen
4d96b12424 Merge pull request #5384 from home-assistant/release-0-36-1
Release 0 36 1
2017-01-16 22:24:12 -08:00
Paulus Schoutsen
4603cf4f38 Bump release to 0.36.1 2017-01-16 22:09:17 -08:00
Paulus Schoutsen
28e5659eee Fix load_yaml default value (#5383) 2017-01-16 22:08:57 -08:00
Paulus Schoutsen
7511a5842d Fix load_yaml default value (#5383) 2017-01-16 22:08:47 -08:00
Daniel Høyer Iversen
836eed2a15 fix bug in flux_led (#5373) 2017-01-16 22:08:24 -08:00
Daniel Høyer Iversen
372b54534a Fix python-nest release number (#5369)
* fix_#5365

* fix_#5365
2017-01-16 22:08:24 -08:00
Marcelo Moreira de Mello
7bad0171ec Fixes #5357 which especify absolute path to save cookie used by USPS sensor. (#5358)
Traceback (most recent call last):
  File "/home/hass/.virtualenvs/home_assistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 151, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "/usr/local/lib/python3.5/asyncio/futures.py", line 361, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
    future.result()
  File "/usr/local/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/usr/local/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/hass/.virtualenvs/home_assistant/lib/python3.5/site-packages/homeassistant/components/sensor/usps.py", line 48, in setup_platform
    add_devices([USPSSensor(session, config.get(CONF_UPDATE_INTERVAL))])
  File "/home/hass/.virtualenvs/home_assistant/lib/python3.5/site-packages/homeassistant/components/sensor/usps.py", line 58, in __init__
    self._profile = myusps.get_profile(session)
  File "/home/hass/.homeassistant/deps/myusps/__init__.py", line 100, in wrapped
    _login(*args)
  File "/home/hass/.homeassistant/deps/myusps/__init__.py", line 90, in _login
    _save_cookies(session.cookies, session.auth.cookie_path)
  File "/home/hass/.homeassistant/deps/myusps/__init__.py", line 41, in _save_cookies
    with open(filename, 'wb') as handle:
PermissionError: [Errno 13] Permission denied: './usps_cookies.pickle'
2017-01-16 22:08:24 -08:00
Pascal Vizeli
7af92d0bca Bugfix upc with aiohttp 1.2 (cookies) (#5362) 2017-01-16 22:08:24 -08:00
Teemu R
63bf453c60 Eq3bt bump version, expose away attribute (#5353)
* eq3bt: read away ends attr

* eq3bt: bump version to fix missing __init__, expose away_ends attribute.
2017-01-16 22:08:24 -08:00
Pascal Vizeli
8a95cc4104 Bugfix timedelta v2 (#5349)
* Bugfix timedelta v2

* fix volvo

* fix lint
2017-01-16 22:08:24 -08:00
Heiko Rothe
29e2613c75 Fixed the lannouncer platform get_service method (#5352) 2017-01-16 22:08:24 -08:00
Daniel Høyer Iversen
0bbb16626c fix bug in flux_led (#5373) 2017-01-16 21:52:12 -08:00
Duoxilian
d8560a244c Made target temperature sensitive to auto mode (#5312)
* Made target temperature sensitive to auto mode

* Used current_operation instead of operation_mode

* When not in auto_mode, the temperature is sent to set_temperature

* Low and high targets are switched in the call to set_temperature.

* Missed on current_operation. Use STATE_AUTO.

* Remove incorrectly checked in directory.

* Updated set_temperature based on Martin's feedback.

* Use ATTR_TEMPERATURE from const.py
2017-01-17 02:58:34 +01:00
Adam Mills
bd3117a0e7 Reserve a test port for broken api to fix race (#5371)
* Reserve a test port for broken api to fix race

* I cheated.
2017-01-16 12:56:47 -08:00
Daniel Høyer Iversen
196897fdfc Fix python-nest release number (#5369)
* fix_#5365

* fix_#5365
2017-01-16 18:03:26 +01:00
Marcelo Moreira de Mello
62f26fb701 Fixes #5357 which especify absolute path to save cookie used by USPS sensor. (#5358)
Traceback (most recent call last):
  File "/home/hass/.virtualenvs/home_assistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 151, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "/usr/local/lib/python3.5/asyncio/futures.py", line 361, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
    future.result()
  File "/usr/local/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/usr/local/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/hass/.virtualenvs/home_assistant/lib/python3.5/site-packages/homeassistant/components/sensor/usps.py", line 48, in setup_platform
    add_devices([USPSSensor(session, config.get(CONF_UPDATE_INTERVAL))])
  File "/home/hass/.virtualenvs/home_assistant/lib/python3.5/site-packages/homeassistant/components/sensor/usps.py", line 58, in __init__
    self._profile = myusps.get_profile(session)
  File "/home/hass/.homeassistant/deps/myusps/__init__.py", line 100, in wrapped
    _login(*args)
  File "/home/hass/.homeassistant/deps/myusps/__init__.py", line 90, in _login
    _save_cookies(session.cookies, session.auth.cookie_path)
  File "/home/hass/.homeassistant/deps/myusps/__init__.py", line 41, in _save_cookies
    with open(filename, 'wb') as handle:
PermissionError: [Errno 13] Permission denied: './usps_cookies.pickle'
2017-01-16 17:36:35 +01:00
whhsw
887c586aae Add station parameter to waqi sensor (#5239)
* Add station parameter to waqi sensor

* Update waqi.py

* Update waqi.py

* Update waqi.py

* add back 'waqi' prefix and add station_name prop

* Update waqi.py
2017-01-16 12:44:09 +01:00
Pascal Vizeli
f08e2648ae Bugfix upc with aiohttp 1.2 (cookies) (#5362) 2017-01-16 11:06:23 +01:00
Teemu R
7a1d4b96ef Eq3bt bump version, expose away attribute (#5353)
* eq3bt: read away ends attr

* eq3bt: bump version to fix missing __init__, expose away_ends attribute.
2017-01-16 06:48:36 +01:00
Pascal Vizeli
2e3d5302bf Bugfix timedelta v2 (#5349)
* Bugfix timedelta v2

* fix volvo

* fix lint
2017-01-15 23:53:37 +01:00
Gianluca Barbaro
6b91d9a75c Update keyboard_remote.py (#5341)
Now it fires events in case the keyboard disconnects and/or disconnects
2017-01-15 14:05:41 -08:00
Heiko Rothe
ad23613cdc Fixed the lannouncer platform get_service method (#5352) 2017-01-15 13:45:54 -08:00
freol35241
c8cf952e21 Remove import of datetime module 2017-01-15 21:10:02 +01:00
freol35241
01d9e6cdfe Removing throttle decorator
Removing redundant throttle decorator on update method. This ensures the existing 'cache-value' config option is respected. Also, UPDATE_INTERVAL is renamed to DEFAULT_UPDATE_INTERVAL for clarity.
2017-01-15 20:53:46 +01:00
Colin O'Dell
8200827a19 Add support for direct MJPEG streams from Amcrest cameras (#5217)
* Add support for direct MJPEG streams from Amcrest cameras

The previous implementation relied on using snapshots from the camera. However,
some Amcrest models cannot keep up with the large number of requests and
instead timeout, resulting in no video stream. These cameras do provide MJPEG
streams though, so this commit adds the option to use these instead of creating
one from snapshots.

Unfortunately, some cameras on newer firmwares do not support MJPEG streams at
high resolution - only at low resolution.

By providing users with both a `resolution` and `stream_source` option, we can
allow them to choose whichever combination works for their particular model
and firmware version.

* Close the stream instead of releasing it

* Close stream without creating a task

* Handle client aborts

* fix lint
2017-01-15 20:37:24 +01:00
Fabian Affolter
633c1408fb Upgrade pylast to 1.7.0 (#5344) 2017-01-15 09:37:17 -08:00
Paulus Schoutsen
82b84f480b Fix script release (#5345) 2017-01-15 09:16:46 -08:00
Paulus Schoutsen
bcfc30264d version bump to 0.37 2017-01-15 08:40:20 -08:00
Paulus Schoutsen
c21172dd36 Merge branch 'dev' 2017-01-15 08:39:56 -08:00
Paulus Schoutsen
24bc035e22 ps - version bump to 0.36 2017-01-15 08:38:41 -08:00
Paulus Schoutsen
36da5d9adb Merge pull request #5245 from home-assistant/dev
0.36
2017-01-15 08:36:53 -08:00
Pascal Vizeli
d7d428119b Bugfix stack trace from api (#5332) 2017-01-15 08:36:24 -08:00
Pascal Vizeli
c458ee29f2 Rename log message / handle cancellederror on image proxy (#5331) 2017-01-15 08:35:58 -08:00
Lupin Demid
85a84549eb Yandex tts component (#5342)
* Added Yandex SpeechKit TTS

* Added test stub

* Added two test and added property for yandex tts

* Copy all test from voice rss

* Added test vith different speaker and  code style changes

* Added new line to end of file

* Url format replaced with url_params
2017-01-15 15:43:10 +01:00
Fabian Affolter
2465aea63b Fix link (#5343) 2017-01-15 14:53:07 +01:00
Zac Hatfield Dodds
e00e6f9db6 Bom weather platform (#5153)
* Fix typo

* Auto-config for `sensor.bom`

Deprecate (but still support) the old two-part station ID, and move to a
single `station` identifier.  Any combination of these, including none,
is valid; most results in downloading and caching the station map to
work out any missing info.

* Add `weather.bom` platform

Very similar to `sensor.bom`, but supporting the lovely new `weather`
component interface.  Easier to configure, and does not support the
deprecated config options.

* Review improvements to BOM weather

Largely around better input validation.
2017-01-15 12:12:50 +01:00
Daniel Høyer Iversen
9fff634b9d Merge pull request #5334 from MrMep/patch-1
Update vlc.py
2017-01-15 10:42:13 +01:00
Adam Mills
e7c157e766 Tests for async volume up/down (#5265) 2017-01-15 08:27:56 +01:00
Martin Hjelmare
9db1aa7629 Add discovery notify support and mysensors notify (#5219)
* Add mysensors notify platform

* Make add_devices optional in platform callback function.
* Use new argument structure for all existing mysensors platforms.
* Add notify platform.
* Update mysensors gateway.

* Refactor notify setup

* Enable discovery of notify platforms.
* Update and add tests for notify component and some platforms.
* Continue setup of notify platforms if a platform fails setup.
* Remove notify tests that check platform config. These tests are not
  needed when config validation is used.
* Add config validation to APNS notify platform.
* Use discovery to set up mysensors notify platform.

* Add discovery_info to get_service and update tests

* Add discovery_info as keyword argument to the get_service function
  signature and update all notify platforms.
* Update existing notify tests to check config validation using test
  helper.
* Add removed tests back in that checked config in apns, command_line
  and file platforms, but use config validation test helper to verify
  config.
* Add a test for notify file to increase coverage.
* Fix some PEP issues.

* Fix comments and use more constants

* Move apns notify service under notify domain
2017-01-15 03:53:14 +01:00
Gianluca Barbaro
d998cba6a2 Update vlc.py
Added default value for "arguments"
2017-01-15 01:35:46 +01:00
Gianluca Barbaro
8013963784 Update vlc.py 2017-01-14 23:31:17 +01:00
Gianluca Barbaro
7436a96978 Update vlc.py 2017-01-14 22:32:50 +01:00
Gianluca Barbaro
3d9b2b5ed0 Update vlc.py
Added support for additional optional configuration

arguments:

to send to vlc.
It is useful for special configurations of VLC.
For example, I have two sound cards on my server, so I defined two vlc media players:

media_player:
- platform: vlc
  name: speaker_1
  arguments: '--alsa-audio-device=hw:1,0'
- platform: vlc
  name: speaker_2
  arguments: '--alsa-audio-device=hw:0,0'

This way, by specifying the corresponding entity_id, I can send the output to the desired speaker.
It is also useful for TTS.
2017-01-14 22:30:24 +01:00
Thibault Cohen
3b9fb6ccf5 Improve InfluxDB (#5238)
* Revert #4791 and fixes #4696

* Update influxDB based on PR comments

* Add migration script

* Update influxdb_migrator based on PR comments

* Add override_measurement option to influxdb_migrator

* Rename value field to state when data is string type

* Fix influxdb cloning query
2017-01-14 09:52:47 -08:00
Colin O'Dell
e3418f633c Add ffmpeg to Docker from jessie-backports (#5322) 2017-01-14 09:43:40 -08:00
Fabian Affolter
bf3e5b460e Clean-up (#5327) 2017-01-14 09:42:45 -08:00
Colin O'Dell
03a6aa48e0 Copy openzwave config to ensure it exists (fixes #5328) (#5329) 2017-01-14 09:41:38 -08:00
Fabian Affolter
2aa996b558 Update name (#5324) 2017-01-14 17:08:48 +01:00
Fabian Affolter
ef4a9bf354 Add timeout to requests, remove pylint disable, and docsstrings (#5326) 2017-01-14 17:08:21 +01:00
Michaël Arnauts
d4eabaf844 Remove build dirs from docker image to keep the layers small (#5243)
* Remove build dirs from docker image to keep the layers small

* Create setup_docker_prereqs script to prepare docker env

* Add documentation for required packages, drop colorlog and cython in first step of Dockerfile since it will be installed later on anyway. Drop libglib2.0-dev and libbluetooth-dev

* Also remove early install of colorlog and cython in Dockerfile.dev

* Re-add libglib2.0-dev and libbluetooth-dev for Bluetooth LE
2017-01-14 07:41:41 -08:00
Pascal Vizeli
7ed83306ea Add warning to openalpr (#5315)
* Add warning to openalpr

* fix lint

* update comment
2017-01-14 15:36:20 +01:00
Fabian Affolter
2e7ae1d5fe Update the link to the docs (#5321) 2017-01-14 15:16:42 +01:00
joopert
f2a42d767e fix hass.loop.run_in_executor in mediaplayer init (#5320) 2017-01-14 14:54:00 +01:00
Michaël Arnauts
c3783bf49b Bugfix for ping component now DEFAULT_SCAN_INTERVAL is a timedelta (#5318) 2017-01-14 11:55:29 +01:00
Pascal Vizeli
b817c7d0c2 Bugfix camera fake image (#5314)
* Bugfix camera fake image

* add logger
2017-01-14 11:53:00 +01:00
Pascal Vizeli
c2492d1493 Component "Image processing" (#5166)
* Init new component for image processing.

* Add demo platform

* address comments

* add unittest v1 for demo

* Add unittest for alpr

* Add openalpr local test

* Add openalpr cloud platform

* Add unittest openalpr cloud platform

* Update stale docstring

* Address paulus comments

* Update stale docstring

* Add coro to function

* Add coro to cloud
2017-01-14 08:18:03 +01:00
Teemu R
5bba9a63a5 switch.tplink: bump to the newest release of pyhs100 (#5308) 2017-01-13 22:20:47 -08:00
Matthew Garrett
d6747d6aaf Add support for Zengge Bluetooth bulbs (#5196)
* Add support for Zengge Bluetooth bulbs

Adds support for the Zengge Bluetooth RGBW bulbs. These are sold under a
number of brands, including Flux. The bulbs do not support full RGBW
control - they turn off the RGB LEDs when white is enabled, and vice versa.

* Update zengge.py
2017-01-13 22:15:43 -08:00
William Scanlon
0da8418f3f Wink fan support (#5174)
* Initial commit for Wink fan support

* Added fan to discovery list

* Raise NotImplementedError and fixed is_on

* Added speed property

* Update __init__.py
2017-01-13 22:08:13 -08:00
Johann Kellerman
9f765836f8 [core] Add 'packages' to the config (#5140)
* Initial

* Merge dicts and lists

* feedback

* Move to homeassistant

* feedback

* increase_coverage

* kick_the_hound
2017-01-13 22:01:47 -08:00
Teemu R
d58b901a78 eq3btsmart: support modes and clean up the code to use climatedevice's features (#4959)
* eq3btsmart: support modes and clean up the code to use climatedevice's features

* eq3btsmart: re-add device state attributes

adds reporting for is_locked, valve, window_open and low_battery,
exposing everything the device reports currently.

* eq3btsmart: bump version req

* eq3btsmart: fix a typo in mode name, report unknown when not initialized

* eq3btsmart: depend on newly forked python-eq3bt lib, pythonify states
2017-01-13 21:34:35 -08:00
Touliloup
394b52b9e8 Xiaomi device tracker (#5283)
* [Device Tracker] Xiaomi Mi Router integration as device tracker

    This device tracker allow to track device connected to Xiaomi Router.
    Parameter: host, username (default admin) and password.

* [Device Tracker] Addition of Xiaomi device tracker file in coverage
2017-01-13 21:24:58 -08:00
Johann Kellerman
b67cce7215 Add correct line numbers for yaml include directives (#5303) 2017-01-13 21:13:17 -08:00
Pascal Vizeli
0cf3c22da0 Bugfix media_player volume_ up and down (#5282)
* Bugfix media_player volume_ up and down

* fix lint

* make a coro
2017-01-13 21:09:02 -08:00
Martin Rowan
a7cb9bdfff Fixed bootstrap to upgrade pip if mininum version not present. As parameter --only-binary in requirements.txt doesn't work on pip < 7.0.0 so install fails. This is to simplify the setup of the development environment when using pyvenv. (#5301) 2017-01-13 21:03:50 -08:00
Dan Cinnamon
5f7d53c06b Bump pyenvisalink to version 2.0 (#5311) 2017-01-13 21:02:33 -08:00
Pascal Vizeli
4b43537801 Bugfix camera streams (#5306)
* fix mjpeg streams

* fix trow error on close by frontend

* fix ffmpeg
2017-01-13 15:57:38 -08:00
Adam Mills
6abad6b76e Version bump for kodi dependency (#5307)
Catches timeout exceptions
2017-01-14 00:16:38 +01:00
Robbie Trencheny
6000c59bb5 Remove GTFS default name & string change 2017-01-13 14:02:00 -08:00
Pascal Vizeli
2c3f55acc4 Add HMWIOSwitch to sensor, binary (#5304) 2017-01-13 22:39:42 +01:00
Pascal Vizeli
a30711f1a0 Update pyhomematic 1.19 & small cleanups (#5299) 2017-01-13 21:22:09 +01:00
Thom Troy
1219ca3c3b [sensor] Add Dublin bus RTPI sensor (#5257) 2017-01-13 19:15:46 +02:00
Pascal Vizeli
baa8e53e66 Bugfix group reload (#5292)
* Bugfix group / hit update

* try to fix round 2

* Convert it to coro

* Don't check statemachine, check unsub listener.
2017-01-13 03:29:20 -08:00
William Scanlon
f7a1d63d52 Support for TrackR device trackers (#5010)
* Support for TrackR device trackers

* Change small style for hass
2017-01-13 00:16:05 +01:00
Pascal Bach
d12decc471 Upgrade to voluptuous to 0.9.3 (#5288) 2017-01-12 23:56:37 +01:00
Pascal Bach
64800fd48c Upgrade distro to 1.0.2 (#5291) 2017-01-12 23:16:32 +01:00
Greg Dowling
9a3c0c8cd3 Don't build Adafruit_BBIO - doesn't work on all platforms. (#5281)
* Don't build Adafruit_BBIO - doesn't work on all platforms.

* Disable pylint import warning on BBIO.
2017-01-12 08:31:30 -08:00
Greg Dowling
d4a54acda0 Merge pull request #5280 from home-assistant/bump-pywemo-version
Bump pywemo version.
2017-01-11 23:26:06 +00:00
pavoni
dc937cc8cf Bump pywemo version. 2017-01-11 23:10:24 +00:00
Adam Mills
eb9b95c292 Convert flic to synchronous platform. (#5276)
* Convert flic to synchronous platform.

pyflic is a synchronous library

* Move pyflic event loop to dedicated thread.
2017-01-11 22:59:39 +01:00
Paulus Schoutsen
e68e29e03e Upgrade to aiohttp 1.2 (#4964)
* Upgrade to aiohttp 1.2

* Clean up emulated_hue tests
2017-01-11 21:25:02 +01:00
Andrew Williams
1cf9ae5a01 Fix TCP sensor to correctly use value_template (#5211)
* Fix TCP sensor to correctly use value_template

* Fix TCP component tests

* Update tcp.py
2017-01-11 17:26:29 +01:00
Pascal Vizeli
3f3a3bcc8a Cleanup language support on TTS (#5255)
* Cleanup language support on TTS

* change to default_language & address comments

* Cleanup not needed code / comment from paulus
2017-01-11 16:31:16 +01:00
Daniel Høyer Iversen
467cb18625 Add last triggered to script (#5261)
* Add last triggered to script

* Add tests for script last_triggered
2017-01-11 16:23:05 +01:00
Robbie Trencheny
82d037a828 Merge pull request #5117 from gopalkildoliya/dev
Notify component for Facebook Messenger
2017-01-10 23:16:43 -08:00
Marcelo Moreira de Mello
34a9fb01ac Bump flux_led version and make use of PyPi package (#5267)
* Bump flux_led version and make use of PyPi package

* Makes script/gen_requirements_all.py happy
2017-01-11 06:45:46 +01:00
joopert
3a4b4380a1 Add support for NAD receivers (#5191)
* Add support for NAD receivers

* remove self.update() in various methods

* remove setting attributes in various methods

* Change import to hass style
2017-01-10 22:32:43 +01:00
Pascal Vizeli
6b00f7ff28 Bugfix async device_tracker see callback (#5259) 2017-01-10 17:19:51 +01:00
Valentin Alexeev
f75e13f55e Use SHA hash to make token harder to guess (#5258)
* Use SHA hash to make token harder to guess

Use hashlib SHA256 to encode object id instead of using it directly.

* Cache access token

Instead of generating a token on the fly cache it in the constructor.

* Fix lint
2017-01-10 16:01:04 +01:00
sander76
6845a0974d adding a default icon "blind" to a PowerView blinds scene. (#5210)
* adding a default icon "blind" to a PowerView blinds scene.

* Adding icon property to define blind icon. Removed it from the state attributes dict.

* fixing lint error
2017-01-10 13:21:15 +01:00
Anton Lundin
7e1629a962 Fix async_volume_up / async_volume_down (#5249)
async_volume_up / async_volume_down should be async versions of
volume_up / volume_down, not a async version of the default variants of
volume_up / volume_down.

The previous code always called into the mediaplayers set_volume_level,
and never into volume_up / volume_down.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-01-10 10:58:39 +01:00
andrey-git
0b685a5b1e Expose supported_features of mqtt_json (#5250)
* Expose supported_features of mqtt_json

* Remove whitespace
2017-01-10 00:40:52 +01:00
Johann Kellerman
1f31dfe5d3 [recorder] Include & Exclude domain fix & unit tests (#5213)
* Tests & domain fix

* incl/excl combined
2017-01-09 21:53:30 +01:00
Fabian Affolter
6be19e8997 Update pytz to 2016.10 (#5247) 2017-01-09 21:50:38 +01:00
Johann Kellerman
e6a9b6404f [sensor/sma] SMA Solar Inverter sensor (#5118)
* Initial

* Rebase ensure_list

* timedelta & remove prints
2017-01-09 21:35:47 +01:00
Fabian Affolter
dd7cafd5e3 Upgrade TwitterAPI to 2.4.3 (#5244) 2017-01-09 21:34:18 +01:00
Adam Mills
c7249a3e3a Build libcec for Docker image (#5230)
* Build libcec for Docker image

* Update development dockerfile as well

* Dynamically load python paths for current version
2017-01-09 17:49:11 +01:00
Pascal Vizeli
bb02fc707c [device_traker/upc] New UPC connect box platform (#5100) 2017-01-09 18:08:37 +02:00
Michaël Arnauts
3ed7c1c6ad Add Lannouncer tts notify component (#5187)
* Add Lannouncer notify component

* Send message by opening a raw TCP socket instead of using requests. Cleanup of method validation.

* Use 'return' instead of 'return None'
2017-01-09 14:10:46 +01:00
Terry Carlin
ee055651cd Update insteon_local.py (#5236)
Correct typo
2017-01-09 12:11:15 +01:00
St. John Johnson
9fdefa5a1d Fix #5188 by Closing the stream instead of Releasing it (#5235)
* Fix #5188 by Closing the stream instead of Releasing it

Closing just terminates the connection, release attempts to download all the contents before closing.  Since the MJPEG stream is infinite, it loads and loads content until the python script runs out of memory.

Source: 50b1d30f41/aiohttp/client_reqrep.py (L668-L672)

* Update mjpeg.py
2017-01-09 10:35:38 +01:00
Paulus Schoutsen
f87016afe6 Update MDI 2017-01-09 01:38:27 +01:00
Paulus Schoutsen
b685e6e2b5 Update frontend 2017-01-09 01:38:04 +01:00
Paulus Schoutsen
5983dc232f Update frontend 2017-01-09 01:14:13 +01:00
Adam Mills
469472914b Add SUPPORT_PLAY flag (#5181)
* Add SUPPORT_PLAY flag

* Add SUPPPORT_PLAY to existing media players

* Leave usage of new flag to device devs
2017-01-09 01:09:30 +01:00
Craig J. Ward
a3971d7ad1 Insteon local (#5088)
* platform set-up begin components

* lights seem to be getting set up properly, not sure why they aren't being added...

* typo

* Dependencies line

* toggle working

* toggle working

* added the switch to insteon_local

First commit hope to test tonight or in the morning

* Update insteon_local.py

* Update insteon_local.py

* Update insteon_local.py

* Update insteon_local.py

* Update insteon_local.py

* Update insteon_local.py

* Update insteon_local.py

* Update insteon_local.py

* Update insteon_local.py

* Update insteon_local.py

* Update insteon_local.py

* move dependency declaration before import?

* Move dependencies in Switch

* Update insteon_local.py

* wait for response

* switched the while to an if

switched the while 'cmd2' not in resp: to an if 'cmd2' not in resp: this seems to have the updater working

* Switched the while sleep loop to an if

switched the wile cmd2 not ins resp to be if cmd2 not in resp seems to be working.

* Update insteon_local.py

* import statement

Updated the import statement to import the instance of the insteon_local component not the hub Instance.

* updated import and the device assignment

update the import to import the instance of the insteon_local component not the hub.

* more changes to support the import change

* more changes to support the import change

* change to hass.data and add loop logic

* &&

* Update insteon_local.py

* Update insteon_local.py

* logic fixes and throttle

* reduce polling time

* brightness support

* import util

* hound fixes

* requirements file

* more hound fixes

* newline

* newline weirdness

* lint fixes

* more lint fixes

* switch state

* Update insteon_local.py

* log cmd2 for debugging

* assume success

* remove check for none

* fix comments

* fix comments again

* fix comments, add fixed version of lib, add support for timeout, add support for port, handle invalid login and connection problems

* fix logging exception

* fix hounceci-bot errors

* fix hounceci-bot errors

* requirements fix

* unique-id changes

* make dimmer off use saved ramp rate

* configurator working for lights

* configurator working for switches?

* configurator working for switches?

* include model names and fix lint errors

* lint fix

* fix exception order

* lint fixes

* fix lint errors

* update to use insteon local 0.38

* fix device id

* move status check to library

* move status check to library

* add SKU to setup

* lint fixes

* requirements

* linting
2017-01-09 00:33:35 +01:00
markferry
2b14d407c0 onkyo: fix selecting sources with only one name (#5221) 2017-01-08 23:59:26 +01:00
happyleavesaoc
81f988cf9e date fix (#5227) 2017-01-08 23:50:42 +01:00
happyleavesaoc
f643149d24 usps sensor: better delivery handling (#5202)
* better delivery handling

* bump dep version
2017-01-08 14:35:14 +01:00
dasos
fd50201407 Squeezebox JSON-RPC (#5084)
* Refactor of Squeezebox connection code

* Refactor of Squeezebox connection code

* Typos

* Make Python 3.4 friendly

* Addressing comments

* Improving docstring

* Using discovered port

* Style better

* Accept new disco object

* Revert "Accept new disco object"

* Make it obvious that port isn't discovered yet

* Flake8. ;)
2017-01-08 14:32:15 +01:00
Jan Losinski
469aad5fc8 Add teardown method to pilight tests (#5195)
* Add teardown method to pilight tests

This is necessary to stop the HomeAssistant instance that was started
in the setUp method. Without this there happen random test failures.

This is necessary to stabilize the tests for PR #5045.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Update test_pilight.py
2017-01-08 14:23:01 +01:00
Pascal Vizeli
a65388e778 Bugfix segfault with new helper track_time_interval (#5222)
* Bugfix sigfault with new helper track_time_interval

* Add none init also to sunrise/sunset for consistance
2017-01-08 14:06:15 +01:00
Lewis Juggins
41ef6228be [device_tracker] Use home zone GPS coordinates for router based devices. (#4852) 2017-01-07 23:09:07 +02:00
Pascal Vizeli
ca4a857532 Improve aiohttp default clientsession close with connector (#5208) 2017-01-07 21:11:19 +01:00
Lewis Juggins
81922b88a2 [calendar] Fix scan interval (#5205) 2017-01-07 11:24:25 +01:00
Paulus Schoutsen
aa1e4c564c Fix tests closing properly (#5203) 2017-01-07 01:47:25 +01:00
Pascal Vizeli
2b991e2f32 [new] component rest_command (#5055)
* New component rest_command

* add unittests

* change handling like other command

* change unittest

* address @balloob comments
2017-01-06 23:42:53 +01:00
Pascal Vizeli
1719d88602 Bugfix default values to timedelta (#5193)
* Bugfix default values to timedelta

* fix unittests
2017-01-06 00:16:12 +01:00
Jared J
c959637ebe Add Yeelight auto discovery, color temp (#5145)
* Add Yeelight auto discovery, color temp

* Fixing linting issues
2017-01-05 23:39:28 +01:00
Ryan Kraus
db623040a4 Re-enabled Weather Sensors for the ISY component. (#5148)
* Re-enabled Weather Sensors for the ISY component.

As the ISY component had been updated to support newer components and
have better UOM support, the support for ISY’s weather module was
dropped. This adds that support back into Home Assistant.

* Cleanup of the ISY Weather support.

Cleaned up the for loops used to generate nodes representing weather
data from the ISY. Moved the weather_node named tuple to the top of the
file so that it can be more easily identified.

* Update isy994.py
2017-01-05 23:33:52 +01:00
Michaël Arnauts
ba29ba0fc3 Universal media_player returns ATTR_MEDIA_POSITION and ATTR_MEDIA_POSITION_UPDATED_AT from it's active child now. (#5184) 2017-01-05 23:15:26 +01:00
Adam Mills
93d462b010 Fix for async device_tracker (#5192) 2017-01-05 23:10:43 +01:00
Pascal Vizeli
50a8ec7335 Bugfix aiohttp connector pool close on shutdown (#5190)
* Bugfix aiohttp connector pool close on shutdown

* fix circular import

* remove lint disable
2017-01-05 23:09:04 +01:00
Nick Touran
a36ca62445 Support longer-than-60-second scan_interval and interval_seconds (#5147)
* Update scan_interval and interval_seconds max to 1 day vs. 60 seconds

* Format fixes

* Add docstring on unittest.

* Added and implemented new async_track_time_interval helper.

* Format fixes, removed unused import.

* Undid whoops on unsub_polling.

* Updated unit tests for scan_interval.

* Added unit test for track_time_interval.

* Allow other forms of time interval input for scan_interval and interval_seconds
2017-01-05 23:05:16 +01:00
Paulus Schoutsen
f88b5a9c5e Update frontend 2017-01-05 22:28:48 +01:00
webworxshop
51446e0772 Add support for customised Kankun SP3 Wifi switches. (#5089)
* Add support for customised Kankun SP3 Wifi switches.

* Add config validation for Kankun SP3 wifi switch.

* Update kankun.py
2017-01-05 22:16:00 +01:00
MrMep
95ddef31fe Update keyboard_remote.py (#5112)
* Update keyboard_remote.py

I changed os.path.isFile() to os.path.exists: as far as I know isFile doesn't work with device files. At least on my Ubuntu it wasn't working.

Then I added some error control in case the keyboard disconnects: with bluetooth keyboards this happen often due to battery saving. Now it reconnects automatically when the keyboard wakes up.

We could fire an event to hass when the keyboard connects-disconnects, maybe I'll do this later.

We should also manage errors due to permissions problems on the device file, or at least give some info in the docs about how to allow HA to grab control over an system input file.

I'm sorry if my coding isn't up to some standard practice I'm not aware of: I'm new to HA and to python itself, I'm just trying to be of help.
Gianluca

* Update keyboard_remote.py

I changed some other few things.

Not the component gets loaded even if the keyboard is disconnected. When it connects, it starts to fire events when keys are pressed.

I also added a sleep(0.1) that reduces a lot the load on the CPU, but without many consequences on key pressed detection.
2017-01-05 22:03:05 +01:00
Adam Mills
276a29c8f4 Convert Kodi platform to async (#5167)
* Convert Kodi platform to async

* Remove unnecessary async_update_ha_state
2017-01-05 21:01:13 +01:00
Martin Vacula
6b682d0d81 Beaglebone black GPIO control by switch v2 (#4908)
* Added support for BBB GPIO

* Requirements updated

* unnecessary pylint statement removed

* Changed according arduino switch

* typo corrected

* Hound errors solved

* lint error

* Update bbb_gpio.py
2017-01-05 20:53:48 +01:00
Johann Kellerman
cbda516af9 ensure_list validator - Allow None to return an empty list (#5133) 2017-01-05 21:33:22 +02:00
Michaël Arnauts
cb85128304 Speeds up lint and test in docker by keeping the cache between invocations. (#5177)
* Add a volume to store the tox cache on the host. This gives quite some speed boost when running lint_docker and test_docker.

* Only map .tox directory for cache.
2017-01-05 09:45:14 +01:00
happyleavesaoc
74aa8194d7 USPS sensor (#5180)
* usps sensor

* Update usps.py
2017-01-05 09:44:15 +01:00
Sander de Leeuw
497a1c84b5 Fixed invalid response when sending a test-request from Locative iOS app (#5179) 2017-01-05 10:05:39 +02:00
Daniel Høyer Iversen
2f907696f3 [WIP] Spread the traffic to yr.no servers and remove yr.no from the default… (#5171)
* Spread the traffic to yr.no servers and remove yr.no from the default config

* use unique address for yr.no

* update yr tests

* Wait 10 min extra before requesting new data

* Update config.py

* Update yr.py
2017-01-04 23:20:30 +01:00
Brent Hughes
4ef7e08553 Rewrite influxdb metrics to be more consistent (#4791)
* Updated to make all metrics consistent

* Updated existing test for new format

* Updated checks on lists and dictionarys
2017-01-04 22:36:54 +01:00
Matthew Garrett
ff0788324c Add support for Tikteck Bluetooth bulbs (#4843)
* Add support for Tikteck Bluetooth bulbs

Adds support for the Tikteck RGBW BLE bulbs. These don't provide "true" RGBW
support - at a certain point in RGB space, the white LEDs turn on. Each bulb
has a specific key that needs to be extracted from the Android app.

* Update tikteck.py
2017-01-04 22:31:31 +01:00
doudz
9f65b8fef5 add offline tts using pico (#5005)
* add offline tts using pico

* Update picotts.py

* Update picotts.py

* Update picotts.py

* Update picotts.py

* Update picotts.py

* Update picotts.py

* Update picotts.py

* Update .coveragerc
2017-01-04 22:05:41 +01:00
Daniel Høyer Iversen
67ab1f69d8 user agent header (#5172)
* user agent in header

* update user agent info

* Use user-agent from lib
2017-01-04 21:15:50 +01:00
Michaël Arnauts
5e8e2a8312 Ping device tracker (#5176)
* Ping device tracker

* Style fixes
2017-01-04 21:06:09 +01:00
Dan Smith
6ed3c69604 Bump uvcclient to 0.10.0 (#5175)
This brings fixes for newer versions of unifi-video and a few
fixes.
2017-01-04 19:55:16 +01:00
Gopal
d09dcc4b03 Timeout and Constant added 2017-01-04 18:23:29 +05:30
Florian Holzapfel
3f7a629079 fix #5157 (#5173) 2017-01-04 13:16:52 +01:00
Oliver
8e61fab579 Pushed to another version of denonavr library with fixes for AVR-nonX devices (#5156) 2017-01-04 00:02:44 +01:00
Magnus Ihse Bursie
d9614cff46 Improve async/multithreaded behavior of tellstick code (#4989)
* Refactor tellstick code for increased readability. Especially highlight if "device" is a telldus core device or a HA entity.

* Refactor Tellstick object model for increased clarity.

* Update comments. Unify better with sensors. Fix typo bug. Add debug logging.

* Refactor tellstick code for increased readability. Especially highlight if "device" is a telldus core device or a HA entity.

* Refactor Tellstick object model for increased clarity.

* Update comments. Unify better with sensors. Fix typo bug. Add debug logging.

* Fix lint issues.

* Remove global variable according to hint from balloob.

* Better async/threading behavior for tellstick.

* Fix lint/style checks.

* Use hass.async_add_job
2017-01-03 23:54:11 +01:00
Adam Mills
2a7a419ff3 Async support in media player component (#4995)
* Async support in media player component

* Removed redundant new tests

* Update to new 'reduce coroutine' standards

* Remove extra create_task
2017-01-03 23:51:23 +01:00
Nathan Henrie
b78cf4772d Add ability to set rpi_rf tx_repeats attribute (#5070)
* Add ability to set rpi_rf `tx_repeats` attribute

Uses the current `rpi_rf` default of 10
Closes home-assistant/home-assistant#5069

* Use `signal_repetitions` instead of `repeats` for consistency
2017-01-03 23:46:30 +01:00
Daniel Høyer Iversen
ebfb2c9b26 Broadlink fix (#5065)
* Broadlink fix

* style fix

* style fix

* typo

* restructure

* Update broadlink.py

* Update broadlink.py

* Add support for more devices

* fix library version

* fix library version

* fix library version

* fix library version

* fix library version

* Update broadlink.py

* lib version

* remove lower

* remove lower

* refactor

* refactor

* refactor

* authorization

* authorization

* refactor

* lib version

* lib version
2017-01-03 23:45:11 +01:00
Thibault Cohen
e17ce4f374 Improve Sharp Aquos TV component - Fixes #4973 (#5108) 2017-01-03 23:38:21 +01:00
Giannie
67b74abf8d Allow selection of bluetooth device to use (#5104)
Adding the device_id key to the bevice tracker component allows selecting the bluetooth device to use in case the default device does not have BLE Capabilities
2017-01-03 23:34:51 +01:00
Brandon Weeks
c14a5fa7c1 Upgrade samsungctl to 0.6.0 (#5126) 2017-01-03 23:28:23 +01:00
Matthew Garrett
2970196f61 Add support for limiting which entities are recorded (#4733) 2017-01-04 00:19:28 +02:00
Johann Kellerman
4692ea85b7 [mqtt] Embedded MQTT server fix (#5132)
* Embedded MQTT server fix and schema

* feedback
2017-01-03 23:17:56 +01:00
Adam Mills
018d786f36 Kodi cleanup and config update (#5098) 2017-01-03 21:41:42 +01:00
Mike Hennessy
254eb4e88a Change zeroconf to use local ip not base_url (#5151)
Rather than rely on base_url being unconfigured and therefore be
set as the host ip in the api component, get the local ip directly.

Use server port from the http component instead of the api component
where it will be None if base_url is set.

Change the exception catch meant to check for ipv4 vs ipv6 to wrap the
address encoding only instead of the zeroconf service info declaration.
2017-01-03 21:39:42 +01:00
Paulus Schoutsen
9eed03108f Run tests on Python 3.6 (#5162)
* Run tests on Python 3.6

* Fix dsmr test

* Fix async util tests

* Fix rest sensor test
2017-01-03 21:33:48 +01:00
eieste
fdd3fa7d80 Apple TouchBar icon Support (mask-icon) (#5159)
* Update index.html

Add Apple TouchBar icon Color Support

* Add svg icon

* Change path to SVG icon

* Rename mask-icon.svg to home-assistant-icon.svg

* Remove useless whitespace

* Update index.html
2017-01-03 21:32:40 +01:00
Daniel Høyer Iversen
6ec500f2e7 issue #5101 (#5161) 2017-01-03 21:13:02 +01:00
andrey-git
a0a9f26312 Keep previous brightness of dimming zwave light upon turning it on/off (#5160)
* Keep previous brightness of dimming zwave light upon turning it on/off

* Fix initialization

* Use value 255 to set dimmer to previous value
2017-01-03 20:31:44 +01:00
Adam Mills
21f59a0732 Merge pull request #5150 from Zac-HD/fix-contrib-link
Fix link to pull request advice for contributors
2017-01-03 14:24:53 -05:00
Brandon Weeks
52f6fe3e06 Add version test for monkey_patch_asyncio() (#5127)
* Add version test for monkey_patch_asyncio()

* Update __main__.py
2017-01-03 17:47:33 +01:00
Dan Smith
f71027a9c7 Nx584 maint (#5149)
* Update nx584 requirement to 0.4

There have been a few bug fixes to nx584 since 0.2, so this just updates
our requirement to pull in the newer version.

* Fix nx584 if no partitions are found

If we succeed in our connection to the panel but find no
configured partitions, then we will fall through to the bypass
probe and fail because 'zones' is never initialized. This fixes
both exception paths and adds a test that would poke it.
2017-01-03 08:19:33 +01:00
Zac-HD
328ff6027b Fix link to pull request advice for contributors 2017-01-03 14:26:24 +11:00
Michaël Arnauts
c864ea60c9 Improve development workflow in docker (#5079)
* Allow bower install of frontend components as root. Needed for frontend development in docker since everything runs as root in the docker image.

* Improve development workflow in docker

* Use LANG=C.UTF-8 in tox. Fixes installation of libraries with UTF-8 in it's readme.

* Install mysqlclient psycopg2 uvloop after requirements_all.txt again, but with a --no-cache-dir this time. Allows bootstrap_frontend to be executed in a different path like the other scripts.
2017-01-02 22:04:09 +01:00
Pascal Vizeli
b2371c6614 Update device_traker for async platforms (#5102)
Async DeviceScanner object, migrate to async, cleanups
2017-01-02 21:50:42 +02:00
John Arild Berentsen
9c6a985c56 [zwave]Use schedule_ha_state and add debug message (#5143)
* Use schedule_ha_state and add debug message

* Logger not defined
2017-01-02 18:55:56 +01:00
John Arild Berentsen
5c006cd2d2 Prevent Homeassistant to create a segfault with OZW (#5085) 2017-01-02 18:53:46 +01:00
andrey-git
a7cc7ce476 Clean up DEFAULT_DEBUG constant in zwave (#5138)
Nice 👍
2017-01-02 18:45:44 +01:00
John Arild Berentsen
23f16bb68f Catch RuntimeError (#5134) 2017-01-02 18:45:10 +01:00
Greg Dowling
8a463ef7a4 Merge pull request #5142 from home-assistant/bump_loop_energy
Bump pyloopenergy to catch SSL exception.
2017-01-02 15:02:08 +00:00
pavoni
9af1e0ccf3 Bump pyloopenergy to catch SSL exception. 2017-01-02 14:15:38 +00:00
jtscott
a8a98f2585 [climate] Fix typo in services.yaml (#5136) 2017-01-02 10:17:52 +00:00
andrey-git
7fbf68df35 Add print_config_parameter service to Z-Wave (#5121)
* Add print_config_param service to z-wave

* Add print_config_parameter service to z-wave

* Add print_config_parameter service to z-wave

* Fix typos

* Fix typos

* Fix typo
2017-01-01 21:10:45 +01:00
Mark
01be70cda9 Philio 3-in-1 Gen 4 zwave sensor needs the no-off-event workaround. (#5120) 2017-01-01 20:40:34 +01:00
Gopal
e89aa6b2d6 File added to coveragerc 2016-12-31 10:11:30 +05:30
Gopal
227fb29cab Facebook notify updated 2016-12-31 09:59:44 +05:30
Felix
d04ee66669 Fixes moldindicator sensor after switch to asyncio (#5038) 2016-12-30 11:16:34 +01:00
Thibault Cohen
9e66755baf Fix proximity issue (#5109) 2016-12-30 08:51:37 +01:00
Pascal Vizeli
0ecd185f0d Bugfix close async log handler (#5086) 2016-12-29 17:27:58 +01:00
Jesse Newland
a2f17cccbb Replace dots in Alexa built-in intent slots w/ underscores (#5092)
* Replace dots in built-in intent slots w/ underscores

* Add a built-in intent test
2016-12-29 17:26:23 +01:00
Gopal
6892048de0 Facebook Notify Started 2016-12-29 18:19:11 +05:30
Johann Kellerman
aaff8d8602 Qwikswitch library PyPi update (#5099) 2016-12-29 11:08:11 +02:00
Brent Hughes
cf714f42df Added Ledenet protocol support to flux_led (#5097)
* Added Ledenet protocol support to flux_led

* Made the protocol config lowercase
2016-12-28 23:21:29 -06:00
Johann Kellerman
f0b1874d2d Fix up docstring for tests (#5090) 2016-12-28 20:04:59 +02:00
Magnus Ihse Bursie
98efbbc129 Fix typo. (#5087) 2016-12-28 08:12:10 +01:00
Magnus Ihse Bursie
d8ff22870a Include flake8-docstrings to test requirements to better mimic tox -e lint (#4926) 2016-12-28 07:26:27 +02:00
John Arild Berentsen
fee47f35b9 Improvements to zwave lock platform (#5066) 2016-12-27 22:08:35 +01:00
Brian Torres-Gil
7b6503c017 Ecobee service fix and new 'resume program' service (#4510)
* ecobee_set_fan_min_on_time: fix issue using 'entity_id' field and add service field help text

* climate.ecobee: add 'resume_program' service

* Add default value for resume_all and correct entity_id field name reference
2016-12-27 21:56:26 +01:00
Michaël Arnauts
c77b4a4806 Update icons from materialdesignicons.com (#5081) 2016-12-27 21:36:07 +01:00
andrey-git
4728fa8da6 Allow to specify TTS language in the service call. (#5047)
* Allow to specify TTS language in the service call.

* Allow to specify TTS language in the service call.

* Respect 79 char limit

* Fix "Too many blank lines"

* Fix "Too many blank lines"

* Fix "Too many blank lines"

* Change language to be optional parameter of *get_tts_audio

* Change language to be optional parameter of *get_tts_audio

* Respect 79 char limit

* Don't pass "None

* Use default of "None" for TTS language

* Use default of "None" for TTS language

* Don't pass "None"

* Change TTS cache key to be hash_lang_engine

* Change language from demo to en

* Fix wrong replace
2016-12-27 17:01:22 +01:00
Daniel Høyer Iversen
68865ec27b upgrade miflora (#5075)
Add an optional extended description…
2016-12-27 09:24:05 +01:00
Fabian Affolter
c5f70e8be3 Upgrade speedtest-cli to 1.0.1 (#5073) 2016-12-26 16:41:18 +01:00
Fabian Affolter
ec89accd29 Upgrade psutil to 5.0.1 (#5072) 2016-12-26 16:31:44 +01:00
Fabian Affolter
ac1063266c Upgrade pyowm to 2.6.0 (#5071) 2016-12-26 16:31:26 +01:00
Hydreliox
5b619a94ad Add sensor for International Space Station (#4968)
* Add sensor for International Space Station

* Change two sensors to one with attributes.

* Fix due to comments in HA PR. Thanks !

* Update Requirement
2016-12-26 16:02:11 +01:00
Pascal Vizeli
244cdf43d0 Async reduce coro (#5001)
* Asyncio coro reduce

* Replace comments
2016-12-26 14:10:23 +01:00
Pascal Vizeli
22d1bf0acd Async migrate climate (#5026)
* Async migrate climate

* Change update handling
2016-12-26 14:09:15 +01:00
Johan Bloemberg
43e5d28643 Fix and test for prefixed MAC addresses. (#5052)
* Fix and test for prefixed MAC addresses.

* Fix style.

* Don't commit old code.

* Fix style.
2016-12-26 14:02:12 +01:00
abmantis
e5dfcf7310 Emulated hue: add support for cover open/close (#5057)
* add support for cover open/close

* fix action compare; reduce line width
2016-12-26 14:00:43 +01:00
abmantis
1c1b04718f emulated_hue: fix alexa "device not responding" (#5058)
* emulated_hue: fix alexa "device not responding"

we need to set the brightness to 100 for devices that only turn on

* emulated_hue: dont override brightness for scenes/scripts

* emulated_hue: python and semi-colons

* emulated_hue: fix output brightness level
2016-12-26 13:58:32 +01:00
Paulus Schoutsen
ce24ef0c20 Merge branch 'master' into dev 2016-12-23 07:08:33 +01:00
Paulus Schoutsen
308d71c448 Merge pull request #5032 from home-assistant/release-0-35-3
0.35.3
2016-12-23 07:05:54 +01:00
Josh Nichols
203c1cfc96 Nest fixes (#5011)
* Updated Nest API to have logical names

* Fix NoneType not having replace method in NestSensor constructor

* Move name setting to constructor, in case zone.name causes IO.

* normalize is_online to online

* Updated python-nest API

* push is_* helpers down to python-nest, and use inheritence to implement rather than checking class name

* Update python-nest
2016-12-22 20:25:43 +01:00
Josh Nichols
6c50f53696 Nest fixes (#5011)
* Updated Nest API to have logical names

* Fix NoneType not having replace method in NestSensor constructor

* Move name setting to constructor, in case zone.name causes IO.

* normalize is_online to online

* Updated python-nest API

* push is_* helpers down to python-nest, and use inheritence to implement rather than checking class name

* Update python-nest
2016-12-22 20:22:07 +01:00
John Mihalic
5e1e5992af Update pyHik requirement version (#5040) 2016-12-22 18:45:05 +01:00
Pascal Vizeli
9bf4a53fbb Bugfix async log handle re-close bug (#5034)
* Bugfix async log handle re-close bug

* Check on running thread on async_close

* Fix now on right place
2016-12-22 16:09:16 +01:00
Pascal Vizeli
334b3b8636 Bugfix async log handle re-close bug (#5034)
* Bugfix async log handle re-close bug

* Check on running thread on async_close

* Fix now on right place
2016-12-22 16:08:01 +01:00
Pascal Vizeli
f18a88c2d4 Bugfix create a task from a task in component update (#5033) 2016-12-21 15:12:26 +01:00
Pascal Vizeli
9a16054867 Bugfix create a task from a task in component update (#5033) 2016-12-21 15:11:14 +01:00
Pascal Vizeli
35b4da0aa2 Bugfix voicerss post api (#5021)
* Bugfix voicerss post api

* fix unittest

* Add cache to service description
2016-12-21 11:49:56 +01:00
pvizeli
61fc4ca8fe Version bump to 0.35.3 2016-12-21 11:47:38 +01:00
Pascal Vizeli
4c9347eb2a Fix spell media_player service (#5030)
Add an optional extended description…
2016-12-21 11:39:59 +01:00
Pascal Vizeli
25469dd8ee Bugfix voicerss post api (#5021)
* Bugfix voicerss post api

* fix unittest

* Add cache to service description
2016-12-21 10:22:12 +01:00
Johann Kellerman
b170f4c399 Spread seconds (#5025) 2016-12-21 08:42:23 +01:00
Johann Kellerman
a8b3900913 device_tracker (#5023)
2
2016-12-21 08:40:44 +01:00
Daniel Høyer Iversen
39bdd5310b Merge pull request #5022 from home-assistant/broadlink_bug_fix
Solve some bugs in the broadlink switch
2016-12-21 05:24:16 +01:00
Daniel Høyer Iversen
133c03ee57 style fix 2016-12-20 21:16:18 +01:00
Daniel Høyer Iversen
f224ee7229 Solve some bugs in the bradlink switch 2016-12-20 21:05:54 +01:00
Petr Vraník
1aea3e0d51 script/lint only on python files (#5018) 2016-12-20 13:06:53 +02:00
Daniel Perna
877efac630 Add missing support for HMIP-PSM (#5013) 2016-12-20 11:39:29 +01:00
Hugo Dupras
ee6fb93018 Hotfix for Netatmo Camera (#4998)
Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>
2016-12-19 07:47:38 -08:00
Daniel Høyer Iversen
08591aacc9 Merge pull request #5000 from home-assistant/rfxtrx_lib_0.14
rfxtrx lib upgrade
2016-12-19 11:54:58 +01:00
Daniel Hoyer Iversen
2cb67eca46 rfxtrx lib upgrade 2016-12-19 11:35:00 +01:00
Daniel Høyer Iversen
00b80d4fe1 Support for broadlink sp (#4961)
* initial support for broadlink sp

* style fix

* style

* bug fix
2016-12-18 17:59:08 -08:00
Paulus Schoutsen
53dde0e4e1 Unbreak dev 2016-12-18 17:35:42 -08:00
Paulus Schoutsen
4778ec4f94 Merge branch 'master' into dev 2016-12-18 15:02:02 -08:00
Paulus Schoutsen
3ea984ca25 Version bump to 0.35.2 2016-12-18 15:00:37 -08:00
Paulus Schoutsen
1258c4c680 Base url: Fix external port different from internal port (#4990)
* Base url: Fix external port different from internal port

* Add base_url example to new config
2016-12-18 15:00:16 -08:00
Paulus Schoutsen
ed0d14c902 Base url: Fix external port different from internal port (#4990)
* Base url: Fix external port different from internal port

* Add base_url example to new config
2016-12-18 14:59:45 -08:00
Paulus Schoutsen
75dd391118 Merge pull request #4988 from home-assistant/release-0-35-1
0.35.1
2016-12-18 14:11:10 -08:00
Paulus Schoutsen
76a9eba744 Version bump to 0.35.1 2016-12-18 13:00:35 -08:00
Paulus Schoutsen
31fe1d28e8 Gracefully exit with async logger (#4965)
* Gracefully exit with async logger

* Lint
2016-12-18 13:00:21 -08:00
Pascal Vizeli
a4a38c8a00 Bugfix TTS clear cache (#4974)
* Bugfix TTS base url with certificate

* fix lint

* remove base_url stuff fix only clear_cache stuff

* cleanup
2016-12-18 13:00:21 -08:00
Paulus Schoutsen
3b74cc606e Allow setting base url (#4985) 2016-12-18 13:00:21 -08:00
Pascal Vizeli
b750319de4 Bugfix wait in automation (#4984) 2016-12-18 13:00:21 -08:00
andrey-git
744d00a36e Fix non-radio Sonos album-art by using track_info['album_art'] before checking other options. (#4958)
* Fix Sonos album art for non-radio streams

* Revert "Fix Sonos album art for non-radio streams"

This reverts commit d71502d18f.

* Fix Sonos album art for non-radio streams

* Move art existance check into _format_media_image_url
2016-12-18 12:58:59 -08:00
Pascal Vizeli
a6d995e394 Bugfix wait in automation (#4984) 2016-12-18 12:57:31 -08:00
Paulus Schoutsen
f8af6e7863 Allow setting base url (#4985) 2016-12-18 12:56:07 -08:00
Pascal Vizeli
fec33347fb Bugfix TTS clear cache (#4974)
* Bugfix TTS base url with certificate

* fix lint

* remove base_url stuff fix only clear_cache stuff

* cleanup
2016-12-18 11:26:40 -08:00
Nick Sabinske
44eaca5985 Add support for the Sonarr URL Base setting (#4975)
* Add support for the Sonarr URL Base setting

For those of us who have sonarr hidden behind reverse proxy under a path, we need to be able to pass the path

Adds urlbase: XXX to the sonarr yaml... Match it to what you have set in Sonarr (Settings>General>URL Base)

* Fix line lengths

* Fix trailing white space caused by last change

* Removing use of len()
2016-12-18 10:05:05 -08:00
Thibault Cohen
18cf6f6f99 Add HydroQuebec support (#4840) 2016-12-18 12:23:10 +01:00
Fabian Affolter
9f298a92f4 Remove and update docstrings (#4969) 2016-12-18 11:39:33 +01:00
Paulus Schoutsen
01e6bd2c92 Gracefully exit with async logger (#4965)
* Gracefully exit with async logger

* Lint
2016-12-18 00:14:59 -08:00
Paulus Schoutsen
a76684f203 Version bump to 0.36.0.dev0 2016-12-17 14:07:44 -08:00
Paulus Schoutsen
9bc16157af Merge pull request #4875 from home-assistant/dev
0.35
2016-12-17 14:07:28 -08:00
Paulus Schoutsen
35d7f2b8bb Version bump to 0.35.0 2016-12-17 14:07:13 -08:00
Georgi Kirichkov
7390f82e1f Updates TP-Link dependency (#4914)
* Updates TP-Link switches dependent module

Refactors code to use the new module API

* Set TP-Link Switch name from the device settings

If no name has been set in the configuration file the name set on the device will be used

* Removes default name for TP-Link switch

Fallback to device alias now works properly

* Removes logging

* Updates comment to denote support for HS200 switch
2016-12-17 13:49:43 -08:00
Paulus Schoutsen
cc9e5de503 Only report slowness warning once per entity (#4962) 2016-12-17 13:00:08 -08:00
Pascal Vizeli
50c8224365 Bugfix async log handler (#4954)
* Bugfix async log handler

* fix boostrap test

* Use hass.data for store handler and cleanup on async_stop

* Update bootstrap.py
2016-12-17 12:21:52 -08:00
Erik Eriksson
b08b376aa7 eliqonline lib upgrade (#4948) 2016-12-17 12:14:04 -08:00
Fabian Affolter
60ef0153a2 Upgrade Sphinx to 1.5.1 (#4957) 2016-12-17 19:30:54 +01:00
Fabian Affolter
44c4b25f2b Upgrade astral to 1.3.3 (#4956) 2016-12-17 19:29:36 +01:00
Fabian Affolter
4abcaea4b7 Upgrade python-telegram-bot to 5.3.0 (#4955) 2016-12-17 19:29:24 +01:00
Albert Lee
831cad4220 Use Wake-on-LAN to turn on LG webOS TV (#4808) 2016-12-16 23:24:35 -08:00
Daniel Perna
6c524594c1 Fixing issue #4899 (#4947) 2016-12-16 22:34:13 -08:00
Paulus Schoutsen
78f6cfd1eb Update coverage 2016-12-16 22:03:45 -08:00
Pascal Vizeli
6d6abab358 Async logging file handler (#4901)
* Async logging file handler

* add time rotation handle

* new layout

* address paulus comments

* fix lint
2016-12-16 15:51:06 -08:00
Ashura
326cc83a17 [media_player.braviatv] Add turn on capabilities. (#4938) 2016-12-16 17:41:31 +00:00
Pascal Vizeli
8358ab56ea Bugfix asyncio wait (#4946) 2016-12-16 08:36:50 -08:00
Albert Lee
32dc518971 Use Wake-on-LAN to turn on Panasonic Viera TV (#4809) 2016-12-16 08:16:46 -08:00
Paulus Schoutsen
b318a033bb Cast fix (#4939)
* Update frontend

* Fix exception on cast startup
2016-12-16 00:10:56 -08:00
Pascal Vizeli
a0b2105ea0 Add voicerss for TTS (#4916)
* Add voicerss for TTS

* add unittests

* fix tests

* fix status bug in google/voicerss

* remove ssl
2016-12-16 00:10:48 -08:00
Nolan Gilley
9f9b87692a add manual option to prevent scheduled tests. (#4906) 2016-12-15 22:55:51 -08:00
Roi Dayan
5c4f04e9fc Fix webostv component to accept any custom sources (#4915)
Updated the schema check to accept any string
Search custom sources in app title and app id
The makes the short list redundant and thus removed
Tested by adding livetv, netflix, youtube, makovod and others
This is also compatible with the list that was supported till now
so current users won't see any difference.

Signed-off-by: Roi Dayan <roi.dayan@gmail.com>
2016-12-15 22:51:08 -08:00
Erik Eriksson
757f6278eb initialize self._last_brightness (#4917) 2016-12-15 22:35:53 -08:00
Adam Mills
b9dcc2777b Setup DarkSky platform when offline during init (#4919)
* Setup DarkSky platform when offline during init

* Fail setup_platform if fetch was unsuccessful
2016-12-15 22:27:37 -08:00
Magnus Ihse Bursie
103fffa0f4 Add support for new netdisco detection of Samsung Smart TV. (#4925) 2016-12-15 22:20:00 -08:00
Fabian Affolter
7748867732 Avoid TypeError for state (#4897) 2016-12-15 22:14:59 -08:00
Paulus Schoutsen
02517ae5ec Fix synologydsm (#4895) 2016-12-15 22:13:38 -08:00
Fabian Affolter
2a31bb48c6 Clean-up (#4894) 2016-12-15 22:12:33 -08:00
Magas
5b70ada7b4 Panasonic viera fix (#4888)
* Removed return False so the Panasonic Viera TV can be added even if it doesn't connect

* Removed return False so the Panasonic Viera TV can be added even if it doesn't connect

* Removed return False so the Panasonic Viera TV can be added even if it doesn't connect

* Remove try/except to connect to the TV

* Update panasonic_viera.py

* Update panasonic_viera.py
2016-12-15 22:11:58 -08:00
Albert Lee
7b45cf8e59 Expose media volume as emulated Hue brightness (#4869)
* Allow virtual Hue bridge to set volume level of media_player entities
* Show correct states in all lights view
2016-12-15 21:47:23 -08:00
Daniel Høyer Iversen
394d53e748 Broadlink sensor and switch (#4834)
* Broadlink sensor and switch

* broadlink logging

* Use async

* style

* style
2016-12-15 21:42:00 -08:00
Hugo Dupras
c125c4af4f Fix for GTFS sensor (#4828)
* Fix for GTFS sensor

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* GTFS fix

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>
2016-12-15 21:40:33 -08:00
Joe Rocklin
f90b89bc74 Add nest hvac state (#4810)
* Add basic property details for Nest hvac_state

* Add the hvac_state sensor

* Update requirements and remove trailing whitespace

Clean up the multiline docstring

Adding a space between summary and description

* Removing the hvac_state as a property on the nest climate

* Update nest.py
2016-12-15 21:39:59 -08:00
Daniel Høyer Iversen
ceac9eab94 Bug fix for #4903 (#4927) 2016-12-15 21:35:47 -08:00
joopert
7bb0abdf09 kodi fanart fix basic auth (#4930) 2016-12-15 21:35:01 -08:00
Pascal Vizeli
1d60760e21 Protect add_job (#4932) 2016-12-15 21:30:09 -08:00
Pascal Vizeli
43d18daebd Homematic faster update with async (#4929) 2016-12-15 21:26:13 +01:00
Lewis Juggins
1a7895b1d8 [media_player.sonos] Bugfix, initalise source_name. (#4911) 2016-12-15 11:46:18 +00:00
Daniel Høyer Iversen
c2f31bbb38 Merge pull request #4924 from home-assistant/flux_lib
Update flux led lib
2016-12-15 08:26:24 +01:00
Daniel Høyer Iversen
a7e75dd01e Merge pull request #4907 from home-assistant/rpi_camera
Bug in rpi_camera
2016-12-15 08:09:23 +01:00
Daniel Hoyer Iversen
58ea3c25df Update flux led lib 2016-12-15 07:58:58 +01:00
Pascal Vizeli
6d2de67620 TTS add google language list for config check (#4912)
* Add config check for language

* update default

* move language from component to platform

* fix lint
2016-12-14 22:32:20 +01:00
Valentin Alexeev
a359d21799 [media_player.sonos] Source selection from favorites (#4804) 2016-12-14 18:05:03 +00:00
Daniel Høyer Iversen
be552a59c9 Bug in rpi_camera 2016-12-14 18:45:05 +01:00
Paulus Schoutsen
832f9737a8 Fix hue groups on older hubs (#4884) 2016-12-13 23:46:27 -08:00
Paulus Schoutsen
da6bdf275e Update frontend 2016-12-13 23:30:08 -08:00
Marcelo Moreira de Mello
7ca025f653 Fixes issues #4844 to avoid traceback when self.rest.data is None (#4886)
6-12-09 18:12:30 homeassistant.core: Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
    result = next(coro)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 386, in _update_entity_states
    yield from update_coro
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 240, in async_update_ha_state
    self._attr_setter('entity_picture', str, ATTR_ENTITY_PICTURE, attr)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 307, in _attr_setter
    value = getattr(self, name)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/sensor/wunderground.py", line 176, in entity_picture
    url = self.rest.data['icon_url']
TypeError: 'NoneType' object is not subscriptable
2016-12-13 23:01:14 -08:00
Erik Eriksson
570cfc60c5 bugfix: is_on is a property (#4889) 2016-12-13 22:58:43 -08:00
Oliver
dc551b825f Added a volume set option and autodiscovery functions to Denon AVR rece… (#4845)
* Added Volume Set option and autodiscovery functions to Denon AVR receivers

* Corrected issues in SSDP discovery and in case no host could be discovered

* Corrected discovery handling / added denonavr to discovery platform

* No needless discoveries anymore / add_devices() with list instead of loop
2016-12-13 20:04:40 -08:00
Erik Eriksson
6da3e23436 Update __init__.py (#4877)
Cleaner exit by not throwing exception if server was not set during initialization of component (ref https://github.com/home-assistant/home-assistant/pull/4866)
2016-12-13 08:57:33 -08:00
Pascal Vizeli
e4b6395250 Migrate REST switch to async (#4517)
* Migrate REST switch to async

* Update rest.py

* Address comments from paulus
2016-12-13 08:55:13 -08:00
Audun Ytterdal
72bd9fb5c7 Remove libtelldus-core-dev from Dockerfile (#4878)
Remove unnecessary  libtelldus-core-dev from Dockerfile . Ref https://github.com/home-assistant/home-assistant/pull/4680#issuecomment-266006310
2016-12-13 08:53:42 -08:00
Pascal Vizeli
2dec38d8d4 TTS Component / Google speech platform (#4837)
* TTS Component / Google speech platform

* Change file backend handling / cache

* Use mimetype / rename Provider function / allow cache on service call

* Add a memcache for faster response

* Add demo platform

* First version of unittest

* Address comments

* improve error handling / address comments

* Add google unittest & check http response code

* Change url param handling

* add test for other language

* Change hash to sha256 for same hash on every os/hardware

* add unittest for receive demo data

* add test for error cases

* Test case load from file to mem over aiohttp server

* Use cache SpeechManager level, address other comments

* Add service for clear cache

* Update service.yaml

* add support for spliting google message
2016-12-12 23:23:08 -08:00
John Mihalic
acb841a1f4 Add Hikvision binary sensor component (#4825)
* Add Hikvision binary sensor component

* Simplify customize configuration

* Add delay attribute

* Remove use of threading timer, fix delay functionality
2016-12-12 23:10:16 -08:00
Paulus Schoutsen
eeb8bc3913 Fix dev tag detection in release script (#4873) 2016-12-12 22:18:20 -08:00
Erik Eriksson
12f790c7cf Display error message instead of exception (#4866)
* Display error message instead of exception

Display error message in log instead of stack trace.
(Usually happens when a server is already running at the same port.)

* Update __init__.py

Better error handling when reading SSL certificate

* Update __init__.py

* Update __init__.py
2016-12-12 22:02:24 -08:00
Erik Eriksson
dbb4e4c3fa [tellduslive] Upgrade requirement (#4865) 2016-12-12 20:05:38 +02:00
Paulus Schoutsen
d51e62d0a3 Merge pull request #4863 from home-assistant/master
Backmerge point releases
2016-12-11 22:51:30 -08:00
Paulus Schoutsen
ab92a91ac5 Merge branch 'dev' into master 2016-12-11 22:49:06 -08:00
Paulus Schoutsen
cfa36f3546 Merge pull request #4862 from home-assistant/release-0-34-5
0.34.5
2016-12-11 22:46:19 -08:00
Paulus Schoutsen
96d8fbe513 Version bump to 0.34.5 2016-12-11 22:26:48 -08:00
Paulus Schoutsen
1e9d91be0e Fix Plex from doing I/O inside event loop (#4857) 2016-12-11 22:26:30 -08:00
Paulus Schoutsen
2402897f47 Fix Nest doing I/O inside event loop (#4855) 2016-12-11 22:26:30 -08:00
Josh Nichols
b857d5dad0 Bump python-nest to fix issue with Nest Cam without activity zones (#4820)
* Bump python-nest to fix issue with Nest Cam without activity zones

* bump to include fix python-nest dependency with hvac_state

* regenerate requirements_all.txt
2016-12-11 22:26:30 -08:00
R1chardTM
d17753009a Fix python-nest version bump (#4799)
* Fix python-nest version bump

* Change SHA so version in HASS and dependency are the same
2016-12-11 22:26:30 -08:00
Marcelo Moreira de Mello
3467020dbf Added resolution support to Amcrest cameras (#4860)
* Added resolution support to Amcrest cameras

* Ordered alphabetically DEFAULT_ options
2016-12-11 21:46:19 -08:00
Adam Mills
4114884cdc Flic: Support use of queued events within timeout (#4822)
* Flic: Support use of queued events within timeout

* Linter fixes
2016-12-11 21:43:59 -08:00
John Mihalic
d7ccf07922 Add media position support and trailer type to Emby (#4792)
* Add media position support and trailer type to Emby

* Adjustments to mitigate TypeError

* Simplify media_position property

* Update handling when data isn't available

* Update emby.py
2016-12-11 21:43:53 -08:00
Erik Eriksson
2a7fa5afc3 Telldus Live: (#4645)
- Implemented support for covers and dimmable lights.
- Removed global object, use hass.data.
- Disabled polling via update.
- Inherit from common TelldusLiveEntity device.
- Configurable polling interval
- Use https API endpoint
- Use tellduslive package
2016-12-11 21:39:37 -08:00
Anton Lundin
04aa4e898a Improve denon media_player (#4836)
* Add debug level logging of messages in denon

* Added media stop for Denon AVR Media Player

* Sort source list

* Rework input selection for Denon AVR

This reworks the input selection, adding more modes and making it so
that the media controls are only announced in modes where they actually
makes sense.

* Added real media info for Denon AVR Media modes

* Read more configuration from denon devices

This reads network name, and overrides the local name with that.

This also reads the source names and reconfigures the input list to
those names, and also reads the source deleted list and removes the
inputs that are set to deleted in the device.

* Discover and handle max volume in Denon media player

* Rework source discovery in Denon media player

This uses SSFUN as authorative source for which sources that we should
present.
2016-12-11 21:04:36 -08:00
Michaël Arnauts
b156ae7812 Add support for Hue LightGroups (#4744)
* Add support for Hue LightGroup entity

* Don't filter on LightGroup and add properties for a group

* Reuse code from HueLight in HueLightGroup

* Remove HueLightGroup and add is_group variable to HueLight

* Make linter happy

* Update light or lightgroup state when a new state is available

* Use schedule_update_ha_state() to schedule the state update. Drop new_lightgroups and use new_lights instead.

* code style fix
2016-12-11 17:59:30 -08:00
David-Leon Pohl
48928d1f9e Fix config validation (#4853) (#4854) 2016-12-11 17:38:33 -08:00
Paulus Schoutsen
df98d5b3c1 Fix Nest doing I/O inside event loop (#4855) 2016-12-11 17:34:26 -08:00
Paulus Schoutsen
f4b5c439a1 Fix Plex from doing I/O inside event loop (#4857) 2016-12-11 17:34:13 -08:00
Jeff Wilson
ecc514b7e4 Use current mode to determine which temperature attributes to use (#4858) 2016-12-11 15:48:47 -08:00
IoTGuy
6edb54052f adding sensehat plugin (#4775)
* adding sensehat plugin

* added

* fix PR

* requirement updated

* Update sensehat.py
2016-12-11 15:46:55 -08:00
Marcelo Moreira de Mello
4d2480bbd1 Added support to language codes on Weather Underground (#4815)
* Added supported to language codes to Weather Underground

* Removed unecessary None assigments
2016-12-11 15:43:42 -08:00
Daniel Høyer Iversen
2708e193ec vlc media player (#4800)
* vlc media player

* Update vlc.py
2016-12-11 14:59:12 -08:00
Jean-Philippe Bouillot
c3923b2768 Netatmo improving Battery info (#4724)
* Improving Battery info

Improving battery status info (to reflect NetAtmo API documentation and change deprecated DeviceList for WeatherStationData

* Fixes from previous update

Fix the hound issue.
add battery_lvl, WindAngle_value, GustAngle_value, rf_status_lvl, wifi_status_lvl
2016-12-11 14:47:27 -08:00
devdelay
080c4efb00 Ecobee detect Smart Away (#4769)
* Ecobee autoAway Event

* Update ecobee.py

Checking if event['running'] true is pointless because if false event['type'] will equal template and when true type will only be 'hold' or 'autoAway' so I've removed this check from the statement
2016-12-11 14:46:10 -08:00
Pascal Vizeli
99f1ea9b59 Migrate alarm control panel to async (#4807)
* Merge alarm control panel to async

* fix lint
2016-12-11 14:39:20 -08:00
Johann Kellerman
46cad514d4 Revert "[device_tracker] Don't clear GPS coordinates when using two device trackers." (#4851) 2016-12-11 19:18:11 +02:00
Lewis Juggins
e0552ad899 [device_tracker] Don't clear GPS coordinates if no GPS seen (#4848) 2016-12-11 15:13:43 +02:00
Daniel Høyer Iversen
5c99dd0e3d Merge pull request #4846 from lwis/gpslogger
[device_tracker.gpslogger] Add additional activity attribute.
2016-12-11 11:07:55 +01:00
Lewis Juggins
cdf9464698 [device_tracker.gpslogger] Add additional activity attribute. 2016-12-11 09:06:29 +00:00
Stefan Jonasson
7ba25f3526 Fixed crash during light objects initizilation (#4835)
* Fixed crash when lights objects was inited
2016-12-11 09:54:50 +01:00
Daniel Høyer Iversen
ee5b9e7291 Configurable scan options for nmap (#4838) 2016-12-10 19:53:25 +02:00
r-jordan
167260bcc6 [climate.generic_thermostat] Make tolerance work both ways (#4830) 2016-12-10 10:36:35 +00:00
Josh Nichols
64de1c9777 Bump python-nest to fix issue with Nest Cam without activity zones (#4820)
* Bump python-nest to fix issue with Nest Cam without activity zones

* bump to include fix python-nest dependency with hvac_state

* regenerate requirements_all.txt
2016-12-09 11:04:40 -08:00
Sören Oldag
1547045f2c Flic: Support ignoring individual click types. (#4827) 2016-12-09 08:52:14 -08:00
Keaton Taylor
d02899216d Prevent emulated hue discovery by hue component (#4819)
* Prevent emulated hue discovery

Test for “HASS Bridge” in discovery info, pass if found, else try and
setup the bridge.

* Solved coding error

Duplicate commands and return false added for component.
2016-12-09 08:45:14 -08:00
Albert Lee
0aac4d64e1 Add away mode for Radio Thermostat/3M Filtrete (#4793) 2016-12-08 23:26:02 -08:00
Pascal Vizeli
0bf9e6d4bb Bugfix error on automation reload (#4823) 2016-12-08 23:24:03 -08:00
Jan Losinski
f78246e686 Pilight receive match fix for bug 4637 (#4639)
* Pilight: dont protocol as list in COMMAND_SCHEMA

As described in bug #4637 the protocol should not be wrapped in a list
in the spec of COMMAND_SCHEMA because this causes the component to
never successfully match any received rf code.

As pointed ot in PR #4639 the easiest way to do this, is to not derive
COMMAND_SCHEMA from RF_CODE_SCHEMA and specify protocol as simple
string there.

This fixes bug #4637.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Pilight: Add "unitcode" to command schema.

This adds "unitcode" to the COMMAND_SCHEMA. It is used for example in
the brennenstuhl protocol of pilight.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2016-12-08 23:19:14 -08:00
Paulus Schoutsen
c90a1b9760 Update frontend 2016-12-08 22:31:32 -08:00
Lewis Juggins
14446c5731 [media_player.sonos] Add stop support. (#4788) 2016-12-08 08:36:37 +00:00
Albert Lee
2e2b764dbe Add exception handling when turning on Onkyo receivers (#4813) 2016-12-07 21:46:42 -08:00
R1chardTM
695f062e29 Fix python-nest version bump (#4799)
* Fix python-nest version bump

* Change SHA so version in HASS and dependency are the same
2016-12-07 21:45:43 -08:00
Keaton Taylor
194b268ae3 Get entity name from entity.name (#4798)
Grabbing the ATTR_FRIENDLY_NAME directly produces an error. Instead
grab from entity.name.
2016-12-07 21:45:18 -08:00
Pascal Vizeli
8295fc8b4c Pararell execute state restore by domain (#4801)
* Pararell execute state restore per domain

* fix spell
2016-12-07 08:37:35 -08:00
Jan Losinski
d0dcd1bb73 Scene: add support for input_select (#4674)
This adds support for the scene component to handle input_select
devices and set their options.

This fixes bug #4673

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2016-12-07 05:33:41 -08:00
Nolan Gilley
82ad8b0a8f round $ to 2 decimals (#4786) 2016-12-07 09:15:48 +01:00
Paulus Schoutsen
91a9da8f0c Merge pull request #4796 from home-assistant/release-0-34-4
0.34.4
2016-12-06 22:44:57 -08:00
Paulus Schoutsen
e3415c4e22 Version bump to 0.34.4 2016-12-06 22:35:43 -08:00
Paulus Schoutsen
9bca3f3103 Update after service calls (#4795)
* Update after service calls

* Service update: wrap async_update in create_task
2016-12-06 22:35:24 -08:00
Pascal Vizeli
7c3ae884df Migrate remote to async (#4678)
* Migrate remote to async

* add coro

* remove sync from init since only used in harmony

* import ATTR from remote

* remove unused sync stuff from tests
2016-12-06 22:35:24 -08:00
Adam Mills
8a4aace789 Fix incorrect caching of /api/error_log (#4789) 2016-12-06 22:35:24 -08:00
Josh Nichols
0e74cd833d Updated python-nest dependency (#4785)
* Updated python-nest dependency

This sha fixes two issues:

- min and max temperatures not being set when temperature isn't locked
- fixes error when setting farenheit with a .5

* gen requirements all

* Add fix for https://github.com/home-assistant/home-assistant/issues/4731
2016-12-06 22:35:24 -08:00
Paulus Schoutsen
5e2911f071 Fix Kodi auth (#4770) 2016-12-06 22:35:24 -08:00
Paulus Schoutsen
7dacc4a7bb Fix default auth influxdb (#4771) 2016-12-06 22:35:24 -08:00
Paulus Schoutsen
98fe50d5ad Update after service calls (#4795)
* Update after service calls

* Service update: wrap async_update in create_task
2016-12-06 22:30:47 -08:00
Paulus Schoutsen
37e3c2a133 Contributing: add skip step 0 2016-12-06 21:48:44 -08:00
Paulus Schoutsen
76b79019ce Add faster reviews link to contributing 2016-12-06 21:48:02 -08:00
Adam Mills
c40ddf18c7 Fix incorrect caching of /api/error_log (#4789) 2016-12-06 21:03:49 -08:00
Josh Nichols
9a3fe691b1 Updated python-nest dependency (#4785)
* Updated python-nest dependency

This sha fixes two issues:

- min and max temperatures not being set when temperature isn't locked
- fixes error when setting farenheit with a .5

* gen requirements all

* Add fix for https://github.com/home-assistant/home-assistant/issues/4731
2016-12-06 20:31:07 -08:00
Audun Ytterdal
8826e6a8d0 Add support for telldus in the Docker image. (#4680)
* Add support for telldus in the Docker image. Start with -v /tmp/TelldusClient:/tmp/TelldusClient -v /tmp/TelldusEvents:/tmp/TelldusEvents

* Merged telldus install with the others

* Clean up indenting

* Stream apt-key
2016-12-06 09:01:47 -08:00
Paulus Schoutsen
860a12cffb Fix Kodi auth (#4770) 2016-12-06 07:43:11 -08:00
Fabian Affolter
76ff934bd3 Move details to docs, update doc strings, and use consts (#4777) 2016-12-06 15:49:59 +01:00
Lewis Juggins
d968e1d011 Add test to ensure device_tracker records state correctly. (#4776) 2016-12-06 15:01:24 +02:00
Paulus Schoutsen
fa0dbaf065 Fix default auth influxdb (#4771) 2016-12-05 23:39:22 -08:00
Paulus Schoutsen
4d0f19496a Merge remote-tracking branch 'origin/master' into dev 2016-12-05 23:35:36 -08:00
Paulus Schoutsen
0cc9555d14 Merge pull request #4774 from home-assistant/release-0-34-3
0.34.3
2016-12-05 23:35:09 -08:00
Paulus Schoutsen
d712a3dc38 Version bump to 0.34.3 2016-12-05 22:42:55 -08:00
rubund
84446bed14 Fix broken EnOcean support (#4710)
* ensure_list

* CONF_ID is not required configuration for enocean lights

* Use vol.All(cv.ensure_list, [vol.Coerce(int)]) as suggested in pull request review

* Fix line too long
2016-12-05 22:42:32 -08:00
Jeff Wilson
e92b15f966 Set hue-bridgeid in UPNP response (#4740) 2016-12-05 22:42:23 -08:00
Paulus Schoutsen
a458ce8069 Fix websocket async (#4752)
* Ensure we write to websocket from inside event loop

* Inline service call helper
2016-12-05 22:42:13 -08:00
dasos
5e492db9a3 Fix connection check (#4732)
* Fix connection check

* Release instead

* Remove if

* Update hook.py
2016-12-05 22:42:02 -08:00
Albert Lee
bc646070c8 Match uppercase MAC addresses in asuswrt 'arp -n' output (#4742) (#4764) 2016-12-05 22:20:21 -08:00
Paulus Schoutsen
64290d74f0 Update frontend 2016-12-05 21:40:45 -08:00
dasos
a11b68c560 Fix connection check (#4732)
* Fix connection check

* Release instead

* Remove if

* Update hook.py
2016-12-05 21:37:05 -08:00
Caleb
8ca2345fd4 Pyunifi dep (#4754)
* change unifi dependency to pyunifi

* Change dependency to fix #4336

* Run gen_requirements_all.py script

* Changed import statement to reflect new package

* Updated test_unifiy.py with different module

* Update requirements_all.txt
2016-12-05 21:35:54 -08:00
Hugo Dupras
8c628071f3 Add support for Netatmo tags (#4761)
* Add support for Netatmo Welcome Tags

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Add size parameter for WelcomeData

* minor fixes

* Add Throttling mechanism for update event

This will prevent to reach the API limit

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Change scan interval for Netatmo Binary sensors

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Minor fixes

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Update netatmo.py
2016-12-05 21:35:33 -08:00
Sören Oldag
81d38c3463 Add flic smart button component (#4681)
* Added component for flic smart buttons.

* Apply home-assistant coding styles.

* Fixed flic configuration.

* Made logging for scanning for new buttons less verbose.

* Fixed flic event data.

* Follow async conventions.

* Added new requirements to requirements_all.txt.

* Added flic component to .coveragerc

* Updated flic threshold configuration key names.

* Flic devices are now removed when they disconnect.

* Include review feedback.

* Fixed stopping of clients in flic component when home assistant is stopped.

* Updated flic component by integrating input of #4738.

Use library method to determine click type. Merge three click events into single one with click_type parameter.

* Use a single client for both handling click events and scanning for new buttons.

* Renamed flic ‘auto_scan’ configuration variable to ‘discovery’ using HA constants.
2016-12-05 21:12:24 -08:00
Adam Mills
776455030f Fix media_image_urls for universal media player (#4765)
* Fix media_image_urls for universal media player

* Linter fixes
2016-12-05 18:07:04 -08:00
Daniel Høyer Iversen
8afd30b7d4 fix setting battery in device_tracker (#4756) 2016-12-05 18:04:04 -08:00
Paulus Schoutsen
b60f5714fc Fix websocket async (#4752)
* Ensure we write to websocket from inside event loop

* Inline service call helper
2016-12-05 18:03:06 -08:00
John Arild Berentsen
fa8bc0a36c Add Verisure smartcam capture service (#4559)
* Add verisure capture as service

* docstyle
2016-12-05 17:51:58 -08:00
Martin J. Laubach
1ae8256ffd Add sensor for reading Austrian ZAMG weather conditions (#4347)
* Add sensor for reading ZAMG weather conditions

* Add to coveragerc; Correct some doc style problems

* More doc fixes

* More doc fixes

* Lose license and whatever.

* Don't return UNKNOWN for unknown variables

* Verify that the configured station id is actually one in the data set.

Don't warn about unknown stations, this cannot happen any more as the configuration parser now checks that.
This could still happen if the data set is incomplete though ...

* Clean up imports

* Clarify comment on throttling interval

* Base zamg sensor on Entity, not WeatherEntity, and delete unused code

* Fix formatting nits from flake8

* Use ATTR_FRIENDLY_NAME, clean up imports, remove unnecessary indirection.

* Use {}.format() instead of "" %

* Re-add unit of measurement that got lost somehow

* Use guard clauses instead of if-matroshka.
Wrap requests.get() in try/except for RequestException.

* Huh, how did this happen? White space corrections...

* Add sensor for reading ZAMG weather conditions

* Add to coveragerc; Correct some doc style problems

* More doc fixes

* More doc fixes

* Verify that the configured station id is actually one in the data set.

Don't warn about unknown stations, this cannot happen any more as the configuration parser now checks that.
This could still happen if the data set is incomplete though ...

* Lose license and whatever.

* Don't return UNKNOWN for unknown variables

* Clean up imports

* Clarify comment on throttling interval

* Base zamg sensor on Entity, not WeatherEntity, and delete unused code

* Fix formatting nits from flake8

* Use ATTR_FRIENDLY_NAME, clean up imports, remove unnecessary indirection.

* Use {}.format() instead of "" %

* Re-add unit of measurement that got lost somehow

* Use guard clauses instead of if-matroshka.
Wrap requests.get() in try/except for RequestException.

* Huh, how did this happen? White space corrections...

* Precipitation actually is a float, good it rained today

* Logger needs no module visibility

* Do not name sensors with _ to be in line with the other weather sensor platforms.

* Remove manually set friendly_name

* comment format police

* Less comments

* Update zamg.py
2016-12-05 17:50:50 -08:00
Jeff Wilson
b3253403aa Set hue-bridgeid in UPNP response (#4740) 2016-12-05 17:39:40 -08:00
Daniel Høyer Iversen
308744d8a0 Add additional attributes to GPSLogger (#4755) 2016-12-05 19:33:51 +00:00
Paulus Schoutsen
13006cee68 Device tracker attributes (#4753) 2016-12-05 19:32:17 +00:00
rubund
e21382cd3e Fix broken EnOcean support (#4710)
* ensure_list

* CONF_ID is not required configuration for enocean lights

* Use vol.All(cv.ensure_list, [vol.Coerce(int)]) as suggested in pull request review

* Fix line too long
2016-12-05 08:15:36 -08:00
Daniel Høyer Iversen
71fc446425 Merge pull request #4719 from home-assistant/device_tracker
device tracker
2016-12-05 16:32:29 +01:00
Fabian Affolter
03d19ec2f1 Netdata sensor (#4743)
* Added netdata sensor

* Typo

* Add netdata sensor

* Improvement of the work done by @ezar
2016-12-05 11:19:20 +01:00
Daniel Hoyer Iversen
5a7e446646 device tracker 2016-12-05 09:12:13 +01:00
Paulus Schoutsen
2b3caa716a Cast progress (#4735)
* add progress to google cast

* Add progress to media player demo
2016-12-04 15:30:55 -08:00
Paulus Schoutsen
6574dd8439 Merge branch 'release-0-34-2' into dev 2016-12-04 15:20:48 -08:00
Paulus Schoutsen
6d56519297 Merge pull request #4736 from home-assistant/release-0-34-2
0.34.2
2016-12-04 15:19:56 -08:00
Paulus Schoutsen
60bcb12a48 Version bump to 0.34.2 2016-12-04 15:08:38 -08:00
Lukas
58509f8bba [0.34] bugfix influxdb node_id (#4712)
* Bugfix for #4709 - do not convert node_id to float

* Update influxdb.py
2016-12-04 15:08:25 -08:00
Lukas
2099d023ef [0.34] bugfix influxdb node_id (#4712)
* Bugfix for #4709 - do not convert node_id to float

* Update influxdb.py
2016-12-04 15:08:14 -08:00
Paulus Schoutsen
db6a6fa4cb Lint 2016-12-04 14:45:25 -08:00
Josh Nichols
d89bfcdaa5 Make sure all nest platforms require discovery info (#4734) 2016-12-04 14:34:01 -08:00
Josh Nichols
64b1179c13 Make sure all nest platforms require discovery info (#4734) 2016-12-04 14:33:50 -08:00
Paulus Schoutsen
840e27adec Fix Nest interpreting Celsius temperature as Fahrenheit (#4729) 2016-12-04 14:32:59 -08:00
Paulus Schoutsen
31a8537ab5 Update frontend 2016-12-04 14:32:43 -08:00
Paulus Schoutsen
87dab37b8a Fix Nest interpreting Celsius temperature as Fahrenheit (#4729) 2016-12-04 13:49:46 -08:00
Paulus Schoutsen
3a2cdd3de0 Merge pull request #4728 from home-assistant/release-0-34-1
0.34.1
2016-12-04 11:18:46 -08:00
Paulus Schoutsen
2009e98497 Version bump to 0.34.1 2016-12-04 11:03:16 -08:00
Paulus Schoutsen
b354a18bf3 Fix CORS when static resources registered (#4727) 2016-12-04 11:02:33 -08:00
hexa-
1cd3cd8d77 Revert "Update reference to correct tplink switch" (#4722) 2016-12-04 11:02:33 -08:00
Pascal Vizeli
d9556392bc Protect hm thread for hangs on events (#4717) 2016-12-04 11:02:33 -08:00
Paulus Schoutsen
695fb412cd Re-org emulated_hue and fix google home (#4708) 2016-12-04 11:02:33 -08:00
Josh Nichols
93322b0251 Updated python-nest to fix a camera bug when loading images (#4701) 2016-12-04 11:02:33 -08:00
Paulus Schoutsen
9b9b625ac4 Fix synology dsm doing I/O inside loop (#4699) 2016-12-04 11:02:33 -08:00
Pascal Vizeli
0ae6585a90 Bugfix sonos hosts (#4698) 2016-12-04 11:02:33 -08:00
Paulus Schoutsen
cffc7ac4d8 Update netdisco to 0.8 (#4723) 2016-12-04 10:59:18 -08:00
Paulus Schoutsen
a9be6c36f1 Re-org emulated_hue and fix google home (#4708) 2016-12-04 10:57:48 -08:00
Paulus Schoutsen
1b35f0878e Fix CORS when static resources registered (#4727) 2016-12-04 10:57:24 -08:00
Paulus Schoutsen
93872590b6 Fix synology dsm doing I/O inside loop (#4699) 2016-12-04 09:54:49 -08:00
Paulus Schoutsen
b2a15e17d3 MQTT Automation: parse payload as JSON (#4703) 2016-12-04 09:53:05 -08:00
Johan Bloemberg
9bf13231f7 Actually test calling async macvendor lookup and fix it. (#4718) 2016-12-04 09:51:40 -08:00
hexa-
c8c6bee539 Revert "Update reference to correct tplink switch" (#4722) 2016-12-04 09:50:43 -08:00
Pascal Vizeli
b5c2be8ffa Protect hm thread for hangs on events (#4717) 2016-12-04 15:31:24 +01:00
DaveSergeant
4d35f2805f New support Digital Loggers relays (#4684)
* initial commit

Previous work included with no history.  Sorry, I was figuring out how to use git, branches and deal with open source projects.  At this point this is a working switch but with the shortcomings of each of the 8 ports causes a network query.  This needs to be rewritten so that the SwitchDevice is part of a larger device group that is only queried once, saving traffic and preventing the small device from timing out.

* Device polls independent of switches now

Used anel_pwrctrl.py as a basis to extract the per-switch polling out to per-device so it can be trottled properly.  Likewise, no longer touching the device independently for relay status AND relay name.  Getting them both from the same statuslist() return.

* Final comments and tweaks

Lowered cycle and update time since the device update is working so well now.  Effectively no timeouts anymore.

* Added dlipower to requirements

homeassistant.components.switch.digitalloggers

* Tox fixes

pydocstyle updates

* More tox errors

* Yet more tox

Removed useful future TODO and helpful details on the structure of the statuslocal list.
Good catch on not initializing .update(), though it worked.

* Blank line fix

* Added file to .coveragerc
2016-12-03 23:40:22 -08:00
Marcelo Moreira de Mello
53c1b93b61 Added persistent_notification in case of error during Unifi device_tracker setup (#4682) 2016-12-03 22:11:52 -08:00
Thibault Cohen
c25aa56751 Add Sharp AquosTV component (#4679) 2016-12-03 22:09:49 -08:00
Pascal Vizeli
e8c9dcf0fe Migrate remote to async (#4678)
* Migrate remote to async

* add coro

* remove sync from init since only used in harmony

* import ATTR from remote

* remove unused sync stuff from tests
2016-12-03 22:08:24 -08:00
William Scanlon
ca63e44227 Wink hub sensor (#4704) 2016-12-03 21:39:48 -08:00
Johan Bloemberg
776e53a7f0 Dsmr hourly gas usage. (#4609)
* Hourly rate of Gas consumption. Use proper unknown state.

* Import unknown state constant.

* doh

* Cleanup device add.

* Fix lint.

* Add test for derivative calculation.

* Remove conflict.

* Document and move calculation into update call.
2016-12-03 20:45:42 -08:00
Dan
a099430834 Universal source list (#4086)
* Add source_list to universal media player

* Expanded attirubte and command support for UMP

Added support to the universal media player
for the following:
    Volume Set
    Current Source
    Set Source
    Current Volume

The goal is to facilitate a single-card media player
that includes source selection and setting the volume
of the receiver.

Example setup:
```
media_player:
  - platform: universal
    name: Media Center
    children:
      - media_player.kodi
      - media_player.cast
    commands:
      select_source:
        service: media_player.select_source
        data:
          entity_id: media_player.receiver
      volume_set:
        service: media_player.volume_set
        data:
          entity_id: media_player.receiver
      volume_mute:
        service: media_player.volume_mute
        data:
          entity_id: media_player.receiver
      turn_on:
        service: homeassistant.turn_on
        data:
          entity_id: media_player.receiver
      turn_off:
        service: homeassistant.turn_off
        data:
          entity_id: media_player.receiver
    attributes:
      state: media_player.receiver
      is_volume_muted: media_player.receiver|is_volume_muted
      volume_level: media_player.receiver|volume_level
      source: media_player.receiver|source
      source_list: media_player.receiver|source_list
```

* Remove print statements

* Change service call back to use call_from_config

* Modified service calls to use template data

* linting fixes

* Add tests

* linting fices

* More pylinting
2016-12-03 20:09:28 -08:00
Pascal Vizeli
7746ecd98e Migrate weather to async (#4677) 2016-12-03 17:58:43 -08:00
Josh Nichols
10d1496f5a Updated python-nest to fix a camera bug when loading images (#4701) 2016-12-03 17:55:14 -08:00
Sebastian von Minckwitz
cf0ff54d14 Add option to hide the group card switch (#4631)
* Add option to hide the group card switch

* Disallow control of hidden group switches

* Revert "Disallow control of hidden group switches"

This reverts commit 75e5ddfe30.

* Changed hide_switch to control
2016-12-03 17:50:11 -08:00
Magnus Ihse Bursie
97cc76b43e Remove global variable from tellstick code (#4700)
* Refactor tellstick code for increased readability. Especially highlight if "device" is a telldus core device or a HA entity.

* Refactor Tellstick object model for increased clarity.

* Update comments. Unify better with sensors. Fix typo bug. Add debug logging.

* Refactor tellstick code for increased readability. Especially highlight if "device" is a telldus core device or a HA entity.

* Refactor Tellstick object model for increased clarity.

* Update comments. Unify better with sensors. Fix typo bug. Add debug logging.

* Fix lint issues.

* Remove global variable according to hint from balloob.
2016-12-03 17:27:55 -08:00
Jacob Minnis
c89e6ec915 Updated email message headers to have 'Date' and 'Message-Id' fields (#4693) (#4695) 2016-12-03 16:56:42 -08:00
Pascal Vizeli
efdf51b542 Bugfix sonos hosts (#4698) 2016-12-04 00:31:27 +01:00
Paulus Schoutsen
bbb251c0cf Version bump to 0.35.0dev0 2016-12-03 12:17:16 -08:00
Paulus Schoutsen
94b719e150 Merge pull request #4626 from home-assistant/dev
0.34
2016-12-03 12:17:02 -08:00
Paulus Schoutsen
69d3a3dd32 Version bump to 0.34 2016-12-03 12:16:18 -08:00
Paulus Schoutsen
4904653b70 Yarl has been fixed (#4694) 2016-12-03 11:59:05 -08:00
Fabian Affolter
dddf4d1460 Style 0.34 (#4689)
* Minor style updates

* Minor style updates

* Update validation and logger messages

* Update ordering

* Fix lint issue

* Fix line too long

* Update ordering

* update logger messages
2016-12-03 20:46:04 +01:00
GadgetReactor
9a6c9cff30 Update reference to correct tplink switch (#4670) 2016-12-03 11:38:14 -08:00
Paulus Schoutsen
d3b62e1fe1 Requirements use zip instead of git (#4692) 2016-12-03 10:18:00 -08:00
Paulus Schoutsen
f63a79ee8f Remove not dev related scripts (#4690) 2016-12-03 09:59:20 -08:00
Paulus Schoutsen
898ba56d9f Fix aiohttp build (#4691) 2016-12-03 09:49:10 -08:00
Josh Nichols
64a5bff5b2 Nest further improvements (#4655)
* Further improvements on nest platform

- fix binary sensor
- add deprecations for monitored_conditions
- better names for sensors (includes device type)

* lint

* Remove unused weather sensor

* Fix to python-nest to a specific commit

* lint

* lint

* lint

* lint
2016-12-03 09:26:47 -08:00
Paulus Schoutsen
af7de8d5ae Merge remote-tracking branch 'origin/master' into dev 2016-12-03 09:11:47 -08:00
Pascal Vizeli
754d98bcd5 Cleanups on homematic climate (#4685) 2016-12-03 14:06:08 +01:00
Paulus Schoutsen
4874030b70 Have api_streams sensor also monitor websocket connections (#4668) 2016-12-02 18:17:46 -08:00
Paulus Schoutsen
84c89686a9 Update __init__.py 2016-12-02 09:13:39 -08:00
Brent Hughes
48fd8f1f63 InfluxDB: Fixed attributes that are lists causing invalid syntax (#4642)
* Fixed attributes that are lists cuasing invalid influx syntax

* Added bool and fixed mixed data type issue

* Fixed changing nearly all data types to float causing some worse influxdb errors. whoops

* Added line to end of file
2016-12-01 23:02:58 -08:00
Lewis Juggins
83a108b20a Sonos specify IP for event subscription (#4177) 2016-12-01 22:22:03 -08:00
Alberto Arias Maestro
b0a800cc6d Update commands to match the strings in pynx584 (#4623)
The command string don't match the ones pynx584. See source code:

https://github.com/kk7ds/pynx584/blob/master/nx584/api.py#L68
2016-12-01 22:20:44 -08:00
Matt N
1f5f4e7a89 zoneminder: Support excluding archived events (#4445) 2016-12-01 22:17:38 -08:00
Fabian Affolter
b1fbada02d Update throttle and add more attributes (#4644) 2016-12-01 22:15:48 -08:00
Lewis Juggins
08909ed420 (InfluxDB) Configuration for a default measurement value for events without a unit. (#4632) 2016-12-01 22:13:55 -08:00
Nick Touran
ec8969351d Prevent Pandora component from crashing or hanging during shutdown. (#4255)
* Prevent Pandora component from crashing or hanging during shutdown.

* Update pandora.py

* Update pandora.py
2016-12-01 22:06:23 -08:00
Javier González Calleja
801a69be3a Extending efergy component for get the amount of energy consumed (#4202)
* Extending efergy component for get the amount of energy consumed

* Changing units from kW to kWh

* Chaning units for Instant Consumption from kWh to kW

* Adding timeout for get and removing pylint config

* Update efergy.py
2016-12-01 22:00:17 -08:00
Fabian Affolter
51e20c92f9 WIP Fix pylint and PEP257 issues (tests) (#4120)
* Fix pylint and PEP257 issues

* More PEP257 fixes
2016-12-01 21:45:19 -08:00
Russell Cloran
443553ff16 Handle IPv6 in zeroconf (#4052) 2016-12-01 21:43:33 -08:00
Pascal Vizeli
2e6a48ff5f WIP: Migrate scene to async + homeassistant scene async (#4665)
* Migrate scene to async + homeassistant scene async

* fix lint

* Update state.py

* Fix tests
2016-12-01 21:38:12 -08:00
Paulus Schoutsen
49cfe38cca Demo platform to group climate instead of thermostat 2016-12-01 21:11:13 -08:00
Pascal Vizeli
8a042586f1 Migrate sensor to async (#4663) 2016-12-01 18:31:55 -08:00
Johan Bloemberg
08f8e540e3 Macvendor (#4468)
* Add MAC vendor lookup for device_tracker.

* Test vendor mac lookup and fix device attribute.

* Generate requirements.

* Style.

* Use hyphen instead of underscore to satisfy 'idna'.

https://github.com/kjd/idna/issues/17

* Resort imports.

* Refactor macvendor to use macvendors.com API instead of netaddr library.

* Test vendor lookup using macvendors.com api.

* Remove debugging.

* Correct description.

* No longer needed.

* Device tracker is now an async component. Fix ddwrt tests.

* Fix linting.

* Add test case for error conditions.

* There is no reason to retry failes vendor loopups as they won't be saved to the file anyways at that point.

* Sorry, bad assumption, this only made things worse.

* Wait for async parts during setup component to complete before asserting results.

* Fix linting.

* Is generated when running 'coverage html'.

* Undo isort.

* Make aioclient_mock exception more generic.

* Only lookup mac vendor string with adding new device to known_devices.yaml.

* Undo isort.

* Revert unneeded change.

* Adjust to use new websession pattern.

* Always make sure to cleanup response.

* Use correct function to release response.

* Fix tests.
2016-12-01 18:30:41 -08:00
Brandon Weeks
f09b888a8a Fixes #3511 - handle multiple return values (#4659) 2016-12-01 18:28:52 -08:00
lichtteil
279f82acc4 Mutate values for light color temperature and white value (#4660)
* Mutate values for light color temperature and white value

* Fix lenght of line

* Fix under-indented line

* Fix cgl
2016-12-01 18:26:53 -08:00
iandday
de6c5a503b Remote Component and Harmony Platform (#4254)
* Initial Harmony device support, working current activity sensor and switch for each activity
TODO: add new device per hub to send device specific activity

 Changes to be committed:
	new file:   homeassistant/components/harmony.py
	new file:   homeassistant/components/sensor/harmony.py
	new file:   homeassistant/components/switch/harmony.py

* ready for beta, I think

 Changes to be committed:
	modified:   homeassistant/components/harmony.py
	modified:   homeassistant/components/sensor/harmony.py
	modified:   homeassistant/components/switch/harmony.py

*  Changes to be committed:
	modified:   homeassistant/components/harmony.py
	new file:   homeassistant/components/remote/__init__.py
	new file:   homeassistant/components/remote/harmony.py
	new file:   homeassistant/components/remote/services.yaml
	modified:   homeassistant/components/sensor/harmony.py
	modified:   homeassistant/components/switch/harmony.py
Implemented remote component and harmony platform

* streamlined harmony support

* typo

* Initial Harmony device support, working current activity sensor and switch for each activity
TODO: add new device per hub to send device specific activity

 Changes to be committed:
	new file:   homeassistant/components/harmony.py
	new file:   homeassistant/components/sensor/harmony.py
	new file:   homeassistant/components/switch/harmony.py

* ready for beta, I think

 Changes to be committed:
	modified:   homeassistant/components/harmony.py
	modified:   homeassistant/components/sensor/harmony.py
	modified:   homeassistant/components/switch/harmony.py

*  Changes to be committed:
	modified:   homeassistant/components/harmony.py
	new file:   homeassistant/components/remote/__init__.py
	new file:   homeassistant/components/remote/harmony.py
	new file:   homeassistant/components/remote/services.yaml
	modified:   homeassistant/components/sensor/harmony.py
	modified:   homeassistant/components/switch/harmony.py
Implemented remote component and harmony platform

* streamlined harmony support

* typo

* reworked token generation

* delete

* Initial Harmony device support, working current activity sensor and switch for each activity
TODO: add new device per hub to send device specific activity

 Changes to be committed:
	new file:   homeassistant/components/harmony.py
	new file:   homeassistant/components/sensor/harmony.py
	new file:   homeassistant/components/switch/harmony.py

* Initial Harmony device support, working current activity sensor and switch for each activity
TODO: add new device per hub to send device specific activity

 Changes to be committed:
	new file:   homeassistant/components/harmony.py
	new file:   homeassistant/components/sensor/harmony.py
	new file:   homeassistant/components/switch/harmony.py

* ready for beta, I think

 Changes to be committed:
	modified:   homeassistant/components/harmony.py
	modified:   homeassistant/components/sensor/harmony.py
	modified:   homeassistant/components/switch/harmony.py

* ready for beta, I think

 Changes to be committed:
	modified:   homeassistant/components/harmony.py
	modified:   homeassistant/components/sensor/harmony.py
	modified:   homeassistant/components/switch/harmony.py

*  Changes to be committed:
	modified:   homeassistant/components/harmony.py
	new file:   homeassistant/components/remote/__init__.py
	new file:   homeassistant/components/remote/harmony.py
	new file:   homeassistant/components/remote/services.yaml
	modified:   homeassistant/components/sensor/harmony.py
	modified:   homeassistant/components/switch/harmony.py
Implemented remote component and harmony platform

* streamlined harmony support

* typo

* reworked token generation

* delete

* readded after rebase

* cleaning up style errors

* modified .coveragerc

* moved import statements

* added more debug logging

* Added URL encoding of token received from Logitech

* Corrected import for python 3

* new pyharmony version

* new pyharmony version

* remote tests

* only write config file if not present or sync service is called

* more tests

* more tests

* bumped pyharmony version to work with new auth

* bumped pyharmony version to work with new auth

* style corrections

* harmony local auth and remote demo platform

* style fix

* PR refinements and permission issues

* forgot a blank line

* removed sync test from test_init

* removed sync test from test_init

* visual indent

* send_command test in demo platform
2016-12-01 12:48:08 -08:00
Jesse Newland
898f89ffc7 Make trusted_networks iterable (#4649) 2016-12-01 12:28:59 -08:00
Jan Losinski
5c807c6bd9 MPD: Reconnect mpd client afetr OSError (#4651)
If the mpd client ran into an socket timeout, the socket will raise an
OSError on every further request. This adds OSError to the list of
excptions, that causes a client reconnect.

This fixes #4650

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2016-12-01 12:28:31 -08:00
Jan Losinski
dd84b4e237 Mpd: Use "file" instead "id" for media_content_id (#4653)
In media_content_id() the "id" of the current song was returned. as
stated in bug #4652 the id is only the Tracklist-Id in the current
tracklist and is omitted if the track is not part of a tracklist (what
caused the bug in the first place).

To match the semantics described in the dockstring, to return a "Content
ID", this chooses the filename of the current song as id and returns
it.

It also uses get() instead of [] to prevent KeyError.

This fixes bug #4652

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2016-12-01 12:20:42 -08:00
John Mihalic
6dfae7a259 Add support for NUT (Network UPS Tools) sensor. (#4551)
* Add support for NUT (Network UPS Tools) sensor.

* Address comments

* Fix issues

* Fix issues 2

* Fix unhandled exception
2016-12-01 08:58:16 +01:00
Johann Kellerman
c6c8cd4f51 Yr.no: New aiohttp client needs params to form websession URL (#4634)
* Yr.no: New aiohttp client needs params to form websession URL
* Support params in aiohttp mocking
2016-12-01 08:20:21 +02:00
Pascal Vizeli
bde7176b3c Migrate light component to async (#4635) 2016-11-30 13:33:38 -08:00
William Scanlon
4c03d670c1 Wink PubNub v4 (#4561)
* PubNub v4

* Updated to pubnubsub-handler 0.0.5

* Updated requirements_all.txt
2016-11-30 13:12:26 -08:00
Johan Bloemberg
406afbb369 Philips controls (#4441)
* Add channel switching for philips tvs.

* Disable track buttons when not watching tv.

* Undo isort config.

* Yes it does.

* Just testing some assumption on hound's flake8 behaviour.

* Revert "Just testing some assumption on hound's flake8 behaviour."

This reverts commit ff9940b39e.

* poke
2016-11-30 13:07:57 -08:00
Marcelo Moreira de Mello
9c6609cb79 Added support to Amcrest camera (#4573)
* Introduced support to Amcrest IP Cameras

* Fixed lint issues

* Fixed requirements test

* * Implemented test to verify crendentials during camera setup

* Added persistent_notification in case of error when during Amcrest setup
2016-11-30 13:07:17 -08:00
Paulus Schoutsen
e5504b39ec Close aiohttp responses (#4624)
* Close aiohttp responses

* Update generic.py
2016-11-30 13:05:58 -08:00
Paulus Schoutsen
b1ef5042f9 Make updater more robust (#4625) 2016-11-30 13:03:09 -08:00
Paulus Schoutsen
b35fa4f1c1 Finish all tasks before setup phase is done (#4606) 2016-11-30 13:02:45 -08:00
Martin Hjelmare
71da9d2f50 Fix mysensors ir switch overwriting devices (#4612) 2016-11-30 13:02:18 -08:00
Fabian Affolter
86388f5af2 Upgrade Sphinx to 1.4.9 (#4641) 2016-11-30 14:21:00 +01:00
Pascal Vizeli
17f0fb69bd Homematic update with HomematicIP/HomematicWired support and multible… (#4568)
* Homematic update with HomematicIP/HomematicWired support and multible connections

* fix bug in virtualkey service

* create new service & cleanups

* fix lint

* Pump pyhomematic 0.1.18
2016-11-29 20:53:02 +01:00
DaveSergeant
2d02baf3d0 Default dimmable brightness to 255 from 100 (#4621)
* Default dimmable brightness to 255 from 100

Full brightness for ISY dimmers is 255. The current 100 value turns dimmer switches on to just under half brightness.  Probably just an oversight from the Sept implementation.

* Brightness change for turn_on, ramp for turn_off.

Per discussion with Teagan42 and jbcodemonkey, the brightness should rightfully be None and not an explicit value.  There is a continuing issue that the ISY modules don't respect HA's brightness customization values.  A new issue will be opened for this.
Additionally, turn_off was using ISY's fastoff() which didn't respect the ramping time.  The default behavior should just be off().
2016-11-29 09:50:12 -07:00
Lewis Juggins
66473120ab Add test for delay on automations (#4630) 2016-11-29 08:45:04 -08:00
Christian Brædstrup
6ddbb4d568 Improved exception handling for D-Link switch (#4633) 2016-11-29 08:40:51 -08:00
Valentin Alexeev
154c69a454 Bump version of pwaqi module to 1.3. Fixes #4595. (#4610) 2016-11-28 23:11:21 -08:00
Charles Spirakis
ad4ec49f9c Update color names to follow w3.org list. (#4374)
The color names -> rgb dictionary now follows the
color names listed in the w3.org site for css3,
section 4.3. Extended color keywords:

https://www.w3.org/TR/2010/PR-css3-color-20101028/#svg-color
2016-11-28 22:59:46 -08:00
Fabian Affolter
e8367f245a Update ordering and sync logger messages (#4615) 2016-11-28 20:50:42 +01:00
Fabian Affolter
4bc37bd661 Add timeout to request, update ordering, make dev info message shorter, and (#4613)
update the other logger messages
2016-11-28 20:49:01 +01:00
Pascal Vizeli
b4841a17a6 Hotfix device_tracker yaml config (#4611) 2016-11-28 18:43:47 +01:00
Valentin Alexeev
3b9d5cdf73 DuneHD media player (#4588)
* Implement WAQI sensor

* Corrections based on CI check.

* Updated requirements_all.txt for pwaqi==1.2

* Require latest version of pwaqi

* Initial implementation of DuneHD media player component based on pdunehd.

* Major: avoid update() in property fetch,
Major: implement source support,
Major: single device per media player instance,
Major: support for volume / mute controls

* Pythonify pdunehd.
Support media_title.

* Fix pylint.

* Further pylint.

* docstring

* Formatting and indentation.

* Change indentation to spaces.

* Update coverage and recorded requirements before PR.

* Further pylint / fake8 / pydocstyle fixes.

* Implement next / prev track,
Properly decode blu-ray playback,
Attempt to decode media title

* Fix play / pause
Linting

* Update requirements.
Fix lint.

* Fix lint and syntax error

* Yet more linting.

* Yet more linting.

* Fix lint: line too long.

* Force update of HA state.
2016-11-27 23:42:57 -08:00
Daniel Perna
77d568dc47 Fixed incorrect event-order (#4605) 2016-11-27 22:29:21 -08:00
Paulus Schoutsen
9db1ff8cd4 Update frontend 2016-11-27 22:27:02 -08:00
Oliver
248a90b71d Added denon media player controls via denonavr library (#4580)
* Added denonavr module again

* Edited requirements_all.txt

* Edited .coveragerc

* Fixed error with AUX1 input source in library

* Adding device should not fail on connection timeout

* Changed method to select source

* Update requirements_all.txt
2016-11-27 22:13:22 -08:00
Mark King
d8c4af9c81 TEMPer component: reset devices on address change (#4596)
Fixes https://github.com/home-assistant/home-assistant/issues/4389

The USB address of these devices periodically changes, causing
home-assistant to fail to read the temperature data. This PR fixes this
by re-reading the available devices on failure. I've been running this
for several days and for the first time have consistent temperature
data without having to restart home-assistant.
2016-11-27 22:01:13 -08:00
Fabian Affolter
1e6c660f59 Threshold sensor (#4216)
* Add threshold sensor

* New config requirement, update async, other changes, and update tests

* Update threshold.py
2016-11-27 21:55:26 -08:00
Harris Borawski
44a508e86c Add exception handling to Sonarr (#4569)
* Add exception handling to request call to prevent
failure in setup_platform if host is down

* update for comments

* update test for state being none

* remove unused import
2016-11-27 21:11:49 -08:00
Bjarni Ivarsson
92c6cee2a1 Support for media_position property on media_player (#4172)
* Added support for media_position property to media_player + implementation for sonos.

* Pla yback progress now updates without needed state transitions in HA.

* Linting fixes

* media_position_update_at property is now a datetime.

* Minor fix.

* Linting fixes.
2016-11-27 17:45:49 -08:00
Paulus Schoutsen
d4bc8e23af Update frontend 2016-11-27 17:21:11 -08:00
Antoine Bertin
f0db698f75 Light effects (#4538)
* Add support for light effects

* Move PLATFORM_SCHEMA changes in light to mqtt_template

* Add effect validation

* Add unittests

* Add light effect to demo and unittests

* Use cv.string for config validation

* Use cv.ensure_list for config validation

* Fix typo

* Remove unused exception management for effect
2016-11-27 17:15:28 -08:00
Pascal Vizeli
cf57db919e Refactory aiohttp clientsession handling in HA (#4602)
* Refactory aiohttp clientsession handling in HA

* remove from core / update platforms / rename file
2016-11-27 16:26:46 -08:00
Josh Nichols
84b12ab007 Nest Cam support (#4292)
* start nestcam support

* start nestcam support

* introduce a access_token_cache_file

* Bare minimum to get nest thermostat loading

* occaisonally the image works

* switch to nest-aware interval for testing

* Add Nest Aware awareness

* remove duplicate error logging line

* Fix nest protect support

* address baloobot

* fix copy pasta

* fix more baloobot

* last baloobot thing for now?

* Use streaming status to determine online or not. online from nest means its on the network

* Fix temperature scale for climate

* Add support for eco mode

* Fix auto mode for nest climate

* update update current_operation and set_operation mode to use constant when possible. try to get setting something working

* remove stale comment

* unused-argument already disabled globally

* Add eco to the end, instead of after off

* Simplify conditional when the hass mode is the same as the nest one

* away_temperature became eco_temperature, and works with eco mode

* Update min/max temp based on locked temperature

* Forgot to set locked stuff during construction

* Cache image instead of throttling (which returns none), respect NestAware subscription

* Fix _time_between_snapshots before the first update

* WIP pin authorization

* Add some more logging

* Working configurator, woo. Fix some hound errors

* Updated pin workflow

* Deprecate more sensors

* Don't update during access of name

* Don't update during access of name

* Add camera brand

* Fix up some syntastic errors

* Fix ups ome hound errors

* Maybe fix some more?

* Move snapshot simulator url checking down into python-nest

* Rename _ready_to_update_camera_image to _ready_for_snapshot

* More fixes

* Set the next time a snapshot can be taken when one is taken to simplify logic

* Add a FIXME about update not getting called

* Call update during constructor, so values get set at least once

* Fix up names

* Remove todo about eco, since that's pretty nest

* thanks hound

* Fix temperature being off for farenheight.

* Fix some lint errors, which includes using a git version of python-nest with updated code

* generate requirements_all.py

* fix pylint

* Update nestcam before adding

* Fix polling of NestCamera

* Lint
2016-11-27 16:18:47 -08:00
Johan Bloemberg
601193b1d2 Expose isort preferences for tools. (#4481)
* Expose isort preferences for tools.

* Adhere to pylints sorted imports requirement.

* More documentation, set typing in between stdlib and 3rd party.
2016-11-27 14:33:30 -08:00
Sean Dague
038b1c1fc6 precision properties for climate components (#4562)
This lets components declare their precision for temperatures. If
nothing is declared, we assume 0.1 C and whole integer precision in
F. Currently this supports only WHOLE, HALVES, and TENTHS for
precision, but adding other precision levels is pretty straight
forward.

This also uses proliphix as an example of changing the precision for a
platform.

Closes bug #4350
2016-11-27 14:19:12 -08:00
Paulus Schoutsen
0d734303a4 HTTP: Fix registering views after start (#4604) 2016-11-27 14:01:12 -08:00
Lewis Juggins
ff4cb23f2a Update nginx docs (#4603) 2016-11-27 13:49:21 -08:00
Paulus Schoutsen
e94b4ec006 Tweak services return result (#4600)
* Tweak services return result

* Lint
2016-11-27 12:33:02 -08:00
Paulus Schoutsen
be91207830 Upgrade HBMQTT (#4599) 2016-11-27 12:21:20 -08:00
Ron Klinkien
ecf285105c Fixed unit_of_measurement functionality for knx sensor (#4594) 2016-11-27 12:21:05 -08:00
Paulus Schoutsen
767f3d58ff Add websocket_api as frontend dependency 2016-11-27 12:13:01 -08:00
Lewis Juggins
34097cda24 Allow generic thermostat tolerance to be customisable to determine the temperature difference required to turn switch on. (#4585) 2016-11-27 09:31:00 +00:00
Michaël Arnauts
0ce3703e30 Remove fixed throttle for binary_sensor.command_line and sensor.command_line since the scan_interval is configured trough YAML since #1059 (#4586)
* Remove fixed throttle for binary_sensor.command_line and sensor.command_line since the scan_interval is configured trough YAML since #1059

* Clean up imports

* Add SCAN_INTERVAL=60 to put default scan_inteval back to 60
2016-11-27 00:29:49 -08:00
Paulus Schoutsen
464e843186 Update frontend 2016-11-26 23:44:20 -08:00
Paulus Schoutsen
5d2b7a6e0b Add ping to websockets API (#4592) 2016-11-26 23:22:34 -08:00
Paulus Schoutsen
914a868fbd Add websocket API (#4582)
* Add websocket API

* Add identifiers to interactions

* Allow unsubscribing event listeners

* Add support for fetching data

* Clean up handling code websockets api

* Lint

* Add Home Assistant version to auth messages

* Py.test be less verbose in tox
2016-11-26 18:23:28 -08:00
Paulus Schoutsen
03e0c7c71c Prevent edimax from doing I/O in event loop (#4584) 2016-11-26 10:10:29 -08:00
Paulus Schoutsen
32ffd006fa Reorganize HTTP component (#4575)
* Move HTTP to own folder

* Break HTTP into middlewares

* Lint

* Split tests per middleware

* Clean up HTTP tests

* Make HomeAssistantViews more stateless

* Lint

* Make HTTP setup async
2016-11-25 13:04:06 -08:00
Fabian Affolter
58b85b2e0e Upgrade speedtest-cli to 1.0.0 (#4578) 2016-11-25 12:30:53 -08:00
Marcelo Moreira de Mello
61653a517d #4421 - Forced icons to be displayed via SSL to avoid Mixed Content warnings (#4544)
* #4421 - Forced icons to be displayed via SSL to avoid Mixed Content warnings

* Fixed houndci-bot whitespace

* Using regex to replace http:// for https://

* Created assert test to verify https translation
2016-11-25 20:03:12 +00:00
Vlad Korniev
2a7bc0e55c Advanced Ip filtering (#4424)
* Added IP Bans configuration

* Fixing warnings

* Added ban enabled option and unit tests

* Fixed py34 tox

* http: requested changes fix

* Requested changes fix
2016-11-24 21:52:10 -08:00
Lewis Juggins
95b439fbd5 Upgrade aiohttp to 1.1.5 (#4213) 2016-11-24 21:37:56 -08:00
Paulus Schoutsen
1872481f47 Merge pull request #4572 from home-assistant/release-0-33-4
0.33.4
2016-11-24 15:37:38 -08:00
Paulus Schoutsen
44b6d23e0f Version bump to 0.33.4 2016-11-24 14:57:12 -08:00
Paulus Schoutsen
58eb0ec52a Set executor pool size to 10 (#4571) 2016-11-24 14:56:59 -08:00
Paulus Schoutsen
febe16d700 Set executor pool size to 10 (#4571) 2016-11-24 14:56:33 -08:00
Pascal Vizeli
8c56091af7 Hotfix executor pool size (#4552) 2016-11-24 14:53:46 -08:00
Paulus Schoutsen
eacdce9ed9 Track tasks only during shutdown and tests (#4428)
* Track tasks only when needed

* Tweak async_block_till_done
2016-11-24 14:49:29 -08:00
Paulus Schoutsen
42c99b0ccb Pass hass object to ServiceRegistry constructor (#4570) 2016-11-24 14:02:39 -08:00
Jon Caruana
2a6c0cfc17 LiteJet: Unit tests and new trigger options held_more_than and held_less_than. (#4473)
* LiteJet: Unit tests and new trigger options held_more_than and held_less_than.
* Unit tests for the LiteJet component and associated platforms. Coverage is almost 100% -- just misses one line.
* The automation LiteJet trigger returns an empty "removal" function to ensure the automation base is happy with it. The pylitejet library doesn't actually support a real removal.
* The automation LiteJet trigger can detect hold time and act appropriately to support things like short tap or long hold.

* LiteJet: Fix indent in unit test source code.

* LiteJet: Fix test_include_switches_* unit tests on Python 3.5

* LiteJet: Remove wait for state existence from unit tests. Recent fixes to discovery make this no longer necessary.
2016-11-24 09:52:15 -08:00
Fabian Affolter
84040892df Remove globally disable pylint issue (#4565) 2016-11-24 12:25:01 +01:00
Fabian Affolter
345008c673 Fix docstring (#4564) 2016-11-24 10:15:00 +01:00
Matt N
14d1494cd2 systemmonitor: Support monitoring removable network interfaces (#4462) 2016-11-24 10:14:38 +01:00
Marcel030nl
f1d11e77ed Update pvoutput.py (#4557)
This addition could be usefull when working with the template sensor using the data of this sensor.
2016-11-24 09:58:38 +01:00
Fabian Affolter
b1b8715f7d Minor comment updates and ordering (#4554) 2016-11-24 00:27:31 +01:00
Fabian Affolter
b6d559da1f Add timeout to requests, use consts, and add link to docs (#4555) 2016-11-24 00:26:59 +01:00
Fabian Affolter
475c412ae4 Minor changes (switch.hook) (#4553)
* Use string formatting, add link to docs, and pylint

* Extent platform for validation
2016-11-24 00:21:48 +01:00
Pascal Vizeli
c04a002c55 Hotfix executor pool size (#4552) 2016-11-23 09:52:03 -08:00
dasos
5013a82655 Hook Smart Home support (#4392)
* Support for Hook (hooksmarthome.com)

* Linting

* Add asyncio

* Move to aiohttp

* Yield more
2016-11-23 14:52:14 +00:00
Johan Bloemberg
05181bf232 0.4 release upstream. (#4545) 2016-11-23 10:44:37 +00:00
Marcelo Moreira de Mello
c22a73e1d0 Removed raise statement to don't pollute the user log. (#4536)
* Removed raise statement to don't polute the user log.
Only the error message should be displayed.

Nov 22 11:28:32 tchellopi hass[20138]: 16-11-22 11:28:32 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Nov 22 11:28:32 tchellopi hass[20138]: Traceback (most recent call last):
Nov 22 11:28:32 tchellopi hass[20138]: File "/usr/local/lib/python3.5/asyncio/tasks.py", line 241, in _step
Nov 22 11:28:32 tchellopi hass[20138]: result = coro.throw(exc)
Nov 22 11:28:32 tchellopi hass[20138]: File "/home/hass/.virtualenvs/home_assistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 386, in _update_entity_states
Nov 22 11:28:32 tchellopi hass[20138]: yield from update_coro
Nov 22 11:28:32 tchellopi hass[20138]: File "/home/hass/.virtualenvs/home_assistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 213, in async_update_ha_state
Nov 22 11:28:32 tchellopi hass[20138]: yield from self.hass.loop.run_in_executor(None, self.update)
Nov 22 11:28:32 tchellopi hass[20138]: File "/usr/local/lib/python3.5/asyncio/futures.py", line 361, in __iter__
Nov 22 11:28:32 tchellopi hass[20138]: yield self  # This tells Task to wait for completion.
Nov 22 11:28:32 tchellopi hass[20138]: File "/usr/local/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
Nov 22 11:28:32 tchellopi hass[20138]: future.result()
Nov 22 11:28:32 tchellopi hass[20138]: File "/usr/local/lib/python3.5/asyncio/futures.py", line 274, in result
Nov 22 11:28:32 tchellopi hass[20138]: raise self._exception
Nov 22 11:28:32 tchellopi hass[20138]: File "/usr/local/lib/python3.5/concurrent/futures/thread.py", line 55, in run
Nov 22 11:28:32 tchellopi hass[20138]: result = self.fn(*self.args, **self.kwargs)
Nov 22 11:28:32 tchellopi hass[20138]: File "/home/hass/.homeassistant/custom_components/sensor/wunderground.py", line 187, in update
Nov 22 11:28:32 tchellopi hass[20138]: self.rest.update()
Nov 22 11:28:32 tchellopi hass[20138]: File "/home/hass/.virtualenvs/home_assistant/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 296, in wrapper
Nov 22 11:28:32 tchellopi hass[20138]: result = method(*args, **kwargs)
Nov 22 11:28:32 tchellopi hass[20138]: File "/home/hass/.homeassistant/custom_components/sensor/wunderground.py", line 222, in update
Nov 22 11:28:32 tchellopi hass[20138]: ["description"])
Nov 22 11:28:32 tchellopi hass[20138]: ValueError: you must supply a key

* Updated unittest since we are just printing the error instead raising
2016-11-22 23:41:51 -08:00
Charles Blonde
c9b353f7a7 Add Bose SoundTouch device support - v2 (#4523)
* Add Bose SoundTouch device support

* Update soundtouch.py
2016-11-22 23:22:52 -08:00
Johan Bloemberg
64cfc4ff02 DSMR sensor (#4309)
* Initial implemenation of DSMR component.

* Fix linting

* Remove protocol V2.2 support until merged upstream.

* Generate requirements using script.

* Use updated dsmr-parser with protocol 2.2 support.

* Add tests.

* Isort and input validation.

* Add entities for gas and actual meter reading. Error handling. Use Throttle.

* Implement non-blocking serial reader.

* Improve logging.

* Merge entities into one, add icons, fix tests for asyncio.

* Add error logging for serial reader.

* Refactoring and documentation.

- refactor asyncio reader task to make sure it stops with HA
- document general principle of this component
- refactor entity reading to be more clear
- remove cruft from split entity implementation

* Use `port` configuration key.

* DSMR V2.2 seems to conflict in explaining which tariff is high and low.

http://www.netbeheernederland.nl/themas/hotspot/hotspot-documenten/?dossierid=11010056&title=Slimme%20meter&onderdeel=Documenten
> DSMR v2.2 Final P1
>> 6.1: table vs table note

    Meter Reading electricity delivered to client normal tariff) in 0,01 kWh - 1-0:1.8.1.255
    Meter Reading electricity delivered to client (low tariff) in 0,01 kWh - 1-0:1.8.2.255

    Note: Tariff code 1 is used for low tariff and tariff code 2 is used for normal tariff.

* Refactor to use asyncio.Protocol instead of loop+queue.

* Fix requirements

* Close transport when HA stops.

* Cleanup.

* Include as dependency for testing (until merged upstream.)

* Fix style.

* Update setup.cfg
2016-11-22 23:03:39 -08:00
Valentin Alexeev
bb46009efa World Air Quality Index sensor (#4434)
* Implement WAQI sensor

* Corrections based on CI check.

* Updated requirements_all.txt for pwaqi==1.2

* Require latest version of pwaqi

* Fix lint: single argument for .exception and no more pass statement.

* Further lint fixes.

* pydocstyle fix

* Implement rate throttle.
Data on WAQI is usually updated once an hour - make it refresh every thirty minutes.

* Implement schema validation with voluptuous.
Change exception handling scope.
Move messages to debug().

* Fix lint (empty indented line).

* Sort lines correctly.

* Fix last lint issue.

* Provide additional sensor data as received from WAQI.
Easier-to-read throttle timing.

* Additional object attributes to be unrolled later.
2016-11-22 22:59:27 -08:00
Paulus Schoutsen
3f9250415f Skip broken tests (#4543) 2016-11-22 22:58:14 -08:00
Pascal Vizeli
c294a534d0 Migrate binary_sensor to async (#4516) 2016-11-22 22:47:43 -08:00
Harris Borawski
85d6970df8 Add Sensor for Sonarr (#4496)
* Add sonarr sensor and tests for sensor

* Fixed some linting errors and removed unused import

* Add SSL option for those who use SSL from within Sonarr

* Add requirements to all requirements, and sensor to coveragerc

* remove unused variable

* move methods to functions, and other lint fixes

* linting fixes

* linting is clean now

* Remove double requirement

* fix linting for docstrings, this should probably be a part of the script/lint and not just travis
2016-11-22 22:32:45 -08:00
dainok
260a619a40 Added GPSLogger API (#4089)
* Added GPSLogger API, check https://goo.gl/eJnKw5 for details.

* Switched to debug severity and added to coveragerc

* Switched to debug severity for logs

* Updated .coveragerc

* Update .coveragerc

* Merged from sfiorini

* Merged from sfiorini

* Update .coveragerc
2016-11-22 22:19:57 -08:00
Michaël Arnauts
0c6ef3b7f9 Try to register a Chromecast anyway, even if it could not be detected by get_chromecasts(), since it might be on a other network. Fixes #4469. (#4470) 2016-11-22 22:16:01 -08:00
Thomas Friedel
0c47434aad Change Osram to use Github lightify dep (#4256)
* used MindrustUK's version ( https://github.com/MindrustUK/python-lightify/commits/master/osramlightify.py ) from Oct 2, 2016 and changed the REQUIRMENTS line to use the fixed lightify component with thread safety fixes

* reformatted long lines

* updated osramlightify requirements in requirements_all.txt

* ran script gen_requirements_all.py

* rerun requirements gen script on linux

* fixed some inspection warnings

* zip file points to a specific commit

* no requests to lights in properties, instead instance variables are update in update method

* regenerated requirements_all.txt

* removed call to update from is_on() property
2016-11-22 22:10:45 -08:00
Magnus Ihse Bursie
1d8a1df2c4 Refactor tellstick code (#4460)
* Refactor tellstick code for increased readability. Especially highlight if "device" is a telldus core device or a HA entity.

* Refactor Tellstick object model for increased clarity.

* Update comments. Unify better with sensors. Fix typo bug. Add debug logging.

* Refactor tellstick code for increased readability. Especially highlight if "device" is a telldus core device or a HA entity.

* Refactor Tellstick object model for increased clarity.

* Update comments. Unify better with sensors. Fix typo bug. Add debug logging.

* Fix lint issues.
2016-11-22 21:48:22 -08:00
Aaron Morris
65b85ec6c0 Fix missing space in error message between "accuracy" and "is" (#4542) 2016-11-22 20:45:06 -08:00
Paulus Schoutsen
b6b9da7e6e Merge pull request #4541 from home-assistant/release-0-33-3
0.33.3
2016-11-22 20:35:55 -08:00
Paulus Schoutsen
d18f2684fb Version bump to 0.33.3 2016-11-22 19:39:15 -08:00
Paulus Schoutsen
e93b079ef4 Fix platform discovery when platform discovered during discovery of a (#4529)
component
2016-11-22 19:38:34 -08:00
Paulus Schoutsen
356ad6e468 Bump netdisco (#4539) 2016-11-22 19:36:39 -08:00
Johann Kellerman
8f35212dd6 Yr.no update entities every hour (#4521) 2016-11-22 19:35:49 -08:00
Johann Kellerman
0827a26642 Yr.no update entities every hour (#4521) 2016-11-22 19:28:31 -08:00
Paulus Schoutsen
b4756e6dda Bump netdisco (#4539) 2016-11-22 18:36:10 -08:00
Paulus Schoutsen
4cc192e445 Disable broken google offset test (#4540) 2016-11-22 18:34:48 -08:00
mnestor
962e5315ab Mock call to google servers (#4532)
* Fix for #4520

* mock call to do_auth to prevent call to google servers
2016-11-22 18:19:32 -08:00
Paulus Schoutsen
2c7e895105 Entity and climate: do not convert temperature unnecessary (#4522)
* Climate: more consistent units

* Prevent unnecessary conversion in entity component

* int -> round

* Disable Google tests because they connect to the internet

* Remove default conversion rounding F->C

* Add rounding of temp to weather comp

* Fix equality

* Maintain precision when converting temp in entity

* Revert "Disable Google tests because they connect to the internet"

This reverts commit b60485dc19.
2016-11-22 17:38:04 -08:00
Paulus Schoutsen
00019b9ff0 Fix warning in test 2016-11-22 12:48:35 -08:00
Pascal Vizeli
8e776b4dc0 Fix wrong name handling in rfxtrx sensor (#4531) 2016-11-22 12:47:37 -08:00
mnestor
ce13b0989d Fix for #4520 (#4526)
* Fix for #4520

* fix lint
2016-11-22 10:15:39 -08:00
Paulus Schoutsen
c81735cc84 Fix platform discovery when platform discovered during discovery of a (#4529)
component
2016-11-22 08:21:08 -08:00
Fabian Affolter
5d18759146 Upgrade miflora to 0.1.13 (fixes #4479) (#4524) 2016-11-22 15:41:37 +01:00
Malte Franken
9cdcfae8f3 New config parameter for min_max sensor to specify number of digits for rounding mean value (#4237)
* new config parameter to specify number of digits for rounding average value

* fixed two `line too long` errors

* added three new tests for the mean sensor including test for precision of mean value
2016-11-22 15:36:29 +01:00
Gilles Margerie
547d93f631 Added source selection for Denon AVR Media Player (#4304)
* Added source selection for Denon AVR Media Player

* Update denon.py

* Update denon.py

* Update denon.py

* Update denon.py

* Update denon.py

slight format update (space issue and new line)

* Further update regarding formatting

* Updated the source name with lowercase

* Update denon.py
2016-11-21 23:45:17 -08:00
Paulus Schoutsen
d841ddc50b Merge pull request #4519 from home-assistant/release-0-33-2
0.33.2
2016-11-21 20:42:21 -08:00
Paulus Schoutsen
40b5824230 Skip google calendar offset test (#4520) 2016-11-21 20:16:50 -08:00
Paulus Schoutsen
86f3e2455d Skip google calendar offset test (#4520) 2016-11-21 20:16:34 -08:00
Paulus Schoutsen
9a065cc536 Version bump to 0.33.2 2016-11-21 19:40:19 -08:00
Richard Cox
8e4dbcaf21 Fixing 'Unknown' status for Nest Protect devices (#4475)
* Fixing 'Unknown' status for Nest Protect devices

* Fixing bad formatting
2016-11-21 19:39:38 -08:00
Richard Cox
6863d2e0af Fixing 'Unknown' status for Nest Protect devices (#4475)
* Fixing 'Unknown' status for Nest Protect devices

* Fixing bad formatting
2016-11-21 19:39:23 -08:00
John Arild Berentsen
c23809488b Neato Fixes (#4490)
* Fix, switch state. Move constants to hub

* Responsiveness

* Whitespace

* Delay was not needed as commands does not return until done.
2016-11-21 19:36:54 -08:00
John Arild Berentsen
248f5c0209 Neato Fixes (#4490)
* Fix, switch state. Move constants to hub

* Responsiveness

* Whitespace

* Delay was not needed as commands does not return until done.
2016-11-21 19:36:44 -08:00
Jack Chapple
e5aa40fa5d Fixes #4500 (#4502) 2016-11-21 19:35:49 -08:00
Jack Chapple
1f573b46a4 Fixes #4500 (#4502) 2016-11-21 19:35:36 -08:00
hexa-
0647bb7f6b switch.tplink: expect daily stats to be empty (#4504)
Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
2016-11-21 19:34:58 -08:00
hexa-
a73fbbaf7a switch.tplink: expect daily stats to be empty (#4504)
Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
2016-11-21 19:34:48 -08:00
Pascal Vizeli
755f5b61b7 Bugfix discovery use wrong time async (#4515)
* Bugfix discovery use wrong time async

* fix lint
2016-11-21 19:33:32 -08:00
Pascal Vizeli
6869c7401e Bugfix device_tracker init tracker scan (#4514) 2016-11-21 19:33:32 -08:00
Pascal Vizeli
835577b2bc Bugfix discovery use wrong time async (#4515)
* Bugfix discovery use wrong time async

* fix lint
2016-11-21 19:33:08 -08:00
Pascal Vizeli
859d0d5ad6 Bugfix device_tracker init tracker scan (#4514) 2016-11-21 19:32:21 -08:00
Fabian Affolter
aed797f438 Upgrade freesms to 0.1.1 (#4491) 2016-11-21 17:32:05 +01:00
Fabian Affolter
eb8093934f Upgrade python-hpilo to 3.9 (#4482) 2016-11-21 17:31:14 +01:00
Fabian Affolter
608b482906 Upgrade sqlalchemy to 1.1.4 (#4486) 2016-11-21 17:29:06 +01:00
Fabian Affolter
7207c2cca1 Upgrade sendgrid to 3.6.3 (#4485) 2016-11-21 17:28:31 +01:00
Fabian Affolter
ed1d0b4197 Upgrade astral to 1.3.2 (#4505) 2016-11-21 17:27:48 +01:00
Fabian Affolter
63461e9007 Upgrade slacker to 0.9.30 (#4484) 2016-11-21 17:27:15 +01:00
Fabian Affolter
40a2145558 Upgrade yahoo-finance to 1.4.0 (#4483) 2016-11-21 17:25:43 +01:00
Sean Dague
d883b18751 Merge pull request #4503 from sdague/pyvera_bump
Bump pyvera to 0.2.21
2016-11-21 06:09:54 -05:00
Sean Dague
b8e462cf5b Bump pyvera to 0.2.21
pyvera 0.2.21 fixes the fact that use of requests.get was not using a
timeout. Some times (after a few days of use) the pyvera poll loop
would hang indefinitely on a requests.get of the event interface. This
would cause the pyvera thread to hang completely. It would also
prevent graceful shutdown, as pyvera does a thread join.

The new version uses a timeout, so that we won't lock up any more.
2016-11-21 06:06:17 -05:00
Paulus Schoutsen
11df7becd3 Merge pull request #4492 from home-assistant/release-0-33-1
0.33.1
2016-11-20 13:58:01 -08:00
Paulus Schoutsen
99f5db8c02 Version bump to 0.33.1 2016-11-20 12:11:07 -08:00
John Arild Berentsen
19b08a975a ZWave lights: Not use super() (#4476)
* Not use super

* Review changes
2016-11-20 12:10:50 -08:00
John Arild Berentsen
123f4acfc1 ZWave lights: Not use super() (#4476)
* Not use super

* Review changes
2016-11-20 11:49:54 -08:00
Paulus Schoutsen
0f90426023 Version bump to 0.34.0.dev0 2016-11-19 16:06:42 -08:00
Paulus Schoutsen
8b6a94b0f5 Merge pull request #4446 from home-assistant/dev
0.33
2016-11-19 16:06:26 -08:00
Paulus Schoutsen
0a333230c1 Version bump to 0.33 2016-11-19 16:05:56 -08:00
Paulus Schoutsen
455e1df7cb Fix typo 2016-11-19 16:05:33 -08:00
Matt N
f71396c293 Fix nmap_tracker documentation link (#4471) 2016-11-19 15:31:45 -08:00
Paulus Schoutsen
d930c399fe Better locking while setting up components + discovery (#4463) 2016-11-19 08:18:33 -08:00
Bjarni Ivarsson
f3748ce535 Sonos line-in and tv source fixes + Sonos discovery fix. (#4440)
* Fixes line-in and tv sources on Sonos + Sonos discovery fixes.

* Style fix.
2016-11-19 15:29:00 +00:00
John Arild Berentsen
8beefcfc69 Switch did not update (#4466) 2016-11-19 15:52:42 +01:00
John Arild Berentsen
93747f2766 switch base cover did not appear (#4454)
Thanks for testing the PR @emilhetty 👍
2016-11-19 12:33:08 +01:00
John Arild Berentsen
7af438fa2f Hound for zwave climate (#4465) 2016-11-19 10:19:22 +01:00
Fabian Affolter
2b5fcd737b PVOutput sensor (#4203)
* Add PVOutput sensor

* Remove attributes

* Revert `verify_ssl` back to true
2016-11-19 10:04:03 +01:00
John Arild Berentsen
2b320f23fc Hound comments (#4464) 2016-11-19 09:46:02 +01:00
John Arild Berentsen
679d500e61 Neato refactor and support for sensors (#4319)
* Imporvements to neato

* Review changes
2016-11-19 00:14:40 -08:00
mnestor
613615433a Google Calendar round 2 (#4161)
* Google Calendar round 2

* Add google back to .coveragerc

* Update __init__.py
2016-11-18 22:29:20 -08:00
Fabian Affolter
f70ff66d11 Upgrade batinfo to 0.4.2 (#4452) 2016-11-18 22:04:15 -08:00
Paulus Schoutsen
d2bbc6ef70 Upgrade linter (#4461) 2016-11-18 21:47:59 -08:00
Paulus Schoutsen
37e28428c1 Merge remote-tracking branch 'origin/master' into dev 2016-11-18 18:39:11 -08:00
Pascal Vizeli
c56f99baaf Async migration device_tracker (#4406)
* Async migration device_tracker

* change location stuff to async

* address paulus comments

* fix lint & add async discovery listener

* address paulus comments v2

* fix tests

* fix test_mqtt

* fix test_init

* fix gps_acc

* fix lint

* change async_update_stale to callback
2016-11-18 23:35:08 +01:00
Erik Eriksson
265232af98 only check heater status if present (#4459) 2016-11-18 14:12:51 -08:00
Fabian Affolter
e6c4113c5b Fix lint issues for 0.33 (#4451)
* Fix PEP257 issues

* Fix ident

* Fix lint issues

* Update docstrings

* Fix indent

* Fix indent

* Fix lint issues

* Fix lint issue

* Again lint
2016-11-18 23:05:03 +01:00
Igor Shults
c86e1b31b3 Fix typo in OWM (#4458) 2016-11-18 22:54:46 +01:00
Lewis Juggins
5912316496 pywebpush update to 0.6.1 (#4449) 2016-11-18 13:03:44 -08:00
John Arild Berentsen
58f0655298 ZWave Light: Use Configurable refresh (#4437)
* Use Configurable refresh

* Use super instead of object
2016-11-18 21:59:01 +01:00
John Arild Berentsen
43a93fb345 ZWave: Fix missing battery_level, node_id and location (#4422)
* Fix missing battery_level, node_id and location

* use super instead of object
2016-11-18 21:42:30 +01:00
Daniel Høyer Iversen
36b338051b Merge pull request #4450 from home-assistant/flux_led_lib_09
Upgrade flux led lib
2016-11-18 14:18:12 +01:00
Daniel Hoyer Iversen
fc566309c1 Upgrade flux led lib 2016-11-18 13:20:51 +01:00
Sean Dague
23ce9949b1 Merge pull request #4447 from sdague/proliphix
bump proliphix library version
2016-11-18 06:56:04 -05:00
Sean Dague
275c80183c bump proliphix library version
This fixes an upstream bug with daylight savings time handling
2016-11-18 05:05:05 -05:00
Sean Dague
cd1655f43b create light.hue_activate_scene service (#4425)
* create light.hue_activate_scene service

This creates a light.hue_activate_scene service that takes group_name
and scene_name, and calls phue's bridge.run_scene with those
parameters. This allows calling hue bridge stored scene names by name
during automation.

This only currently works reliably in 1 hue hub configurations (which
is most of them). Phue will be further enhanced to display warnings
when it can't figure out what to do with the parameters passed in to HA.

* Update hue.py
2016-11-17 22:14:06 -08:00
jnimmo
1a117d0bea Add keypress & output control services to Envisalink component (#3932)
* Add keypress & output control services to Envisalink component

Add services to allow sending custom keypresses and activating
programmable outputs on an alarm control panel.
Implemented for the Envisalink alarm, and moving to new version of
pyenvisalink to support this.

Replicated the service handler mapping code from Cover component into
Alarm Control Panel to allow handling alternative schemas if required
by new services.

* Update requirements_all.txt

* Updated services.yaml

* Removed requirement to enter code in HA UI

Incorporated changes suggested by @sriram
https://github.com/srirams/home-assistant/commit/2f8deb70cb5f3621a69b6b9
acb72f8e29123650c

Including pending state for exit/entry delay

Clarified services to use the code passed to them as a first priority,
otherwise use the code from configuration

Swapped back to using NotImplementedError for the service definitions

* - Add support for alarm_keypress to manual alarm (functions like a standard alarm keypad where entering the code disarms or arms the alarm)
- Add tests for alarm_keypress to manual alarm
- Style corrections (too many returns, comment & whitespace issues)

* Removed alarm_output_control service as unable to incorporate in the demo/test in a meaningful way

* Add keypress & output control services to Envisalink component

Add services to allow sending custom keypresses and activating
programmable outputs on an alarm control panel.
Implemented for the Envisalink alarm, and moving to new version of
pyenvisalink to support this.

Replicated the service handler mapping code from Cover component into
Alarm Control Panel to allow handling alternative schemas if required
by new services.

* Update requirements_all.txt

* Updated services.yaml

* Removed requirement to enter code in HA UI

Incorporated changes suggested by @sriram
https://github.com/srirams/home-assistant/commit/2f8deb70cb5f3621a69b6b9
acb72f8e29123650c

Including pending state for exit/entry delay

Clarified services to use the code passed to them as a first priority,
otherwise use the code from configuration

Swapped back to using NotImplementedError for the service definitions

* - Add support for alarm_keypress to manual alarm (functions like a standard alarm keypad where entering the code disarms or arms the alarm)
- Add tests for alarm_keypress to manual alarm
- Style corrections (too many returns, comment & whitespace issues)

* Removed alarm_output_control service as unable to incorporate in the demo/test in a meaningful way

* Moved the Alarm_Keypress service into Envisalink component out of the generic

* Update envisalink.py

* Update services.yaml
2016-11-17 22:13:22 -08:00
Fabian Affolter
944bb8474f Change validation to optional (#4400) 2016-11-17 22:09:57 -08:00
Magnus Ihse Bursie
779f520c56 Make UI more responsive to power off for Samsung Smart TV (#4438) 2016-11-17 22:00:18 -08:00
Magnus Ihse Bursie
82ed7b6b08 Fix so shell script adheres to posix standards. (#4439) 2016-11-17 21:59:53 -08:00
Paulus Schoutsen
af77341494 Add sensor to show how many clients are connected. (#4430)
* Add sensor to show how many clients are connected.

* Lint

* Fix tests
2016-11-17 21:54:47 -08:00
Paulus Schoutsen
23fb8c4cdd Convert script component to async (#4427) 2016-11-17 21:50:01 -08:00
Paulus Schoutsen
726bc5b670 Do not report on shutting down errors (#4431)
* Do not report on shutting down errors

* Lint
2016-11-17 12:02:43 -08:00
Open Home Automation
b615b3349f Fix for Miflora 2.6.6 firmware (#4436) 2016-11-17 08:40:21 -08:00
Paulus Schoutsen
0f59bb208c Migrate callbacks to use schedule_update_ha_state (#4426)
* Migrate callbacks to use schedule_update_ha_state

* Migrate MQTT sensor callback to async

* Migrate wemo to not update inside schedule_update_ha_state

* Make MQTT switch async

* Fix nx584 test

* Migrate tellstick callback

* Migrate vera callback

* Alarm control panel - manual: use async callbacks

* Run the switch rest tests that work
2016-11-17 07:34:46 -08:00
Paulus Schoutsen
38d201a54a Increase logging level of errors while doing jobs (#4429) 2016-11-16 23:01:14 -08:00
Pascal Vizeli
c8bc1e3c5d change add_job to use call_soon_threadsafe (#4410)
* change add_job to use call_soon_threadsafe

* address comments from paulus

* Tweak core tests

* Fix tests Python 3.4.2
2016-11-16 20:00:08 -08:00
Lewis Juggins
a862bc4edc Fix DLink async I/O (#4301) 2016-11-16 18:55:58 -08:00
Magnus Ihse Bursie
b0e3d5a576 Better handling of accented characters in slugify (#4399) (#4423)
* Better handling of accented characters in slugify (#4399)

* Update __init__.py
2016-11-16 15:05:10 -08:00
Paulus Schoutsen
f006b00dc1 Fix spelling schedule_update_ha_state (#4415) 2016-11-16 08:26:29 -08:00
bestlibre
1fff6ce438 Deduplicate MQTT_PUBLISH_SCHEMA definition (#4411) 2016-11-16 08:19:00 -08:00
Sean Dague
c06c82905a dynamically fetch yamaha media playback support (#4385)
This makes it so that media playback support for inputs is dynamically
fetched from the receiver, instead of assuming that all playback
commands work for all inputs.

Tests are added for this, using a FakeYamaha class, which has some
sample data stubbed in for key methods that need to be called. We also
include an example of the desc.xml needed to dynamically parse these
features for these tests (as this is done in platform init).
2016-11-15 21:56:40 -08:00
Paulus Schoutsen
2b86d89bb4 Fix tplink test 2016-11-15 21:26:03 -08:00
Sean Dague
7bdb79bd54 bump phue to 0.9 (#4404)
This increases the phue library to 0.9, which includes some basic
Scene support that could be consumed from home assistant.
2016-11-15 21:14:54 -08:00
Pascal Vizeli
41aaeb715a Convert switch to AsnycIO (#4382)
* Convert switch to AsnycIO

* Move update entity to service

* use time better for faster handling

* Change to suggestion from paulus

* Use new shedule_update_ha_state

* fix lint

* minimize executor calls
2016-11-15 21:06:50 -08:00
Fabian Affolter
5d8a465c18 Add timeout to requests (#4398) 2016-11-15 21:02:17 -08:00
John Arild Berentsen
c6f5a5443f Make zwave climate entities contain it's respective setpoints (#4357)
* Make zwave entities contain it's respective setpoints

* Add fan state
2016-11-15 13:14:29 +01:00
Fabian Affolter
d6cb102f63 Merge pull request #4144 from dasos/squeezebox_name_fix
Squeezebox name
2016-11-15 10:06:10 +01:00
Fabian Affolter
edde76e544 Fix validation and use consts (mqtt) (#4396) 2016-11-15 08:33:42 +01:00
Fabian Affolter
d5fff2f94a Fix validation and use consts (mqtt) 2016-11-15 08:21:44 +01:00
bestlibre
0e0ba28249 support for last will and birth message for mqtt (#4381) 2016-11-14 22:18:33 -08:00
Paulus Schoutsen
6745e83a6c Merge pull request #4394 from home-assistant/release-0-32-4
0.32.4
2016-11-14 22:04:43 -08:00
Paulus Schoutsen
44bc057fdb Version bump to 0.32.4 2016-11-14 21:34:40 -08:00
hexa-
96b8d8fcfa http: reimplement X-Forwarded-For parsing (#4355)
This feature needs to be enabled through the `http.use_x_forwarded_for` option,
satisfying security concerns of spoofed remote addresses in untrusted network
environments.

The testsuite was enhanced to explicitly test the functionality of the
header.

Fixes #4265.

Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
2016-11-14 21:33:34 -08:00
Sean Dague
fc2df34206 Pin versions on linters for tests
The linters really need to specify an exact version, because when
either flake8 or pylint release a new version, a whole lot of new
issues are caught, causing failures on the code unrelated to the
patches being pushed.

Pinning is a best practice for linters. This allows patches which move
forward the linter version to happen with any code fixes required for
it to pass.
2016-11-14 21:32:02 -08:00
Paulus Schoutsen
09c29737de Fix device tracker sending invalid event data 2016-11-14 21:31:17 -08:00
Paulus Schoutsen
4c01b47945 device_tracker.see should not call async methods (#4377) 2016-11-14 21:31:06 -08:00
Paulus Schoutsen
7aaf3a46db Fix device tracker sending invalid event data (#4393) 2016-11-14 21:28:57 -08:00
Paulus Schoutsen
d774ba46c7 Fix device tracker sending invalid event data 2016-11-14 20:59:29 -08:00
Lewis Juggins
4c37ee8884 Handle live content better in Kodi (#4388) 2016-11-14 20:11:22 -08:00
Paulus Schoutsen
7f5f458074 Faster async entity update on component. (#4384) 2016-11-14 18:54:38 -08:00
Paulus Schoutsen
479457d6ec device_tracker.see should not call async methods (#4377) 2016-11-14 18:35:58 -08:00
Paulus Schoutsen
7e73d27dd1 Do not serve HTTP requests while stopping (#4378) 2016-11-14 18:33:53 -08:00
Martin Wood
e7ffec87ac Squeezebox name fix #4019 2016-11-14 21:46:05 +00:00
Robbie Trencheny
2d47b187c5 notify.html5: decode bytes values in registration data (#4379)
Occassionally the values of `keys` and `p256h` are bytes objects instead of
strings. As JSON by default does not serialize bytes objects let's decode
bytes objects to unicode strings.

Resolves the registration issue mentioned in #4012.

Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
2016-11-14 11:35:31 -08:00
Sean Dague
fe2103dedb Merge pull request #4386 from sdague/lint
Pin versions on linters for tests
2016-11-14 13:58:50 -05:00
Sean Dague
7bf5d1c662 Pin versions on linters for tests
The linters really need to specify an exact version, because when
either flake8 or pylint release a new version, a whole lot of new
issues are caught, causing failures on the code unrelated to the
patches being pushed.

Pinning is a best practice for linters. This allows patches which move
forward the linter version to happen with any code fixes required for
it to pass.
2016-11-14 13:50:27 -05:00
pvizeli
cb24282040 Faster async entity update on component. 2016-11-14 14:18:04 +01:00
Fabian Affolter
bd9429d3af Upgrade sendgrid to 3.6.2 (#4370) 2016-11-14 09:35:08 +01:00
Martin Weinelt
d7a005ad0f notify.html5: decode bytes values in registration data
Occassionally the values of `keys` and `p256h` are bytes objects instead of
strings. As JSON by default does not serialize bytes objects let's decode
bytes objects to unicode strings.

Resolves the registration issue mentioned in #4012.

Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
2016-11-14 05:14:18 +01:00
Paulus Schoutsen
2e2a996a8e Do not serve HTTP requests while stopping 2016-11-13 18:12:50 -08:00
Paulus Schoutsen
0364498dee Add .hound.yml 2016-11-13 11:34:09 -08:00
Daniel Høyer Iversen
c5fdd4392a Merge pull request #4373 from home-assistant/flux_led_color_bright
support color and brightness in flux_led light
2016-11-13 20:33:48 +01:00
Daniel Hoyer Iversen
895454b6c3 support color and brightness in flux_led light 2016-11-13 11:10:27 +01:00
Nathan Henrie
2109b7a1b9 Use entity_id for backend, friendly name for frontend (#4343)
* Use entity_id for backend, friendly name for frontend

Closes https://github.com/home-assistant/home-assistant/issues/3434

Command line switches had the option to set a `friendly_name` reportedly
for use in the front end. However, if set, it was also being used as the
`entity_id`.

This did not seem like obvious behavior to me. This PR changes the
behavior so the entity_id is the object_id, which must already be
unique, and is an obvious place to have a very predictable slug (even if
long or unsightly), and the friendly name (if set) is used for the
display.

Example:

```yaml
switch:
  platform: command_line
  switches:
    rf_kitchen_light_one:
      command_on: switch_command on kitchen
      command_off: switch_command off kitchen
      command_state: query_command kitchen
      value_template: '{{ value == "online" }}'
      friendly_name: "Beautiful bright kitchen light!"
```

If you were using in an automation or from dev tools, would use:
`switch.rf_kitchen_light_one`, but your front end would still show `Beautiful
bright kitchen light!`

* Add new arg to test_assumed_state_should_be_true_if_command_state_is_false

* Import ENTITY_ID _FORMAT from existing, rename device_name to object_id

* Rename `device_name` to `object_id`

* Test that `entity_id` and `name` are set as expected
2016-11-12 22:46:23 -08:00
Pascal Vizeli
71a305ea45 Hotfix deadlock on platform setup (#4354)
* Hotfix deadlock on platform setup

* fix wrong import
2016-11-12 16:19:13 -08:00
hexa-
e73634e6c7 http: reimplement X-Forwarded-For parsing (#4355)
This feature needs to be enabled through the `http.use_x_forwarded_for` option,
satisfying security concerns of spoofed remote addresses in untrusted network
environments.

The testsuite was enhanced to explicitly test the functionality of the
header.

Fixes #4265.

Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
2016-11-12 16:14:39 -08:00
Pascal Vizeli
3d47ad5018 Use hass aiohttp connector for ssl connection (#4344) 2016-11-12 16:00:31 -08:00
Erik Eriksson
c823ea9f2a Don't fail if component name is None. Fixes (#4345)
https://github.com/home-assistant/home-assistant/issues/4326

Might fix https://github.com/home-assistant/home-assistant/issues/4326
2016-11-12 14:16:27 -08:00
Fabian Affolter
75bcb1ff0f Upgrade schiene to 0.18 (#4359) 2016-11-12 12:30:05 -08:00
Sean Dague
1663cc9084 Fix typo in generic thermostat (#4348)
It looks like a copy / paste error was made when doing the min/max
code. This fixes that.
2016-11-11 17:42:58 +01:00
Christian Brædstrup
17cfcc981d D-Link switch version bump of external library (#4351) 2016-11-11 17:38:12 +01:00
Hugo Dupras
60fabaec24 Add timeout for Netatmo binary sensor (#4280)
* Add time limit for Netatmo binary sensor

* Change limit to timeout

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Update requirements_all.txt
2016-11-10 23:04:11 -08:00
Marcelo Moreira de Mello
5e44934e7e Added some extra options to Weather Underground component (#4306)
* Added some extra options to Weather Underground component

* Added Location and Elevation options

* Fixed if statement

* Fixed lint

* Updated tests including  elevation and location

* Update wunderground.py
2016-11-10 23:01:20 -08:00
Lewis Juggins
01a6c1c1c8 Add strptime template function (#3950) 2016-11-10 22:57:44 -08:00
Jeffrey Lin
cd1b0ac67d Added NVRAM-based MAC to IP mapping as backup to ARP tables (#4189) 2016-11-10 22:46:58 -08:00
Paulus Schoutsen
2bfded7153 MQTT.Server will use HASS eventloop (#3429) 2016-11-10 22:45:38 -08:00
Javier González Calleja
20af5cb5b4 Daily consumption information for HS110 (#4206)
* Add daily consumption information for HS110

* Fixing code review

* Fixing code review

* Fixing code review
2016-11-10 22:43:16 -08:00
Paulus Schoutsen
080f56e0f5 Merge pull request #4342 from home-assistant/release-0-32-3
0.32.3
2016-11-10 21:59:39 -08:00
Paulus Schoutsen
173e15e733 Version bump to 0.32.3 2016-11-10 21:50:05 -08:00
Paulus Schoutsen
72407c2f95 Make yr compatible with 0.32 2016-11-10 21:49:56 -08:00
Paulus Schoutsen
1b79722b69 Fix KNX async I/O (#4267) 2016-11-10 21:43:50 -08:00
Pascal Vizeli
cc5233103c Fix rest switch default template (#4331) 2016-11-10 21:43:50 -08:00
Daniel Høyer Iversen
2feea1d1eb Add support for rgb light in led flux, fixes issue #4303 (#4332) 2016-11-10 21:43:50 -08:00
Johann Kellerman
2c39c39d52 Improve async generic camera's error handling (#4316)
* Handle errors

* Feedback

* DisconnectedError
2016-11-10 21:43:48 -08:00
Paulus Schoutsen
6e6b1ef7ab fix panasonic viera doing I/O in event loop (#4341) 2016-11-10 21:42:41 -08:00
Pascal Vizeli
55ddaf1ee7 Synology SSL fix & Error handling (#4325)
* Synology SSL fix & Error handling

* change handling for cookies/ssl

* fix use not deprecated functions

* fix lint

* change verify

* fix connector close to coro

* fix force close

* not needed since websession close connector too

* fix params

* fix lint
2016-11-10 21:42:37 -08:00
Pascal Vizeli
6860d9b096 Update SoCo to 0.12 (#4337)
* Update SoCo to 0.12

* fix req
2016-11-10 21:41:28 -08:00
Sean Dague
3e1cc4282e Fix "argument of type 'NoneType' is not iterable" during discovery (#4279)
* Fix "argument of type 'NoneType' is not iterable" during discovery

When yamaha receivers are dynamically discovered, there config is
empty, which means that we need to set zone_ignore to [] otherwise the
iteration over receivers fails.

* Bump rxv library version to fix play_status bug

rxv version 0.3 will issue the play_status command even for sources
that don't support it, causing stack traces during updates when
receivers are on HDMI inputs.

This was fixed in rxv 0.3.1. Bump to fix bug #4226.

* Don't discovery receivers that we've already configured

The discovery component doesn't know anything about already configured
receivers. This means that specifying a receiver manually will make it
show up twice if you have the discovery component enabled.

This puts a platform specific work around here that ensures that if
the media_player is found, we ignore the discovery system.
2016-11-10 21:41:28 -08:00
Jan Losinski
200bdb30ff Change pilight systemcode validation to integer (#4286)
* Change pilight systemcode validation to integer

According to the pilight code the systemcode should be an integer and
not a string (it is an int in the pilight code). Passing this as a
string caused errors from pilight:
"ERROR: elro_800_switch: insufficient number of arguments"

This fixes #4282

* Change pilight unit-id to positive integer

According to the pilight code the unit of an entity is also evrywhere
handled as an integer. So converting and passing this as string causes
pilight not to work.

This fixes #4282

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2016-11-10 21:41:28 -08:00
Paulus Schoutsen
eb17ba970c Increase update delay (#4321) 2016-11-10 21:41:28 -08:00
Paulus Schoutsen
ffe4c425af Fix Tellstick doing I/O inside event loop (#4268) 2016-11-10 21:41:28 -08:00
Jesse Newland
a18fdbfbb8 Fix alarm.com I/O inside properties (#4307)
* Fix alarm.com I/O inside properties

* First line should end with a period

* Not needed

* Fetch state on init
2016-11-10 21:41:28 -08:00
Lewis Juggins
58600f25b3 Fix OWM async I/O (#4298) 2016-11-10 21:41:28 -08:00
Pascal Vizeli
749fc583ea Fix rest switch default template (#4331) 2016-11-10 21:32:08 -08:00
Daniel Høyer Iversen
b07d887d77 Add support for rgb light in led flux, fixes issue #4303 (#4332) 2016-11-10 21:30:52 -08:00
Johann Kellerman
9bb94a4512 Improve async generic camera's error handling (#4316)
* Handle errors

* Feedback

* DisconnectedError
2016-11-10 21:28:22 -08:00
Paulus Schoutsen
e76d553513 fix panasonic viera doing I/O in event loop (#4341) 2016-11-10 21:17:44 -08:00
Pascal Vizeli
844799a1f7 Synology SSL fix & Error handling (#4325)
* Synology SSL fix & Error handling

* change handling for cookies/ssl

* fix use not deprecated functions

* fix lint

* change verify

* fix connector close to coro

* fix force close

* not needed since websession close connector too

* fix params

* fix lint
2016-11-10 21:04:47 -08:00
Pascal Vizeli
e005ebe989 Update SoCo to 0.12 (#4337)
* Update SoCo to 0.12

* fix req
2016-11-10 21:01:42 -08:00
Sean Dague
e9d19c1dcc Fix "argument of type 'NoneType' is not iterable" during discovery (#4279)
* Fix "argument of type 'NoneType' is not iterable" during discovery

When yamaha receivers are dynamically discovered, there config is
empty, which means that we need to set zone_ignore to [] otherwise the
iteration over receivers fails.

* Bump rxv library version to fix play_status bug

rxv version 0.3 will issue the play_status command even for sources
that don't support it, causing stack traces during updates when
receivers are on HDMI inputs.

This was fixed in rxv 0.3.1. Bump to fix bug #4226.

* Don't discovery receivers that we've already configured

The discovery component doesn't know anything about already configured
receivers. This means that specifying a receiver manually will make it
show up twice if you have the discovery component enabled.

This puts a platform specific work around here that ensures that if
the media_player is found, we ignore the discovery system.
2016-11-10 20:44:38 -08:00
Jan Losinski
7d2ab4fce6 Change pilight systemcode validation to integer (#4286)
* Change pilight systemcode validation to integer

According to the pilight code the systemcode should be an integer and
not a string (it is an int in the pilight code). Passing this as a
string caused errors from pilight:
"ERROR: elro_800_switch: insufficient number of arguments"

This fixes #4282

* Change pilight unit-id to positive integer

According to the pilight code the unit of an entity is also evrywhere
handled as an integer. So converting and passing this as string causes
pilight not to work.

This fixes #4282

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2016-11-10 13:14:40 -08:00
Pascal Vizeli
ba2ea35089 Add logging to platform/component setup (#4300)
* Add timeout to platform/component

* Revert "Add timeout to platform/component"

This reverts commit 280a311e48.

* Add logging data

* Change log message with paulus comments
2016-11-10 18:46:31 +01:00
Erik Eriksson
ade62faa38 Don't fail if component name is None. Fixes (#4334)
https://github.com/home-assistant/home-assistant/issues/4326

Might fix https://github.com/home-assistant/home-assistant/issues/4326
2016-11-10 08:46:32 -08:00
Finbarr Brady
ee322dbbdc Cisco IOS device tracker support (#4193) 2016-11-09 22:36:57 +02:00
John Arild Berentsen
0d4141bf13 Add missing Index labels (#4328) 2016-11-09 19:11:24 +01:00
Christopher Viel
d404ac8978 Add support for off script to WOL switch (#4258) 2016-11-09 08:44:30 -08:00
Pascal Vizeli
71da21dcc8 Change pending task sheduler to time based cleanup (#4324)
* Change pending task sheduler to time based cleanup

* update unittest
2016-11-09 08:41:17 -08:00
Paulus Schoutsen
04dbc992ec Increase update delay (#4321) 2016-11-09 07:21:58 -08:00
Paulus Schoutsen
6d0e08cf7d Fix KNX async I/O (#4267) 2016-11-08 21:00:33 -08:00
Paulus Schoutsen
1e0025acae Fix Tellstick doing I/O inside event loop (#4268) 2016-11-08 20:25:19 -08:00
Pascal Vizeli
8fc853ba11 Add more unittest for async_add_job (#4320)
* Add more unittest for async_add_job

* fix test

* lint
2016-11-08 20:01:05 -08:00
sustah
8cbb8f6527 Update dlink.py (#4317)
corrected "total consumption" units from W to kWh
2016-11-08 19:58:27 -08:00
Jesse Newland
4f86c9ecda Fix alarm.com I/O inside properties (#4307)
* Fix alarm.com I/O inside properties

* First line should end with a period

* Not needed

* Fetch state on init
2016-11-08 19:57:46 -08:00
Lewis Juggins
9561fed650 Fix Dark Sky async I/O (#4299) 2016-11-08 19:46:44 -08:00
Lewis Juggins
67b599475e Fix OWM async I/O (#4298) 2016-11-08 18:57:56 -08:00
Pascal Vizeli
114ece1848 Fix possible sigterm / unittest / Fix all lazy test (#4297)
* replace weakref with a list

* add unittest

* fix lint

* fix handling

* fix unittest

* change code style

* fix lazy tests
2016-11-08 10:24:50 +01:00
Fabian Affolter
c05815cced Upgrade sqlalchemy to 1.1.3 (#4277) 2016-11-07 23:08:17 -08:00
Pascal Vizeli
2e0c185740 Async cleanup part 3 (#4302) 2016-11-07 22:31:40 -08:00
Johann Kellerman
231ef40f53 iOS links (#4295) 2016-11-08 00:07:24 +01:00
Fabian Affolter
b4159c7dc9 Upgrade python-digitalocean to 1.10.1 (#4276) 2016-11-06 23:49:25 -08:00
Fabian Affolter
8cc5fc1369 Upgrade psutil to 5.0.0 (#4275) 2016-11-06 23:49:11 -08:00
Paulus Schoutsen
fc3235fb6d Merge pull request #4271 from home-assistant/release-0-32-2
Release 0 32 2
2016-11-06 23:40:06 -08:00
David-Leon Pohl
d129df93dd Hotfix #4272 (#4273) 2016-11-06 23:34:45 -08:00
David-Leon Pohl
67336a111b Hotfix #4272 (#4273) 2016-11-06 23:34:32 -08:00
Paulus Schoutsen
0af1a96f14 Lint 2016-11-06 23:24:25 -08:00
andyat
272899ec96 Fix setting temperature in Celsius on radiotherm CT50 (#4270) 2016-11-06 23:21:08 -08:00
andyat
7d28d9d6b4 Fix setting temperature in Celsius on radiotherm CT50 (#4270) 2016-11-06 23:18:06 -08:00
Paulus Schoutsen
6a92e27e2f Version bump to 0.32.2 2016-11-06 23:12:37 -08:00
Paulus Schoutsen
faceb4c1dc Sequential updates for non-async entities 2016-11-06 23:12:20 -08:00
Paulus Schoutsen
6d5f00098a Move Honeywell I/O out of event loop (#4244) 2016-11-06 23:09:31 -08:00
Pascal Vizeli
618a86a37c Set executor to 15 and help to reduce flooting async core with updates (#4252)
* Set executor to 15 and help to reduce flooting async core with udpates

* fix typing

* if it a executor, wait

* address comments from paulus

* add space for style :)

* fix spell

* Update entity_component.py

* Update entity_component.py
2016-11-06 22:28:03 -08:00
Paulus Schoutsen
880ef8af48 Remove broken disable verify ssl synology (#4269) 2016-11-06 22:17:56 -08:00
William Scanlon
95124c7ddb Revert "Catch AttributeError on Wink PubNub update" (#4263) 2016-11-06 20:05:42 -08:00
William Scanlon
0aba227300 Catch AttributeError (#4253) 2016-11-06 16:04:57 -08:00
Martin Hjelmare
734bd75fd3 Fix mysensors overwriting gateway in GATEWAYS (#4013)
GATEWAYS was a dict, so would overwrite item if key was the same. This
would happen when using multiple MQTT gateways, since the device id is
the same (`mqtt`).

* Fix by changing GATEWAYS from dict into list.
* Use hass data to store mysensors gateways instead of having GATEWAYS
  be a global.
2016-11-06 10:49:43 -08:00
Frantz
0c5e077091 Updated netdisco to 0.7.6 (#4250) 2016-11-06 10:43:13 -08:00
Nicolas Graziano
1ed2f8ae91 Update braviarc to 0.3.6 (#4246)
Add HDMI sources.
Sources ordered.
2016-11-06 09:27:55 -08:00
Paulus Schoutsen
a343c20404 Async gather wait (#4247)
* Fix config validation for input_*, script

* Allow scheduling coroutines

* Validate entity ids when entity ids set by platform

* Async: gather -> wait

* Script/Group: use async_add_job instead of create_task
2016-11-06 09:26:40 -08:00
Antoine Bertin
d4e8b831a0 Add mqtt_template light component (#4233)
* Add mqtt_template component

* Docstring copy paste party on overriden methods

* pep8 E501 🌟

* Add missing docstrings on unittests
2016-11-06 09:09:01 -08:00
Paulus Schoutsen
98f41d6b84 Tweak block_till_done (#4245) 2016-11-06 08:43:32 -08:00
Paulus Schoutsen
7774a03a55 Move Honeywell I/O out of event loop (#4244) 2016-11-06 07:53:54 -08:00
Fabian Affolter
c35e5c9997 Upgrade astral to 1.3 (#4238) 2016-11-06 07:36:16 -08:00
Fabian Affolter
5d862e426e Upgrade fuzzywuzzy to 0.14.0 (#4240) 2016-11-06 07:36:03 -08:00
William Scanlon
bab8d574fe Wink Thermostat support and NoneType error fixes (#4175) 2016-11-06 07:27:15 -08:00
Fabian Affolter
c980d26aae Upgrade distro to 1.0.1 (#4239) 2016-11-06 14:00:41 +02:00
Paulus Schoutsen
08f75f7935 Merge pull request #4235 from home-assistant/release-0-32-1
0.32.1
2016-11-05 17:09:10 -07:00
Brent Hughes
1ad14b8227 Updated Emulated_Hue to send request info as variables to scripts (#4010)
* Updated Emulated_Hue to send request info as variables to scripts

* Updated tests to not use the old mqtt

* Updated test to actualy use and validate the script variables

* Fixed the removal of time in a recent merge

* fixed test to not use a timer
2016-11-05 17:08:54 -07:00
Pascal Vizeli
382ac5c3b5 Async cleanups with new handling and executor (#4234) 2016-11-06 01:01:03 +01:00
Paulus Schoutsen
af297aa0dc Version bump to 0.32.1 2016-11-05 17:00:06 -07:00
Paulus Schoutsen
20e1b3eae0 Fix radiotherm I/O inside properties (#4227) 2016-11-05 16:59:52 -07:00
Paulus Schoutsen
28861221ae Remove chunked encoding (#4230) 2016-11-05 16:59:52 -07:00
Pascal Vizeli
f367c49fb9 Sonos fix for slow update (#4232)
* Sonos fix for slow update

* fix auto update on discovery

* fix unittest
2016-11-05 16:59:52 -07:00
Pascal Vizeli
ad8645baf4 Sonos fix for slow update (#4232)
* Sonos fix for slow update

* fix auto update on discovery

* fix unittest
2016-11-05 16:58:29 -07:00
Paulus Schoutsen
62785c2431 More async tests (#4223)
* Annotate test callbacks to be async

* Convert device_sun_light_trigger to be async
2016-11-05 16:36:20 -07:00
Paulus Schoutsen
22c3d014aa Remove chunked encoding (#4230) 2016-11-05 15:29:22 -07:00
Paulus Schoutsen
3f3127a290 Fix radiotherm I/O inside properties (#4227) 2016-11-05 13:28:11 -07:00
Danijel Stojnic
88fc64c8a0 Add Map support for Locative component (#4174)
* Add Map support for Locative component

The Locative App on the mobile is sending an HTTP request to the
server where also the GPS location is sent.
But the GPS location was not passed to the event device_tracker.see.

Use the passed GPS location from Locative and pass it to the
device_tracker.see event.

With this the device is then also shown on the HA Map component.

* Use existing constants for latitude and longitude

Use the existing constants from homeassistant.consts:

ATTR_LATITUDE for 'latitude'
ATTR_LONGITUDE for 'longitude'

* Reuse the "yield from self.hass.loop.run_in_executor" again

* Use variable gps_location
2016-11-05 13:05:15 -07:00
Samuel Bétrisey
1463fc4fe0 Add Swisscom Internet-Box device tracker (#4123)
* Add Swisscom Internet-Box device tracker

* Add Swisscom device tracker to .coveragerc

* Add timeout to requests
Fix formatting and add missing comments to pass the lint test

* Remove authentication which was not required

I realised that there was no need to be authenticated to get the
connected devices. Thanks Swisscom :/

* Moving config to a PLATFORM_SCHEMA and using voluptuous
2016-11-05 13:04:44 -07:00
Pascal Vizeli
ece58ce78f Remove ThreadPool with async executor (#4154)
* Remove ThreadPool with async executor

* Fix zigbee

* update unittest

* fix remote api

* add pending task to remote

* fix lint

* remove unused import

* remove old stuff for lazy tests

* fix bug and add a exception handler to executor

* change executor handling

* change to wait from gather

* fix unittest
2016-11-05 09:27:55 -07:00
Paulus Schoutsen
b67f1fed52 Version bump to 0.33.0.dev0 2016-11-05 08:53:13 -07:00
Paulus Schoutsen
4770888d22 Merge pull request #4166 from home-assistant/dev
0.32
2016-11-05 08:52:57 -07:00
Paulus Schoutsen
1d0f3b930f Version bump to 0.32.0 2016-11-05 08:40:32 -07:00
Paulus Schoutsen
22e2262f8e Merge remote-tracking branch 'origin/master' into dev 2016-11-05 08:40:04 -07:00
William Scanlon
53d1a040d4 Stop Octoprint from logging errors during startup (#4220)
* Fix log errors

* Remove discovery code
2016-11-05 07:55:59 -07:00
Fabian Affolter
d7d71c97e2 Make the wind details more robust (weather.openweathermap) (#4215)
* Make the wind details more robust

* Return None if values is not available
2016-11-05 09:15:59 +01:00
Paulus Schoutsen
c15fd4323e Disable insteon hub (#4221) 2016-11-04 23:38:27 -07:00
Pascal Vizeli
91227d9a2e Refactory nest component/platforms (#4219)
* Refactory nest component/platforms
2016-11-04 20:22:47 -04:00
jbcodemonkey
a3db0ec231 add dimmer slide control to imported isy lights (#4152)
Supported attribute added and checks appear to pass. 🐬
2016-11-04 15:28:22 -06:00
Paulus Schoutsen
18e965c3cd Fix flaky group notify test (#4212) 2016-11-03 22:56:55 -07:00
Paulus Schoutsen
4cc417677e Add link to issue in warning slow entity update (#4211) 2016-11-03 22:45:01 -07:00
Paulus Schoutsen
525d735f21 Warn if fetching properties takes too long (#4208)
* Warn if fetching properties takes too long

* Update entity.py
2016-11-03 21:58:25 -07:00
Paulus Schoutsen
e88b98f5fa Clean up tests (#4209) 2016-11-03 21:58:18 -07:00
Lewis Juggins
6f68752d1e Speed up Sonos tests (#4196) 2016-11-03 21:23:37 -07:00
Fabian Affolter
61a0976752 Use port instead of url and fix PEP257 issues (#4192) 2016-11-03 18:43:42 -07:00
Pascal Vizeli
d7b3c9c38e Fix log owntrack log flooting (#4198) 2016-11-03 18:42:22 -07:00
jgriff2
a01939c6e9 Fix Synology Camera SSL certificate option (#4201) [BREAKING CHANGE]
* Fix Synology SSL config

* Revert "Fix Synology SSL config"

This reverts commit b8dc2a92abee6249b3dd42c99d0786820ebbeb72.

* Revert "Fix Synology SSL config"

This reverts commit 805e87f3af300a1b7627bb5df0792285fcf38901.

* Fix Synology SSL config
2016-11-03 18:41:32 -07:00
Fabian Affolter
c128919b5f Remove globally disabled pylint warnings (#4204) 2016-11-03 18:40:43 -07:00
Pascal Vizeli
e5d69feb93 Fix blocking/stack trace with empty list (#4191) 2016-11-03 18:33:18 -07:00
Paulus Schoutsen
ee5f228309 Make services yield (#4187)
* Make services yield

* Disable pylint abstract-method check

* add input_select

* add input_slider

* change to async vers.

* fix lint

* yield on add_entities as other components does
2016-11-03 18:32:14 -07:00
John Arild Berentsen
15dde7925a Prevent multiple instances of device initialzed (#4179) 2016-11-03 13:08:23 +01:00
Pascal Vizeli
fcf318cf53 Bugfix windows have a other default loop now (#4195)
* Bugfix windows have a other default loop now

* fix handling with 3.4.2 that not support ensure_future

* make the same as ensure_future does

* fix spell

* fix lazy test
2016-11-03 11:07:47 +01:00
Pascal Vizeli
c2a5f63b1f Bugfix async Yr.no (#4190) 2016-11-03 11:09:03 +02:00
Fabian Affolter
79fa2d4175 CUPS sensor (#4142)
* Add CUPS sensor

* Use CupsData

* Fix requirement
2016-11-03 09:31:50 +01:00
Erik Eriksson
214a18f08c Support for Dovado routers (#4176)
* Implemented support for the Dovado router

* Update .coveragerc
2016-11-02 21:20:21 -07:00
Ferry van Zeelst
ded2ea8b19 Synology DSM sensor (#4156)
* Added Synology DSM Sensor

* Fixed balloobbot's comments

* Fixed mistake (should have run lint and flake8 before committing

* Fixed update mechanisme according to balloobs feedback

* Requesting retest as test failure isn't related to changes made
2016-11-02 21:17:29 -07:00
Paulus Schoutsen
1d100dcac9 Bugfix/frontend group urls (#4185)
* Remove unnecessary sleeps

* Frontend: fix serving index when refreshing view page.
2016-11-02 21:15:23 -07:00
Bart274
a3ae96440b Update the icloud device_tracker (#4081)
* Update the icloud device_tracker

* addressed @kellerza 's comments

* GMTT config needs an entity_id

* renamed services

* fix cookiedir and clean up keep_alive function

* fix travis errors

* forgot a self.

* update devices after initializing the API

* changed wording

* addressed changes from @kellerza

* Syntax error solved

* Update icloud.py

* Only use account of username instead of whole username as default for account name

* use slugify instead of slug for schema

* remove Google Maps Travel Time

* Add comment from original tracker back
2016-11-02 21:07:23 -07:00
devdelay
0235626f40 yet another command_line sensor update (#4184) 2016-11-02 21:00:32 -07:00
Paulus Schoutsen
d7dd7df5e7 Update frontend 2016-11-02 20:39:42 -07:00
Nicolas Graziano
1e28851280 Media player BraviaTv : Try to connect only if tv is not in off state. (#4140)
When HA is restart with the TV in off state there was error log every 10s until the TV is set ON.
2016-11-02 19:51:53 -07:00
bestlibre
df68de8032 Influxdb sensor state set to unknown if query return no points (#4148)
* Influxdb sensor state set to unknown if query return no points

* Update influxdb.py
2016-11-02 19:50:18 -07:00
Johann Kellerman
f3595f790a Async version of Yr.no (#4158)
* initial

* feedback

* More feedback. Still need to fix match_url

* url_match

* split_lines
2016-11-02 19:34:12 -07:00
Johann Kellerman
0d14920758 Component setup error messages with markdown (#3919)
* Remove_dev_link_async

* callback
2016-11-02 19:31:09 -07:00
Paulus Schoutsen
2940fb72fb EntityComponent.add_entities now converts generators to a list (#4183) 2016-11-02 19:24:25 -07:00
Daniel Perna
8e0838adeb Added support for Philips TVs with jointSPACE API (#4157)
* Added support for Philips Tvs with JointSpace API

* Flake + Lint fixes

* Lint be like "lol fu"

* Changes as requested by reviewers, except lib-requirement

* Switched to library-usage

* lint... newline-bingo...
2016-11-02 19:19:53 -07:00
Paulus Schoutsen
4e820ea30a Move mocks to async_start (#4182) 2016-11-02 19:16:59 -07:00
Pascal Vizeli
26490109ac Change event loop on windows (#4075)
* Change event loop on windows

* fix

* split PR

* remove set event loop

* Add paulus suggestion

* fix missing import

* revert stuff from PR Splitting

* fix event loop on test
2016-11-02 21:53:52 +01:00
Georgi Kirichkov
e4a713207d Fixes in TP-Link Switch logging 0 values on init (#4026)
* Fixes in TP-Link Switch logging 0 values on init

On init of component the emeter would log to influxdb and possibly other inputs a 0 value, instead of not logging anything.
Initial polling should circumvent that behavior and avoid logging inconsistencies.

* Refactors update call in __init__
2016-11-02 12:23:43 -07:00
Greg Dowling
cc0d0a38d7 Get temparature units from vera controller. (#4130)
Alrighty 👯‍♀️
2016-11-02 14:20:44 +01:00
Erik Eriksson
afde5a6b26 extracted logic into an external package. monitor more attributes. support for more than one vehicle (#4170) 2016-11-01 22:01:00 -07:00
Lewis Juggins
a5fb284717 Add new_device_discovered event (#4132) 2016-11-01 21:52:27 -07:00
Johann Kellerman
e487a09190 Remove None value before writing known_devices (#4098)
* Remove None

* Replace null
2016-11-01 21:51:31 -07:00
Jan Losinski
52eb816c62 Introduce a send_delay for pilight component (#4051)
* Add a method to throttle calls to services

This adds CallRateDelayThrottle. This is a class that provides an
decorator to throttle calls to services. Instead of the Throttle in
homeassistant.util it does this by delaying all subsequent calls
instead of just dropping them. Dropping of calls would be bad if we
call services to actual change the state of a connected hardware (like
rf controlled power plugs).

Ihe delay is done by rescheduling the call using
track_point_in_utc_time from homeassistant.helpers.event so it should
not block the mainloop at all.

* Add unittests for CallRateDelayThrottle

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Introduce a send_delay for pilight component

If pilight is used with a "pilight USB Nano" between the daemon and the
hardware, we must use a delay between sending multiple signals.
Otherwise the hardware will just skip random codes. We hit this
condition for example, if we switch a group of pilight switches on or
off. Without the delay, random switch signals will not be transmitted by
the RF transmitter.

As this seems not necessary, if the transmitter is directly connected
via GPIO, we introduce a optional configuration to set the delay.

* Add unittests for pilight send_delay handling

This adds an unittest to test the delayed calls to the send_code
service.
2016-11-01 21:50:27 -07:00
Jason Carter
90d894a499 Garadget (#4031)
* Initial attempt at implementation

* Adding Garadget cover component

* Updating Device to be Required

* Updating .coveragerc to exclude from testing

* Updating code review items

* Updating per 2nd code review

* Updating configuration to be more like command-line
2016-11-01 21:49:27 -07:00
Jon Caruana
ba13951fff Add LiteJet (a lighting control system) component (#4125)
* Initial submission of LiteJet integration.

* Add LiteJet switch pressed automation trigger. (State changes are too slow to catch a press-release.)
Add LiteJet scene, replacing commented out code that treated these as lights.
Include LiteJet numbers in the device state so that it is easy to lookup entity -> number.

* Fix missing global.

* Allow light's brightness to be set explicitly.

* Support optional 'ignore' key to ignore prefixes of loads, switches, and scenes that weren't configured for use in the LiteJet system.

* Fix lint errors and warnings.

* Cleanup header comments.
Default to not creating LiteJet switches as these are generally not useful.

* Lint fixes.

* Fixes from pull request feedback.

* Use hass.data instead of globals for data storage.

* Fix lint warnings.
2016-11-01 20:44:25 -07:00
Sean Dague
2a7b7ebd6a Merge pull request #3985 from postlund/yamaha_additions
Improve support for Yamaha receiver
2016-11-01 21:50:03 -04:00
Bjarni Ivarsson
df7d9c3bb2 Fallback to read volume and mute state from speaker. (#4173) 2016-11-01 15:12:18 -07:00
Bjarni Ivarsson
c549ea115d Sonos responsiveness improvements + enhancements (#4063)
* Sonos responsiveness improvements (async_ coroutines, event based updating, album art caching) + Better radio station information

* Docstring fixes.

* Docstring fixes.

* Updated SoCo dependency + fixed file permissions.

* Only fetch speaker info if needed.

* PEP8 fixes

* Fixed SoCoMock.get_speaker_info to get test to pass.

* Regenerated requirements_all.txt + async fetching of album art with caching + added http_session to HomeAssistant object.

* Unit test fixed.

* Add blank line as per flake8

* Fixed media image proxy unit test.

* Removed async stuff.

* Removed last remnants of async stuff.
2016-11-01 10:42:38 -07:00
Fabian Affolter
dad54bb993 Update to make the sample file validate (#4168) 2016-11-01 15:11:42 +01:00
Fabian Affolter
0211cf29eb Change behavior to be more natural and fix test (#4150) 2016-11-01 10:43:48 +01:00
Nicholas Sideras
1d9ac5f8b3 Update __init__.py (#4155)
Changed manifest.json to respect Android screen rotate lock.
2016-10-31 13:04:54 -07:00
Paulus Schoutsen
7f699b4261 Lazy initialise the worker pool (#4110)
* Lazy initialise the worker pool

* Minimize pool initialization in core tests

* Fix tests on Python 3.4

* Remove passing in thread count to mock HASS

* Tests: Allow pool by default for threaded, disable for async

* Remove JobPriority for thread pool

* Fix wrong block_till_done

* EmulatedHue: Remove unused test code

* Zigbee: do not touch hass.pool

* Init loop in add_job

* Fix core test

* Fix random sensor test
2016-10-31 08:47:29 -07:00
Paulus Schoutsen
a1e910f1cf Disable rest switch tests 2016-10-31 08:22:49 -07:00
Fabian Affolter
b4899ec469 Allow multiple symbols (sensor.yahoo_finance) (#4126)
* Allow multiple symbols

* Update test
2016-10-31 13:31:09 +01:00
John
06de7053ce Add Emby Server media_player component (#3862)
* Add Emby Server media_player component

* Code cleanup, move to request sessions, generate UUID per session

* Make media image fetch more robust

* Allow for http or https

* Cleanup some Keyerror conditions found through more testing

* Move EmbyRemote to pip, update requirements

* Code cleanup, add SSL config option
2016-10-31 13:29:08 +01:00
Fabian Affolter
4484a7a94b Use voluptuous for Pilight switch (#3819)
* Migrate to voluptuous

* Add protocol

* Update
2016-10-31 13:18:47 +01:00
Jared Beckham
a89e635bf3 Added tests for REST switches (#4016)
* Added tests for REST switches

* Remove REST switch from test coverage exclusions
2016-10-31 13:14:23 +01:00
Daniel Høyer Iversen
3ab056ba69 Merge pull request #4149 from home-assistant/flux_led_library
flux led lib
2016-10-31 11:56:00 +01:00
Daniel
5ba815ab21 flux led lib 2016-10-31 09:23:34 +01:00
Fabian Affolter
274e9799b3 Add random number sensor (#4139) 2016-10-31 00:01:25 -07:00
Jared Beckham
5ce9aea65d Added tests for REST sensors (#4115) 2016-10-30 21:51:03 -07:00
Michael
705814cb08 Catch all errors when doing mqtt message unicode-decode. (#4143)
* catch all errors when doing mqtt message unicode-decode.

* added AttributeError and UnicodeDecodeError to exception when decoding an mqtt message payload
2016-10-30 23:17:41 +01:00
Alok Saboo
8e695d1eb0 Fixed typo (#4145) 2016-10-30 23:13:27 +01:00
Fabian Affolter
be272ac64a Disable too-many-* (#4107)
* Disable too-many-* and too-few-public-methods

* Remove globally disabled pylint warnings
2016-10-30 22:18:53 +01:00
Fabian Affolter
b910a9917d Migrate to async (sensor.statistics) (#4138)
* Migrate to async

* Add async_ prefix and remove stale print
2016-10-30 18:56:26 +01:00
Fabian Affolter
9649097b32 Migrate to async (sensor.min_max) (#4136)
* Migrate to async

* Add async_ prefix
2016-10-30 16:45:53 +01:00
Fabian Affolter
5e76a51db4 Migrate to async (#4135) 2016-10-30 15:23:47 +01:00
Fabian Affolter
27abac85b6 Migrate to async (sensor.time_date) (#4100)
* Migrate to async

* Update acc. #4114
2016-10-30 15:21:23 +01:00
Fabian Affolter
9f2aae1357 Maintenance 2nd (#4106)
* Add link to docs

* Fix link

* Update line breaks

* Update ordering

* Align vera platofrm to only use add_devices
(instead od add_devices_callback)

* Remove line break

* Use consts

* Update ordering

* Update ordering

* Use const, create default name, use string formatting

* Update ordering

* Use const

* Update import style

* Update ordering and line breaks

* update line breaks

* Set default port

* Set defaults and update ordering

* Update ordering

* Minor style updates

* Update ordering, defaults, line breaks, and readability

* Use constants

* Add line breaks

* use string formatting

* Update line breaks

* Update logger
2016-10-30 09:58:34 +01:00
Adam Mills
e6ece4bf6d Fix initialization of zwave color bulbs (#4085)
* Fix initialization of zwave color bulbs

Zwave values can be added to the node in any order. This change allows
proper initialization when the multilevel value is added before the
color value.

* Fix incorrect rename of color command class
2016-10-29 17:14:28 -07:00
Hydreliox
aea2d1b317 Add support for Yeelight Wifi bulbs (#4065)
* Add support for Yeelight Wifi bulbs

* Fix cache property in instance
2016-10-29 17:03:26 -07:00
Pierre Ståhl
33e46b484f Add service to change visibility of a group (#3998) 2016-10-29 16:54:26 -07:00
wokar
3f6a5564ad lg_netcast platform fails to load if no channels defined (#4083)
* fixes loading of lg_netcast platform if no channels are defined

* turned list comprehension into for loop
2016-10-29 16:52:53 -07:00
Erik Eriksson
3317b4916b OSError is alias for IOException and base class for many other exceptions - no need to catch redundant exceptions if OSError already present in except-clause (#4111) 2016-10-29 15:33:56 -07:00
Pascal Vizeli
9c0455e3dc Allow update entities on add_entities callback (#4114)
* Allow udpate entities on add_entities callback

* fix wrong position

* update force_update to update_before_add

* add unittest for update_befor_add

* fix unittest

* change mocking
2016-10-29 15:33:11 -07:00
Fabian Affolter
5d43d3eb1c Fix error message (#4122) 2016-10-29 15:30:23 -07:00
Paulus Schoutsen
4163e55dbd Introducing hass.data (#4121)
* Hello hass.data

* Migrate setup_component to hass.data
2016-10-29 14:51:17 -07:00
Paulus Schoutsen
3cc4fdaa34 Fix HTTP static file singular (#4118) 2016-10-29 14:45:31 -07:00
Pascal Vizeli
edeb31d74e Fix bug with aioHTTP and none authentification (#4116) 2016-10-29 22:47:46 +02:00
Fabian Affolter
54d19e3c53 Maintenance (sensor.currencylayer, sensor.fixer) (#4103)
* Add new const (base)

* Use constant

* Remove second error message, use const, add attribution, add link
to docs, remove unused vars, and a little simplification

* Add quote

* Use const

* Add attribution, simplify the code, and use consts
2016-10-29 13:27:02 -07:00
Fabian Affolter
892f455aee Maintenance (sensor.bitcoin, sensor.yahoo_finance) (#4104)
* Add attribution

* Update ordering

* Update ordering
2016-10-29 13:21:09 -07:00
Fabian Affolter
942d630762 Maintenance zoneminder (#4102)
* Add timeout to requests, fix typos, and defaults

* Clean-up
2016-10-29 13:10:42 -07:00
Paulus Schoutsen
9ea1101aba Fix bootstrap circular imports (#4108)
* Fix bootstrap circular imports

* fix test

* Lint
2016-10-29 12:54:47 -07:00
Pascal Vizeli
08a65a3b31 Async input_*/zone migration (#4095)
* Async input_*

* Async zone component

* rename service callback
2016-10-29 12:19:27 -07:00
Fabian Affolter
d4b3f56d53 Maintenance (#4101)
* UPdate ordering, fix typos, and align logger messages

* Update import style, fix PEP257 issue, and align logger messages

* Updaate import style and align logger messages

* Update import style and align logger messages

* Update ordering

* Update import style and ordering

* Update quotes

* Make logger messages more clear

* Fix indentation
2016-10-29 09:12:43 -07:00
Paulus Schoutsen
5a2b4a5376 Core Async improvements (#4087)
* Clean up HomeAssistant.start

* Add missing pieces to remote HA constructor

* Make HomeAssistant constructor async safe

* Code cleanup

* Init websession lazy
2016-10-29 08:57:59 -07:00
Sean Dague
9d836a115a Add zone_ignore option for yamaha. (#4091)
* Add zone_ignore option for yamaha.

We attempt to discover all zones for yamaha receivers. There are times
when users may want to suppress some zones from showing up. When a
Zone isn't actually connected to speakers, or on some newer receivers
where Zone_4 is an HDMI only zone, that doesn't support even basic
media_player UI.

This provide a mechanism for users to do that.

Fixes #4088

* Update yamaha.py
2016-10-28 19:18:31 -07:00
Fabian Affolter
bf92aedd38 Add hddtemp sensor (#4092) 2016-10-28 19:06:24 -07:00
devdelay
230c3815f2 Update command_line sensor to use STATE_UNKNOWN (#4093) 2016-10-28 19:03:40 -07:00
Pascal Vizeli
9afe066ec8 Fix name in openalpr cloud api (#4097) 2016-10-28 19:01:14 -07:00
Pascal Vizeli
66541a6a19 Update ha-ffmpeg to version 0.15 (#4096) 2016-10-29 00:12:53 +02:00
Pascal Vizeli
825ee3612d fix some comments spell (#4082)
* fix some comments

* fix in an executor

* address paulus comments
2016-10-28 21:26:52 +02:00
Abhishek Anand
65bd7d2326 Generalized REST switch to enable templating and configurable timeout. (#3329)
* successfully tested the "remote temperature mode" switch for the radio thermostat

* removed logging and interpreted None as Off.

* turn_off value is also templated now -- can depend on state

Also, undid accidental removal of error logging.

* ensured backward compatibility of config file

if value_template is not provided, the update function behaves as before

* ran autopep8 --in-place

* fixed another complaint of tox

* addressed the comments of balloob

* undid acccidental log.error to log.info

* timeout : 50 -> 10

* added a timeout parameter

* removed the stray '-', better names for the failure case

* string comparisons after .lower(), as suggested by balloob

* addressed balloob's latest requests

* making flake happy

* value_template --> is_on_template in config file

* moved CONF_IS_ON_TEMPLATE to local file

* null checks

* addressed flake error

* properly comparing template text when is_on is not a template.
2016-10-27 22:34:22 -07:00
John Arild Berentsen
d8c1013b09 Zwave climate, add operating state to attributes (#4069)
* Zwave climate, add operating state to attributes

* Reversed assisgnment
2016-10-27 22:25:17 -07:00
Fabian Affolter
02d1dc6247 Upgrade psutil to 4.4.2 (#4079) 2016-10-27 22:22:43 -07:00
Paulus Schoutsen
726d950522 Update aiohttp.py 2016-10-27 21:45:35 -07:00
Pascal Vizeli
3324995e70 Async clientsession / fix stuff on aiohttp and camera platform (#4084)
* add websession

* convert to websession

* convert camera to async

* fix lint

* fix spell

* add import

* create task to loop

* fix test

* update aiohttp

* fix tests part 2

* Update aiohttp.py
2016-10-27 21:40:10 -07:00
Fabian Affolter
85747fe2ef Upgrade python-telegram-bot to 5.2.0 (#4080) 2016-10-27 21:28:09 -07:00
Pascal Vizeli
09db875ace Fix async bug in automation (#4078) 2016-10-27 18:26:55 +02:00
bestlibre
7d407756c3 Converting unit_of_measurement variable to optional, to be consistent with other sensors (#4076) 2016-10-27 08:50:36 -07:00
Richard Cox
91d682d02c Adding ssl option to zoneminder (#4074) 2016-10-27 15:54:03 +02:00
Benoit BESSET
b75c103db4 fixed Up/Down (#4064) 2016-10-27 12:10:38 +02:00
Richard Cox
bba323d226 [media_player/onkyo] host should be optional (#4073) 2016-10-27 10:33:35 +02:00
Paulus Schoutsen
7564d539c1 Lint 2016-10-27 00:37:02 -07:00
Paulus Schoutsen
33439aaa22 Update frontend 2016-10-27 00:21:55 -07:00
Pascal Vizeli
d5368f6f78 Async bootstrap / component init (#3991)
* Async bootstrap

* Adress comments

* Fix tests

* More fixes

* Tests fixes
2016-10-27 00:16:23 -07:00
Simon Szustkowski
d9999f36e8 Added a ThingSpeak component (#4027)
* Added a ThingSpeak component

* Forgot a colon. Fixed it

* Some config variables are better required

* New requirements created by the script

* Updated the .coveragerc

* Fixed small linting errors

* Removed unneccessary validation

* Even more linting error fixes

* Changed the way the component listens to state changes

* Removed unneccessary declaration of 'state' variable, referring to new_state instead
2016-10-26 23:56:51 -07:00
Pierre Ståhl
235e1a0885 Minor improvements to RPi camera platform (#4059)
* Try to create output file instead of checking write permissions

* Kill raspistill process during shutdown
2016-10-26 23:51:13 -07:00
Paulus Schoutsen
541fec0534 Sort .coveragerc alphabetically. 2016-10-26 23:50:11 -07:00
bestlibre
b3ad7989ae Influxdb sensor (#4060)
* Influxdb sensor with voluptuous configuration validation

* Adding sensor to coveragerc since there is no test for now
2016-10-26 23:48:57 -07:00
Sean Dague
3d897e0e52 Add discovery for yamaha component (#4061)
This uses the discovery code from netdisco/ha to discover yamaha
receivers. The old discovery code remains if discovery is turned of in
HA, at least for now. Though it probably is worth turning that off in
the future.
2016-10-26 23:46:44 -07:00
Alok Saboo
c6d5987109 Create Currencylayer exchange rate sensor (#4062)
* Added Currencylayer exchange rate sensor

* Updated .coveragerc to include currencylayer

* Update currencylayer.py

* Added Conf_name
2016-10-26 23:46:13 -07:00
Matthew Treinish
5d3956ea98 Cleanup use of MQTT in emulated_hue tests (#4068)
* Use unix newlines on test_emulated_hue

This commit switches the test_emulated_hue module to use unix newlines
instead of the DOS style that were there before. (using dos2unix on
the file) This makes it consistent with the other files in the repo.

* Cleanup emulated_hue tests

Previously these tests relied on the mqtt light platform as test devices
to control with the emulated hue. However, this was pretty heavyweight
and required running an MQTT broker in the tests. Instead this commit
switches it to use the demo light platform which is strictly in memory.

Fixes #3549
2016-10-26 23:33:43 -07:00
Marcelo Moreira de Mello
4fb0b27310 Wunderground sensor with alerts exceeds API limits (#4070)
* Fixes issue #4067 - Wunderground sensor with alerts exceeds API limits

 To avoid hitting the max limit of 500 calls per day, this patch keeps weather conditions being updated each 5 minutes
  and weather advisories each 15 minutes.

 This formula will result the following:

   conditions -> 300 seconds -> 5 minutes -> 12 req/h -> 288 req/day
   alerts -> 900 seconds -> 15 minutes -> 4 req/h -> 96 req/day

* Using timedelta in minutes instead seconds
2016-10-26 23:31:49 -07:00
Paulus Schoutsen
4833e992fb Pin cython==0.24.1 (#4057) 2016-10-25 23:38:32 -07:00
Paulus Schoutsen
fe3aed0f0c Update .coveragerc 2016-10-25 23:32:58 -07:00
Paulus Schoutsen
57402bcb43 Update .coveragerc 2016-10-25 23:30:43 -07:00
Scott O'Neil
7f48c00793 Adding timer setting functionality to sonos component (#3941)
* Adding timer setting functionality to sonos component

* Adding clear sleep timer for Sonos
2016-10-25 23:22:17 -07:00
Paulus Schoutsen
f58647849a Fix Z-Wave: Pin cython in Dockerfile (#4055) 2016-10-25 23:17:34 -07:00
Marcelo Moreira de Mello
1f468fc94d If no weather advisories were issued, state should return 0 instead Unknown (#4029)
* If no weather advisories were issued, state should return 0 instead Unknown

* Updated to keep on the same if statement

* Revert "Updated to keep on the same if statement"

This reverts commit 0e6a94aa0f.
2016-10-25 22:49:51 -07:00
Bjarni Ivarsson
961c02f72a Sonos improvements (#3997)
* Sonos improvements: media_* properties delegate to coordinator if speaker is a slave, media_image_url and media_title now works for radio streams, source selection/list takes speaker model into account, commands on slaves delegate to coordinator.

* Fixed failing unit tests.
2016-10-26 00:37:47 +02:00
Robbie Trencheny
79da1ec0d9 Merge pull request #4037 from home-assistant/remove-deprecated-things
Remove deprecated things
2016-10-25 14:28:01 -07:00
Robbie Trencheny
fe174402d2 Remove more deprecated things 2016-10-25 14:16:08 -07:00
Matthew Treinish
1b2dfb8ed1 Handle FreeBSD version in updater component (#4048) 2016-10-25 22:38:22 +02:00
Pierre Ståhl
297a6f6f03 Improve support for Yamaha receiver
* Playback (play, pause, stop, next, previous)

* Media title, artist and album
2016-10-25 20:53:04 +02:00
Per Sandström
0dfcf40d37 [WIP] Config validation error line numbers (#3976)
Config validation error line numbers
2016-10-25 20:13:32 +02:00
Fabian Affolter
d308ea69ce Upgrade yahoo-finance to 1.3.2 (#4040) 2016-10-25 08:36:20 -07:00
Sean Dague
a8c5c995a0 Merge pull request #4042 from sdague/typo
fix typos in script module strings
2016-10-25 07:40:11 -04:00
Sean Dague
86b318e992 fix typos in script module strings
It looks like some copy / paste in docstrings, clean them up for
posterity.
2016-10-25 07:20:40 -04:00
Bart274
53ea926292 Fix for see service attributes (#4023) 2016-10-25 10:59:20 +02:00
Robbie Trencheny
2b1f4123db Update requirements_all.txt 2016-10-24 22:36:04 -07:00
Robbie Trencheny
b36e346ccb Fix helpers.state tests 2016-10-24 22:33:54 -07:00
Adam Mills
89e8fb4066 Configurator support for entity_picture (#4028) 2016-10-24 22:28:34 -07:00
David-Leon Pohl
e2d23d902a Unittests for ddwrt device tracker and bugfix (#3996)
* BUG Message data cannot be changed thus use voluptuous to ensure format

* Pilight daemon expects JSON serializable data

Thus dict is needed and not a mapping proxy.

* Add explanation why dict as message data is needed

* Use more obvious voluptuous validation scheme

* Pylint:  Trailing whitespace

* Pilight sensor component

* Python 3.4 compatibility

* D202

* Use pytest-caplog and no unittest.TestCase

* Fix setup/teardown of unittests

* Activate coverage testing

* Bugfix whitelist filter and use bugfixed pilight library

* Use newest pilight library that has a bugfix

* Add unittest for pilight hub component

* PEP257 for docstrings

* Bugfix setting device name from host name and small cleanup

- Init with connection error handling is more clear
- Comments clean-up

* PEP257

* New unittest with full coverage

* Upload missing testfixtures

* D209

* Handle double quotes in reply

* Formatting
2016-10-24 22:18:24 -07:00
Fabian Affolter
2604dd89a6 Add test (#3999) 2016-10-24 22:01:38 -07:00
Robbie Trencheny
044b9caa76 Remove garage_door, hvac, rollershutter and thermostat components/platforms 2016-10-24 22:00:43 -07:00
Daniel Perna
1707cdf9f3 Added support for Notifications for Android TV / FireTV (#3978)
* Added support for Notifications for Android TV / FireTV

* Silly me forgot to commit coverage

* Fixed pylint

* Fixed flake8

* Fixed another flake8 -.-

* Changed option 'ip' to 'host' like most other platforms do
2016-10-24 21:59:09 -07:00
Fabian Affolter
4c86721e70 Update tests, rename variable, and change conversion (#3546) 2016-10-24 21:53:03 -07:00
Matthew Treinish
0ff500ca25 Add mochad component (#3970)
This commit adds a new component for communicating with mochad[1] a
socket interface for the CM15A and CM19A USB X10 controllers. This
commit leverages the pymochad library to interface with a mochad socket
either on a local or remote machine. Mochad is added as as a generic
platform because it supports multiple different classes of device,
however in this patch only the switch device implemented as a starting
point. Future patches will include other devices types. (although
that's dependent on someone gaining access to those)

[1] https://sourceforge.net/projects/mochad/
2016-10-24 21:49:49 -07:00
Robbie Trencheny
23f54b07c7 Dont load notify.ios if no devices exist. Thanks @arsaboo for catching this. 2016-10-24 18:46:47 -07:00
Robbie Trencheny
f25ddef4d7 More iOS HTTP Async updates 2016-10-24 17:31:45 -07:00
Robbie Trencheny
7158919346 Missed a wsgi->http on iOS component 2016-10-24 15:03:51 -07:00
Fabian Affolter
627517cbbc Upgrade psutil to 4.4.0 (#4032) 2016-10-24 22:24:33 +02:00
Fabian Affolter
4ecfc7d066 Upgrade sqlalchemy to 1.1.2 (#4003) 2016-10-24 22:00:22 +02:00
Fabian Affolter
72751b95b5 Upgrade slacker to 0.9.29 (#4000) 2016-10-24 22:00:02 +02:00
Fabian Affolter
fc3b7907ed Upgrade python-telegram-bot to 5.1.1 (#4001) 2016-10-24 21:59:48 +02:00
Paulus Schoutsen
f26a7fc6bb Update http 2016-10-24 00:09:20 -07:00
Robbie Trencheny
0c563f7b14 Minor updater... updates (#4020)
* Enable updater in dev versions

* Code clarity

* Add log line about being on the current version already

* Remove dev check test
2016-10-24 00:01:56 -07:00
Paulus Schoutsen
519d9f2fd0 async HTTP component (#3914)
* Migrate WSGI to asyncio

* Rename wsgi -> http

* Python 3.4 compat

* Move linting to Python 3.4

* lint

* Lint

* Fix Python 3.4 mock_open + binary data

* Surpress logging aiohttp.access

* Spelling

* Sending files is a coroutine

* More callback annotations and naming fixes

* Fix ios
2016-10-23 23:48:01 -07:00
Paulus Schoutsen
3701ac292c Merge pull request #4017 from home-assistant/release-0-31-1
0.31.1
2016-10-23 21:57:38 -07:00
Lewis Juggins
1db18478d2 Exclude dirs/files prefixed with . (#3986) 2016-10-23 21:08:56 -07:00
Robbie Trencheny
3230869f74 Fix a spelling problem on user-facing error 2016-10-23 20:34:31 -07:00
Robbie Trencheny
9aa88819a5 Fix a spelling problem on user-facing error 2016-10-23 20:33:49 -07:00
Paulus Schoutsen
3e92318cb2 Version bump to 0.31.1 2016-10-23 19:20:30 -07:00
Johann Kellerman
f0a38dded6 Catch UnicodeDecodeError Error (#4007)
* Catch UnicodeDecodeError Error

Error for #3933

* Forgot (exc)

* catch...

* Tests by @lwis

* Docstring

* Create open
2016-10-23 19:20:13 -07:00
Robbie Trencheny
c32f47aea6 iOS component hotfixes (#4015)
* iOS component hot fixes around component/platform loading, logging, and more

* Load device_tracker and zeroconf in deps instead of bootstraping

* Change conditional check on status code
2016-10-23 19:18:13 -07:00
Robbie Trencheny
626763a7c3 iOS component hotfixes (#4015)
* iOS component hot fixes around component/platform loading, logging, and more

* Load device_tracker and zeroconf in deps instead of bootstraping

* Change conditional check on status code
2016-10-23 19:17:34 -07:00
Johann Kellerman
5df8477536 Catch UnicodeDecodeError Error (#4007)
* Catch UnicodeDecodeError Error 

Error for #3933

* Forgot (exc)

* catch...

* Tests by @lwis

* Docstring

* Create open
2016-10-23 18:55:06 -07:00
Fabian Affolter
1f89e6ddba Upgrade pytz to 2016.7 (#4002) 2016-10-23 20:51:41 +02:00
Lewis Juggins
13ab2be5f6 Exclude dirs/files prefixed with . (#3986) 2016-10-23 16:47:06 +02:00
Robbie Trencheny
2bc84af87e Version bump to 0.32.0.dev0 2016-10-22 15:23:01 -07:00
Robbie Trencheny
ef2ed7bfc9 Merge pull request #3937 from home-assistant/dev
0.31
2016-10-22 15:22:07 -07:00
Robbie Trencheny
6040a40af2 Update version 2016-10-22 15:09:05 -07:00
jbags81
fb352c20d9 Update wink.py (#3957)
* Update wink.py

added lambda and smoke detector call in component loading routine to fix broken functionality.

* Update wink.py

fixed extra space.

* Update wink.py

applied cleaner refactor per comments

* Update wink.py

fixed spacing

* Update wink.py

fixed lint error #1
2016-10-22 16:59:20 -04:00
John Arild Berentsen
678f30def1 Prevent Verisure cam to delete a file when it is None (#3988) 2016-10-22 21:01:12 +02:00
Paulus Schoutsen
0fce5ccc7f Update frontend 2016-10-22 11:24:06 -07:00
John Arild Berentsen
02afc98668 Prevent zwave from firing event at shutdown (#3987) 2016-10-22 14:08:24 +02:00
Eric Hagan
57777ef79a Adds support for Pioneer AVR interface port number (#3878)
* Adds support for Pioneer AVR interface port number

https://community.home-assistant.io/t/support-for-pioneer-avr/503
telnetlib supports a port number so adding port as
an optional config element with a default of 23 resolves this.

* Adds timeout to Pioneer AVR

timeout in telnetlib defaults to socket._GLOBAL_DEFAULT_TIMEOUT
which is not a value, but rather a bare Object used for comparison.

telnetlib says the following about the timeout optional argument:
"The optional timeout parameter specifies a timeout in seconds
 for blocking operations like the connection attempt (if not
 specified, the global default timeout setting will be used)."

From the documentation for sockets:
"Sockets are by default always created in blocking mode"

Catching connect and timeout errors, logging to debug
and continuing.

* Catches timeout exceptions, logs and continues.
2016-10-22 11:05:00 +02:00
Paulus Schoutsen
ca6fa1313e Fix updater, add new fields (#3982)
* Fix updater

* Add Docker and virtualenv checks

* Add log line informing user of update/analytics

* Remove str
2016-10-21 23:30:40 -07:00
Robbie Trencheny
ea91d24eb2 HA iOS support (#3752)
* Initial commit of the iOS component and platform

* Allow extra

* Add battery to identify, a new function to get devices, and load the upcoming sensor

* Add iOS sensor platform, currently for battery state & level

* Add discoverability for the iOS app

* Convert single quote to double quotes

* Load all required components and platforms when loading the iOS component for the best experience

* Unify quote style to double

* Change to hass_ios

* Update push URL, add support for logging based on status code, log rate limit updates

* Block iOS from coverage checks for now...
2016-10-21 23:20:15 -07:00
Brent Hughes
6e5a3c0a94 Fixed statsd stopping if state is not numeric or only attributes changed (#3981)
* Fixed statsd stopping if attribute changed by not the state

* Fixed tests which exposed a new bug.

* Fixed another issue. whoops
2016-10-21 23:18:13 -07:00
dasos
754d536974 Work better with password-protected Squeezebox / LMS servers (#3953)
* Work better with password-protected Squeezebox / LMS servers, including getting file art. Refactored to only have a single method calling the telent lib. (Should make it easier to convert to the more appropriate JSON interface)

* Update squeezebox.py

* Update squeezebox.py

* Update squeezebox.py

* Update squeezebox.py

* Update squeezebox.py
2016-10-21 22:37:35 -07:00
Georgi Kirichkov
4f6ed09a99 Adds energy monitoring capabilities to the TP-Link HS110 (#3917)
* Adds energy monitoring capabilities to the TP-Link HS110

Energy monitoring works only on the HS110 model

* Reverts to using GadgetReactor's module

* Updates requirements_all.txt

* Refactors tplink switch to use attribute caching

* Update tplink.py
2016-10-21 21:45:36 -07:00
Johann Kellerman
8d375e2d47 Improve known_device.yaml writing (#3955)
* Better known_device.yaml writing

* yaml dump
2016-10-21 21:41:27 -07:00
Hydreliox
1d2d338cd0 Add Bbox Router bandwidth as sensors (#3956)
* Add Bbox Routeur bandwidth as sensors

Add possibility to monitor max and currently used bandwidth of your xdsl connection for Bbox Routeur

* Minor Fixes

Unit constant get back into the main sensor file

* Unused round removed
2016-10-21 21:34:22 -07:00
Hugo Dupras
cb47507002 Add support for Neato Connected robot as a switch (#3935)
* Add support for Neato Connected robot as a switch

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Add checklist items

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Add missing docstring

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* [Neato] Add update function to retrieve robot state

* Add docstring for update function + catch exception when retrieving state

* Change type of HTTPError when updating state

* Fix pylint errors
2016-10-21 21:14:45 -07:00
Fabian Affolter
fae620f3b3 Migrate to voluptuous (#3748) 2016-10-21 21:14:35 -07:00
Paulus Schoutsen
b821a82417 Merge remote-tracking branch 'origin/master' into dev 2016-10-21 20:57:07 -07:00
Paulus Schoutsen
da7837af73 Update frontend 2016-10-21 20:52:58 -07:00
Johann Kellerman
6e903fd429 Updater component - rename opt_out to reporting (#3979)
* Updater component - rename opt_out to reporting

* Fix tests
2016-10-21 20:40:23 -07:00
Martin Hjelmare
9f7e167669 Fix test using libsodium and SECRET_KEY (#3975)
* Move test to class with custom config setups and with config
  validation.
2016-10-21 20:23:29 -07:00
John Arild Berentsen
54a64fb8d9 Add support for verisure file camera. (#3952) 2016-10-21 22:41:17 +02:00
Nick Vella
2d89c3ecf4 Telstra SMS API notification component (#3949)
* Telstra API component

* import PLATFORM_SCHEMA

* Exclude Telstra notify component in coveragerc

* fix authentication issues

* Include title in SMS if it's provided

* pass lint

* Fix many code styling issues

* Confirm credentials are correct on component setup
2016-10-20 23:47:21 -07:00
Teemu Mikkonen
9f6d1c4e7b Device tracker: SNMPv3 (#3961)
* Add initial SNMPv3 support for better security

* Fixed indentation errors

* Fixed flake8 E128 on row 65

* Disabled warning about too many instance-attributes

* Removed extra code, added Inclusive to make better config validation
2016-10-20 23:01:30 -07:00
AlucardZero
62b8e54235 Upgrade SoCo to 0.12 (#3951)
Changelog: https://github.com/SoCo/SoCo/releases/tag/v0.12

Backwards Compatability changes:

    Dropped support for Python 3.2
    Methods relating to the music library (get_artists, get_album_artists, get_albums and others) have been moved to the music_library module. Instead of device.get_album_artists(), please now use device.music_library.get_album_artists() etc. Old code will continue to work for the moment, but will raise deprecation warnings
    Made a hard deprecation of the Spotify plugin since the API it relied on has been deprecated and it therefore no longer worked
    Dropped pylint checks for Python 2.6
2016-10-20 22:51:00 -07:00
Dustin S
1ceac8407d Adding security contexts to the resources. (#3840) 2016-10-20 22:43:39 -07:00
Jason Carter
0c0b02eb3d Moving updates out of state property (#3966) 2016-10-20 22:35:25 -07:00
Johann Kellerman
c70722dbae Updater component with basic system reporting (#3781) 2016-10-20 21:30:44 +02:00
Martin Hjelmare
a05fb4cef8 Upgrade pymysensors to 0.8 (#3954) 2016-10-20 20:56:26 +02:00
Marcelo Moreira de Mello
fee01fcccc Added unit test to the Yahoo Finance sensor (#3943) 2016-10-20 20:14:50 +02:00
henryk
2b37b4251b Fritzbox - Only report a MAC address if it's really there (#3964)
Fixes 'Neither mac or device id passed in'
2016-10-20 20:04:11 +02:00
Fabian Affolter
3aa1b6a3f8 Fix PEP257 issues (#3962) 2016-10-20 19:10:12 +02:00
Pascal Vizeli
c32afcd961 Bugfix sonos (#3926)
* Bugfix Sonos

* lint

* Use player uid for looking of exists

* fix lint

* fix unittest

* Change player_id to unique_id
2016-10-20 08:36:48 -07:00
hcooper
d60c2d604f Add support for multiple inputs to nmap tracking module as a list (#3944) 2016-10-20 07:15:00 +02:00
David-Leon Pohl
081e61528d Bugfixes for pilight hub component and unit tests (#3948) 2016-10-19 22:02:11 +02:00
Richard Cox
5799d1aec9 Fixing verbage (#3940) 2016-10-18 18:25:47 -07:00
Adam Mills
7d32e5eeeb Logbook filtering of automations by entity_id (#3927)
* Logbook filtering of automations by entity_id

* Trigger action function parameters required
2016-10-18 18:11:35 -07:00
Johann Kellerman
57f32fa629 Fixup device_tracekt.mqtt voluptuous & unit tests (#3904) 2016-10-18 18:10:28 -07:00
Sean Dague
7da47852d4 Yamaha zones (#3920)
* Enhance yamaha component

This enhances the yamaha component to create 1 player per zone,
instead of only one play, which provides direct control of the various
zones for the player.

It also exposes play_media for NET_RADIO sources, which allows direct
setting of that.

This requires code changes in rxv 0.2.0, so the requirement dependency
is raised.

* Support current playback metadata for NET_RADIO

When on NET RADIO, support the currently playing information.
2016-10-18 18:04:15 -07:00
Justin Weberg
f1b658ea5d Fix Typo (#3942) 2016-10-18 17:59:14 -07:00
Pascal Vizeli
754e93ff6a Rename add_devices to async_add_devices like dev guide (#3938) 2016-10-19 00:35:22 +02:00
David-Leon Pohl
947c1efca2 New pilight sensor component (#3822)
* Pilight daemon expects JSON serializable data. Thus dict is needed and not a mapping proxy.
* Add explanation why dict as message data is needed
* Use pytest-caplog and no unittest.TestCase
2016-10-18 23:16:20 +02:00
hexa-
a1239077d9 Add support for matrix notifications (#3827) 2016-10-18 21:13:00 +02:00
Paulus Schoutsen
53b5dc8e84 Build frontend 2016-10-18 09:10:22 -07:00
Lewis Juggins
09bcd7321a Reset Bravia playing info to ensure state reflects correctly (#3903) 2016-10-17 23:13:35 -07:00
Pascal Vizeli
14ef0ca786 Bugfix Template sensors (#3931) 2016-10-18 07:27:32 +02:00
Rob Capellini
272539105f Replacing tempfile with mock_open in tests (#3753)
- test_bootstrap.py
- test_config.py
- components/test_init.py
- components/test_panel_custom.py
- components/test_api.py
- components/notify/test_file.py
- components/notify/test_demo.py
- components/camera/test_local_file.py
- helpers/test_config_validation.py
- util/test_package.py
- util/test_yaml.py

No changes needed in:
- components/cover/test_command_line.py
- components/switch/test_command_line.py
- components/rollershutter/test_command_line.py
- components/test_shell_command.py
- components/notify/test_command_line.py

Misc changes in:
- components/mqtt/test_server.py

Also, removed some unused mock parameters in tests/components/mqtt/test_server.py.
2016-10-17 20:16:36 -07:00
Fabian Affolter
7d67017de7 Upgrade python-digitalocean to 1.10.0 (#3921) 2016-10-17 20:13:43 -07:00
juggie
d921073e77 Ecobee - Celsius (#3906)
* #3899 - Ecobee tempoeratures

* #3899 Remove unused import

* #3899 Implement min/max_temp in ecobee.py as these temperatures have to be in F for ecobee api.

* #3899 Stale print

* #3899 Use min/max_temp from base class

* #3899 Removed unused import (again) so tests pass since changing to use super class

* #3899 Fix long lines

* #3899 Install tox locally... make it happy, commit

* #3899 Remove overridden min/max_temp and instead update __init__:min/max_temp to convert to self.temperature_unit (of the thermostat) as opposed to self.unit_of_measurement (of the system), which is wrong

* Remove unused import from ecobee
2016-10-17 20:06:03 -07:00
Jason Carter
9cf2acb495 Concord232 alarm panel (#3842)
* Adding Concord232 Alarm Panel

* Adding Concord232 Zones as Sensors

* Updating requirements_all.txt

* Adding DOCType and making helper function a closure for clarity

* Fixing D400 error in build

* Fixing pylint errors

* Adding # pylint: disable=too-many-locals

* Updating with proper polling methods

* Fixing Merge issues

* Fixing DocStyle Issue

* Moving Import out of setup

* Fixing DocString

* Removing overthought GLOBAL
2016-10-17 19:59:41 -07:00
Giel Janssens
3b424b034a Netatmo thermostat (#3888)
* Added Netatmo-thermostat

* Remove-CONF_DEVICES
2016-10-17 19:57:02 -07:00
Marcelo Moreira de Mello
76598bc4d2 #3829 - Fixed issued LowHighTuple doesn't define __round__ method for Nest Sensor (#3881)
* #3829 - Fixed type LowHighTuple doesn't define __round__ method issue when Nest is operating in range mode

* Testing if temperature is a tuple instead int or float
2016-10-17 19:55:53 -07:00
William Scanlon
c54476b62f Protocol is an int (#3928) 2016-10-17 19:53:50 -07:00
sam-io
ae8a8e22ad Support for Apple Push Notification Service (#3756)
* added push notification implementation

* some lint changes

* added docs

* added push notification implementation

* some lint changes

* added docs

* Fixed comment formatting issues

* Added requirments

* Update requirements_all.txt

* Update apns.py

* re-generated requirments_all.txt

* Added link to online docs

* added push notification implementation

* some lint changes

* added docs

* added push notification implementation

* some lint changes

* added docs

* Fixed comment formatting issues

* Added requirments

* Update requirements_all.txt

* Update apns.py

* re-generated requirments_all.txt

* Added link to online docs

* changed to use http/2 library for push notifications

* fixed lint issue

* fixed test that fails on CI

* another go at fixing test that fails on CI

* another go at fixing test that fails on CI

* another go at fixing test that fails on CI

* added missing docstring

* moved service description to main services.yaml file

* renamed apns service
2016-10-17 19:41:49 -07:00
Paulus Schoutsen
4c8d1d9d2f Clean up some async stuff (#3915)
* Clean up some async stuff

* Adjust comments

* Pass hass instance to eventbus
2016-10-17 19:38:41 -07:00
Sean Dague
daea93d9f9 Suppress requests/urllib3 connection pool log messages (#3854)
requests/urllib3 is notorious for using the INFO log level for very
DEBUG kinds of information. Given the configurability of python
logging it's actually pretty easy to just set requests to WARN by
default. This cleans out a bunch of largely unuseful log lines from
home assistant output.
2016-10-17 21:14:10 +02:00
Pascal Vizeli
1540bb1279 Async template (#3909)
* port binary_sensor/template

* port sensor/template

* port switch/template

* fix unittest

* fix

* use task instead yield on it

* fix unittest

* fix unittest v2

* fix invalid config

* fix lint

* fix unuset import
2016-10-17 07:00:55 +02:00
Jan Harkes
555e533f67 Added tests for the template is_defined filter 2016-10-17 03:20:07 +02:00
Jan Harkes
118f2f0bad Use a filter to fail rendering undefined variables
Instead of globally using StrictUndefined, introduce a filter that
will trigger a render failure on undefined variables.

Use as `{{ value_json.someval | is_defined }}`.
2016-10-17 03:20:07 +02:00
Jan Harkes
c8add59ea5 Fail when rendering undefined objects in Jinja2 templates
By not successfully rendering unknown objects to an empty string
the caller provided error_value actually gets used.

This allows, for instance, the MQTT sensor to retain its state when an
unexpected or unwanted message (#2733/#3834) is received.
2016-10-17 03:20:07 +02:00
Willems Davy
18f5258aaf Emoncms history component (#3531)
* Emoncms_history component, fix git mess

* - switch to track_point_in_time to send all data at foxed interval
- don't use json_dump
- switch to http post instead of http get
2016-10-16 17:05:01 -07:00
Justin Weberg
207c9e8575 Fix Comment (#3913) 2016-10-16 16:56:02 -07:00
Rob Capellini
4891ca1610 Removing calls to mock.assert_called_once_with (#3896)
If a mock's assert_called_once_with method is misspelled (e.g. asert_called_once_with) then the test will appear as passing.  Therefore, this commit removes all instances of assert_called_once_with calls and replaces them with two assertions:

        self.assertEqual(mock.call_count, 1)
        self.assertEqual(mock.call_args, mock.call(call_args))
2016-10-16 16:13:27 -07:00
Lewis Juggins
10c9132046 Resolve issue with delay not passing variables to render (#3901) 2016-10-16 16:08:12 -07:00
Fabian Affolter
71ee847aee Add web scrape sensor (#3841)
* Add web scrape sensor

* Add support for 'value_template', set 'verify_ssl' to true,
and remove 'before', 'after' & 'element'

* Fix pylint issue
2016-10-16 16:06:07 -07:00
Per Sandström
d9ae7ceb0c Tellstick switch force update (#3874) 2016-10-16 15:56:55 -07:00
Justin Weberg
2a972b2334 Move micromarkdown to HA (#3908)
* Move micromarkdown to HA

* Fix requests

* Update micromarkdown-js.html& .gz

* Update micromarkdown-js files
2016-10-16 15:47:34 -07:00
Pascal Vizeli
7484152be1 Async speedup add_device callback (#3910)
* Speed up entities processing from add_device callback

* fix lint

* fix bug
2016-10-17 00:35:57 +02:00
Paulus Schoutsen
6581dc2381 Document more core pieces 2016-10-16 13:45:17 -07:00
Paulus Schoutsen
31ec0ac6a7 Add util.async to the dev docs 2016-10-16 13:35:01 -07:00
John Arild Berentsen
8b2edc1514 ZWave: Add association service (#3894)
* Add association service

* Refactor service

* Requested changes

* Grammar in pydocstyle
2016-10-16 20:36:06 +02:00
Adam Mills
2612c6d6b8 Zwave alt delay workaround for HS-WD100+ (#3893) 2016-10-16 20:35:39 +02:00
Pascal Vizeli
0b8b9ecb94 Async EntitiesComponent (#3820)
* first version

* First draft component entities

* Change add_entities to callback from coroutine

* Fix bug add async_prepare_reload

* Group draft v1

* group async

* bugfix

* bugfix v2

* fix lint

* fix extract_entity_ids

* fix other things

* move get_component out of executor

* bugfix

* Address minor changes

* lint

* bugfix - should work now

* make group init async only

* change update handling to old stuff

* fix group handling, remove generator from init

* fix lint

* protect loop for spaming with updates

* fix lint

* update test_group

* fix

* update group handling

* fix __init__ async trouble

* move device_tracker to new layout

* lint

* fix group unittest

* Test with coroutine

* fix bug

* now it works 💯

* ups

* first part of suggestion

* add_entities to coroutine

* change group

* convert add async_add_entity to coroutine

* fix unit tests

* fix lint

* fix lint part 2

* fix wrong import delete

* change async_update_tracked_entity_ids to coroutine

* fix

* revert last change

* fix unittest entity id

* fix unittest

* fix unittest

* fix unittest entity_component

* fix group

* fix group_test

* try part 2 to fix test_group

* fix all entity_component

* rename _process_config

* Change Group to init with factory

* fix lint

* fix lint

* fix callback

* Tweak entity component and group

* More fixes

* Final fixes

* No longer needed blocks

* Address @bbangert comments

* Add test for group.stop

* More callbacks for automation
2016-10-16 09:35:46 -07:00
Fabian Affolter
a0fdb2778d Fix name allocation (#3890) 2016-10-16 18:07:34 +02:00
Fabian Affolter
5ef8ca9b03 Upgrade sendgrid to 3.6.0 (#3887) 2016-10-16 09:09:48 +02:00
Fabian Affolter
a10fa90357 Update link to docs repo (#3886) 2016-10-15 13:46:45 +02:00
Fabian Affolter
9743e17d62 Minimum/maximum/mean sensor (#3852)
* Add min/max sensor

* Update min_max.py
2016-10-14 21:43:46 -07:00
Marcelo Moreira de Mello
6fcb1b548e Added the ability to Weather Underground to track severe weather alerts (#3505)
*  Added the ability to Weather Underground to track severe weather alerts

*   * Added message on the advisory attr

  * Updated tests

* * Making use of guard clause

* Checking multiple_alerts prior loop

* Using a better way to create dict

* Fixed issue to set to None only the object that failed

* Added unittest

* Split update() method to different calls with their one throttle control to minimize API calls

* Updated unittest and make sure the alert sensor will not return 'unknown' status'

* Removed update() method from state property

* Branch rebased and include Weather Underground attribution

* Update wunderground.py
2016-10-14 21:35:27 -07:00
Adam Mills
1bf5554017 Zwave rgb fix (#3879)
* _zw098 must be set before update_properties

* Fix problematic zwave color light value matching

See https://community.home-assistant.io/t/color-issues-with-aeotec-zwave-zw098/2830
2016-10-14 21:17:48 -07:00
Georgi Kirichkov
49b1643ff0 Relaxes the configuration options for influxdb (#3869)
* Relaxes the configuration options for influxdb

By default influxdb allows unauthenticated access
Home Assistant required at least username and password to be present to properly submit data to influxdb

* Removes unused import of 'copy'

The copy module was used only in the removed test case responsible for testing the missing keys

* Updates InfluxDB config schema to require user and password

Current InfluxDB (v 1.0) can work without any authentication, but when authentication is enabled both username and password should be set.

* Removes extra white space in test_influxdb.py
2016-10-14 21:10:04 -07:00
Michael
ce19e6367f Catch MQTT encoding errors (#3749)
* added error handling to mqtt message receive if payload is not utf-8 unicode
added mqtt test for above code as well

* change permission back to 644

* attempting to test new code

* changed exception to AttributeError
fixed test for above

* fixed lint errors I made in tests....mqtt/test_init.py

* more lint fixes for my added test

* remove dual decode of MQTT payload

* convert if to try, except, else statement for mqtt payload decode

* rework mqtt unicode testing code to properly check for log file entriy on unicode decode exception

* fixed lint error

* Update test_init.py
2016-10-14 21:08:44 -07:00
Fabian Affolter
180e146e14 Upgrade uber_rides to 0.2.7 (#3876) 2016-10-14 21:00:27 -07:00
Fabian Affolter
bead274b20 Upgrade slacker to 0.9.28 (#3877) 2016-10-14 20:58:49 -07:00
Richard Cox
1cbf8c8049 Zoneminder component (#3795)
* Initial Zoneminder commit

* Fixing bug when ZM sets its function to 'None'

* Adding zoneminder to coverage

* Quick Doc fix

* Update zoneminder.py

Doc Fix

* making the url base optional
2016-10-14 20:56:40 -07:00
Lukas
ad259ead50 Add ignore option to zwave customize configuration (#3865) 2016-10-14 08:36:55 -07:00
Daniel Høyer Iversen
bb457f47cc Merge pull request #3868 from home-assistant/flux_led_lib
update flux led library
2016-10-14 11:41:18 +02:00
Daniel
df3e904fe7 update flux led library 2016-10-14 11:17:03 +02:00
Hugo Dupras
7697cdef0a Pushbullet push an url note if an url is provided inside data (#3758) 2016-10-14 00:11:48 -07:00
Igor Shults
6951b6f60b Allow any positive integer for Z-Wave polling intensity (#3859) 2016-10-14 00:09:52 -07:00
John Arild Berentsen
6ca0d4cd14 Use pass instead of return None (#3856) 2016-10-14 00:09:24 -07:00
Sean Dague
a5b756e1e5 Bump proliphix library to 0.4.0 (#3855)
There was a bug in setback setting which is now fixed in 0.4.0. This
ensures that any users have working setback code.
2016-10-14 00:06:53 -07:00
Sean Dague
7848791a04 add arwn sensor platform (#3846)
This adds a sensor component that builds sensors based on the arwn
project (https://github.com/sdague/arwn). This uses a 433mhz receiver
to collect weather data and publish it over mqtt in a well defined
schema, which home-assistant can display as sensors.
2016-10-14 00:06:04 -07:00
Paulus Schoutsen
f916fc04f9 Update frontend 2016-10-14 00:02:21 -07:00
John Arild Berentsen
8f4608c654 Use only node id to identify node in set_config_parameter (#3801) 2016-10-13 23:45:00 -07:00
Per Sandström
399a0b470a select next and previous of input select (#3839) 2016-10-13 21:53:47 -07:00
Jan Harkes
4d716cec2b Bump pychromecast dependency to 0.7.6 (#3864) 2016-10-13 21:24:54 -07:00
Lukas
1373db8b60 Include index and instance in object_id of zwave devices (#3759)
* Include index and instance in object_id of zwave devices

* Add the instance id if there is more than one instance for the value
2016-10-13 21:13:05 -07:00
Hydreliox
7771cc2ccf Add Bbox Modem Routeur for device tracker (#3848) 2016-10-13 19:43:51 -07:00
Per Sandström
c5ad7996fb Merge pull request #3857 from persandstrom/vsure0.11.1
vsure 0.11.1
2016-10-13 22:18:42 +02:00
Per Sandström
3d94f77998 vsure 0.11.1 2016-10-13 21:53:50 +02:00
Marcelo Moreira de Mello
6330d9cde6 Fixed Fitbit resting heart rate attribute (#3835)
* Fixed Fitbit restingHeartRate field to grab the correct field from dictionary

In [31]: r['activities-heart'][-1].get('value')
Out[31]:
{'customHeartRateZones': [],
 'heartRateZones': [{'caloriesOut': 126.18348,
   'max': 94,
   'min': 30,
   'minutes': 67,
   'name': 'Out of Range'},
  {'caloriesOut': 27.21339,
   'max': 131,
   'min': 94,
   'minutes': 5,
   'name': 'Fat Burn'},
  {'caloriesOut': 0, 'max': 159, 'min': 131, 'minutes': 0, 'name': 'Cardio'},
  {'caloriesOut': 0, 'max': 220, 'min': 159, 'minutes': 0, 'name': 'Peak'}],
 'restingHeartRate': 69}

In [32]: r['activities-heart'][-1].get('value').get('restingHeartRate')
Out[32]: 69

* Renamed sensor to Resting Heart Rate to match it

* Fixed lint style
2016-10-13 09:22:05 -07:00
Hugo Dupras
9a0bb62654 Hotfix for Netatmo discovery (#3837)
This should definetly fix #2601

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>
2016-10-13 09:21:22 -07:00
Fabian Affolter
d873a7baf0 Use async_render_* and fix config validation (#3847) 2016-10-13 09:20:49 -07:00
Robbie Trencheny
c663d85129 Add Alexa Flash Briefing Skill API support (#3745)
* Add Alexa Flash Briefing Skill API support

* Set default value for text to empty string as per API docs

* Clean up existing Alexa tests

* Update configuration parsing and validation

* Add tests for the Flash Briefing API

* Update test_alexa.py
2016-10-13 09:14:22 -07:00
John
8c13d3ed4c Update zwave lights to increase update delay timer as needed (#3741)
Fix permissions
2016-10-13 09:09:41 -07:00
Johann Kellerman
cb322f72db Add persistent notifications to bootstrap (#3738)
* Add persistent notifications to bootstrap

* Rebase, Fix test
2016-10-13 09:09:07 -07:00
Scott Reston
39a446c43c Proper title, added album and artist for Squeezebox (#3735)
* Proper title, added album and artist

Title had previously concatenated artist - title.

* Made changes suggested by @balloobbot
2016-10-13 09:07:10 -07:00
wokar
aa8622f8e8 Added include and exclude functionality to history component (#3674)
* added include and exclude functionality to history component

* fixed summary lines in test method doc.

* cleanup of query filter creation

* o improved config validation
o move move IGNORE_DOMAINS to Filter.apply()
o removed config from Last5StatesView
o Filters instance is now created on setup
o config values are processed in setup and set to the Filters instance
o function _set_filters_in_query() moved to Filters class and renamed to apply()

* added unittests for more include/exclude filter combinations

* make pylint happy
2016-10-13 08:54:45 -07:00
Vittorio Monaco
e031b8078f Fixes an issue where Chromecast audio groups were not properly discovered (#3630)
* Fixes an issue where Chromecast audio groups were not properly discovered

* Forgot to commit the main fix

* Removes unused variable

* Doesn't use a protected API anymore

* PR remarks

* Fixes tests, adds comment

* Restores line as it was in the original commit, rephrases comment

* Should fix lint issues

* Trailing whitespace

* Some more lint
2016-10-13 08:51:43 -07:00
jgriff2
e1647fb6ac Add synology ss cameras (#3626)
* Add files via upload

* Update .coveragerc

* test

* Update synology camera

* Use voluptuous for synology

* Use voluptuous for synology

* Use voluptuous for synology

* Use voluptuous for synology

* Conform synology to flake8

* Added Whitelist to synology

* Sync to dev branch

* Added helper function to synology
2016-10-13 08:49:58 -07:00
Lewis Juggins
10feac11d9 Support recursive config inclusions (#3783) 2016-10-12 12:05:41 +02:00
Paulus Schoutsen
d4e2332ce0 Merge pull request #3814 from home-assistant/release-0-30-1
0.30.2
2016-10-11 22:28:00 -07:00
Jean Regisser
1d7169403b Add again certifi to Docker image (#3813)
Latest versions of certifi (>= 2016.8.31) don't seem to break anything
anymore.
See home-assistant/home-assistant#2554
2016-10-11 22:25:17 -07:00
Keith Lamprecht
e4685de459 Restore Optional Target Config Attribute (notify.pushover) (#3769)
* Restore Optional Target Config Attribute

* Fix Tabs

* Change indents to spaces

* Make a target fix

* Change to simpler not syntax
2016-10-11 21:59:45 -07:00
Keith Lamprecht
d83de36c32 Restore Optional Target Config Attribute (notify.pushover) (#3769)
* Restore Optional Target Config Attribute

* Fix Tabs

* Change indents to spaces

* Make a target fix

* Change to simpler not syntax
2016-10-11 21:59:34 -07:00
Fabian Affolter
73547c8c4b Fix slack targets (#3826) 2016-10-11 21:58:54 -07:00
Fabian Affolter
40094cecae Fix slack targets (#3826) 2016-10-11 21:16:11 -07:00
Robbie Trencheny
0b327cd4d9 Notify: Only attach target if in call data (#3831)
* Only pass through the target if it has a value

* Target will no longer be none
2016-10-11 20:34:14 -07:00
Robbie Trencheny
d302dbec2d Notify: Only attach target if in call data (#3831)
* Only pass through the target if it has a value

* Target will no longer be none
2016-10-11 20:33:41 -07:00
Fabian Affolter
e135691bd6 Migrate to voluptuous (#3817) 2016-10-11 08:33:22 -07:00
Fabian Affolter
d4dc2707a1 Use voluptuous for eQ-3 thermostat (#3729)
* Migrate to voluptuous

* Fix requirement and typo
2016-10-11 11:27:31 +02:00
Paulus Schoutsen
a8cdf36d5c Update recorder callback (#3812) 2016-10-11 00:58:43 -07:00
Fabian Affolter
a99f36f519 Migrate to voluptuous (#3737) 2016-10-11 00:56:57 -07:00
Fabian Affolter
0568ef025b Use voluptuous for Heatmiser (#3732) 2016-10-11 00:53:24 -07:00
Fabian Affolter
8ded8f572a Add/adjust attribution of sensor platform (#3719)
* Add/adjust attribution

* Fix typo
2016-10-11 00:28:19 -07:00
Fabian Affolter
7cf2c48175 Use voluptuous for FitBit (#3686)
* Migrate to voluptuous

* Fix default
2016-10-11 00:27:15 -07:00
Fabian Affolter
7cf9ff83bc Migrate to voluptuous (#3293) [BREAKING CHANGE] 2016-10-11 00:26:11 -07:00
Paulus Schoutsen
dfe9af7110 Version bump to 0.30.2 2016-10-11 00:21:01 -07:00
Erik Eriksson
016e8f833d slugify (#3777) 2016-10-11 00:20:49 -07:00
Teemu Mikkonen
574df0f420 Fix for html5 notification tag problem. Fixes #3774 (#3790) 2016-10-11 00:20:49 -07:00
Pascal Vizeli
f18f181962 Hotfix device name with autodiscovery (#3791) 2016-10-11 00:20:49 -07:00
Ellis Percival
4754455295 Make 'pin' optional for zigbee device config. (#3799) 2016-10-11 00:20:49 -07:00
Robbie Trencheny
8c1317f278 Wrap found target in list (#3809)
* Wrap found target in list

* Fix test_messages_to_targets_route
2016-10-11 00:20:49 -07:00
Russell Cloran
7c2cb6cffd Separate climate platform and presentation units (#3755)
* Separate platform and presentation units in climate

* Fix unit tests

Maybe

* Fix unit tests some more

Maybe

* Rename _platform_unit_of_measurement to temperature_unit

* Fix tests for renamed attribute
2016-10-11 00:00:29 -07:00
Ferry van Zeelst
8c9d1d9af1 Added additional checks which hides functions which are not supported by Nest (#3751)
* Added additional checks which hides functions which are not support (like fans / humidity / cooling)

* Fixed pylint and flake8 errors (not test file available)

* Fixed pydocstyle error

* Refactored Code and Comments as described in pull-request

* Added additional comment and requesting retest

* Upgraded to python-nest 2.11 which contains previously hidden functions
2016-10-10 23:57:14 -07:00
Lukas
941fccd3fc Update python-lirc to 1.2.3 (#3784)
* Upgrade to latest python-lirc 1.2.3

* update requirements_all.txt
2016-10-10 23:44:41 -07:00
Clemens Wolff
711526e574 Cache condition in helpers.Script (#3797)
* Cache condition in helpers.Script

The caching is a simple in-memory, per-instance dictionary.
We use __str__ to format cache keys.

This naive implementation has some disadvantages (e.g., we won't be able
to cache two conditions that contain references to
distinct-but-equivalent object instances and we don't have any control
over the size of the condition cache), but for most simple use-cases the
approach should be good enough.

Resolves #3629

* Fix docstring style
2016-10-10 23:36:38 -07:00
Fabian Affolter
a2503e4d13 Upgrade sqlalchemy to 1.1.1 (#3796) 2016-10-10 23:29:43 -07:00
Fabian Affolter
656ee52435 Upgrade cherrypy to 8.1.2 (#3805) 2016-10-10 23:27:53 -07:00
Fabian Affolter
002660fd9e Upgrade dnspython3 to 1.15.0 (#3804) 2016-10-10 23:24:10 -07:00
Fabian Affolter
63580f9e03 Upgrade pyowm to 2.5.0 (#3806) 2016-10-10 23:23:32 -07:00
Teemu Mikkonen
87d9cdd78f Fix for html5 notification tag problem. Fixes #3774 (#3790) 2016-10-10 23:17:27 -07:00
phardy
c8ca66b671 Stop GTFS component from overwriting friendly_name (#3798)
* Prevent update from clobbering configured name.

* linted

* Fixing awkward line breaking.
2016-10-10 22:36:20 -07:00
Robbie Trencheny
9b98d470c2 Wrap found target in list (#3809)
* Wrap found target in list

* Fix test_messages_to_targets_route
2016-10-10 22:31:15 -07:00
sander76
b19ec21e88 Changing import as powerview api did change. (#3780) 2016-10-10 22:30:27 -07:00
Fabian Affolter
3b331eac56 Update docstrings (sensor.pi_hole, sensor.haveibeenpwned) (#3793)
* Fix docstrings

* Update docstrings
2016-10-10 19:38:32 +02:00
Fabian Affolter
552265bc31 No longer use old name (#3792) 2016-10-10 19:38:20 +02:00
Ellis Percival
df58f718ab Make 'pin' optional for zigbee device config. (#3799) 2016-10-10 16:53:18 +02:00
Pascal Vizeli
76a1a54369 Hotfix device name with autodiscovery (#3791) 2016-10-10 13:46:23 +02:00
Per Sandström
b6e008be71 Merge pull request #3782 from persandstrom/vsure0.11.0
vsure0.11.0
2016-10-09 22:01:46 +02:00
Per Sandström
9d5c20b629 vsure0.11.0 2016-10-09 21:47:35 +02:00
Erik Eriksson
63d9ea6643 slugify (#3777) 2016-10-09 09:15:58 -07:00
Hugo Dupras
1d0df63615 Netatmo binary sensor (#3455)
* Basic support for Netatmo welcome binary sensors

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Bug fixes and optimization for Netatmo devices

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* pylint fixes

* Bug Fixing and optimization for Netatmo devices

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Add unique_id for cameras to avoid duplicate
And global config to disable discovery for netatmo devices

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>
2016-10-09 08:45:12 -07:00
hexa-
154eacef6c Http: Change approved_ips from string to cidr validation (#3532) [BREAKING CHANGE]
* Change approved_ips from string to cidr validation

Relabel to trusted_networks, better reflecting its expected inputs,
everything that ipaddress.ip_networks recognizes as an ip network
is possible:
- 127.0.0.1      (single ipv4 addresses)
- 192.168.0.0/24 (ipv4 networks)
- ::1            (single ipv6 addresses)
- 2001:DB8::/48  (ipv6 networks)

* Add support for the X-Forwarded-For header
2016-10-09 08:13:30 -07:00
Fabian Affolter
dc95b28487 Use voluptuous for Russound RNET (#3689)
* Migrate to voluptuous

* Remove wrong default
2016-10-09 16:40:54 +02:00
Paulus Schoutsen
c9a88322d6 Merge pull request #3765 from home-assistant/hotfix-0-30-1
0.30.1
2016-10-08 14:50:52 -07:00
Paulus Schoutsen
46b58db2ff Version bump to 0.30.1 2016-10-08 14:42:47 -07:00
mtl010957
78cbfa3f96 Fixed issue #3760, handle X10 unit numbers greater than 9. (#3763) 2016-10-08 14:42:24 -07:00
Roi Dayan
dba5c74c8f Fix command line cover template (#3754)
The command line cover value template is optional so we
need to check it's not none before assigning hass to it.

Fixes #3649

Signed-off-by: Roi Dayan <roi.dayan@gmail.com>
2016-10-08 14:42:24 -07:00
Johann Kellerman
a94a5ac9b5 Coerce device IDs from known_devices to be slugs (#3764)
* Slugify & consider_home test fix [due to load valid PR]

* undo schema change

* Fix slugify error
2016-10-08 14:42:24 -07:00
Johann Kellerman
4d9bac6f9c Coerce device IDs from known_devices to be slugs (#3764)
* Slugify & consider_home test fix [due to load valid PR]

* undo schema change

* Fix slugify error
2016-10-08 14:40:50 -07:00
Roi Dayan
6419d273ea Fix command line cover template (#3754)
The command line cover value template is optional so we
need to check it's not none before assigning hass to it.

Fixes #3649

Signed-off-by: Roi Dayan <roi.dayan@gmail.com>
2016-10-08 13:03:32 -07:00
mtl010957
7882b19dc5 Fixed issue #3760, handle X10 unit numbers greater than 9. (#3763) 2016-10-08 12:57:40 -07:00
Willems Davy
8f8bba4ad7 Haveibeenpwned sensor platform (#3618)
* Initial version of "haveibeenpwned" sensor component

* 2 flake8 fixes

* remove debugging error message

* Increase scan_interval as well as throttle to make sure that during initial startup of hass the request happens with 5 seconds delays and after startup with 15 minutes delays. Scan_interval is increased also to not call update as often

* update .coveragerc

* remove (ssl) verify=False

* - use dict to keep the request values with email as key
- use track_point_in_time system to make sure data updates initially at 5 seconds between each call until all sensor's email have a result in the dict.

* fix a pylint error that happend on the py35 tests
2016-10-08 11:38:58 -07:00
Johann Kellerman
7b40a641ec Continue on invalid platforms and new setup_component unit tests (#3736) 2016-10-08 11:27:35 -07:00
wokar
1b26b5ad14 add include configuration to logbook (#3739) 2016-10-08 11:26:14 -07:00
Hugo Dupras
bbbb4441ea Add discovery support for Netatmo weather Station (#3714)
* Add discovery support for Netatmo Weather station

Only The weather information are currently supported (No battery or wifi status supported)

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Add unique_id for netatmo sensors to avoid duplicate

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Update requirements_all.txt and PEP8 fixes

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>
2016-10-08 11:26:01 -07:00
Paulus Schoutsen
1e2e877302 Version bump to 0.31.0.dev0 2016-10-08 09:58:28 -07:00
Paulus Schoutsen
4239a2b844 Merge pull request #3715 from home-assistant/dev
0.30
2016-10-08 09:58:08 -07:00
Paulus Schoutsen
408b68bfac Version bump to 0.30.0 2016-10-08 09:57:51 -07:00
Paulus Schoutsen
fe317b806f Close event loop to avoid error on exiting HASS (#3762) 2016-10-08 18:56:36 +02:00
Paulus Schoutsen
09cbf68637 Update frontend 2016-10-08 09:23:45 -07:00
Johann Kellerman
fb94aaa5a1 Load yaml using validator and include consider_home (#3743)
* Load yaml using validator, consider_home

* timedelta, track_if_away

* improve voluptuous

* Add default back

* Change time_period validation order
2016-10-07 18:08:33 -07:00
Fabian Affolter
b09b13f552 Catch exception (fixes #3699) (#3727) 2016-10-07 17:30:59 -07:00
Erik Eriksson
2d4df42a65 improved error handling (#3725) 2016-10-07 17:25:51 -07:00
Erik Eriksson
fccc7e69d0 Improved exception handling. Don't stop updating from server because of exception. (#3724) 2016-10-07 17:24:02 -07:00
Pascal Vizeli
f1e5d32ef5 Async exception handling (#3731)
* remove unused exception

* add logging

* disable pylint broad-except

* add exception handler

* fix lint

* update log output

* change log message in async with exc_info

* Add exc_info to asyncio exception handler
2016-10-07 17:20:39 -07:00
Erik Eriksson
1c24018fbb Improved exception handling (#3746) 2016-10-07 17:16:35 -07:00
Robbie Trencheny
f37038921f Fix E501 line too long error 2016-10-07 11:48:38 -07:00
Robbie Trencheny
f030ff67ad Set anel_pwrctrl switch to specific commit instead of master 2016-10-07 11:38:39 -07:00
Robbie Trencheny
3cfec2b5e2 Set TP-Link switch to specific commit instead of master 2016-10-07 11:36:43 -07:00
Robbie Trencheny
58b3dd7cc0 Set specific commit for Hunter Douglas API package due to upstream rename 2016-10-07 11:34:41 -07:00
Fabian Affolter
5e16dc6307 Fix typo (#3744) 2016-10-07 00:00:12 -07:00
Fabian Affolter
8b059e9aad Migrate to voluptuous (#3687) 2016-10-06 16:11:08 +02:00
Fabian Affolter
12f1be9b1c Fix PEP257 issues and ordering (#3720) 2016-10-05 17:32:29 -07:00
Robbie Trencheny
519f400175 Merge branch 'master' into dev 2016-10-05 15:35:01 -07:00
Fabian Affolter
a94571fd10 Change name of Forecast.io platform to Dark Sky (#3698)
* Rename Forecast.io platform to Dark Sky

* Upgrade to python-forecastio to 1.3.5

* Update to reflect name change (Forecast.io -> Dark Sky)

* Rename forecast to darksky
2016-10-05 21:42:58 +02:00
Fabian Affolter
cb3a78b330 Adjust vol to accept filenames (fixes #3701) (#3707) 2016-10-05 18:02:45 +02:00
John
1bc6366051 Increase allowable polling intensity values (#3711) 2016-10-05 16:58:06 +02:00
Fabian Affolter
5d339fb141 Fix sentence (#3709) 2016-10-05 16:28:38 +02:00
Fabian Affolter
0c68f381b0 Migrate to voluptuous (#3679) 2016-10-05 14:40:08 +02:00
Daniel Høyer Iversen
3e40b24293 Merge pull request #3708 from home-assistant/flux_led
Update flux led library
2016-10-05 11:12:56 +02:00
Daniel Høyer Iversen
4b828d225e Merge pull request #3656 from home-assistant/pushetta
customize if pushetta should send test message on start up
2016-10-05 11:03:35 +02:00
Daniel
201294e481 Update flux led library 2016-10-05 10:49:33 +02:00
Daniel
350d23f7eb customize if pushetta should send test message on start up 2016-10-05 10:45:41 +02:00
Daniel Høyer Iversen
b8beae9c6c Merge pull request #3651 from home-assistant/automation
Customize initial state of automation
2016-10-05 09:48:55 +02:00
Daniel
46f3337b07 Customize initial state of automation 2016-10-05 09:20:51 +02:00
John Arild Berentsen
b2354f45be Add possibility to set temperature to a given operation_mode (#3646)
* Add possibility to set temperature to a given operation_mode

* Correctly break

* Review changes
2016-10-04 23:48:25 -07:00
Paulus Schoutsen
e4e13b59cf Update frontend 2016-10-04 23:15:10 -07:00
Paulus Schoutsen
8c694eb279 Speed up MQTT server test (#3703) 2016-10-04 22:49:43 -07:00
Paulus Schoutsen
9d085a023c Merge pull request #3706 from home-assistant/hotfix-0-29-7b
Fix broken unit tests
2016-10-04 22:47:46 -07:00
Martin Hjelmare
c06313a897 Set force_update to true for mysensors sensors (#3648) 2016-10-04 22:45:38 -07:00
Per Sandström
ed490b1c11 Add västtrafik sensor (#3640) 2016-10-04 22:37:45 -07:00
Marcelo Moreira de Mello
70fc94003d Fixed issue #3624 and bumped python-nest to 2.10.0 version (#3665)
* Fixed issue #3624 and bumped python-nest to 2.10.0 version

*    Fixed return state when accessing attribute operation_mode

* Fixed typo
2016-10-04 22:29:21 -07:00
Paulus Schoutsen
114fae76e1 Fix broken unit tests 2016-10-04 22:23:58 -07:00
Paulus Schoutsen
4f0064b00e Fix broken tests (#3704)
* Fix broken tests

* Lint
2016-10-04 22:19:12 -07:00
Fabian Affolter
dc53c21548 Check that no configuration is provided (#3675) 2016-10-04 22:10:31 -07:00
Pascal Vizeli
b9b41d3855 Update ha-alpr / change default interval (#3691) 2016-10-04 22:04:50 -07:00
John Arild Berentsen
17a8dd3f70 Add set_config_parameter service (#3696) 2016-10-04 22:04:19 -07:00
gwendalg
03d6a7c42a Add Ted5000 Sensor (#3559)
* Add Ted5000 Sensor

Signed-off-by: Gwendal Grignou <gwendal@gmail.com>

* sensors: ted5000: use requests instead of urllib.

Signed-off-by: Gwendal Grignou <gwendal@gmail.com>

* Update ted5000.py

Add timeout to requests call.
2016-10-04 21:57:40 -07:00
Daniel Høyer Iversen
d2d393feb5 Add automations and scripts to group.all_automations and group.all_scripts (#3664)
* Add automations to group.all_automations

* Add scripts to group.all_scripts
2016-10-04 21:20:48 -07:00
Paulus Schoutsen
e49651cdeb Merge pull request #3702 from home-assistant/hotfix-0-29-7
0.29.7
2016-10-04 21:03:47 -07:00
Paulus Schoutsen
a60e845203 Version bump to 0.29.7 2016-10-04 21:01:28 -07:00
Pascal Vizeli
f23eb9336f Service & signal (stop/restart) fix (#3690)
* Bugfix signhandling/services

* change from coroutine to callback

* add error handling

* fix bug with endless running

* fix unit test

* Revert "fix unit test"

This reverts commit 31135c7709.

* Disable sigterm/sighup test
2016-10-04 21:01:08 -07:00
Pascal Vizeli
0bf8bb62ad Service & signal (stop/restart) fix (#3690)
* Bugfix signhandling/services

* change from coroutine to callback

* add error handling

* fix bug with endless running

* fix unit test

* Revert "fix unit test"

This reverts commit 31135c7709.

* Disable sigterm/sighup test
2016-10-04 21:00:36 -07:00
Paulus Schoutsen
5085cdb0f7 Add async_safe annotation (#3688)
* Add async_safe annotation

* More async_run_job

* coroutine -> async_save

* Lint

* Rename async_safe -> callback

* Add tests to core for different job types

* Add one more test with different type of callbacks

* Fix typing signature for callback methods

* Fix callback service executed method

* Fix method signatures for callback
2016-10-04 20:44:32 -07:00
Robbie Trencheny
8358f938b5 Now no one wants to be blacklisted, so lets remove the configuration entirely 2016-10-04 13:39:48 -07:00
Robbie Trencheny
be7401f4a2 Now no one wants to be blacklisted, so lets remove the configuration entirely 2016-10-04 13:38:56 -07:00
Robbie Trencheny
760117167d Update .mention-bot to add more users to blacklist and remove skipAlreadyMentionedPR 2016-10-04 13:25:57 -07:00
Robbie Trencheny
2fd83b439c Update .mention-bot to add more users to blacklist and remove skipAlreadyMentionedPR 2016-10-04 13:25:16 -07:00
Robbie Trencheny
e523c3d196 Add @mention-bot configuration 2016-10-04 13:22:35 -07:00
Per Sandström
d9e73d1d71 Merge pull request #3697 from persandstrom/verisure_0.10.3
vsure 0.10.3
2016-10-04 22:20:12 +02:00
Per Sandström
5d3e93b4ef vsure 0.10.3 2016-10-04 22:01:36 +02:00
sam-io
85782f9c29 fix for date formatting issue (#3693) 2016-10-04 08:41:39 -07:00
William Scanlon
2cf49f3de6 Added support for Wink Smoke and CO detectors (#3645) 2016-10-04 01:07:50 -07:00
Fabian Affolter
a072047d9d Auth and headers support for REST sensor (#3592)
* Add auth and header support

* Update header part
2016-10-04 01:07:17 -07:00
Fabian Affolter
74b0e4cb45 Statistics sensor (#3513)
* Initial stats sensor

* Add total and tests

* Use deque, rename var, set default, and only update sensor
2016-10-04 01:04:00 -07:00
Rob Capellini
694983379f test: mocking IO in HTML5 notify tests (#3685)
Replacing temporary file creation in tests with mock's mock_open for faster IO.
2016-10-04 01:01:41 -07:00
Erik Eriksson
5900d8a2c1 only query vehicle attributes once (#3668)
use registration number as dev id
2016-10-04 00:58:25 -07:00
Erik Eriksson
287a7e2720 Support for encrypted payload (#3587) 2016-10-04 00:57:37 -07:00
William Scanlon
8592ba3cb9 Report availability of arest (#3614) 2016-10-04 00:51:45 -07:00
deisi
c93b63963b Fix 3621 (#3642)
Happens when the scanner searches for a mac address, that has been forgotten
by the fritzbox.
2016-10-04 00:47:58 -07:00
Fabian Affolter
194402f7e7 Upgrade Sphinx to 1.4.8 and set missing variables (#3650) 2016-10-04 00:47:28 -07:00
Paulus Schoutsen
d58548dd1c Address asyncio comments (#3663)
* Template platforms: create_task instead of yield from

* Automation: less yielding, more create_tasking

* Helpers.script: less yielding, more create_tasking

* Deflake logbook test

* Deflake automation reload config test

* MQTT: Use async_add_job and threaded_listener_factory

* Deflake other logbook test

* lint

* Add test for automation trigger service

* MQTT client can be called from within async
2016-10-03 22:39:27 -07:00
Robbie Trencheny
f2a12b7ac2 Add @mention-bot configuration 2016-10-03 17:36:00 -07:00
Pascal Vizeli
625319846c Big Homematic update (#3677)
* Update homeassistant with new pyhomematic layout

* fix linter
2016-10-03 23:21:53 +02:00
Daniel Høyer Iversen
c3ea04f2dd revert update of input_boolean 2016-10-03 22:05:06 +02:00
Daniel Høyer Iversen
4a5a1e1e96 Ensure unique entity id for input_boolean 2016-10-03 22:03:16 +02:00
Pascal Vizeli
41aff96375 Bugfix temp convert on none temp attribute / unittest for that (#3654) 2016-10-03 10:46:31 +02:00
Justin Weberg
0219df17f5 Expose Configuration path to frontend (#3660)
* Expose config path to frontend

* Fix typo

* Add deleted code.
2016-10-03 00:04:43 -07:00
Robbie Trencheny
b586e80977 Squashed commit of the following:
commit 220331260e9748ac8e17b3ce776330c1dfb7725b
Merge: 73d93e5 c891820
Author: Robbie Trencheny <me@robbiet.us>
Date:   Sun Oct 2 17:57:24 2016 -0700

    Merge branch 'color_temp_for_mqtt_light' of https://github.com/alterscape/home-assistant into alterscape-color_temp_for_mqtt_light

commit c89182008a
Author: Ryan Spicer <ryanspicer@gmail.com>
Date:   Sun Sep 18 23:06:34 2016 -0700

    fix missing docstring.

commit e61dda4dd3
Author: Ryan Spicer <ryanspicer@gmail.com>
Date:   Sun Sep 18 22:43:04 2016 -0700

    fix pep8 errors and typos in tests.

commit 559d1752d2
Author: Ryan Spicer <ryanspicer@gmail.com>
Date:   Sun Sep 18 21:41:07 2016 -0700

    add tests for mqtt color temp support

commit 702defb932
Author: Ryan Spicer <ryanspicer@gmail.com>
Date:   Sun Sep 18 20:55:07 2016 -0700

    Add color temp support to mqtt lights.
2016-10-02 18:04:00 -07:00
hexa-
73d93e526e Add anel_pwrctrl platform to control switches on ANEL PwrCtrl devices (#3644)
* Add pwrctrl platform to control switches on ANEL PwrCtrl devices

* make requested changes
2016-10-02 16:51:15 -07:00
Paulus Schoutsen
148ea82513 Update frontend 2016-10-02 15:38:18 -07:00
Paulus Schoutsen
abb8bcb6d9 Protect waiting for event loop from within event loop (#3658)
* Protect waiting for event loop from within event loop

* Faster fetching of loop attribute for ident check
2016-10-02 15:07:23 -07:00
John Arild Berentsen
e455daa61d Make sure temperature slider is shown if reported temp is 0 (#3653) 2016-10-02 17:47:04 +02:00
Martin Hjelmare
b6b0bad0c7 Add new mysensors types (#3637)
* Add S_INFO, S_GAS, S_GPS, S_WATER_QUALITY.
* Extend S_CUSTOM, S_POWER.
* Add more units.
2016-10-01 23:23:31 -07:00
Paulus Schoutsen
d5ab292ff3 Sensor.emoncms: Never disable SSL verification. 2016-10-01 23:13:07 -07:00
Erik Eriksson
9f8acbec95 Add support for tracking position and status for a Volvo car (#3617) 2016-10-01 23:00:01 -07:00
Jeff Wilson
d55ed7a3a2 Flux switch improvements (#3615)
* Make flux always adjust brightness of light (even when not in XY mode)

* Remove kelvin mode from flux switch

The light/turn_on service only works with mired values, kelvin values
are out of range per the schema.

* Use already defined min/max values for light/turn_on schema

* Clamp temp value to light/turn_on allowed values
2016-10-01 22:57:15 -07:00
Greg Dowling
fcbfcf0aa7 Bump pywemo version - changes port order for faster startup. (#3612) 2016-10-01 22:53:24 -07:00
Simon Szustkowski
183936375f Add a Timeout for InfluxDB connections (#3563)
* Add a Timeout for InfluxDB connections

* Removed trailing whitespace
2016-10-01 22:29:06 -07:00
Paulus Schoutsen
1f1ac02457 Merge branch 'pr/3552' into dev 2016-10-01 22:20:58 -07:00
Robbie Trencheny
646eaccd4d Update notify to expect a list of string targets instead of a single … (#3548)
* Update notify to expect a list of string targets instead of a single string

* Actually do the thing I set out to do

* Fix notify.group test to expect an array of targets

* REST platform will only use the first target in the list

* Update notify platforms to expect a list of targets

* Update notify services.yaml
2016-10-01 22:19:17 -07:00
Pascal Vizeli
c189c05676 Add temp convert to climate base object (#3611)
* Add temp convert to climate base object

* fix nest

* fix lint
2016-10-01 22:15:19 -07:00
Lewis Juggins
9683e3e3ad Correctly define requirements for emulated hue (#3535) 2016-10-01 21:56:45 -07:00
Fabian Affolter
a61e08680a Add persistent notification for failed login attempts (#3528) 2016-10-01 21:20:16 -07:00
Klaas Hoekema
9da2d6edd0 Make forecast.io update interval configurable (#3520)
Adds a config parameter (`update_interval`) to the `forecast` sensor to
set the minimum update interval. The default remains 120 seconds.
2016-10-01 21:18:10 -07:00
William Scanlon
1f38e9fa57 Support for wink oath2 and relay sensors (#3496) 2016-10-01 20:45:39 -07:00
Paulus Schoutsen
996d7cf1cd Merge pull request #3627 from home-assistant/async-entity-update
Add async updates to entities
2016-10-01 16:20:48 -07:00
Paulus Schoutsen
c36d30f4fe Typo 2016-10-01 15:43:33 -07:00
Paulus Schoutsen
8f3e12c9b8 Make Automation.reload_service_handler async 2016-10-01 15:42:17 -07:00
Paulus Schoutsen
56fdc2a625 Automation: call prepare_setup_platform in executor 2016-10-01 14:11:16 -07:00
Paulus Schoutsen
e18825ba20 Automation: only call executor once when processing config 2016-10-01 14:11:16 -07:00
Paulus Schoutsen
7ab7edd81c Make automation async 2016-10-01 14:11:16 -07:00
Paulus Schoutsen
16ff68ca84 Add mqtt.async_subscribe 2016-10-01 14:11:16 -07:00
Paulus Schoutsen
b8504f8fc8 Make helpers.script async 2016-10-01 14:11:16 -07:00
Paulus Schoutsen
185bd6c28a Make helpers.condition.* async 2016-10-01 14:11:16 -07:00
Paulus Schoutsen
33a51623f8 Make Service.call_from_config async 2016-10-01 14:11:16 -07:00
Paulus Schoutsen
4198c42736 Have template platforms never leave the event loop 2016-10-01 14:11:16 -07:00
Paulus Schoutsen
3e24a35c1e Skip RFXtrx tests unless RFXTRX=RUN (#3625)
* Skip RFXtrx tests unless RFXTRX=RUN

* Remove my previous hacks to slightly speed up rfxtrx

* Exclude RFXTRX tests from coverage

* Remove unused import in rfxtrx tstt

* Add close connection back to RFXtrx tests

* Typo
2016-10-01 13:57:10 -07:00
Paulus Schoutsen
651f3ab55c Merge pull request #3641 from home-assistant/hotfix-0-29-6
0.29.6
2016-10-01 12:12:56 -07:00
Paulus Schoutsen
756f23f0b4 Version bump to 0.29.6 2016-10-01 12:10:00 -07:00
Paulus Schoutsen
ef0e018cbb Service config calls will no longer mutate original config (#3628) 2016-10-01 12:09:25 -07:00
Ben Bangert
9cf2ad0b55 Monkey-patch a weakref set in Task to be a no-op. (#3639)
* Monkey-patch a weakref set in Task to be a no-op.

* Fix linting issues
2016-10-01 12:08:56 -07:00
Ben Bangert
892bbdc2dd Monkey-patch a weakref set in Task to be a no-op. (#3639)
* Monkey-patch a weakref set in Task to be a no-op.

* Fix linting issues
2016-10-01 12:08:25 -07:00
Paulus Schoutsen
bb03960ba5 Voluptuous arest (#3558)
* Migrate to voluptuous

* Adjust sensor.arest for new template system

* Use items() to align the var section with the pins
2016-10-01 18:45:43 +02:00
Fabian Affolter
15ed8c6332 Add units (fixes #3619) (#3633) 2016-10-01 17:35:32 +02:00
Paulus Schoutsen
412b5350ce Service config calls will no longer mutate original config (#3628) 2016-09-30 23:26:15 -07:00
Otto Winter
d5f8aa52c4 Add support for MySensors cover (#3512)
* Added support for MySensors cover device

* Fixed set_req not defined

* Fixed V_PERCENTAGE is str

* Removed set_cover_position

The MySensors documentation doesn’t specify when sending a V_PERCENTAGE
is allowed.

* Fixed homeassistant/components/mysensors.py line too long

* Fixed lint ATTR_POSITION imported but unused

* Use V_PERCENTAGE for MySensors cover

* Revert "Removed set_cover_position"

This reverts commit d78cb3a04d.

* Fix set_req, ATTR_POSITION not defined

* Added support for non-exactly positionable covers

* Fixed V_PERCENTAGE cast to bool

* Ported MySensors cover back to v1.4

`V_PERCENTAGE` and `V_DIMMER` are aliases just like `V_STATUS` and
`V_LIGHT`, so the code inside `MySensorsCover` doesn’t need to be
updated.

* Fixed v1.5 V_TYPES not in in v1.4 gateway SetReq
2016-10-01 01:36:04 +02:00
Paulus Schoutsen
b650b2b0db Spread async love (#3575)
* Convert Entity.update_ha_state to be async

* Make Service.call async

* Update entity.py

* Add Entity.async_update

* Make automation zone trigger async

* Fix linting

* Reduce flakiness in hass.block_till_done

* Make automation.numeric_state async

* Make mqtt.subscribe async

* Make automation.mqtt async

* Make automation.time async

* Make automation.sun async

* Add async_track_point_in_utc_time

* Make helpers.track_sunrise/set async

* Add async_track_state_change

* Make automation.state async

* Clean up helpers/entity.py tests

* Lint

* Lint

* Core.is_state and Core.is_state_attr are async friendly

* Lint

* Lint
2016-09-30 12:57:24 -07:00
Fabian Affolter
7e50ccd32a Component for Digital Ocean (#3322)
* Add Digital Ocean implementation

* Remove kernel
2016-09-30 18:30:44 +02:00
John Arild Berentsen
521080d1b0 Zwave: Update commandclasses and deviceclasses according to sigma SDK (#3495)
* Update Command classes and device types to Sigma SDK

* Fix some pylint

* Seperate constants to file

* Flake8

* coverage and flake8 pylint

* Add services.yaml

* Service descriptions was missing

* Spelling :)

* grammar

* Remove zwave service descriptions from main
2016-09-30 08:43:18 -07:00
Paulus Schoutsen
d76cf092c3 Merge pull request #3610 from home-assistant/hotfix-0-29-5
0.29.5
2016-09-30 00:24:59 -07:00
Paulus Schoutsen
dfb92fa836 Version bump to 0.29.5 2016-09-30 00:15:14 -07:00
Paulus Schoutsen
5cb8ce71ef Lint 2016-09-30 00:14:59 -07:00
Jeff Wilson
099e983ca0 Nest operation modes (#3609)
* Add ability to change Nest mode to all available options

* Make Nest state reflect current operation not current operation mode

* Update Nest sensor to use operation mode

* Fix linting

* Revert "Make Nest state reflect current operation not current operation mode"

This reverts commit 573ba028d8.

Conflicts:
	homeassistant/components/climate/nest.py
2016-09-30 00:14:59 -07:00
Marcelo Moreira de Mello
39514be1f9 Fixed issue #3574 - Temperature slider fixed on frontend on heat/cool mode (#3606)
* Fixed issue #3574 - Temperature slider fixed on frontend on heat/cool mode

* Fixed target_temperature to return None when self.is_away_mode_on is True
2016-09-30 00:14:59 -07:00
Paulus Schoutsen
234f4449b0 Lint 2016-09-30 00:14:08 -07:00
Jeff Wilson
a89d036e26 Nest operation modes (#3609)
* Add ability to change Nest mode to all available options

* Make Nest state reflect current operation not current operation mode

* Update Nest sensor to use operation mode

* Fix linting

* Revert "Make Nest state reflect current operation not current operation mode"

This reverts commit 573ba028d8.

Conflicts:
	homeassistant/components/climate/nest.py
2016-09-29 23:44:14 -07:00
Marcelo Moreira de Mello
9ea030f42e Fixed issue #3574 - Temperature slider fixed on frontend on heat/cool mode (#3606)
* Fixed issue #3574 - Temperature slider fixed on frontend on heat/cool mode

* Fixed target_temperature to return None when self.is_away_mode_on is True
2016-09-29 22:17:13 -07:00
Paulus Schoutsen
7ac8425099 Fix tests 2016-09-29 21:42:36 -07:00
Fabian Affolter
c000e74d0a Migrate to voluptuous (#3374) 2016-09-29 19:07:35 -07:00
Fabian Affolter
6632747543 Migrate to voluptuous (#3341) 2016-09-29 19:06:28 -07:00
Fabian Affolter
a7266ae6cf Check that no configuration is provided (#3553) 2016-09-29 19:02:22 -07:00
Paulus Schoutsen
4031f70665 Merge pull request #3603 from home-assistant/hotfix-0-29-4
Hotfix 0 29 4
2016-09-29 18:59:09 -07:00
Paulus Schoutsen
2b59409e52 Version 0.29.4 2016-09-29 18:57:33 -07:00
Dan Cinnamon
b41c795d34 Passing original config reference to load_platform. (#3602) 2016-09-29 18:56:09 -07:00
Pascal Vizeli
db56ed400d Bugfix voluptuous acer_projector (#3598) 2016-09-29 18:56:09 -07:00
Paulus Schoutsen
c603ffbe26 Fix voluptuous alexa config (#3596) 2016-09-29 18:56:09 -07:00
Dan Cinnamon
68028afb98 Passing original config reference to load_platform. (#3602) 2016-09-29 18:55:43 -07:00
Paulus Schoutsen
733120c577 Fix voluptuous alexa config (#3596) 2016-09-29 18:45:55 -07:00
Pascal Vizeli
01435f7f42 Bugfix voluptuous acer_projector (#3598) 2016-09-29 18:36:20 -07:00
Paulus Schoutsen
77c91c8a5e Merge pull request #3590 from home-assistant/hotfix-0-29-3
Hotfix 0 29 3
2016-09-29 09:09:51 -07:00
Paulus Schoutsen
a321c2f0d8 Version bump to 0.29.3 2016-09-29 09:07:19 -07:00
Pascal Vizeli
807daf8f5d Bugfix voluptuous for hue (#3589) 2016-09-29 09:07:00 -07:00
Pascal Vizeli
08bacd8e31 Bugfix voluptuous for hue (#3589) 2016-09-29 09:06:41 -07:00
Paulus Schoutsen
f79d762e66 Merge pull request #3585 from home-assistant/hotfix-29-2
Hotfix 29 2
2016-09-29 08:18:51 -07:00
Paulus Schoutsen
30aa67b789 Version bump to 0.29.2 2016-09-29 07:50:34 -07:00
Hugo Dupras
883e45c476 Netatmo: Hotfix for hass 0.29 (#3576)
Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>
2016-09-29 07:46:04 -07:00
Hugo Dupras
dd551cf056 Netatmo: Hotfix for hass 0.29 (#3576)
Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>
2016-09-29 07:45:54 -07:00
Fabian Affolter
47a3adb6b3 Remove duplicate port entry (fixes #3583) (#3584) 2016-09-29 07:45:39 -07:00
Fabian Affolter
7d86fb8c72 Remove duplicate port entry (fixes #3583) (#3584) 2016-09-29 07:45:25 -07:00
Greg Dowling
e87467cb20 Merge pull request #3577 from home-assistant/fix_loopenergy_exceptions
Loopenergy library - bump to catch more exceptions in poll thread.
2016-09-29 10:49:14 +01:00
pavoni
abd1213cc4 Bump library to catch more exceptions in poll thread. 2016-09-29 09:55:05 +01:00
Paulus Schoutsen
f3d838c448 Version bump to 0.29.1 2016-09-28 22:08:02 -07:00
Marcelo Moreira de Mello
574e3231d0 Fixed typo (#3569)
Sep 29 00:59:22 pi hass[21333]: if self.device.measurment_scale == 'F':
Sep 29 00:59:22 pi hass[21333]: AttributeError: 'Device' object has no attribute 'measurment_scale'
2016-09-28 22:07:40 -07:00
Marcelo Moreira de Mello
48ffdea31f Fixed typo (#3569)
Sep 29 00:59:22 pi hass[21333]: if self.device.measurment_scale == 'F':
Sep 29 00:59:22 pi hass[21333]: AttributeError: 'Device' object has no attribute 'measurment_scale'
2016-09-28 22:07:23 -07:00
Paulus Schoutsen
8e14da7454 Version bump to 0.29 2016-09-28 21:21:13 -07:00
Paulus Schoutsen
6e80581b30 Version bump to 0.30.0.dev0 2016-09-28 21:21:03 -07:00
Paulus Schoutsen
9780ea5c52 Version bump to 0.29 2016-09-28 21:20:47 -07:00
Paulus Schoutsen
c4d817146f Merge pull request #3486 from home-assistant/dev
0.29 - 🎈 anniversary edition
2016-09-28 20:59:50 -07:00
Fabian Affolter
f3caca6a06 Upgrade python-telegram-bot to 5.1.0 (#3525) 2016-09-28 00:08:24 -07:00
Fabian Affolter
d6c586bf42 Upgrade fuzzywuzzy to 0.12.0 (#3524) 2016-09-28 00:07:52 -07:00
Fabian Affolter
3b5142eb85 Upgrade dnspython3 to 1.14.0 (#3522) 2016-09-28 00:07:39 -07:00
Paulus Schoutsen
4b8bc90d16 Limit worker pool to 10 threads (#3560)
* Limit worker pool to 10 threads

* Comment evdev in requirements

* Allow skipping RFXtrx tests locally

* Fix worker pool size tests

* lol whut
2016-09-28 00:05:38 -07:00
Fabian Affolter
a084232cf5 Add link to error message (#3530) 2016-09-27 23:59:34 -07:00
Paulus Schoutsen
00e298206e Optimize template 2 (#3521)
* Enforce compiling templates

* Refactor templates

* Add template validator to Logbook service

* Some more fixes

* Lint

* Allow easy skipping of rfxtrx tests

* Fix template bug in AND & OR conditions

* add entities extractor

Conflicts:
	tests/helpers/test_template.py

* fix unittest

* Convert template to be async

* Fix Farcy

* Lint fix

* Limit template updates to related entities

* Make template automation async
2016-09-27 21:29:55 -07:00
happyleaves
559f63bfc3 bump limitlessled version 2016-09-27 16:30:26 -04:00
John Arild Berentsen
6694b0470e Update Climate slider code (#3394)
* Update ecobee to use only range setpoints

* Update nest to only use range setpoints

* Update demo to use only range for ecobee test device

* Update test

* Fetch unit from ecobee

* generic_thermostat did not have state

* generic_thermostat test update
2016-09-27 19:34:16 +02:00
Daniel Høyer Iversen
da6c09640c Merge pull request #3542 from home-assistant/rfxtrx_lib
update rfxtrx lib
2016-09-27 12:35:02 +02:00
Daniel
2505792ef3 update rfxtrx lib 2016-09-27 10:42:03 +02:00
Per Sandström
4c45e92116 modbus update, add error log instead of AttributeError exception (#3517) 2016-09-26 20:46:34 -07:00
Fabian Affolter
041c92699a Change line separator to lf instead of crlf (#3533)
* Change line separator to lf instead of crlf

* Update permissions

* Use LN instead of CRLF

* Remove BOM and use LN instead of CRLF
2016-09-26 20:26:32 -07:00
Dan Cinnamon
d761b000a5 Added a dispatch call to the envisalink sensor to also get partition status updates. 2016-09-26 20:13:41 -07:00
Pascal Vizeli
cae10cfe26 Use setup_component in tests v2 (#3537)
* setup_component - sun

* setup_component - updater

* setup_component - weblink
2016-09-26 23:20:36 +02:00
Martin Hjelmare
ea4f49f0a0 Fix mqtt cover retain and state (#3519)
* Platform schema had duplicate retain keys, which made it always set
	to default.
* Optimistic state changed was inverted, due to using integer position
	instead	of boolean.
* Add more tests for mqtt cover.
2016-09-26 00:53:38 +02:00
Pascal Vizeli
bbfd86dec3 Use setup_component in tests v1 (#3507)
* update unittests like #3414

* setup_component - splunk

* setup_component - statsd

* fix statsd & splunk unittest config values

* component_setup - device_sun_light_trigger

* setup_component - introduction

* component_setup - persistent_notification

* setup_component - logentries, mqtt eventstream

* fix unittest logentries
2016-09-25 23:15:21 +02:00
Paulus Schoutsen
0c0feda834 Pre-compile templates (#3515)
* Pre-compile templates

* Compile templates in numeric_state condition
2016-09-25 13:33:01 -07:00
Robbie Trencheny
b3d67a7ed9 Change notify target property to be a dictionary (#3501)
* Change notify target property to be a dictionary

* Make demo target properties unique and fix test to match behavior
2016-09-25 09:41:11 -07:00
Martin Hjelmare
986873834a Fix mysensors white value (#3508)
* Fix turning on mysensors light with white value attribute in kwargs.
* Fix import order in check_config.py.
2016-09-24 23:45:01 +02:00
Paulus Schoutsen
36921748ed Merge branch 'master' into dev
Conflicts:
	homeassistant/components/climate/ecobee.py
	homeassistant/components/cover/wink.py
	homeassistant/const.py
2016-09-24 01:03:56 -07:00
Paulus Schoutsen
b628fb088b Merge pull request #3503 from home-assistant/fix-platform-component-no-config
Allow platform components without config
2016-09-24 00:15:58 -07:00
Pascal Vizeli
4a5cc5ad3d Add new component for licence plates processing (OpenAlpr) (#3461)
* Add new component for licence plates processing (OpenAlpr)

* address balloobbot comments

* add to coveragerc

* move config from device to base

* fix lint

* move local api test to voluptous

* split render engine

* change cloud_api pip string & lint

* update requirements_all.txt

* fix lint

* update cloud_api url

* convert base64 byte string to string

* Update cloudapi / add configence / add state

* fix lint

* change state to high confidence plate

* fix cloudapi

* fix local api detection

* add wraper for local api

* fix lint

* fix wrong import

* fix HAAlpr name

* update ha-alpr without async

* support only eventbased requests with interval 0

* fix minor things

* fix lint

* fix lint2
2016-09-24 00:07:42 -07:00
Paulus Schoutsen
a1488b46f6 Fix zone being setup twice 2016-09-24 00:04:03 -07:00
Paulus Schoutsen
ac4e54c6ff Filter out falsey platform configs 2016-09-24 00:03:44 -07:00
Dan Smith
bac8ffdd52 Bump somecomfort to 0.3.2 (#3502)
This has fixes related to #3468
2016-09-23 22:15:05 -07:00
Robbie Trencheny
d3a012a536 Fix ENTITY_ID_ALL_COVERS format 2016-09-23 17:14:29 -07:00
Robbie Trencheny
e00a469828 Fix all_covers group friendly_name
It now matches other components (`all covers` instead of `all_covers`).
2016-09-23 17:13:12 -07:00
Johann Kellerman
1b9d867d60 Add domain to boolean (#3500) 2016-09-23 14:10:12 -07:00
Martin Hjelmare
8d0009b894 Fix mysensors required version for HVAC (#3499) 2016-09-23 22:07:06 +02:00
Fabian Affolter
ad2dea939b Fix lint issues (#3492) 2016-09-23 12:20:22 +02:00
Fabian Affolter
2ecbcac2b1 Fix PEP257 issues (#3491)
* Align test name with platform

* Fix PEP257 issues
2016-09-23 10:28:28 +02:00
Fabian Affolter
3d31d26b6c Fix typos (#3490) 2016-09-23 10:28:16 +02:00
Fabian Affolter
0065dc0cd7 Update links (#3488) 2016-09-23 10:28:05 +02:00
Daniel Høyer Iversen
e4c5f356e2 Merge pull request #3489 from home-assistant/rfxtrx_update
Update rfxtrx lib to 0.12
2016-09-23 09:25:15 +02:00
Johann Kellerman
9631179126 Use voluptuous for input_slider, input_boolean, input_select (#3256)
* Use voluptuous for input slider

* floats

* _setup_component

* Imperative mood

* CONFIG_SCHEMA

* None returns empty ensure_list

* allow_extra

* bool

* restore ensure_list behaviour
2016-09-23 00:12:11 -07:00
Johann Kellerman
de51cfbc07 Sorted yaml output for check_config (#3354)
* Consistent display of check_config dicts

* OrderedDict

* remove sorted
2016-09-23 00:10:19 -07:00
Open Home Automation
de4c63b437 Added more configuration parameters (#3479)
Upgraded miflora library to 0.1.9 (which is more stable)
2016-09-23 00:09:15 -07:00
Sytone
d5912f41fb Added play media to squeezebox (#3306)
* Added play media to squeezebox

The squeezebox component can now add a URI to an existing playlist or just over write it to force a stream to play.

* Cleaned up flake8 issues with formatting. 

Spacing... The end of the world! Fixed. Once day the tools will fix this on the fly, one day...

[x] ./homeassistant/components/media_player/squeezebox.py:307:1: W293 blank line contains whitespace
[x] ./homeassistant/components/media_player/squeezebox.py:366:1: W391 blank line at end of file
[x] ./homeassistant/components/media_player/squeezebox.py:366:1: W293 blank line contains whitespace

Updated SUPPORT_SQUEEZEBOX to add SUPPORT_PLAY_MEDIA

[x] ./homeassistant/components/media_player/squeezebox.py:13:1: F401 'homeassistant.components.media_player.SUPPORT_PLAY_MEDIA' imported but unused

* Updates from review

Updated the comments to indicate they are developer / API comments and not for end users.
Marked the private functions with a leading underscore (_)

* Fixed Lint issues. 

202ERROR: InvocationError: '/home/travis/build/home-assistant/home-assistant/.tox/lint/bin/flake8'

203lint runtests: commands[1] | pylint homeassistant

204************* Module homeassistant.components.media_player.squeezebox

205C:322, 0: Trailing whitespace (trailing-whitespace)
2016-09-23 00:05:33 -07:00
Daniel
03b2c48d45 Update rfxtrx to 0.12 2016-09-23 09:04:57 +02:00
irvingwa
65b1a731ca Added check for channel in kodi media player to play channel from PVR. (#3475)
* Added check for channel in kodi media player to play channel from PVR.

* test
2016-09-22 23:50:07 -07:00
kaustubhphatak
7625aae373 Add support for mysensors HVAC device (#3405)
* Added Support for mysensnors Climate/HVAC device

* Added Support for mysensnors-hvac device:fix pylint error

* Added Support for mysensnors-hvac device:fix pylint error2

* Fixed Issues in code as per review comments

* Fixed Linter Errors

* Fixed Linter Errors:2

* Fixed Linter Errors:2

* Fixed Linter Errors

* Fixed Linter Errors

* Fixed Linter Errors

* Added Support for MySensors HVAC| Fixed Review Comments| Removed Additional Comments

* Added Support for MySensors HVAC| Fixed Review Comments Itr2

* Changes to correctly support devices with both high and low bound temperatures

* Changed to optimize the code
2016-09-22 23:47:40 -07:00
Paulus Schoutsen
8251039ca4 Fix nmap config (#3482) 2016-09-22 08:44:18 -07:00
Pascal Vizeli
3418d03e69 convert first to string befor matching (#3476) 2016-09-22 00:03:32 -07:00
tinglis1
f1caf3f2b5 Bom weather current component (#3370)
* add bom_weather_current component

* wrong fork

* wrong fork

* Code tidy up

- fixed order of imports
- changes some of the units to be standardised

* Rename bom_weather_current.py to bom.py

* pylint changes

* lint formatting changes

* formatting

* fix logger string variable formatting

* Update .coveragerc
2016-09-21 19:26:28 +02:00
Paulus Schoutsen
3dea4be2cc Fix missing commits from 0.28
Add missing commits to master
2016-09-21 08:52:30 -07:00
Paulus Schoutsen
8f9fea37b2 Merge branch 'master' into potential-master-fix 2016-09-21 08:50:53 -07:00
Teagan Glenn
380993f2ca Automatic polling (#3360)
* Test updating automatic

* Scan interval

* Schedule scan every time delta

* Pass around has

* Recursive issue

* Method invocation

* Oops

* Set up poll

* Default argument value

* Unused import

* Semicolon

* Fix tests

* Linting

* Unneeded throttle as it's handled by time event

* Use track time change event listener

* Disable lint rule

* Attribute removed - removing test

* Debug instead of info

* Unused import
2016-09-21 08:34:22 -07:00
Paulus Schoutsen
5fd93e8d80 Version bump to 0.28.2 2016-09-21 08:34:22 -07:00
Nick Vella
bc9d2586c6 Add open/closed state for open_cover and close_cover in SERVICE_TO_STATE (#3180)
* Add open/closed state mapping for open_cover and close_cover

* Add 'open', 'closed' for open/close_cover_tilt

* Revert "Add 'open', 'closed' for open/close_cover_tilt"

This reverts commit e45582d439.
2016-09-21 08:34:22 -07:00
John Arild Berentsen
ad7683470a Bugfix ecobee: inverted high and low temps and enforce int to temps (#3325)
* inverted high and low temps

* Looks like somethings are mixed up

* Added debugentires

* Added debugentires 2

* Enforce int on temperatures
2016-09-21 08:34:22 -07:00
John Arild Berentsen
329474d3e3 Missing garage door detection (#3349) 2016-09-21 08:34:22 -07:00
Pascal Vizeli
b7430d939d Bugfix voluptuous on recorder (#3350) 2016-09-21 08:34:22 -07:00
David-Leon Pohl
e5af126fae Bugfix pilight component (#3355)
* BUG Message data cannot be changed thus use voluptuous to ensure format

* Pilight daemon expects JSON serializable data

Thus dict is needed and not a mapping proxy.

* Add explanation why dict as message data is needed

* Use more obvious voluptuous validation scheme

* Pylint:  Trailing whitespace
2016-09-21 08:34:22 -07:00
Paulus Schoutsen
9aff839925 Version bump to 0.28.1 2016-09-21 08:34:22 -07:00
Paulus Schoutsen
287f9c9bda Bugfix group order (#3323)
* Add ordered dict config validator

* Have group component use ordered dict config validator

* Improve config_validation testing

* update doc string config_validation.ordered_dict

* validate full dict entries

* Further simplify ordered_dict validator.

* Lint fix
2016-09-21 08:34:22 -07:00
Teagan Glenn
a6673f6741 Automatic Device Tracker Bug Fix (#3330)
* Iterate over items

* Pass display name as host name
2016-09-21 08:34:22 -07:00
John Arild Berentsen
784cf0c4bd Revert only add 1 device (#3324) 2016-09-21 08:34:22 -07:00
Marcelo Moreira de Mello
5966c46a67 Fixed voluptuous to accept string instead positive_int for CODE on Simplisafe (#3310) 2016-09-21 08:34:22 -07:00
Teagan Glenn
b9992a9914 UOM is a list - not a string. (#3469) 2016-09-21 08:03:26 -07:00
Dan Cinnamon
edf812c0ea Envisalink Fixes + Enhancements (#3460)
* Added the ability to trigger the alarm.

* Bump version of pyenvisalink to 1.3

* Fixed an issue where the panic_type was not passed to the sub-components properly.

* Bump pyenvisalink version, and make default panic mode = police.

* Pass in event loop to pyenvisalink.

* Made the components play nicely with asyncio.

* Bump pyenvisalink to 1.6

* Bump up pyenvisalink, and better handle synchronous setup.
2016-09-20 23:51:10 -07:00
Hugo Dupras
a310599a03 Add specific icon for forecast.io sensors (#3465) 2016-09-20 22:40:10 -07:00
Simon Szustkowski
4c625d09aa Add the ability to manually specify a Yamaha AVR via it's IP address (#3451)
* Added the possibility to manually specify a Yamaha Receiver

* Added the possibility to manually specify a Yamaha AVR

* Using string formatting

* Hostname checks for None now

* Do not use add_devices for each if-branch separately

* Fixed linting
2016-09-20 22:26:43 -07:00
Fabian Affolter
0335f88e61 Migrate to voluptuous (#3342) [Breaking Change] 2016-09-20 22:21:06 -07:00
Lewis Juggins
769bc37150 Add additional fields to influx (#3462) 2016-09-20 22:20:05 -07:00
Marc Pabst
138205a019 Adding support for a white value (#3338)
* Update __init__.py

addedattribute "WHITE_VALUE" to improve support for RGBW devices

* Update services.yaml

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

shortened line

* Update __init__.py

* Update __init__.py

* Add mysensors RGBW and light tests

* Activate support for mysensors RGBW devices with support for
	white_value attribute.
* Add white_value support in light demo platform.
* Add tests for white_value and more for light component.
* Add tests for light demo platform.
* Fix import order in check_config.
2016-09-20 21:26:40 -07:00
wokar
e891f1a260 Filter entities from logbook (#3426)
* o added ability to exclude entities or domains from logbook
o exclude hidden entities

* fixed remaned configuration key

* - filter the events before they get passed to humanify, to separate concerns
- instead of looking at customize, look for the hidden attribute on the state change events
- access to configuration defaults to an empty list - no need to check

* - filter only events of type EVENT_STATE_CHANGED
- improve config handling

* added unit tests to cover all filter cases and logbook message creation
2016-09-20 20:07:26 -07:00
Milas Bowman
eb1871dc5b Allow pairing with Harmony Hub (#3467)
The real Hue hub responds to both `/api` and `/api/`. For greater
compatibility, the view now responds to both using `extra_urls`.
2016-09-20 20:05:14 -07:00
Fabian Affolter
f75b0a99d9 Use voluptuous for Hue (#3340)
* Migrate to voluptuous

* Change name used in test
2016-09-20 12:35:10 +02:00
Christian Brædstrup
81ebdadcec D-link switch library bump and error handling for W110 devices (#3386) (#3425) 2016-09-20 00:10:15 -07:00
sam-io
de5bd26050 Email (#3421)
* Added email component

* added email sensor component

* added doc string to test class

* fixed lint error

* fixed lint error

* rename of email component

* added another block as test fails on CI

* added retry to multi email test

* added delay to retry

* added to .coveragerc

* removed sleep from tests and fixed up stale comments
2016-09-20 00:09:14 -07:00
Lewis Juggins
54248863b3 Use uvloop for asyncio policy (#3417) 2016-09-20 00:06:33 -07:00
William Scanlon
43c395232a Sensor updates (#3410) 2016-09-20 00:05:54 -07:00
Paulus Schoutsen
68835c4b4b Update frontend 2016-09-19 23:56:40 -07:00
Paulus Schoutsen
be68fe0d85 Move worker pool monitoring to be time based instead of add_job based. (#3439)
* Move worker pool monitoring to be time based instead of add_job based.

* Stub out worker pool monitor during tests

* Add test for monitor worker pool.

* Improve naming

* Test stop_monitor coroutine

* Add async_create_timer test

* Finish rename create_timer
2016-09-19 23:39:49 -07:00
Micha LaQua
d31f6bc3f0 Allow hiding automation entities from UIs (#3442)
* Allow hiding automation entities from UIs

* Flake8 fixes: Allow hiding automation entities from UIs

* Automation: Rework hide entity feature

 * Refactor keyword 'hidden' to 'hide_entity' to avoid ambiguity
 * Migrate hide_entity subsetting to Voluptuous
2016-09-19 23:39:07 -07:00
Marcelo Moreira de Mello
ae1b69430e Added support to Yahoo Finance to track the stock market within Home Assistant (#3446)
* Added support to Yahoo Finance to track the stock market within Home Assistant

* Fixed pylint issues

* Fixed formatting issues

* Fixed pep257 issues

*   - Fixed URL link
  - Added attributes for Yahoo Finance

* Removed price sales ATTR

* Fixed lint and flake8 issues. Added attribution to Yahoo! per https://developer.yahoo.com/attribution/
2016-09-19 23:38:10 -07:00
Fabian Affolter
a998846961 Add unit to comment (#3452) 2016-09-19 23:17:52 -07:00
Paulus Schoutsen
9ac39df33f Fix logger config validation (#3459) 2016-09-19 21:12:56 -07:00
Paulus Schoutsen
fa2ce366de Update frontend 2016-09-19 21:12:31 -07:00
Teagan Glenn
35603268ca Isy fixes (#3457)
* Fix binary sensor

* Add 'stopped' to states

* Add '%' to states for light

* ISY light brightness support

* Method case

* Z-Wave unit 51 is a light
2016-09-19 20:16:51 -07:00
Paulus Schoutsen
d6ad4bc22b Remove validate_config (#3448) 2016-09-18 21:40:49 -07:00
Paulus Schoutsen
87fe83dcb9 Fix slow tests (#3444)
* Fix RFXtrx tests

* Report slow tests on CI

* Minor rfxtrx clean up

* rfxtrx test tweak
2016-09-18 21:40:37 -07:00
Ben Bangert
256062fd99 Fix test shutdown to ensure loop/threads are clean. (#3447)
* Fix test shutdown to ensure loop/threads are clean.

We now ensure the loop is closed, it has completed, and the
executer has completed. This ensure all threads are freed
up with any test calling hass.stop().

* Fix lint issue with run_loop
2016-09-18 20:35:58 -07:00
Paulus Schoutsen
8a99ce78c2 Better Hue error reporting (#3443) 2016-09-18 19:59:38 -07:00
Paulus Schoutsen
9a87e5e336 Feature/voluptuous influxdb (#3441)
* Migrate to voluptuous

* Fix voluptuous influxdb
2016-09-18 15:32:18 -07:00
Paulus Schoutsen
da8994e4b5 Migrate camera.uvc to voluptuous (#3440) 2016-09-18 14:22:32 -07:00
Josh Nichols
b34101b277 Update Ecobee state after making changes to climate (#3436)
* Update Ecobee state after making changes to climate

Without this, climate and sensor state will take up to 3 minutes
(the MIN_TIME_BETWEEN_UPDATES on its update throttle) to update in
the interface, which makes it more difficult to do automation around the
state.

* Use a boolean instance variable that update can check, rather than always calling update
2016-09-18 13:20:06 -07:00
Daniel Høyer Iversen
11c07440fe Accept login from approved ips without password (#3427) 2016-09-18 10:20:19 -07:00
John
2c43d6718b Update pyenvisalink to latest version (#3435) 2016-09-18 10:19:32 -07:00
Pascal Vizeli
de4cc5034e Add toggle service to input_boolean (#3432) 2016-09-18 10:18:44 -07:00
Paulus Schoutsen
c89a77dc74 Update frontend 2016-09-18 00:04:43 -07:00
Phil Hawthorne
91e36f380b Add PyBluez to Dockerfile (#3423)
* Add PyBluez to Dockerfile

Adds PyBluez to Dockerfile so people using Docker can run Bluetooth
devices

* Remove pip install of pybluez

Pybluez will be installed automatically when the Bluetooth device
tracker is enabled
2016-09-17 23:57:12 -07:00
Johann Kellerman
169f054c6c Use voluptuous for nmap, tplink, thomson device trackers (#3124)
* Use Voluptuous for nmap, tplink, thomson device_trackers

* Fix logic
2016-09-17 23:44:15 -07:00
joyrider3774
9184773f8f Emoncms feeds sensor component (#3258)
* Add Initial version for emoncms feeds sensor

* flake8 test fixes

* pylint test fixes

* - fix bug with include_feed_id_names not assigning the name to the  element in the same postion as found in include_feed_id
- a few structure changes to have less nesting (pylint fix)
- minor other changes

* update .coveragerc

* voluptuous fixes:
- exclude_feed_id and include_feed_id Exclusive group so that only one (or none) can be specified at once
- id must be positive int
- exclude_feed_id and include_feed_id must be positive int

* Fix comment so it refers to the documentation

* use string formatting

* Remove outer try

* clean up sensors.append calls
(break them out for loop)

* multiple changes like:
- rename config value "include_feed_id" to "include_only_feed_id"
- rename config value "include_feed_id_names" to "sensor_names"
- renamed config value sensor_names is now a dictionary an can also be used when renamed config value "include_only_feed_id" is not specified
- Set default value for scan_interval using the config validation
- blank lines between default, 3rd party and own imports
- removed homeassistant.util import, it was not needed anymore

* fix extended voluptuous schema
scan_interval should not be extended to PLATFORM_SCHEMA as it was already in the schema by config_validation helper so i should not add / change it. It was also causing problems reading the value from the config.

* Use Home Assistant polling

* remove statement that can never happen

* Guard clause

* Reduce instance variables
2016-09-17 23:34:24 -07:00
Paulus Schoutsen
e19a092934 Update Docker to use Python 3.5 (#3430) 2016-09-17 23:32:11 -07:00
deisi
1c706834e0 Recieve signals from a keyboard and use keyboard as a remote control (#3305) 2016-09-17 23:31:27 -07:00
Fabian Affolter
04d31e4ef4 Use voluptuous for RPi GPIO (#3371)
* Migrate to voluptuous

* Remove the check for lists
2016-09-17 23:28:37 -07:00
Fabian Affolter
2b7d1fe20d Use voluptuous for logger (#3375)
* Migrate to voluptuous

* No list for configuration check
2016-09-17 23:23:45 -07:00
Daniel Høyer Iversen
a90049568e Fix issue #3401 weblink (#3402) 2016-09-17 23:21:24 -07:00
Pascal Vizeli
534f56a3e2 Bugfix if ffmpeg is not present on config / Update ha-ffmpeg 0.13 (#3418) 2016-09-17 22:57:18 -07:00
Lewis Juggins
81928b1a6b Update pychromecast (#3416) 2016-09-17 22:51:40 -07:00
Paulus Schoutsen
325220e009 Make track_point_in_utc_time more async (#3428)
* Make track_point_in_utc_time more async

* Make track_point_in_time async friendly
2016-09-17 19:51:18 -07:00
Paulus Schoutsen
aca375c312 Asyncio event helpers (#3415)
* Automation - Event: Use coroutine

* Convert event helpers to coroutine

* Fix linting

* Add hass.async_add_job

* Automation - Event to use async_add_job
2016-09-17 18:28:01 -07:00
Paulus Schoutsen
4076ccf639 Use setup_component in tests (#3414)
* Alarm Control Panel Manual - use setup_component

* Update automation - zone tests

* Update climate - demo tests

* Update climate - generic thermostat tests

* Update cover - command line tests

* Update cover - demo tests

* Update device tracker tests

* Update device tracker - owntracks tests

* Update fan - demo tests

* Update garage door - demo tests

* Update light tests

* Update lock - demo tests

* Update media player - demo tests

* Update notify - command line tests

* Update notify - demo tests

* Update notify - file tests

* Update notify - group tests

* Update sensor - mfi tests

* Update sensor - moldindicator tests

* Update sensor - mqtt room tests

* Update switch - command line

* Update switch - flux

* Update switch tests

* Update scene tests

* Fix wrong default port for mfi switch
2016-09-17 10:29:58 -07:00
Jeff Wilson
d7452f9d5d Add ability to set fan made to Nest climate component (#3399)
* Add ability to set fan made to Nest climate component

* Use constants for fan values

* Use STATE_ON from cost

* Fix lint error
2016-09-15 21:01:32 -07:00
Paulus Schoutsen
c23ad3e285 Fix zones (#3413) 2016-09-15 19:40:18 -07:00
Greg Dowling
0a6f496425 Add support for Vera covers. (#3411) 2016-09-15 20:47:03 +02:00
Pascal Vizeli
07a92e8ac3 Split ffmpeg to compoment (#3396)
Add an optional extended description…
2016-09-15 14:35:40 +02:00
Dan
d1b08824e8 Implemented onkyo reconnect (#3061)
* Implemented onkyo reconnect

Connection object is cleared after a failed command. It will be
automatically recreated upon the next command running. This should allow
for failed connections to be restored.

* Remove reduntant error catching

* Run all update commands with command wrapper.

* Handle errors better

* Removed unused global

I have no idea how that got there.
2016-09-14 18:21:01 -07:00
gross1989
c693db49b3 Nuimo controller component based on SDK (#3039) 2016-09-14 18:20:49 -07:00
Dan
b58976bc36 Add operation_list to radiotherm (#3393)
* Add operation_list to radiotherm

* Use constants
2016-09-14 18:14:39 -07:00
Eric Jansen
70a79efb77 Bugfix: incorrectly inverted value when setting cover position (#3376) 2016-09-14 17:41:45 -07:00
chrom3
982a0bc195 Kodi notification platform (#3403) 2016-09-14 21:54:45 +02:00
Daniel Høyer Iversen
9ad592e606 Merge pull request #3395 from home-assistant/style_fix
fix style in tellstick sensor
2016-09-14 12:12:45 +02:00
Daniel
6f840de1d2 fix style in tellstick sensor 2016-09-14 11:58:26 +02:00
Fabian Affolter
d029861c93 Use voluptuous for Tellstick (#3367)
* Migrate to voluptuous

* Update tellstick.py
2016-09-13 23:29:15 -07:00
Fabian Affolter
c6fa07d059 Migrate to voluptuous (#3372) 2016-09-13 23:20:58 -07:00
Fabian Affolter
782838af56 Use voluptuous for Zone (#3377)
* Migrate to voluptuous

* Zone: Remove unneeded latitude/longitude check
2016-09-13 23:13:10 -07:00
Jeff Wilson
7724cb9eb4 Fix octoprint sensor (#3385)
* Fix non-temperature sensors for octoprint

* Fix double space in octoprint temperature names

* Fix tox linting errors
2016-09-13 23:10:49 -07:00
Pascal Vizeli
b78e98702a Update yahooweather 0.8 / change request time (#3352) [Breaking change] 2016-09-13 23:04:26 -07:00
Fabian Affolter
727b756054 Use voluptuous for KNX (#3345)
* Migrate to voluptuous

* Make host optional and set default
2016-09-13 23:03:30 -07:00
Fabian Affolter
4791b5679e Use voluptuous for iTunes (#3344)
* Migrate to voluptuous

* Add support for SSL/TLS
2016-09-13 23:01:51 -07:00
Fabian Affolter
79bff0fc57 Migrate to voluptuous (#3337) 2016-09-13 22:52:51 -07:00
Fabian Affolter
1e8cf8c1b7 Upgrade PyMata to 2.13 (#3335) 2016-09-13 22:52:11 -07:00
Fabian Affolter
26a118e75d Upgrade cherrypy to 8.1.0 (#3334) 2016-09-13 22:51:55 -07:00
Fabian Affolter
e7f9fdca67 Upgrade sqlalchemy to 1.0.15 (#3333) 2016-09-13 22:51:13 -07:00
Open Home Automation
0c7c85dbfe Miflora (#3053)
* First version of the MiFlora sensor (not yet finished)

* First workign version

* Added some documentation
Get name from sensor, if not defined

* Ignore IOError

* Added force_update option

* Updated comments

* Renamed fertility to conductivity (what it really is)

* MiFlora library update

* Updated helper files

* Formatting

* Fixed pylint errors

* Removed default from monitored conditions

* Removed KeyError handling as a KeyError should never be raised

* Added a return when no data is received

* emoved unnecessary return statement

* Changed default name

* Changes quotes and string operation ( @Teagan42 )

* - number of samples for median calculation is now configurable
- set state to None if no data could be polled from sensor

* Bugfix in library
more logging

* Fixed miflora version number
2016-09-13 22:37:57 -07:00
Nolan Gilley
2c01a67446 short sleep (#3115) 2016-09-13 21:46:11 -07:00
Fabian Affolter
68def21615 Use voluptuous for Yamaha receiver (#3210)
* Migrate to voluptuous

* Add missing configuration variables
2016-09-13 21:39:03 -07:00
Rob Johnson
7528da455c Vera Thermostat Support (#3247)
* vera thermostat & climate support

* disable abstract

* code review changes

* fix

* fix build

* remove old method
2016-09-13 21:36:49 -07:00
Heiko Rothe
8da85d7a91 Added away timeout setting for idle devices (#3321) 2016-09-13 20:34:59 -07:00
Fabian Affolter
ac5647a30e Use voluptuous for statsd (#2928)
* Migrate to voluptuous

* Update tests
2016-09-13 18:22:30 -07:00
David Baumann
cb3ab1e873 Implement Sensor for KNX Platform (#2911)
* Added Sensor Support for KNX Devices

Added Sensor for KNX Group Addresses
- Temperature
- Wind Speed
- Illuminance(LUX)

Mostly to fetch from a KNX Wetterstation

* Some pylint,flake8 fixes

* Pydoc Fixes

* Fix Coverage Ordering

* Refactor KNX Sensor

Refactor to Idea from @usul27 and added Minimum Maximum

* Removed Measurement Untis from const.py

Removed needed Measurement Units from const.py and add it to
sensor\knx.py

* Change .coveragerc

* Add as Requested from @Teagan42 the new Type Names

Additional add CONF_MINIMUM and CONF_MAXIMUM

* Added Changes as Requested from @Teagan42

* Fixed the Merge Conflict, Hopefully i done it rigth :-)

* Fixed Styling
2016-09-13 18:21:43 -07:00
Johann Kellerman
afc527ea55 Fix tests (#3387) 2016-09-13 18:17:51 -07:00
wokar
165362da0c fixed link constructor to show icon again (#3388) 2016-09-13 18:15:19 -07:00
Pascal Vizeli
1697a8c774 SleepIQ component with sensor and binary sensor platforms (#3390)
Original from #2949
2016-09-14 00:11:50 +02:00
Eric Clymer
de2eed3c9f Fix saving push_notification.conf as suggested by @robbiet480 (#3382) 2016-09-13 14:22:55 -07:00
Per Sandström
ca646c08c2 Modbus component refactoring - sensors and switches (#3297) 2016-09-13 22:47:44 +02:00
Pascal Vizeli
e4f4e91096 Bugfix auto/manual mode change (#3384) 2016-09-13 21:43:37 +02:00
Pascal Vizeli
812dc99073 fix xbox live entity id (#3368) 2016-09-13 21:27:43 +02:00
John Arild Berentsen
898cf1b352 zxt_120 set temperature did not update on setpoint (#3380) 2016-09-13 20:26:44 +02:00
Fabian Affolter
bba75bf6c3 Add Simplepush notifications (#3336) 2016-09-13 19:26:47 +02:00
John Arild Berentsen
efbc378226 Fix temp conversion for nest setpoint (#3373)
* Fix temp conversion for nest setpoint

* DEbug
2016-09-13 19:16:17 +02:00
Fabian Affolter
8ba952ee0e Use voluptuous for SCSGate (#3265)
* Migrate to voluptuous

* Extend platforms
2016-09-13 07:23:53 +02:00
Paulus Schoutsen
db3bfad0b5 Merge pull request #3359 from home-assistant/hotfix-0-28-2
0.28.2
2016-09-12 21:28:57 -07:00
Teagan Glenn
2b1416c514 Automatic polling (#3360)
* Test updating automatic

* Scan interval

* Schedule scan every time delta

* Pass around has

* Recursive issue

* Method invocation

* Oops

* Set up poll

* Default argument value

* Unused import

* Semicolon

* Fix tests

* Linting

* Unneeded throttle as it's handled by time event

* Use track time change event listener

* Disable lint rule

* Attribute removed - removing test

* Debug instead of info

* Unused import
2016-09-12 19:59:53 -07:00
Teagan Glenn
8189ec2c8d Automatic polling (#3360)
* Test updating automatic

* Scan interval

* Schedule scan every time delta

* Pass around has

* Recursive issue

* Method invocation

* Oops

* Set up poll

* Default argument value

* Unused import

* Semicolon

* Fix tests

* Linting

* Unneeded throttle as it's handled by time event

* Use track time change event listener

* Disable lint rule

* Attribute removed - removing test

* Debug instead of info

* Unused import
2016-09-12 19:59:34 -07:00
beepmill
7f6fb95afd Ignore desktop.ini (Windows Explorer) (#3363) 2016-09-12 19:45:39 -07:00
Paulus Schoutsen
609d7ebea5 Migrate core from threads to async awesomeness (#3248)
* Add event loop to the core

* Add block_till_done to HA core object

* Fix some tests

* Linting core

* Fix statemachine tests

* Core test fixes

* fix block_till_done to wait for loop and queue to empty

* fix test_core for passing, and correct start/stop/block_till_done

* Fix remote tests

* Fix tests: block_till_done

* Fix linting

* Fix more tests

* Fix final linting

* Fix remote test

* remove unnecessary import

* reduce sleep to avoid slowing down the tests excessively

* fix remaining tests to wait for non-threadsafe operations

* Add async_ doc strings for event loop / coroutine info

* Fix command line test to block for the right timeout

* Fix py3.4.2 loop var access

* Fix SERVICE_CALL_LIMIT being in effect for other tests

* Fix lint errors

* Fix lint error with proper placement

* Fix slave start to not start a timer

* Add asyncio compatible listeners.

* Increase min Python version to 3.4.2

* Move async backports to util

* Add backported async tests

* Fix linting

* Simplify Python version check

* Fix lint

* Remove unneeded try/except and queue listener appproriately.

* Fix tuple vs. list unorderable error on version compare.

* Fix version tests
2016-09-12 19:16:14 -07:00
Paulus Schoutsen
b9154158e8 Version bump to 0.28.2 2016-09-12 18:33:36 -07:00
Nick Vella
b43bf62347 Add open/closed state for open_cover and close_cover in SERVICE_TO_STATE (#3180)
* Add open/closed state mapping for open_cover and close_cover

* Add 'open', 'closed' for open/close_cover_tilt

* Revert "Add 'open', 'closed' for open/close_cover_tilt"

This reverts commit e45582d439.
2016-09-12 18:33:11 -07:00
John Arild Berentsen
c6b6ab1b79 Bugfix ecobee: inverted high and low temps and enforce int to temps (#3325)
* inverted high and low temps

* Looks like somethings are mixed up

* Added debugentires

* Added debugentires 2

* Enforce int on temperatures
2016-09-12 18:33:11 -07:00
John Arild Berentsen
07148fc580 Missing garage door detection (#3349) 2016-09-12 18:33:11 -07:00
Pascal Vizeli
bc600b8f32 Bugfix voluptuous on recorder (#3350) 2016-09-12 18:33:11 -07:00
David-Leon Pohl
dd4611064f Bugfix pilight component (#3355)
* BUG Message data cannot be changed thus use voluptuous to ensure format

* Pilight daemon expects JSON serializable data

Thus dict is needed and not a mapping proxy.

* Add explanation why dict as message data is needed

* Use more obvious voluptuous validation scheme

* Pylint:  Trailing whitespace
2016-09-12 18:33:11 -07:00
Nick Vella
24f1bff7f1 Add open/closed state for open_cover and close_cover in SERVICE_TO_STATE (#3180)
* Add open/closed state mapping for open_cover and close_cover

* Add 'open', 'closed' for open/close_cover_tilt

* Revert "Add 'open', 'closed' for open/close_cover_tilt"

This reverts commit e45582d439.
2016-09-12 18:31:44 -07:00
David-Leon Pohl
6959407dfd Bugfix pilight component (#3355)
* BUG Message data cannot be changed thus use voluptuous to ensure format

* Pilight daemon expects JSON serializable data

Thus dict is needed and not a mapping proxy.

* Add explanation why dict as message data is needed

* Use more obvious voluptuous validation scheme

* Pylint:  Trailing whitespace
2016-09-12 18:28:11 -07:00
John Arild Berentsen
14b6f9d927 Missing garage door detection (#3349) 2016-09-12 18:23:18 -07:00
Pascal Vizeli
d7e3fa22eb Bugfix voluptuous on recorder (#3350) 2016-09-12 18:21:35 -07:00
Pascal Vizeli
a9ef8d8568 Update ha-ffmpeg version 0.12 and add tests (#3301)
* update ha-ffmpeg version 0.12 and add tests

* change error logging
2016-09-12 22:52:49 +02:00
John Arild Berentsen
a69c575dab Bugfix ecobee: inverted high and low temps and enforce int to temps (#3325)
* inverted high and low temps

* Looks like somethings are mixed up

* Added debugentires

* Added debugentires 2

* Enforce int on temperatures
2016-09-12 17:40:46 +02:00
Heiko Rothe
240cb9b8f0 Minor naming fix (#3318) 2016-09-12 16:58:49 +02:00
Fabian Affolter
ac063f8e61 Fix typo (#3343) 2016-09-12 16:19:46 +02:00
Fabian Affolter
c028e1fc6f Update ordering, constants, and callback name (light.*) (#3339)
* Extend schema

* Update ordering

* Add line breaks

* Align callback name with other platforms

* ALign callbackname with other platforms

* Update callback name to match other platforms

* Update callback name

* Update callback name
2016-09-12 15:52:22 +02:00
Richard Cox
44681ebd55 Slack notification optional username / icon (#3314)
* Slack notification optional username / icon

* Small bugfix to handle defaults better

* Dedup'ing code
2016-09-12 09:49:26 +02:00
clach04
c90cc77c41 bluetooth_le_tracker clarify header with LE (#3328) 2016-09-12 07:56:12 +02:00
Paulus Schoutsen
71aa1a2f3c Merge pull request #3332 from home-assistant/hotfix-0-28-1
Hotfix 0 28 1
2016-09-11 22:42:16 -07:00
Paulus Schoutsen
0cfa5e5f67 Version bump to 0.28.1 2016-09-11 22:28:53 -07:00
Paulus Schoutsen
f0ec51711c Bugfix group order (#3323)
* Add ordered dict config validator

* Have group component use ordered dict config validator

* Improve config_validation testing

* update doc string config_validation.ordered_dict

* validate full dict entries

* Further simplify ordered_dict validator.

* Lint fix
2016-09-11 22:27:47 -07:00
Teagan Glenn
d6ca930427 Automatic Device Tracker Bug Fix (#3330)
* Iterate over items

* Pass display name as host name
2016-09-11 22:27:47 -07:00
John Arild Berentsen
7bce8bc33f Revert only add 1 device (#3324) 2016-09-11 22:27:47 -07:00
Marcelo Moreira de Mello
36785296ce Fixed voluptuous to accept string instead positive_int for CODE on Simplisafe (#3310) 2016-09-11 22:27:47 -07:00
Paulus Schoutsen
838b09bb8f Bugfix group order (#3323)
* Add ordered dict config validator

* Have group component use ordered dict config validator

* Improve config_validation testing

* update doc string config_validation.ordered_dict

* validate full dict entries

* Further simplify ordered_dict validator.

* Lint fix
2016-09-11 22:25:01 -07:00
Paulus Schoutsen
fa4b253871 Comment out pyuserinput in requirements_all (#3307)
* Comment out pyuserinput in requirements_all

* Ignore import error for keyboard component
2016-09-11 21:59:48 -07:00
Teagan Glenn
360a650370 Automatic Device Tracker Bug Fix (#3330)
* Iterate over items

* Pass display name as host name
2016-09-11 21:53:05 -07:00
John Arild Berentsen
26abe83be5 Revert only add 1 device (#3324) 2016-09-11 21:46:14 -07:00
Johann Kellerman
dba78b02da Add voluptuous to locative (#3254) 2016-09-12 01:12:28 +02:00
Fabian Affolter
515c4773f3 Use voluptuous for netatmo (#3287)
* Migrate to voluptuous

* Switch back to archive (reverting #3285)
2016-09-11 21:27:58 +02:00
Teagan Glenn
05a3b610ff Add ISY programs and support for all device types (#3082)
*  ISY Lock, Binary Sensor, Cover devices, Sensors and Fan support
* Support for ISY Programs
2016-09-11 20:18:53 +02:00
William Scanlon
8c7a1b4b05 Merge pull request #3218 from w1ll1am23/full_color_support_wink_osram
Add full color support for Osram Lightify bulbs with Wink
2016-09-11 10:55:19 -04:00
William Scanlon
58c0990508 Convert rgb to hsb for Wink Osram light 2016-09-11 10:45:04 -04:00
Fabian Affolter
11396a221e Extend schema (#3278) 2016-09-11 11:45:38 +02:00
Fabian Affolter
ab826eef0d Migrate to voluptuous (#3276) 2016-09-11 11:38:43 +02:00
Fabian Affolter
d20b4c17a2 Migrate to voluptuous (#3277) 2016-09-11 11:30:27 +02:00
Fabian Affolter
1b77b2c3a3 Migrate to voluptuous (#3280) 2016-09-11 11:19:10 +02:00
Fabian Affolter
f5df5615be Migrate to voluptuous (#3282) 2016-09-11 10:04:07 +02:00
Fabian Affolter
cc99d266b7 Use constants and update ordering (#3275) 2016-09-11 10:01:46 +02:00
Fabian Affolter
aed1348411 Use constants and update ordering (#3274) 2016-09-11 09:25:19 +02:00
Fabian Affolter
f6bc63092c Migrate to voluptuous (#3281) 2016-09-11 09:24:25 +02:00
Fabian Affolter
d48ed41122 Use constants (#3284) 2016-09-11 09:24:07 +02:00
Fabian Affolter
cce3e284d7 Use voluptuous for Neurio (#3289)
* Migrate to voluptuous

* Migrate to voluptuous
2016-09-11 09:23:33 +02:00
Fabian Affolter
ac9151af54 Migrate to voluptuous (#3292) 2016-09-11 09:22:49 +02:00
Fabian Affolter
f341974b8b Migrate to voluptuous (#3290) 2016-09-11 09:22:08 +02:00
Fabian Affolter
78313c793c Migrate to voluptuous (#3298) 2016-09-11 09:21:16 +02:00
Fabian Affolter
3f4d30c8da Add timeout (#3304) 2016-09-11 09:21:01 +02:00
Marcelo Moreira de Mello
9bbe7be684 Fixed voluptuous to accept string instead positive_int for CODE on Simplisafe (#3310) 2016-09-11 09:07:13 +02:00
Robbie Trencheny
4748e7f7e9 Version bump 2016-09-10 18:23:21 -07:00
Fabian Affolter
1b46ed5045 0.28 (#3288)
* Backend support for importing waypoints from owntracks as HA zones

* Added test for Owntracks waypoints import

* Backend support for importing waypoints from owntracks as HA zones

* Added test for Owntracks waypoints import

* Removed redundant assignment to CONF_WAYPOINT_IMPORT_USER

* Fixed zone test break and code style issues

* Fixed style issues

* Fixed variable scope issues for entities

* Fixed E302

* Do not install pip packages in tests

* EventBus: return function to unlisten

* Convert automation to entities with services

* Refactored zone creation based on code review feedback, enhanced configuration

* Added unit test to enhance waypoint_whitelist coverage

* Fix JSON encoder issue in recorder

* Fix tests docstring

* * Improved zone naming in waypoint import
* Added more test coverage for owntracks and zone

* Back to 0.28.0.dev0

* Code review feedback from @pavoni

* Added bitfield of features for flux_led since we are supporting effects

* Host should be optional for apcupsd component (#3072)

* Use voluptuous for file (#3049)

* Zwave climate Bugfix: if some setpoints have different units, we should fetch the o… (#3078)

* Bugfix: if some setpoints have different units, we should fetch the one that are active.

* Move order of population for first time detection

* Default to config if None unit_of_measurement

* unit fix (#3083)

* humidity slider (#3088)

* If device was off target temp was null. Default to Heating setpoint (#3091)

* Fix linting

* Upgrade pyuserinput to 0.1.11 (#3068)

* Upgrade pyowm to 2.4.0 (#3067)

* improve isfile validation check (#3101)

* Refactor notification titles to allow for them to be None, this also includes a change in Telegram to only include the title if it's present, and to use a Markdown parse mode for messages (#3100)

* Fix broken test

* rfxtrx sensor clean up

* Bitcoin sensor use warning instead of error (#3103)

* Use voluptuous for HDMI CEC & CONF_DEVICES constants (#3107)

* Update voluptuous for nest (#3109)

* Update configuration check
* Extend platform

* Fix for BLE device tracker (#3019)

* Bug fix tracked devices
* Added scan_duration configuration parameter

* fix homematic climate implementation (#3114)

* Allow 'None' MAC to be loaded from known_devices (#3102)

* Use voluptuous for xmpp (#3127)

* Use voluptuous for twitter (#3126)

* Use voluptuous for Fritzbox and DDWRT (#3122)

* Use Voluptuous for BT Home Hub (#3121)

* Use voluptuous for syslog (#3120)

* Use voluptuous for Aruba (#3119)

* Use constants, update configuration check, and ordering (Pilight) (#3118)

* Use contants, update configuration check, and ordering

* Fix pylint issue

* Migrate to voluptuous (#3113)

* Fix typo (#3108)

* Migrate to voluptuous (#3106)

* Update voluptuous (#3104)

* Climate and cover bugfix (#3097)

* Avoid None comparison for zwave cover.

* Just rely on unit from config for unit_of_measurement

* Explicit return None

* Mqtt (#11)

* Explicit return None

* Missing service and wrong service name defined

* Mqtt state was inverted, and never triggering

* Migrate to voluptuous (#3096)

* Migrate to voluptuous (#3084)

* Fixed Homematic cover (#3116)

* Migrate to voluptuous (#3069)

🐬

* Migrate to voluptuous (#3066)

🐬

* snapcast update (#3012)

* snapcast update

* snapcast update

* validate config

* use conf constants

* orvibo updates (#3006)

🐬

* Update frontend

* move units to temperature for climate zwave. wrong state was sent to mqtt cove

* Use voluptuous for instapush (#3132)

* Use voluptuous for Octoprint (#3111)

* Migrate to voluptuous

* Fix pylint issues

* Add missing docstrings (fix PEP257 issues) (#3098)

* Add missing docstrings (fix PEP257 issues)

* Finish sentence

* Updated braviatv's braviarc version to 0.3.4 (#2997)

* Updated braviarc version to 0.3.4

* Updated braviarc version to requirements_all.txt

* Use voluptuous for Acer projector switch (#3077)

🐬

* Use voluptuous for twilio (#3134)

* Use voluptuous for webostv (#3135)

* Use voluptuous for Command line platforms (#2968)

* Migrate to voluptuous

* Fix pylint issues

* Remove FIXME

* Split setup test

* Test with bootstrap

* Remove lon and lat

* Fix pylint issues

* Add coinmarketcap sensor (#3064)

* Migrate to voluptuous (#3142)

🐬

* Back out insteon hub and fan changes (#3062)

* Move details to docs (#3146)

* Update frontend

* Use constants (#3148)

* Update ordering (#3149)

* Migrate to voluptuous (#3092)

* Display the error instead of the traceback (notify.slack) (#3079)

* Display the error instead of the traceback

* Remove name for check

* Automatic ODB device tracker & device tracker attributes (#3035)

* Migrate to voluptuous (#3173)

* Add voluptuous for tomato and SNMP (#3172)

* Improve voluptuous and login errors for Asus device tracker (#3170)

* Add exclude option to nmap device tracker (#2983)

* Add exclude option to nmap device tracker

Adds an optional exclude paramater to nmap device tracker.
Devices specified in the exclude list will never be scanned
by nmap. This can help to reduce log spam.

ex:
```
device_tracker:
  - platform: nmap_tracker
    hosts: 10.0.0.1/24
    home_interval: 1
    interval_seconds: 12
    consider_home: 120
    track_new_devices: yes
    exclude:
      - 10.0.0.2
      - 10.0.0.1
```

* Handle optional exclude

* Style fixed

* Added Xbox Live component (#3013)

* Added Xbox Live component

* Added Xbox Live sensor to coveralls

* Added init success checks

* Added entity id

* Adding link_names to post.message call (#3167)

If you do not turn link_names on, Slack will not highlight @channel and @username messages.

* Allow https (fixes #3150) (#3155)

* Use constants (#3156)

* Bugfix: ctach Runtime errors (#3153)

"RuntimeError: Disable scan failed" has been seen in a live installation

* Migrate to voluptuous (#3166)

🐬

* Migrate to voluptuous (#3164)

🐬

* Migrate to voluptuous (#3163)

🐬

* Migrate to voluptuous (#3162)

🐬 and 🍪 for fixing quotes!

* Exclude www_static from pydocstyle linting (#3175)

🐬

* Migrate to voluptuous (#3174)

* Migrate to voluptuous (#3171)

* Use voluptuous for mFi switch (#3168)

* Migrate to voluptuous

* Take change configuration into account

* Migrate to voluptuous (#3144)

🐬

* Add the occupancy sensor_class (#3176)

Such a complicated PR

* Update frontend

* Use voluptuous for Unifi, Ubus (#3125)

* Using alert with Hue maintains prior state (#3147)

* When using flash with hue, dont change the on/off state of the light so that it will naturally return to its previous state once flash is complete

* ATTR_FLASH not ATTR_EFFECT

* MQTT fan platform (#3095)

* Add fan.mqtt, allow brightness to be passed and mapped to a fan speed for compatibility with emulated_hue

* Pylint/Flake8 fixes

* Remove brightness

* Add more features, like custom oscillation/speed payloads and setting the speed list

* Flake8 fixes

* flake8/pylint fixes

* Use constants

* block fan.mqtt from coverage

* Fix oscillating comment

* Add Sphinx API doc generation (#3029)

* add's sphinx project to docs/ dir
* include core/helpers autodocs for API reference

* Allow reloading automation without restarting HA (#3002)

* Migrate to voluptuous (#3182)

🐬

* Migrate to voluptuous (#3179)

🐬

* Added scale and offset to the Temper component (#2853)

🐬

* Use voluptuous for BT and Owntracks device trackers (#3187)

🐬

* Correct binary_sensor.ecobee docs URL

* Use voluptuous for Hikvisioncam switch (#3184)

* Migrate to voluptuous

* Use vol.Optional

* Use voluptuous for Edimax (#3178)

🐬

* Use voluptuous for Bravia TV (#3165)

🐬

* Added support to 'effect: random' to Osram Lightify lights (#3192)

* Added support to 'effect: random' to Osram Lightify lights

* removed extra line not required

* Use voluptuous for message_bird, sendgrid (#3136)

* Try out the RTD theme

* Doc updates

* Update voluptuous for existing notify platforms (#3133)

* Update voluptuous for exists notify platforms

* fix constants

* Simple trend sensor. (#3073)

* First cut of trend sensor.

* Tidy.

* Migrate to voluptuous (#3193)

* Migrate to voluptuous (#3194)

🐬

* Migrate to voluptuous (#3197)

* Migrate to voluptuous (#3198)

🐬

* Use extend of PLATFORM_SCHEMA (#3199)

* Migrate to voluptuous (#3202)

🐬

* Updated to use the occupancy sensor_class (#3204)

🐬

* Migrate to voluptuous (#3206)

* Migrate to voluptuous (#3207)

* Migrate to voluptuous (#3208)

🐬

* Migrate to voluptuous (#3209)

🐬

* Migrate to voluptuous (#3214)

* Use voluptuous for SqueezeBox (#3212)

* Migrate to voluptuous

* Remove name

* Migrate to voluptuous and upgrade uber_rides to 0.2.5 (#3181)

* Migrate to voluptuous (#3200)

🐬

* Use Voluptuous for Luci and Netgear device trackers (#3123)

* Use Voluptuous for Luci and NEtgear device trackers

* str_schema shortcut

* Undo str_schema

* change update handling with variable for breack CCU2 (#3215)

* Update ordering (#3216)

* Docs update

* Flake8/pylint

* Add new docs requirements

* Update email validation (#3228)

🐬

* Fix email validation (fixes #3138) (#3227)

* Upgrade slacker to 0.9.25 (#3224)

* Upgrade psutil to 4.3.1 (#3223)

* Upgrade gps3 to 0.33.3 (#3222)

* Upgrade Werkzeug to 0.11.11 (#3220)

* Upgrade sendgrid to 3.4.0 (#3226)

* Bluetooth: keep looking for new devices (#3201)

* keep looking for new devices

* Update bluetooth_tracker.py

* change default value for tracking new devices

* remove commented code

* dlink switch added device state attributes and support for legacy firmware (#3211)

* Use voluptuous for free mobile (#3236)

* Use voluptuous for nma (#3241)

* Improve 1-Wire device family detection and error checking. Use volupt… (#3233)

* Improve 1-Wire device family detection and error checking. Use voluptuous

* Fix detection of gpio connected devices

* Replace rollershutter and garage door with cover, add fan (#3242)

* Use voluptuous for Alarm.com (#3229)

* Use voluptuous for gntp (#3237)

* Use voluptuous for pushbullet, pushetta and pushover (#3240)

* Migrate to voluptuous (#3230)

🐬

* Fix mFi sensors in uninitialized state (#3246)

If mFi sensors are identified but not fully assigned they can
have no tag value, and mficlient throws a ValueError to signal this.
This patch handles that case by considering such devices to always
be STATE_OFF.

* Use voluptuous for PulseAudio Loopback (#3160)

* Migrate to voluptuous

* Fix conf var

* Use voluptuous for Verisure (#3169)

* Migrate to voluptuous

* Update type and add missing config variable

* thread safe modbus (#3188)

*  Upgraded fitbit to version 0.2.3 which fixed oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired) (#3244)

* update ffmpeg version to 0.10 add get image to camera (#3235)

* Migrate to voluptuous (#3234)

* fix bugfix with unique_id (#3217)

* Zwave climate fix and wink cover. (#3205)

* Fixes setpoint get was done outside loop

* zxt_120

* Wink not migrated to cover

* Clarifying debug

* too long line

* Only add 1 device entity

* Owntracks voluptuous fix (#3191)

* Zwave set temperature fix (#3221)

* If device was off set target temp would not work.

* Changed to use a workaround just for Horstmann HRT4-ZW Zwave Thermostat

* Wrong Horseman id

* style changes

* Change PR to suggestion on gitter (#3243)

* Reload groups (#3203)

* Allow reloading groups without restart

* Test to make sure automation listeners are removed.

* Remove unused imports for group tests

* Simplify group config validation

* Add prepare_reload function to entity component

* Migrate group to use entity_component.prepare_reload

* Migrate automation to use entity_component.prepare_reload

* Clean up group.get_entity_ids

* Use cv.boolean for group config validation

* fix remove listener (#3196)

* Add linux battery sensor (#3238)

* protect service data for changes in calls (#3249)

* protect service data for changes in calls

* change handling

* move MappingProxyType to service call

* Fix issue #3250 (#3253)

* Minor Ecobee changes (#3131)

* Update configuration check, ordering, and constants

* Make API key optional

* issue #3250

* Add voluptuous to ecobee (#3257)

* Use constants and update ordering (#3261)

* Add support for complex template structures to data_template (#3255)

* Improve yaml fault tolerance and handle check_config border cases (#3159)

* Use voluptuous for nx584 alarm (#3231)

* Migrate to voluptuous

* Fix pylint issue

* fastdotcom from pypi (#3269)

* Use constants and update ordering (#3268)

🐬

* Use constants and update ordering (#3267)

🐬

* Add additional template for custom date formats (#3262)

I can live with a few visual line breaks 🐬

* Use constants and update ordering (#3266)

* Updated  braviatv's braviarc version to 0.3.5 (#3271)

* Use voluptuous for Device Sun Light Trigger (#3105)

* Migrate to voluptuous

* Use default

* Point to master till archive is back (#3285)

* Pi-Hole statistics sensor (#3158)

* Add Pi-Hole sensor

* Update docstrings and remove print()

* Use None for payload

* Added stuff for support range setting (#3189)

* cleanup Homematic code (#3291)

* cleanup old code

* cleanup round 2

* remove unwanted platforms

* Update frontend

* Hotfix for #3100 (#3302)

* Fix TP-Link Archer C7 long passwords (#3225)

* Fix tplink C7 long passwords

Fixes an issue where passwords longer than 15 chars could not log in to Archer C7 routers.

* Truncate in correct place

* Add comment about TP-Link C7 pass truncation

* Fix lint error

* Truncate comment at 79 chars not 80

* modbus write registers service (#3252)

* Fix bloomsky platform discovery (#3303)

* Remove dev tag
2016-09-10 18:22:58 -07:00
Robbie Trencheny
e8f8ea080b Remove dev tag 2016-09-10 18:13:27 -07:00
Paulus Schoutsen
b8251b084a Fix bloomsky platform discovery (#3303) 2016-09-10 09:12:24 -07:00
Per Sandström
54a17f5d98 modbus write registers service (#3252) 2016-09-10 08:17:28 -07:00
Mal Curtis
8438001942 Fix TP-Link Archer C7 long passwords (#3225)
* Fix tplink C7 long passwords

Fixes an issue where passwords longer than 15 chars could not log in to Archer C7 routers.

* Truncate in correct place

* Add comment about TP-Link C7 pass truncation

* Fix lint error

* Truncate comment at 79 chars not 80
2016-09-10 08:08:51 -07:00
Lewis Juggins
de150ecbc9 Hotfix for #3100 (#3302) 2016-09-10 07:36:55 -07:00
Robbie Trencheny
d466bae244 Update frontend 2016-09-09 14:23:03 -07:00
Pascal Vizeli
e87da765c5 cleanup Homematic code (#3291)
* cleanup old code

* cleanup round 2

* remove unwanted platforms
2016-09-09 19:33:12 +02:00
John Arild Berentsen
ba28208106 Added stuff for support range setting (#3189) 2016-09-09 11:06:53 -06:00
Fabian Affolter
545329174d Pi-Hole statistics sensor (#3158)
* Add Pi-Hole sensor

* Update docstrings and remove print()

* Use None for payload
2016-09-09 17:10:46 +02:00
Fabian Affolter
5881f6000e Point to master till archive is back (#3285) 2016-09-09 16:53:18 +02:00
Daniel Høyer Iversen
3411c4c7c3 Merge pull request #3260 from home-assistant/issue_#3250
issue #3250
2016-09-09 09:33:26 +02:00
Fabian Affolter
5bf66cae1f Use voluptuous for Device Sun Light Trigger (#3105)
* Migrate to voluptuous

* Use default
2016-09-09 09:06:24 +02:00
Brian Karani Ndwiga
53c8115f82 Updated braviatv's braviarc version to 0.3.5 (#3271) 2016-09-09 08:38:32 +02:00
Fabian Affolter
911231afc1 Use constants and update ordering (#3266) 2016-09-09 08:37:30 +02:00
Lewis Juggins
44f5a66b66 Add additional template for custom date formats (#3262)
I can live with a few visual line breaks 🐬
2016-09-08 18:49:02 -06:00
Fabian Affolter
ee6c83f569 Use constants and update ordering (#3267)
🐬
2016-09-08 18:34:55 -06:00
Fabian Affolter
fb0232429e Use constants and update ordering (#3268)
🐬
2016-09-08 18:32:32 -06:00
Nolan Gilley
1cace5782c fastdotcom from pypi (#3269) 2016-09-08 18:26:50 -06:00
Fabian Affolter
02848b3949 Use voluptuous for nx584 alarm (#3231)
* Migrate to voluptuous

* Fix pylint issue
2016-09-08 23:06:57 +02:00
Johann Kellerman
e8ad76c816 Improve yaml fault tolerance and handle check_config border cases (#3159) 2016-09-08 22:20:38 +02:00
Pascal Vizeli
267cda447e Add support for complex template structures to data_template (#3255) 2016-09-08 18:19:47 +02:00
Fabian Affolter
94e3986d54 Use constants and update ordering (#3261) 2016-09-08 16:26:54 +02:00
Pascal Vizeli
24aa3b3c97 Add voluptuous to ecobee (#3257) 2016-09-08 16:11:00 +02:00
Daniel
b3d2db45de issue #3250 2016-09-08 08:43:05 +02:00
Fabian Affolter
1af5d4c8b8 Minor Ecobee changes (#3131)
* Update configuration check, ordering, and constants

* Make API key optional
2016-09-07 20:21:42 +02:00
Daniel Høyer Iversen
4d41c5cd0f Fix issue #3250 (#3253) 2016-09-07 19:17:16 +02:00
Pascal Vizeli
e632a47772 protect service data for changes in calls (#3249)
* protect service data for changes in calls

* change handling

* move MappingProxyType to service call
2016-09-07 08:19:19 -07:00
Fabian Affolter
32c234ffcc Add linux battery sensor (#3238) 2016-09-07 16:32:35 +02:00
Paulus Schoutsen
5995f2438e fix remove listener (#3196) 2016-09-07 06:59:59 -07:00
Paulus Schoutsen
35b388edce Reload groups (#3203)
* Allow reloading groups without restart

* Test to make sure automation listeners are removed.

* Remove unused imports for group tests

* Simplify group config validation

* Add prepare_reload function to entity component

* Migrate group to use entity_component.prepare_reload

* Migrate automation to use entity_component.prepare_reload

* Clean up group.get_entity_ids

* Use cv.boolean for group config validation
2016-09-07 06:59:16 -07:00
Pascal Vizeli
91028cbc13 Change PR to suggestion on gitter (#3243) 2016-09-07 06:57:59 -07:00
Dave Banks
3668afe306 Zwave set temperature fix (#3221)
* If device was off set target temp would not work.

* Changed to use a workaround just for Horstmann HRT4-ZW Zwave Thermostat

* Wrong Horseman id

* style changes
2016-09-07 11:22:51 +02:00
Johann Kellerman
47864fc7d7 Owntracks voluptuous fix (#3191) 2016-09-06 18:35:10 -07:00
John Arild Berentsen
e88e6d1030 Zwave climate fix and wink cover. (#3205)
* Fixes setpoint get was done outside loop

* zxt_120

* Wink not migrated to cover

* Clarifying debug

* too long line

* Only add 1 device entity
2016-09-06 18:34:28 -07:00
Pascal Vizeli
d7b757fb97 fix bugfix with unique_id (#3217) 2016-09-06 18:31:56 -07:00
Fabian Affolter
6a837f3aad Migrate to voluptuous (#3234) 2016-09-06 18:28:55 -07:00
Pascal Vizeli
165871d48a update ffmpeg version to 0.10 add get image to camera (#3235) 2016-09-06 18:24:11 -07:00
Marcelo Moreira de Mello
fb719f530a Upgraded fitbit to version 0.2.3 which fixed oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired) (#3244) 2016-09-06 18:23:08 -07:00
Per Sandström
d53d8f5ea9 thread safe modbus (#3188) 2016-09-06 18:21:38 -07:00
Fabian Affolter
7aafa309c9 Use voluptuous for Verisure (#3169)
* Migrate to voluptuous

* Update type and add missing config variable
2016-09-06 18:18:34 -07:00
Fabian Affolter
abff2f2b36 Use voluptuous for PulseAudio Loopback (#3160)
* Migrate to voluptuous

* Fix conf var
2016-09-06 18:16:03 -07:00
Dan Smith
f55095df83 Fix mFi sensors in uninitialized state (#3246)
If mFi sensors are identified but not fully assigned they can
have no tag value, and mficlient throws a ValueError to signal this.
This patch handles that case by considering such devices to always
be STATE_OFF.
2016-09-06 18:04:20 -07:00
Fabian Affolter
9d4ccb1f49 Migrate to voluptuous (#3230)
🐬
2016-09-06 18:03:43 -06:00
Pascal Vizeli
9eacde0005 Use voluptuous for pushbullet, pushetta and pushover (#3240) 2016-09-06 18:00:33 -06:00
Pascal Vizeli
22870d424a Use voluptuous for gntp (#3237) 2016-09-06 16:16:21 -06:00
Fabian Affolter
e00f9339d1 Use voluptuous for Alarm.com (#3229) 2016-09-06 23:48:32 +02:00
Fabian Affolter
d8db881e9a Replace rollershutter and garage door with cover, add fan (#3242) 2016-09-06 23:41:26 +02:00
Ardetus
fa8ed4de41 Improve 1-Wire device family detection and error checking. Use volupt… (#3233)
* Improve 1-Wire device family detection and error checking. Use voluptuous

* Fix detection of gpio connected devices
2016-09-06 14:50:02 -06:00
Pascal Vizeli
79fa9963da Use voluptuous for nma (#3241) 2016-09-06 22:24:04 +02:00
Pascal Vizeli
d06a3c9145 Use voluptuous for free mobile (#3236) 2016-09-06 21:33:11 +02:00
Christian Brædstrup
c1139a9fda dlink switch added device state attributes and support for legacy firmware (#3211) 2016-09-06 11:52:22 -06:00
Bart274
9ade87013e Bluetooth: keep looking for new devices (#3201)
* keep looking for new devices

* Update bluetooth_tracker.py

* change default value for tracking new devices

* remove commented code
2016-09-06 11:51:36 -06:00
Fabian Affolter
478c82c34c Upgrade sendgrid to 3.4.0 (#3226) 2016-09-06 18:12:24 +02:00
Fabian Affolter
85baebb23b Upgrade Werkzeug to 0.11.11 (#3220) 2016-09-06 08:55:23 -06:00
Fabian Affolter
88d62bd935 Upgrade gps3 to 0.33.3 (#3222) 2016-09-06 08:53:21 -06:00
Fabian Affolter
9530c7366b Upgrade psutil to 4.3.1 (#3223) 2016-09-06 08:51:51 -06:00
Fabian Affolter
26eba4cb1a Upgrade slacker to 0.9.25 (#3224) 2016-09-06 08:51:23 -06:00
Fabian Affolter
c06fe51122 Fix email validation (fixes #3138) (#3227) 2016-09-06 08:48:24 -06:00
Fabian Affolter
f595c8715c Update email validation (#3228)
🐬
2016-09-06 08:45:33 -06:00
Robbie Trencheny
6e6b2ae3f4 Add new docs requirements 2016-09-05 18:12:44 -07:00
Robbie Trencheny
d903661577 Flake8/pylint 2016-09-05 18:10:04 -07:00
Robbie Trencheny
a5faa851e8 Docs update 2016-09-05 18:06:19 -07:00
Fabian Affolter
5ec6eaf7d0 Update ordering (#3216) 2016-09-05 22:53:23 +02:00
Pascal Vizeli
73036f4725 change update handling with variable for breack CCU2 (#3215) 2016-09-05 22:39:29 +02:00
Johann Kellerman
17a2cac7e1 Use Voluptuous for Luci and Netgear device trackers (#3123)
* Use Voluptuous for Luci and NEtgear device trackers

* str_schema shortcut

* Undo str_schema
2016-09-05 11:37:36 -06:00
Fabian Affolter
e0a6d7941c Migrate to voluptuous (#3200)
🐬
2016-09-05 11:34:35 -06:00
Fabian Affolter
4638696f8c Migrate to voluptuous and upgrade uber_rides to 0.2.5 (#3181) 2016-09-05 11:33:35 -06:00
Fabian Affolter
428db4a644 Use voluptuous for SqueezeBox (#3212)
* Migrate to voluptuous

* Remove name
2016-09-05 19:27:06 +02:00
Fabian Affolter
ea1e4ea215 Migrate to voluptuous (#3214) 2016-09-05 19:22:26 +02:00
Fabian Affolter
6b787ee01e Migrate to voluptuous (#3209)
🐬
2016-09-05 10:05:27 -06:00
Fabian Affolter
6be20883f0 Migrate to voluptuous (#3208)
🐬
2016-09-05 10:04:46 -06:00
Fabian Affolter
95ea0c02b9 Migrate to voluptuous (#3207) 2016-09-05 10:03:25 -06:00
Fabian Affolter
5059d8dde9 Migrate to voluptuous (#3206) 2016-09-05 10:01:50 -06:00
arsaboo
3bbd909b20 Updated to use the occupancy sensor_class (#3204)
🐬
2016-09-05 09:55:29 -06:00
Fabian Affolter
909b5ffa5b Migrate to voluptuous (#3202)
🐬
2016-09-05 09:51:18 -06:00
Fabian Affolter
e324885ff6 Use extend of PLATFORM_SCHEMA (#3199) 2016-09-05 09:47:53 -06:00
Fabian Affolter
8afed2cafa Migrate to voluptuous (#3198)
🐬
2016-09-05 09:46:57 -06:00
Fabian Affolter
6bbe3483d9 Migrate to voluptuous (#3197) 2016-09-05 09:45:06 -06:00
Fabian Affolter
9c600012a1 Migrate to voluptuous (#3194)
🐬
2016-09-05 09:40:57 -06:00
Fabian Affolter
aed59aea7d Migrate to voluptuous (#3193) 2016-09-05 09:39:21 -06:00
Greg Dowling
09d52820dd Simple trend sensor. (#3073)
* First cut of trend sensor.

* Tidy.
2016-09-05 16:32:14 +02:00
Pascal Vizeli
48c1631178 Update voluptuous for existing notify platforms (#3133)
* Update voluptuous for exists notify platforms

* fix constants
2016-09-05 13:27:10 +02:00
Robbie Trencheny
1170b2897a Doc updates 2016-09-05 03:31:48 -07:00
Robbie Trencheny
5144547b70 Try out the RTD theme 2016-09-05 02:25:03 -07:00
Pascal Vizeli
e460d8f637 Use voluptuous for message_bird, sendgrid (#3136) 2016-09-05 07:07:31 +02:00
Marcelo Moreira de Mello
7bab4055a5 Added support to 'effect: random' to Osram Lightify lights (#3192)
* Added support to 'effect: random' to Osram Lightify lights

* removed extra line not required
2016-09-04 21:15:44 -07:00
Fabian Affolter
892f6a706a Use voluptuous for Bravia TV (#3165)
🐬
2016-09-04 19:22:01 -06:00
Fabian Affolter
59cd92cb4d Use voluptuous for Edimax (#3178)
🐬
2016-09-04 19:17:40 -06:00
Fabian Affolter
98bdcd3405 Use voluptuous for Hikvisioncam switch (#3184)
* Migrate to voluptuous

* Use vol.Optional
2016-09-04 19:16:16 -06:00
Robbie Trencheny
a569ee787d Correct binary_sensor.ecobee docs URL 2016-09-04 14:37:10 -07:00
Johann Kellerman
ad52816595 Use voluptuous for BT and Owntracks device trackers (#3187)
🐬
2016-09-04 11:10:20 -06:00
Heiko Rothe
29870b301e Added scale and offset to the Temper component (#2853)
🐬
2016-09-04 10:37:10 -06:00
Fabian Affolter
b4c8d10dbc Migrate to voluptuous (#3179)
🐬
2016-09-04 10:32:12 -06:00
Fabian Affolter
cd67368bb7 Migrate to voluptuous (#3182)
🐬
2016-09-04 10:27:19 -06:00
Paulus Schoutsen
e9813b219e Allow reloading automation without restarting HA (#3002) 2016-09-04 17:15:52 +02:00
Ben Bangert
641d531be3 Add Sphinx API doc generation (#3029)
* add's sphinx project to docs/ dir
* include core/helpers autodocs for API reference
2016-09-04 14:36:44 +02:00
Robbie Trencheny
74980d9563 MQTT fan platform (#3095)
* Add fan.mqtt, allow brightness to be passed and mapped to a fan speed for compatibility with emulated_hue

* Pylint/Flake8 fixes

* Remove brightness

* Add more features, like custom oscillation/speed payloads and setting the speed list

* Flake8 fixes

* flake8/pylint fixes

* Use constants

* block fan.mqtt from coverage

* Fix oscillating comment
2016-09-04 03:15:55 -07:00
Robbie Trencheny
0f37d8d8eb Using alert with Hue maintains prior state (#3147)
* When using flash with hue, dont change the on/off state of the light so that it will naturally return to its previous state once flash is complete

* ATTR_FLASH not ATTR_EFFECT
2016-09-04 03:04:12 -07:00
Johann Kellerman
22362727e4 Use voluptuous for Unifi, Ubus (#3125) 2016-09-04 10:06:16 +02:00
Robbie Trencheny
48e6befc13 Update frontend 2016-09-03 22:04:23 -07:00
Robbie Trencheny
4de9717256 Add the occupancy sensor_class (#3176)
Such a complicated PR
2016-09-03 22:52:31 -06:00
Fabian Affolter
b02b008fe5 Migrate to voluptuous (#3144)
🐬
2016-09-03 20:36:21 -06:00
Fabian Affolter
3c615e2319 Use voluptuous for mFi switch (#3168)
* Migrate to voluptuous

* Take change configuration into account
2016-09-03 20:32:35 -06:00
Fabian Affolter
8467d07a3d Migrate to voluptuous (#3171) 2016-09-03 20:24:29 -06:00
Fabian Affolter
6f45906eda Migrate to voluptuous (#3174) 2016-09-03 20:21:59 -06:00
Martin Hjelmare
34ba4d3e09 Exclude www_static from pydocstyle linting (#3175)
🐬
2016-09-03 20:21:19 -06:00
Fabian Affolter
3b1c0a7502 Migrate to voluptuous (#3162)
🐬 and 🍪 for fixing quotes!
2016-09-03 20:20:45 -06:00
Fabian Affolter
6a2f0fc456 Migrate to voluptuous (#3163)
🐬
2016-09-03 20:18:11 -06:00
Fabian Affolter
2aab77a486 Migrate to voluptuous (#3164)
🐬
2016-09-03 20:14:28 -06:00
Fabian Affolter
02960ec482 Migrate to voluptuous (#3166)
🐬
2016-09-03 20:09:02 -06:00
Open Home Automation
db7f6a328f Bugfix: ctach Runtime errors (#3153)
"RuntimeError: Disable scan failed" has been seen in a live installation
2016-09-03 16:47:11 -07:00
Fabian Affolter
290ec9b4ac Use constants (#3156) 2016-09-03 16:45:49 -07:00
Fabian Affolter
0198ba4eac Allow https (fixes #3150) (#3155) 2016-09-03 16:45:31 -07:00
Steven Barnes
09b53a0d55 Adding link_names to post.message call (#3167)
If you do not turn link_names on, Slack will not highlight @channel and @username messages.
2016-09-03 16:44:30 -07:00
Heiko Rothe
269e97c6de Added Xbox Live component (#3013)
* Added Xbox Live component

* Added Xbox Live sensor to coveralls

* Added init success checks

* Added entity id
2016-09-03 16:43:33 -07:00
Dan
68ef55a982 Add exclude option to nmap device tracker (#2983)
* Add exclude option to nmap device tracker

Adds an optional exclude paramater to nmap device tracker.
Devices specified in the exclude list will never be scanned
by nmap. This can help to reduce log spam.

ex:
```
device_tracker:
  - platform: nmap_tracker
    hosts: 10.0.0.1/24
    home_interval: 1
    interval_seconds: 12
    consider_home: 120
    track_new_devices: yes
    exclude:
      - 10.0.0.2
      - 10.0.0.1
```

* Handle optional exclude

* Style fixed
2016-09-03 16:41:38 -07:00
Johann Kellerman
91a3522100 Improve voluptuous and login errors for Asus device tracker (#3170) 2016-09-03 17:32:43 -06:00
Johann Kellerman
fe7f797ad9 Add voluptuous for tomato and SNMP (#3172) 2016-09-03 17:30:48 -06:00
Fabian Affolter
70888532f8 Migrate to voluptuous (#3173) 2016-09-03 17:30:21 -06:00
Robbie Trencheny
32e1e046ae Merge branch 'master' into dev 2016-09-03 16:25:59 -07:00
Robbie Trencheny
64cc4a47ec 0.27.2 (#3151)
* Host should be optional for apcupsd component (#3072)

* Zwave climate Bugfix: if some setpoints have different units, we should fetch the o… (#3078)

* Bugfix: if some setpoints have different units, we should fetch the one that are active.

* Move order of population for first time detection

* Default to config if None unit_of_measurement

* unit fix (#3083)

* humidity slider (#3088)

* If device was off target temp was null. Default to Heating setpoint (#3091)

* Fix for BLE device tracker (#3019)

* Bug fix tracked devices
* Added scan_duration configuration parameter

* fix homematic climate implementation (#3114)

* Allow 'None' MAC to be loaded from known_devices (#3102)

* Climate and cover bugfix (#3097)

* Avoid None comparison for zwave cover.

* Just rely on unit from config for unit_of_measurement

* Explicit return None

* Mqtt (#11)

* Explicit return None

* Missing service and wrong service name defined

* Mqtt state was inverted, and never triggering

* Fixed Homematic cover (#3116)

* Add missing docstrings (fix PEP257 issues) (#3098)

* Add missing docstrings (fix PEP257 issues)

* Finish sentence

* Merge pull request #3130 from turbokongen/zwave_fixes

Bugfix. climate and covermqt

* Back out insteon hub and fan changes (#3062)

* Bump version

* Special frontend build for 0.27.2
2016-09-03 15:59:20 -07:00
Teagan Glenn
601395bc12 Automatic ODB device tracker & device tracker attributes (#3035) 2016-09-03 18:38:17 +02:00
Fabian Affolter
a08ac85971 Display the error instead of the traceback (notify.slack) (#3079)
* Display the error instead of the traceback

* Remove name for check
2016-09-03 17:01:05 +02:00
Fabian Affolter
5dc63c17c8 Migrate to voluptuous (#3092) 2016-09-03 10:56:41 +02:00
Fabian Affolter
795121d5a8 Update ordering (#3149) 2016-09-03 09:35:33 +02:00
Fabian Affolter
6ae4e5cb6c Use constants (#3148) 2016-09-03 00:09:14 +02:00
Robbie Trencheny
b5ae005acc Update frontend 2016-09-02 14:50:10 -07:00
Fabian Affolter
fb9627deda Move details to docs (#3146) 2016-09-02 23:25:35 +02:00
Teagan Glenn
6fdd7f5350 Back out insteon hub and fan changes (#3062) 2016-09-02 12:18:32 -07:00
Robbie Trencheny
a7a662d224 Merge pull request #3130 from turbokongen/zwave_fixes
Bugfix. climate and covermqt
2016-09-02 12:15:27 -07:00
Fabian Affolter
3bbcf4d8b1 Migrate to voluptuous (#3142)
🐬
2016-09-02 11:16:42 -06:00
Fabian Affolter
a0a509ceea Add coinmarketcap sensor (#3064) 2016-09-02 16:59:05 +02:00
Fabian Affolter
40c71b5d96 Use voluptuous for Command line platforms (#2968)
* Migrate to voluptuous

* Fix pylint issues

* Remove FIXME

* Split setup test

* Test with bootstrap

* Remove lon and lat

* Fix pylint issues
2016-09-02 08:09:09 -06:00
Pascal Vizeli
81628b01c2 Use voluptuous for webostv (#3135) 2016-09-02 07:59:38 -06:00
Pascal Vizeli
28e939afcf Use voluptuous for twilio (#3134) 2016-09-02 07:59:08 -06:00
Fabian Affolter
e5ef548f10 Use voluptuous for Acer projector switch (#3077)
🐬
2016-09-02 07:42:38 -06:00
Tomi Tuhkanen
dedc4a129c Updated braviatv's braviarc version to 0.3.4 (#2997)
* Updated braviarc version to 0.3.4

* Updated braviarc version to requirements_all.txt
2016-09-02 15:07:40 +02:00
Fabian Affolter
95cc672161 Add missing docstrings (fix PEP257 issues) (#3098)
* Add missing docstrings (fix PEP257 issues)

* Finish sentence
2016-09-02 14:25:13 +02:00
Fabian Affolter
6a84b82663 Use voluptuous for Octoprint (#3111)
* Migrate to voluptuous

* Fix pylint issues
2016-09-02 12:26:23 +02:00
Pascal Vizeli
000832a82c Use voluptuous for instapush (#3132) 2016-09-02 11:14:18 +02:00
turbokongen
0907eea442 move units to temperature for climate zwave. wrong state was sent to mqtt cove 2016-09-02 10:49:53 +02:00
Robbie Trencheny
b8b1fadc6d Update frontend 2016-09-01 21:59:32 -07:00
happyleavesaoc
24d3cbdfe9 orvibo updates (#3006)
🐬
2016-09-01 22:37:09 -06:00
happyleavesaoc
451f0cb3f1 snapcast update (#3012)
* snapcast update

* snapcast update

* validate config

* use conf constants
2016-09-01 22:36:14 -06:00
Fabian Affolter
b4df9b30d8 Migrate to voluptuous (#3066)
🐬
2016-09-01 22:34:42 -06:00
Fabian Affolter
27ee4c555a Migrate to voluptuous (#3069)
🐬
2016-09-01 22:34:07 -06:00
Daniel Perna
0c310c166a Fixed Homematic cover (#3116) 2016-09-01 22:32:12 -06:00
Fabian Affolter
06df31bb5b Migrate to voluptuous (#3084) 2016-09-01 22:31:49 -06:00
Fabian Affolter
177d8ef4ef Migrate to voluptuous (#3096) 2016-09-01 22:31:32 -06:00
John Arild Berentsen
a50205aedb Climate and cover bugfix (#3097)
* Avoid None comparison for zwave cover.

* Just rely on unit from config for unit_of_measurement

* Explicit return None

* Mqtt (#11)

* Explicit return None

* Missing service and wrong service name defined

* Mqtt state was inverted, and never triggering
2016-09-01 22:31:25 -06:00
Fabian Affolter
9226cef61e Update voluptuous (#3104) 2016-09-01 22:30:49 -06:00
Fabian Affolter
29f2dd2ce9 Migrate to voluptuous (#3106) 2016-09-01 22:30:25 -06:00
Fabian Affolter
ed7a227035 Fix typo (#3108) 2016-09-01 22:30:20 -06:00
Fabian Affolter
d8ad4e1584 Migrate to voluptuous (#3113) 2016-09-01 22:29:35 -06:00
Fabian Affolter
db7abc1cfe Use constants, update configuration check, and ordering (Pilight) (#3118)
* Use contants, update configuration check, and ordering

* Fix pylint issue
2016-09-01 22:28:52 -06:00
Johann Kellerman
a571271c39 Use voluptuous for Aruba (#3119) 2016-09-01 22:28:46 -06:00
Pascal Vizeli
9e38255c26 Use voluptuous for syslog (#3120) 2016-09-01 22:28:33 -06:00
Johann Kellerman
586e47d08d Use Voluptuous for BT Home Hub (#3121) 2016-09-01 22:28:28 -06:00
Johann Kellerman
78f0e681ed Use voluptuous for Fritzbox and DDWRT (#3122) 2016-09-01 22:28:03 -06:00
Pascal Vizeli
afdd734b44 Use voluptuous for twitter (#3126) 2016-09-01 22:27:38 -06:00
Pascal Vizeli
6b6d34ba51 Use voluptuous for xmpp (#3127) 2016-09-01 22:27:28 -06:00
Johann Kellerman
dadcf92290 Allow 'None' MAC to be loaded from known_devices (#3102) 2016-09-02 00:02:35 +02:00
Pascal Vizeli
dcfc1ef361 fix homematic climate implementation (#3114) 2016-09-01 22:20:55 +02:00
Open Home Automation
83f1272662 Fix for BLE device tracker (#3019)
* Bug fix tracked devices
* Added scan_duration configuration parameter
2016-09-01 22:18:58 +02:00
Fabian Affolter
d2dfe04ec9 Update voluptuous for nest (#3109)
* Update configuration check
* Extend platform
2016-09-01 22:08:03 +02:00
Fabian Affolter
24d412938e Use voluptuous for HDMI CEC & CONF_DEVICES constants (#3107) 2016-09-01 22:04:00 +02:00
Fabian Affolter
748d7f4ecb Bitcoin sensor use warning instead of error (#3103) 2016-09-01 21:57:47 +02:00
Daniel Høyer Iversen
1094de7ad9 Merge pull request #3110 from home-assistant/rfxtrx_sensor_cleanup
rfxtrx sensor clean up
2016-09-01 19:42:40 +02:00
Daniel
831d96995d rfxtrx sensor clean up 2016-09-01 19:23:26 +02:00
Paulus Schoutsen
60f540315a Fix broken test 2016-09-01 14:40:13 +01:00
Lewis Juggins
0bcfb65a30 Refactor notification titles to allow for them to be None, this also includes a change in Telegram to only include the title if it's present, and to use a Markdown parse mode for messages (#3100) 2016-09-01 14:35:46 +01:00
Pascal Vizeli
5036bb0bc6 improve isfile validation check (#3101) 2016-09-01 14:35:00 +01:00
Paulus Schoutsen
87e332c777 Merge pull request #2980 from home-assistant/automation-entities
Create entities for automation
2016-09-01 09:50:39 +01:00
Fabian Affolter
88e600827e Upgrade pyowm to 2.4.0 (#3067) 2016-09-01 09:38:50 +01:00
Fabian Affolter
e045a6f0c3 Upgrade pyuserinput to 0.1.11 (#3068) 2016-09-01 09:37:58 +01:00
Paulus Schoutsen
c792dd4126 Fix linting 2016-09-01 09:12:42 +01:00
John Arild Berentsen
571cbdf40c If device was off target temp was null. Default to Heating setpoint (#3091) 2016-09-01 09:31:52 +02:00
John Arild Berentsen
4b12ea04d6 humidity slider (#3088) 2016-09-01 07:13:33 +02:00
John Arild Berentsen
5f664acb4f unit fix (#3083) 2016-08-31 22:30:44 +02:00
John Arild Berentsen
e5b6592870 Zwave climate Bugfix: if some setpoints have different units, we should fetch the o… (#3078)
* Bugfix: if some setpoints have different units, we should fetch the one that are active.

* Move order of population for first time detection

* Default to config if None unit_of_measurement
2016-08-31 21:50:03 +02:00
Pascal Vizeli
705b3571f4 Use voluptuous for file (#3049) 2016-08-31 18:12:34 +02:00
Daniel Høyer Iversen
dfee443312 Host should be optional for apcupsd component (#3072) 2016-08-31 18:09:22 +02:00
Greg Dowling
0943cc78cd Merge pull request #2973 from nma83/owntracks-waypoint-import
Owntracks waypoint import
2016-08-31 15:25:49 +01:00
Daniel Høyer Iversen
8816b62d9c Merge pull request #3063 from tchellomello/flux_led_supportability
Added bitfield of features for flux_led since we are supporting effects
2016-08-31 10:25:29 +02:00
Marcelo Moreira de Mello
eadd07dc7d Added bitfield of features for flux_led since we are supporting effects 2016-08-31 03:52:19 -04:00
NMA
12e2c38436 Code review feedback from @pavoni 2016-08-31 08:16:01 +05:30
Robbie Trencheny
4864a67dcd Back to 0.28.0.dev0 2016-08-30 14:23:00 -07:00
Robbie Trencheny
dfc38b76a4 Merge pull request #3060 from home-assistant/dev
0.27.1
2016-08-30 14:22:01 -07:00
Robbie Trencheny
e9354bb1e8 Make pep8 happy 2016-08-30 13:58:53 -07:00
Robbie Trencheny
d907902af8 0.27.1 NOT 0.28.1, thanks for the catch @arsaboo 2016-08-30 13:44:35 -07:00
Robbie Trencheny
9a4447ca13 0.28.1 2016-08-30 13:37:47 -07:00
Fabian Affolter
eec96ea137 Migrate to voluptuous (#2954) 2016-08-30 21:34:33 +02:00
John Arild Berentsen
7ceb22a08b Ecobee (#3055)
* Added in list for opreation

* Added attribute to reflect the old operation

* fix humidity
2016-08-30 21:04:53 +02:00
Pascal Vizeli
cf9b49ac03 update ha-ffmpeg version to 0.9 (#3059) 2016-08-30 20:58:37 +02:00
Johann Kellerman
55d305359e Device tracker component & platform validation. No more home_range. (#2908)
* Device tracker component & platform validation. No more home_range.

* Mock, bluetooth

* Renamed _CONFIG_SCHEMA. Raise warning for #1606

* test duplicates

* Fix assert

* Coverage

* Typing

* T fixes
2016-08-30 10:22:52 -06:00
Daniel Høyer Iversen
16e0187fcc Merge pull request #3051 from tchellomello/added_random_effect_flux_led
Added option to use effect:random for Flux Led light bulbs
2016-08-30 09:52:50 +02:00
Marcelo Moreira de Mello
650ec1a337 Added option to use effect:random for Flux Led light bulbs 2016-08-29 19:55:01 -04:00
Pascal Vizeli
4e044361c3 Use voluptuous for smtp (#3048)
Make note of the breaking change in release notes
2016-08-29 16:56:40 -06:00
Fabian Affolter
c1794d111e Upgrade sendgrid to 3.2.10 (#3044) 2016-08-29 14:16:18 -06:00
Fabian Affolter
008e3000bb Upgrade TwitterAPI to 2.4.2 (#3043) 2016-08-29 14:16:10 -06:00
Greg Dowling
1b718c62a3 Fix bug in wemo discovery caused by voluptuous addition. (#3027) 2016-08-29 07:45:48 -06:00
Daniel Høyer Iversen
6275cffab4 Merge pull request #3036 from home-assistant/bug_fix_asuwrt
Bug fix for asuswrt device_tracker. Issue #3015
2016-08-29 08:36:42 +02:00
Daniel
62bbda1f82 Bug fix for asuswrt device_tracker. Issue #3015 2016-08-29 08:23:20 +02:00
arsaboo
39402aff2e Remove units for humidity in Wundeground sensor (#3018)
* Remove units for humidity

Wunderground returns the information with the units.

* Trim the % from the return value of humidity
2016-08-28 21:05:28 -06:00
Martin Hjelmare
1699885907 Fix media_player descriptions and select_source (#3030)
🐬
2016-08-28 20:00:43 -06:00
Teagan Glenn
b6ad0bfbea Allow user to configure server id to perform speed test against (#3008)
* Allow user to configure server id to perform speed test against

* Don't overwrite list

* Type-o

* Convert to string

* Append lists

* str(None) => 'None' did not realize that.
2016-08-28 19:09:34 -06:00
Daniel Høyer Iversen
821b3d7fac Bug fix for asuswrt device_tracker. Issue #3015 (#3016)
🐬
2016-08-28 17:34:01 -06:00
John Arild Berentsen
2d8bc754c8 Ecobee (#3025)
* fix ecobee mode

* Fixup
2016-08-28 22:51:56 +02:00
John Arild Berentsen
2a5ca1c873 Map Modes to setpoint indexes (#3023)
* Map Modes to setpoint indexes

* Fixes devices with no thermostat mode

* another try to fix devices without mode

* another try to fix devices without mode 2

* another try to fix devices without mode 3

* fix setting setpoint for devices with no mode

* fix setting setpoint for devices with no mode
2016-08-28 22:41:48 +02:00
Pascal Vizeli
3313995c4c fix voluptuous and cover autodiscovery (#3022) 2016-08-28 20:00:44 +02:00
John Arild Berentsen
17a57d3b47 Fixes wrong statevalue and problem with zwave setpoint (#3017)
* Fixes wrong statevalue and problem with zwave setpoint

* Fix demo test to match bugfix (#10)
2016-08-28 17:58:50 +02:00
NMA
70fe7f747a * Improved zone naming in waypoint import
* Added more test coverage for owntracks and zone
2016-08-28 13:18:30 +05:30
Robbie Trencheny
7940648725 0.28.0.dev0 2016-08-27 21:07:55 -07:00
Robbie Trencheny
7b2f0e709b Merge pull request #2952 from home-assistant/dev
0.27
2016-08-27 20:27:52 -07:00
Robbie Trencheny
78675ed3f8 Version bump to 0.27.0 2016-08-27 20:07:20 -07:00
Robbie Trencheny
43555b646c update frontend 2016-08-27 20:05:44 -07:00
Teagan Glenn
fdb6de4d23 Fan demo (#2976)
* Update attr to property and default state method

* State prop is defined in parent class

* Demo platform fan

* PyDoc

* Copy-pasta artifact

* PyDoc

* Linting

* Raise error if turn_off and turn_on not implemented

* Update demo platform

* Initial unit test commit

* Readability

* Unneeded typing

* Should inherit from fan entity

* Turn off polling

* Initial oscillating flag

* Pass HASS into demo

* Typing

* Invoke set_speed instead of setting directly

* Service update

* Update demo tests

* Forgot to block after service call.

* linting

* Test to make sure not implemented is thrown

* Is On Method test

* Update const to match string

* Update services yaml

* Toggle method

* Toggle service

* Typing

* TYPE O

* Attribute check

* Type-o

* Type-o

* Put typing back

* ToggleEntity

* Linting

* Linting

* Oops

* Stale prints

* Demo support
2016-08-27 14:53:12 -06:00
Fabian Affolter
a4b90c9879 Use voluptuous for Raspberry Pi and local file camera (#2988)
* Migrate to voluptuous

* Update const.py

* Migrate to voluptuous

* Remove duplicate _LOGGER entry
2016-08-27 14:44:22 -06:00
Fabian Affolter
2accc15d41 Migrate to voluptuous (#2991)
🐬
2016-08-27 14:43:33 -06:00
Fabian Affolter
e6b9d5f5b3 Migrate to voluptuous (#2989)
🍪 🐬
2016-08-27 14:42:34 -06:00
Martin Hjelmare
6acaf25b0d Use voluptuous for mysensors (#2992)
* Add voluptuous config validation for mysensors
* Remove and clean up parts that are not needed for pymysensors 0.7.
2016-08-27 14:41:21 -06:00
Johann Kellerman
6f1c97b9d3 Voluptuous for AsusWRT (#2998)
* Voluptuous for AsusWRT
2016-08-27 22:30:06 +02:00
John Arild Berentsen
f863efdaca Use COMMAND_CLASS_THERMOSTAT_SETPOINT to get unit_of_measurement instad of COMMAND_CLASS_SENSOR_MULTILEVEL. Not all devices have multilevel sensor. (#3003) 2016-08-27 13:39:22 +02:00
Robbie Trencheny
04f0fec352 Merge pull request #2970 from persandstrom/modbus_write
modbus write register service
2016-08-27 03:07:34 -07:00
Per Sandström
2c26514c95 modbus sensor value scaling (#2972) 2016-08-27 02:49:49 -07:00
Matthew Bowen
c05d27d214 Completely local control of entities via Alexa (#2942)
* Initial code for alexa_local_control.

* Added support for creating a dummy username.

* Move SSDP responses to local variables.

* Added config validation via Voluptuous.

* Modify and remove unnecessary returned emulated bridge values.

* Remove script and scene domains from default exposed domains.

* Replaced Flask with HomeAssistantWSGI.

* Fix lint errors.

* Correcting grammar and spelling in docs and comments.

* Rename alexa_local_control to emulated_hue.

* Rename emulated_hue attributes.

* Fix a bug where something marked not exposed is exposed by default.

* Make sure the UPNP responder thread cleanly stops when HASS stops.

Also fix some config loading and lint errors.

* Fixed unexposed entities still having individual state exposed.

* Started writing tests for emulated_hue.

* Fix being able to set state of non-exposed entity.

* Another test for emulated_hue.

* More tests for emulated_hue.

Also slightly simplified emulated_hue's PUT handler.

* Fix bad test, sorry :/

* Third time's the charm.

* Fix lint and value validation tests.

* Rename emulated_hue bridge name.

* Remove license and documentation from header.

* Combine two if statements.

* Style changes.

* Fixed various issues and added some constants
2016-08-27 01:23:40 -07:00
Paulus Schoutsen
7f27cc5468 Fix tests docstring 2016-08-27 07:45:46 +01:00
Paulus Schoutsen
586208b3ed Fix JSON encoder issue in recorder 2016-08-27 07:43:42 +01:00
icovada
a4b8c3cab0 Update telegram.py add send_document (#2937)
🐬
2016-08-26 18:52:44 -06:00
Johann Kellerman
4aad83d60b Voluptuous for pushover (#3000) 2016-08-26 17:43:59 -07:00
Johann Kellerman
37048919bf Check config requirement fix (#2999)
* Check config requirement fix
2016-08-27 01:33:57 +02:00
Fabian Affolter
5cc672ea59 Migrate to voluptuous (#2990)
🐬
2016-08-26 14:50:32 -06:00
Per Sandström
ead0559661 Merge pull request #2995 from persandstrom/vsure_10.2
bump vsure version
2016-08-26 21:53:31 +02:00
Per Sandström
4ee37cb8c8 bump vsure version 2016-08-26 21:38:49 +02:00
NMA
2430acf3ad Added unit test to enhance waypoint_whitelist coverage 2016-08-26 22:00:48 +05:30
NMA
5a25c74276 Refactored zone creation based on code review feedback, enhanced configuration 2016-08-26 19:52:08 +05:30
Pascal Vizeli
9ab2ac766e add motion sensor / rewrite ffmpeg binary sensor (#2969)
🐬 

* use const flags
2016-08-26 06:48:17 -06:00
Pascal Vizeli
d2bb61ad9e Change variable to poll for ccu/homegear (#2987) 2016-08-26 12:17:50 +02:00
Pascal Vizeli
95b98f6752 Full homematic system variable support (#2986) 2016-08-26 10:25:56 +02:00
Paulus Schoutsen
3fa1963345 Convert automation to entities with services 2016-08-25 23:36:48 -07:00
Paulus Schoutsen
d9ecc4af64 EventBus: return function to unlisten 2016-08-25 23:25:35 -07:00
Paulus Schoutsen
62ba0fa7a2 Do not install pip packages in tests 2016-08-25 23:23:14 -07:00
Martin Hjelmare
877dc9c7b5 Merge pull request #2960 from MartinHjelmare/mysensors-mqtt
Add MQTT gateway for MySensors
2016-08-26 08:10:57 +02:00
Roi Dayan
d611010a6e Fix reading dht config values (#2956)
🐬
2016-08-25 20:09:48 -06:00
Pascal Vizeli
2eadae2039 add homematic hub device with variable support / update pyhomematic with new device / add cover support (#2981) 2016-08-25 21:55:03 +02:00
Daniel Høyer Iversen
354f4b4740 Upgrade rfxtrx lib (#2974) 2016-08-25 10:52:48 -07:00
MartinHjelmare
d1e94b958f Extract mqtt string into constant and add log 2016-08-25 19:07:22 +02:00
NMA
ed872f6054 Fixed E302 2016-08-25 22:29:16 +05:30
Landrash
34f57ebdc9 Fix reference to wrong components in tests for cameras (#1) (#2975)
🐬 👍
2016-08-25 10:55:37 -06:00
NMA
47a9313fdb Fixed variable scope issues for entities 2016-08-25 22:15:31 +05:30
NMA
ca73295dd1 Fixed style issues 2016-08-25 21:35:04 +05:30
NMA
2ca3541eac Fixed zone test break and code style issues 2016-08-25 21:33:07 +05:30
Teagan Glenn
826ec9b9d7 Add a Fan component and support for an Insteon Hub Fan (#2964)
* Fan component and service definitions
* Insteon Hub fan support
2016-08-25 14:47:07 +02:00
NMA
95b7a8c4b9 Removed redundant assignment to CONF_WAYPOINT_IMPORT_USER 2016-08-25 17:07:53 +05:30
NMA
185ae50e24 Rebased to upstream 2016-08-25 17:02:45 +05:30
NMA
e6b7511e7d Added test for Owntracks waypoints import 2016-08-25 16:52:22 +05:30
NMA
1ada7d6211 Backend support for importing waypoints from owntracks as HA zones 2016-08-25 16:52:22 +05:30
NMA
2bea5a484f Added test for Owntracks waypoints import 2016-08-25 16:47:34 +05:30
Per SandstrÃom
be1981ca5d modbus write register service 2016-08-25 08:20:08 +00:00
Johann Kellerman
17631cd728 Check config script: various fixes (#2967)
🐬
2016-08-24 23:18:32 -06:00
Fabian Affolter
b199c61c88 Migrate to voluptuous (#2955)
🐬
2016-08-24 22:36:41 -06:00
Fabian Affolter
9219d65c3e Migrate to voluptuous (#2958) 2016-08-24 22:35:09 -06:00
John Arild Berentsen
d9322b81f3 Bugfixing DemoCover NotImplemented Was not raised for is_closed (#2965)
* NotImplemented was not raised when is_closed was missing

* Bugfixing Demo
2016-08-24 20:36:43 +02:00
Open Home Automation
cc358a5dde Corrected sensor name from HM-Z19 to MH-Z19 (#2963)
Approved
2016-08-24 10:54:34 -06:00
John Arild Berentsen
5d2d9af8e3 Add deprecated warning to thermostat and hvac (#2962)
* Add deprecated warning for thermostat and hvac
2016-08-24 16:30:14 +02:00
Daniel Høyer Iversen
daa066c036 Merge pull request #2959 from home-assistant/rfxtrx
minor bug in rfxtrx sensor
2016-08-24 14:25:07 +02:00
John Arild Berentsen
e5abf6074c Cover (#2957)
* current_position was set, it should be optional

* Update mqtt test to match
2016-08-24 11:53:02 +02:00
Daniel
99796e559e minor bug in rfxtrx sensor 2016-08-24 11:33:57 +02:00
MartinHjelmare
e7b206da0c Add MQTT gateway for MySensors
* Use mqtt component to enable a MySensors MQTT gateway.
* Setup the MQTT gateway if mysensors config has mqtt as a value for
	the key	device in the list of gateways.
* Simplify two lines in the mqtt component.
2016-08-24 10:48:55 +02:00
Greg Dowling
4795122463 Add voluptuous to binary template sensor (#2938)
* Add voluptuous to binary template sensor / update failing test.

* Update tests.

* Quick fixes to remove duplicate variables
2016-08-24 01:16:26 -07:00
Nolan Gilley
61ef2683c5 Add volume and seek control to gpmdp (#2953) 2016-08-23 23:32:00 -07:00
Carter
52acb2e6f0 adding pull mode and relay time for you garage door (#2896)
* adding pull mode and relay time

* fixing failing tests

* removed unused vars, removed trailing whitespace

* removed white space

* split line in 2

* removed whitespace and fixed indent

* undid line break

* Update rpi_gpio.py

new line so its not too long

* back to no new line

* Moved long method to a new line

* Moved comment

* moved comment to above method

* adding required blank line

* fixed variables and made them optional

misunderstood the logic at first.

* removed line for lint and removed vars that were not required

* added second blank line for class

* added new configs to platform_schema - still have same error on load

* changing string to int

* added code to covers rpi as well
2016-08-23 23:28:49 -07:00
Robby Grossman
78b2c87b54 Implement support for NEST structures. (#2736)
* Implement support for NEST structures.

* Conform to balloobbot style preferences.

* Log to debug level rather than info level.

* Use config validation to coerce list format if supplied as string.

* Use list comprehension for more succinct code.

* Conform to project linting standards.
2016-08-23 22:47:53 -07:00
Robbie Trencheny
5d4dc713f2 Append the travel mode to the sensor name for Google Travel Time 2016-08-23 21:01:31 -07:00
Paulus Schoutsen
21fb18e5aa pep257 fixes 2016-08-23 20:25:52 -07:00
Paulus Schoutsen
c4b53039c1 Merge remote-tracking branch 'origin/master' into dev 2016-08-23 19:39:03 -07:00
Paulus Schoutsen
63e3d20260 update frontend 2016-08-23 19:36:45 -07:00
Nolan Gilley
0c91ba4a50 improve gpmdp (#2951) 2016-08-23 19:09:43 -07:00
Pascal Vizeli
c5fd665151 add ffmpeg noise detection sensor (#2950) 2016-08-23 19:08:20 -07:00
Fabian Affolter
98364248d4 Use voluptuous for graphite (#2929)
* Migrate to voluptuous

* Update tests

* Fix tests and check if Graphite instance is reachable
2016-08-23 19:01:46 -07:00
Fabian Affolter
6f27d58188 Use voluptuous for Splunk (#2931)
* Migrate to voluptuous

* Update tests
2016-08-23 18:58:59 -07:00
John Arild Berentsen
cf832499cd Combine garage_door and rollershutter to cover (#2891)
* First draft for cover component

* Efficiency from @martinhjelmare

* migrate demo

* migrate demo test

* migrate command_line rollershutter

* migrate command_line test

* migrate rpi_gpio garage_door

* make some abstract methods optional

* migrate homematic

* migrate scsgate

* migrate rfxtrx and test

* migrate zwave

* migrate wink

* migrate mqtt rollershutter and test

* requirements

* coverage

* Update mqtt with garage door

* Naming and cleanup

* update test_demo.py

* update demo and core

* Add deprecated warning to rollershutter and garage_door

* Naming again

* Update

* String constants

* Make sure set_position works properly in demo too

* Make sure position is not set if not available.

* Naming, and is_closed

* Update zwave.py

* requirements

* Update test_rfxtrx.py

* fix mqtt

* requirements

* fix wink version

* Fixed demo test

* naming
2016-08-23 18:23:18 -07:00
Fabian Affolter
a43ea81d8e Migrate to voluptuous (#2927) 2016-08-23 17:27:54 -07:00
Paulus Schoutsen
2b4f0cb5a1 Fix broken template sensor tests 2016-08-23 00:14:45 -07:00
Paulus Schoutsen
88573667fa Update frontend 2016-08-23 00:06:58 -07:00
Greg Dowling
dfd76fc0e6 Minor tidy of voluptuous. (#2945) 2016-08-22 23:57:07 -07:00
Greg Dowling
5abb46a809 Tidy voluptuous. (#2946) 2016-08-22 23:56:39 -07:00
Robbie Trencheny
82de1cd6fe change const.py to use single quotes 2016-08-22 23:15:22 -07:00
Paulus Schoutsen
c9d5d1a417 Remove debug print 2016-08-22 21:44:58 -07:00
Johann Kellerman
14b034f452 Check config script (#2657)
* Add check_config, yaml linting script

* WIP: Start reusing some bootstrap methods for validation

* Start outputs

* Secrets, files and failed config

* requirements_all

* Fixes

* formatting

* Fix unit test after formatting
2016-08-22 21:42:05 -07:00
William Scanlon
f00cdc50df Updated python-wink version to fix color/temp detection (#2935) 2016-08-22 21:31:17 -07:00
Johann Kellerman
0def842231 Quick lint script for changed files (#2941) 2016-08-22 20:52:31 -07:00
Greg Dowling
dfca2476bd Add voluptuous to efergy. (#2943) 2016-08-22 20:51:17 -07:00
Greg Dowling
9fcfc213c7 Bump pywemo. (#2944) 2016-08-22 20:50:05 -07:00
Greg Dowling
eac67fd971 Add voluptuous to template switch (#2940)
* Add voluptuous to template switch / revise tests.
2016-08-23 00:05:45 +02:00
Fabian Affolter
e5969f0733 Clean-up (#2933) 2016-08-22 14:20:04 +02:00
Fabian Affolter
fb639e08d7 Fix schemas and update ordering (#2932) 2016-08-22 14:19:19 +02:00
Fabian Affolter
b6da4a53d5 Use voluptuous for dweet and arduino (#2926)
* Migrate to voluptuous

* Migrate to voluptuous

* One import is enough
2016-08-22 11:28:58 +02:00
Greg Dowling
32318c6f19 Add voluptuous validation to template sensor. (#2886) 2016-08-22 01:11:16 -07:00
Fabian Affolter
5d816b5eb5 Use voluptuous for OhmConnect (#2906)
* Migrate to voluptuous

* Remove string
2016-08-22 08:20:31 +02:00
Paulus Schoutsen
0d7d125344 Update frontend 2016-08-21 16:58:42 -07:00
Paulus Schoutsen
7598de90cb Allow unregistering a push subscription (#2921)
* Allow unregistering a push subscription

* Update frontend

* ps - HTML5 tests DRY 🍾
2016-08-21 16:01:24 -07:00
Teagan Glenn
d2f7b3c7db Merge pull request #2922 from dpford/tplink-5g
Add tplink Archer C7 device tracking support for 5Ghz networks
2016-08-21 16:49:19 -06:00
Jesse Newland
520d4d5dc0 Add zwave.rename_node service (#2923)
* Add zwave.rename_node service

* Validate service data

* Better schema
2016-08-21 14:36:44 -07:00
Dan Ford
2b4980ae5d Add tplink Archer C7 device tracking support for 5Ghz networks 2016-08-21 13:09:44 -07:00
Josh Nichols
d70d1e1303 Add support for notifying with Slack attachments. (#2914)
* Add support for notifying with Slack messages.

When creating notifications, this allows you to pass in `attachments`
with the `data`. It's an array of attachments as defined in
https://api.slack.com/docs/message-attachments

When passing in attachments, message is still required, but it's okay to
be a blank string.

* Split over multiple lines

* Make sure attachments gets assigned, even if there isn't attachment data
2016-08-21 11:54:28 -07:00
Paulus Schoutsen
f802d6bfa3 Update test packages (#2918) 2016-08-21 11:44:40 -07:00
Nolan Gilley
635e5c8eba Add voluptuous to ecobee, speedtest.net, fast.com, actiontec, forecast.io (#2872)
* add voluptuous

* fixes for comments

* str to cv.string
2016-08-21 10:29:13 -07:00
Martin Hjelmare
fa3d83118a Merge pull request #2917 from hensing/update_mysensors
Update pymysensors version to 0.7.1
2016-08-21 13:16:49 +02:00
Henning Dickten
a12dadab5e Update pymysensors version to 0.7.1 2016-08-21 12:47:40 +02:00
Paulus Schoutsen
23e86fc8ea Update frontend 2016-08-20 23:44:31 -07:00
Paulus Schoutsen
aa6a0523ef Add template support to generic camera + local file tests (#2881)
* Add template support to generic camera

* Add tests for local file
2016-08-20 23:04:55 -07:00
Teagan Glenn
9cfad34866 Merge pull request #2916 from Teagan42/YamlSecret-LoadBeforeBreak
Approved by @balloob via gitter
2016-08-20 22:20:11 -06:00
Teagan M. Glenn
af22aeeba8 Apparently, doesn't load the root config secret 2016-08-20 22:07:21 -06:00
Heiko Rothe
6aa0789e38 MQTT room presence detection (#2913)
* Added room presence tracker

* Fixed room/device discovery bugs

* Added tests for room tracker

* Fixed some formatting mistakes

* Fixed a tiny bug with the track new option

* Converted device tracker into sensor

* Removed leftover service entry

* Changed name to mqtt_room

* Changed payload validation to voluptuous

* Fixed validation

* Removed sleep from tests
2016-08-20 20:49:38 -07:00
Open Home Automation
46dcfb3d70 Serial CO2 sensor support (#2885)
* Added support for serial HM-Z19 CO2 sensor

* Minor pylint bug fixes

* Added new files to .coveragerc

* Removed newline

* Changes in requirements after change of pmsensor library

* Change the implementation of default name

* Check if serial interface is working before adding the sensor

* Maximum sensor value is 5000ppm
2016-08-20 16:35:10 -07:00
Fabian Affolter
5f508b6afa Use voluptuous for REST platforms (#2887)
* Initial step to migrate to voluptuous

* Migrate to voluptuous

* Add schema for sensor_classes
2016-08-20 16:28:45 -07:00
Roi Dayan
b62c3ac56c Update dht sensor dependency Adafruit_DHT to v1.3.0 (#2900)
The repository already merged the pull request adding python3 support.
root is no longer required to use the gpio.

Signed-off-by: Roi Dayan <roi.dayan@gmail.com>
2016-08-20 15:41:58 -07:00
Fabian Affolter
18fd17fdf3 Migrate to voluptuous (#2901) 2016-08-20 15:41:14 -07:00
Fabian Affolter
e8c6e4d561 Clean-up, ordering, constants, and extend of schema (#2903)
* Clean-up, ordering, constants, and extend of schema

* Put REQUIREMENTS back and re-add line breaks

* Clean-up, ordering, constants, and extend of schema

* Extend platform
2016-08-20 15:40:16 -07:00
Fabian Affolter
8fc27cbe43 Migrate to voluptuous (#2905) 2016-08-20 15:28:26 -07:00
Fabian Affolter
502c65ca32 Migrate to voluptuous (#2907) 2016-08-20 15:25:11 -07:00
Paulus Schoutsen
3fae4fefbf Bust cache for new media player covers (#2882) 2016-08-20 15:14:57 -07:00
Daniel Perna
2558501235 Added LlamaLab Automate notify platform (#2863)
* Addod LlamaLab Automate notify platform

* Added platform to .coveragerc

* Added device-option and switched to voluptuous

* Fixed voluptuous usage
2016-08-20 15:11:37 -07:00
Martin Hjelmare
b7eee6fbb3 Merge pull request #2910 from hensing/update_mysensors
Update pymysensors version to 0.7
2016-08-20 23:32:17 +02:00
Henning Dickten
7d0c50a106 Update pymysensors version to 0.7 2016-08-20 22:45:55 +02:00
Teagan Glenn
8d1a9d86ea Yaml secret fallback to parent folders (#2878)
* Move secret cache out of loader so it can be referenced by other folders
* Unit test to verify secrets from another folder work & see if it overrides parent secret
* Clear secret cache after load
2016-08-20 21:39:56 +02:00
Per Sandström
ca75e66c1a Merge pull request #2902 from persandstrom/vsure_10.1
vsure 10.1
2016-08-20 17:23:07 +02:00
Per Sandström
b5cc145a92 bump vsure version 2016-08-20 17:08:42 +02:00
Greg Dowling
a46230b830 Merge pull request #2892 from home-assistant/vera_voluptuous
Add voluptuous to Vera.
2016-08-20 16:05:51 +01:00
pavoni
c0cd2d749f Tidy. 2016-08-20 15:43:07 +01:00
Greg Dowling
2df85242f9 Merge pull request #2890 from home-assistant/loop_energy_voluptuous
Add voluptuous to Loopenergy
2016-08-20 15:34:53 +01:00
Josh Nichols
8eb66ac2b8 Ensure Slack messages appear as correct user (#2893)
Current documentation suggests to use personal API tokens. This isn't
ideal because for a few reasons:

* messages will come as your own user, so it's hard to tell it's coming
  from hass
* it's harder to manage if multiple people are using Slack and home
* assistant, since you'd have to coordinate rolling of it

It is possible to use Slack bot users already. Just make a new one from https://your-team.slack.com/apps/build/custom-integration, and use the token for that. You can even add an icon from the web frontend for home assistant.

However, the message will appear as a bot without a name or icon. This pull requests fixes this by passing the as_user parameter, which uses the bot user's name and icon.

One caveat is you need to invite the bot user into the room you want to
post to. This probably was an issue before though.

🎩 to @jnewland who pointed me to this in his branch
2016-08-20 14:36:28 +02:00
Greg Dowling
482f32bb87 Add voluptuous to wemo. (#2895) 2016-08-20 14:03:57 +02:00
John Arild Berentsen
6e672b7bee More generic use of up and down commands plus a workaround for SOMFY controller. (#2852)
* Support older devices

* Update with workaround

* Inverted up and down

* Make dual arguments
2016-08-20 13:59:23 +02:00
Pascal Vizeli
a50463d2f1 Improve homematic climate support (#2894) 2016-08-20 00:20:41 +02:00
pavoni
712f1498ae Add voluptuous to Vera. 2016-08-19 22:43:40 +01:00
pavoni
d1a31b3e0c Change CONFIG to CONF for consistency. 2016-08-19 21:47:07 +01:00
pavoni
337b2e3f77 Add voluptuous
.# Please enter the commit message for your changes. Lines starting
2016-08-19 20:07:09 +01:00
Fabian Affolter
4f1712c933 Use voluptuous for system monitoring sensors (#2813)
* Use voluptuous for system monitoring sensors

* Extent platform, ordering, and consts

* Add resource/resources
2016-08-19 14:57:14 +02:00
Open Home Automation
def9bbf827 Upgrade pmsensor to 0.3 (#2883) 2016-08-19 14:56:10 +02:00
Fabian Affolter
ca1de9cac1 Add url to validation (#2874)
* Add url to validation

* Fix pylint issue

* Clean-up
2016-08-19 13:41:01 +02:00
Fabian Affolter
c74e167a7b Use voluptuous for dweet, transmission, and twitch sensor (#2802)
* Use voluptuous for dweet, transmission, and twitch sensor

* Extent platform, ordering, and consts

* Clean-up
2016-08-19 00:18:45 -07:00
John Arild Berentsen
ada4de3ffb Migrate Thermostat and HVAC component to climate component (#2825)
* First draft for climate

* Updates for thermostats
2016-08-19 00:17:28 -07:00
Fabian Affolter
0abc50e844 Use voluptuous for transport sensors (#2867) 2016-08-19 00:12:56 -07:00
Nolan Gilley
2a563e1604 binary occupancy sensor (#2869) 2016-08-19 00:11:56 -07:00
Paulus Schoutsen
a031d64a44 Merge pull request #2880 from home-assistant/hotfix-026-3
Hotfix 026 3
2016-08-18 22:48:02 -07:00
Paulus Schoutsen
a548eb6c7f Version bump to 0.26.3 2016-08-18 22:46:34 -07:00
Paulus Schoutsen
2b10a1ac20 Fix media player art (#2879) 2016-08-18 22:46:17 -07:00
Paulus Schoutsen
bafc9413a3 Fix media player art (#2879) 2016-08-18 22:45:42 -07:00
Nolan Gilley
9bfac590f6 fix 2862 (#2868) 2016-08-18 16:21:01 -07:00
Teagan Glenn
85d632c272 Merge pull request #2870 from Teagan42/AddFixToWunderground
Fix PyDoc and other issues with Wunderground - approved by robbie
2016-08-18 17:20:15 -06:00
Teagan Glenn
297fca9351 Type-o 2016-08-18 16:39:16 -06:00
Teagan Glenn
cb3a37691f Type-o 2016-08-18 16:28:19 -06:00
Pascal Vizeli
df4a9ea1da add move_postion support for HA rollershutter / CONFIG_SCHEMA (#2873) 2016-08-18 23:14:14 +02:00
Teagan M. Glenn
5bdcf60a21 Extend platform schema 2016-08-18 10:47:52 -06:00
Teagan M. Glenn
90449a90f1 Use string templating 2016-08-18 10:46:24 -06:00
Teagan M. Glenn
25840f97c2 Consistent use of WUnderground 2016-08-18 10:46:04 -06:00
Teagan M. Glenn
c2b75140bf Fix config validation import to make things more readable 2016-08-18 10:40:28 -06:00
Teagan M. Glenn
ec5e20f0d9 Use string constant 2016-08-18 10:38:34 -06:00
Teagan M. Glenn
db2d9ec854 Unused property 2016-08-18 10:37:39 -06:00
Teagan M. Glenn
ddec28da4b Use schema validators already avaialble 2016-08-18 10:37:26 -06:00
Teagan M. Glenn
6f57d36134 Add doc link to header of file 2016-08-18 10:37:00 -06:00
Teagan M. Glenn
0490fe832a Unneeded validation removed 2016-08-18 10:32:19 -06:00
Teagan M. Glenn
2b8e2a3d36 Remove print lines 2016-08-18 10:27:53 -06:00
Teagan M. Glenn
41f84d9e20 Pydoc for unit test methods 2016-08-18 10:27:38 -06:00
Teagan Glenn
c1653d2fca Merge pull request #2861 from arsaboo/patch-2
Wunderground weather sensor
2016-08-18 09:40:00 -06:00
arsaboo
230dde4b57 Removed blank line (linting error) 2016-08-18 10:12:56 -04:00
arsaboo
90fdc89838 Updated to address @balloob's comments 2016-08-18 09:59:41 -04:00
Nolan Gilley
09d531b3b9 fix gpmdp (#2864)
* fix gpmdp

* fix balloobs comments

* move create_connection
2016-08-18 00:08:58 -07:00
Emil Horpen Hetty
053a55bc5f Added name support for Forecast.io (#2638)
* Added support for name

Added name support and changed default name to "Forecast.io" since "Weather" had conflict with Yahoo weather and Open weather map

* Update forecast.py
2016-08-17 23:54:08 -07:00
Open Home Automation
ccd8f51253 Ble tracker (#2810)
* Added Bluetooth Low Energy device tracker

* Added new file(s)

* Fixed pylint errors

* Remove traling zeros from device names

* recreated deleted file

* Added requirements

* Renamed to bluetooth_le tracker
Removed gattlib from tests
Minor code cleanup

* - fixed .coveragerc bug
- changed discovery algorithm, new devices will only be added if seen 5 times to make sure
  HA doesn't blow the database with devices just passing by
2016-08-17 23:41:05 -07:00
Roi Dayan
98f236c754 Add webos customize option to add custom sources (#2561)
Currently there are only hw inputs in the sources list.
Other interesting inputs can be live tv (dvbt) and vod apps.

* add customize option for webos
* add short names for livetv, youtube, mako apps
* add current app as a source
* use large icon (largeIcon is the same as icon if doesn't exists)
* filter out hw inputs that are not connected

Signed-off-by: Roi Dayan <roi.dayan@gmail.com>
2016-08-17 23:39:37 -07:00
Robbie Trencheny
a5f144cb7c HTML5 notify actions (#2855)
* Add action and callback support to html5 (#2855).

Remove registrations from the callback view since we always get the latest anyway.

We dont put an audience in the claims so we will never hit this error.

Bring tests back up to where they were before callbacks.

Only import jwt where necessary

Fix bracket spacing errors

Fix JWT decode check for loop

Remove stale comment.

Add tests for the callback system.

Shorten line

Disable pylint broad-except and change e to jwt_decode_error.

Verify expiration

Remove duplicate jwt.exceptions.DecodeError

Catch no keys matched and return False

* Switch to using registrations for callbackview instead of json_path

* Only check for URL and such if the data object actually exists

* raise instead of return

* cleanup decode_jwt

* Clean up JWT errors

* Correctly set status_code to 401

* Improve JWT by adding target to claims and attempting to check the given target for a decode match first, as well as pass the target through in the event payload.

* Add tag support and fix formatting issues

* Pass through any keys that dont apply to the payload into the notification.data dictionary

* Remove stale print

* Pass back the data dictionary if it exists

* Actually put the default url even if a notify payload dictionary doesnt exist

* pylint, flake8

* Add subscription validation

* Add validation for the callback event payload and use constants where possible

* Use HTTP_UNAUTHORIZED instead of 401

* Change callback dictionary to dict instead of cv.match_all

* Fix up tests and make subscription required

* Whoops, that test was supposed to fail

* Use the result of CALLBACK_EVENT_PAYLOAD_SCHEMA as event_payload

* Add a test for html5 callback decode_jwt where the device has been renamed since notification has been sent.

* Remove the loop through logic, assume that target is always in JWT

* Always return something instead of possibly None.

* Update frontend
2016-08-17 22:34:12 -07:00
Teagan M. Glenn
a5fd04f215 Unit tests around wunderground 2016-08-17 22:33:39 -06:00
Teagan M. Glenn
4e586c18ff Check for error and pull obvservation 2016-08-17 22:32:42 -06:00
Teagan M. Glenn
87f81bf3b4 Use url builder helper 2016-08-17 22:32:19 -06:00
Teagan M. Glenn
d2ba8ee0a7 Reraise exception 2016-08-17 22:31:58 -06:00
Teagan M. Glenn
466dd35f3d Don't set state on update - state already handles this 2016-08-17 22:31:47 -06:00
Teagan M. Glenn
e54ba5ff72 No need no need to set variable 2016-08-17 22:31:28 -06:00
Teagan M. Glenn
dd14f90afb Error handling on state 2016-08-17 22:30:23 -06:00
Teagan M. Glenn
ecb4eb843b Don't call update on init of sensor 2016-08-17 22:30:03 -06:00
Teagan M. Glenn
afef255a25 Condition is already a string 2016-08-17 22:29:49 -06:00
Teagan M. Glenn
417711d665 Refactoring 2016-08-17 22:29:37 -06:00
Teagan M. Glenn
31237a891c Catch exception from update on initial platform setup 2016-08-17 22:29:25 -06:00
Teagan M. Glenn
62b00e1294 Update invocation of WUndergroundData 2016-08-17 22:29:00 -06:00
Teagan M. Glenn
563154c3c2 Validate configuration 2016-08-17 22:28:18 -06:00
Teagan M. Glenn
1a8e17ce41 Pass hass to constructor 2016-08-17 22:28:05 -06:00
Teagan M. Glenn
42caa31067 Unused variable 2016-08-17 22:22:29 -06:00
Teagan M. Glenn
e4abecd359 Build url helper method 2016-08-17 22:22:11 -06:00
Teagan M. Glenn
53b97feb3c Rename constant - make valid for lat/long too 2016-08-17 22:20:22 -06:00
Teagan M. Glenn
a09baf1d5a Not using payload 2016-08-17 22:19:57 -06:00
Teagan M. Glenn
b7809675eb Config schema 2016-08-17 22:19:13 -06:00
Teagan M. Glenn
333e3ba822 Add imports 2016-08-17 22:18:37 -06:00
David Straub
49998272db Added daily temp/precip forecast values to forecast.io (#2846) 2016-08-17 19:48:51 -07:00
Paulus Schoutsen
8088322c43 Consider core running while starting (#2858) 2016-08-17 18:58:00 -07:00
Johann Kellerman
244f60d6cd Fix script help (#2860)
Allow `--help` to filter down to the script
2016-08-17 18:57:52 -07:00
arsaboo
a0bcd33b71 Update wunderground.py 2016-08-17 17:48:37 -04:00
arsaboo
be57cd55c5 Update wunderground.py 2016-08-17 17:25:42 -04:00
arsaboo
4dff42e8bb Update wunderground.py 2016-08-17 17:04:11 -04:00
arsaboo
75cd1f8063 Update wunderground.py 2016-08-17 16:50:32 -04:00
arsaboo
fae9267701 Update wunderground.py 2016-08-17 16:41:22 -04:00
arsaboo
1a34bc5301 Removed lynting issues 2016-08-17 16:31:36 -04:00
arsaboo
aabeda2b60 Update wunderground.py 2016-08-17 16:15:07 -04:00
arsaboo
469d095827 Create initial Wunderground weather sensor 2016-08-17 15:06:12 -04:00
Matthias Grawinkel
8a3c511a04 Adding Digest Auth for webcam image retrieval (#2821)
* Adding Digest Auth for webcam image retrieval

* Update generic.py

* Update mjpeg.py

* Update generic.py

* Update mjpeg.py

* Update generic.py

* Update mjpeg.py
2016-08-17 19:08:47 +02:00
Paulus Schoutsen
2237189c86 Add default badge to push notification (#2859) 2016-08-16 23:05:00 -07:00
Paulus Schoutsen
7720a17c18 Add badge 2016-08-16 23:02:19 -07:00
Pascal Vizeli
4a847dbd91 new yahooweather version and fix update function (#2848) 2016-08-16 22:40:20 -07:00
Robbie Trencheny
848781fbb7 Add a group notify platform (#2842)
* Add a group notify platform which allows sending a single notification to multiple platforms.

* Correctly sort group.py

* Clean up the payload logic

* Make name and entity id required in the schema

* Deep update the dictionary to fix a bug where data wasnt merging.

* Add notify.group tests.

* Improve docstrings.

* Change entities to services and entity_id to service

* Make service a slug without a default value

* Update tests for entities->services, entity_id->service

* vol.Any(cv.slug) -> cv.slug
2016-08-16 22:14:04 -07:00
Robbie Trencheny
c1ce6855c5 Expose notify platform targets as individual services (#2837)
* First pass on providing individual services for all possible targets that a notification platform supports.

* Add a quite hacky first version of notification groups

* Add a docstring for get_targets

* Register group service under notifygroup/ and safely check for notifygroups in config

* Remove notifygroups, because it belongs in its own PR

* Make @balloob requested changes

* get_targets()->targets

* Add tests for notify targets exposed as individual services

* If we dont have a platform name set in configuration, lets use the name of the platform instead of notify

* Fix test docstring.

* Dont use a dictionary for just one value

* No need to double slugify

* targets is now just a list of strings instead of a dict
2016-08-16 22:05:41 -07:00
Robbie Trencheny
37561765ff Add Gravatar support to device_tracker (#2836)
* Support passing an email address linked to Gravatar as the picture in known_devices.

* Add a dedicated field for Gravatar

* Bring tests back up to where they were before Gravatar.

* Add tests for Gravatar.
2016-08-16 21:08:57 -07:00
Pascal Vizeli
4fcfffc172 add tcp/udp port to config validation (#2854) 2016-08-16 20:55:29 -07:00
Kevin Gottsman
781fe9c54e Fix logging message for disarm (#2857) 2016-08-16 20:53:59 -07:00
Nolan Gilley
324ddfdaeb fix flux_update service (#2792)
* fix flux_update service

* fix tests

* give update service unique name

* remove unnecessary param

* Revert "fix tests"

This reverts commit 2fd7760455.

* fix flux_update
2016-08-16 20:53:00 -07:00
Maggi Trymbill
f668a88485 Fixed typo (#2856)
Pretty sure this is a typo ... it made finding the plist and logs a bit of a headache for me at least :)
2016-08-16 18:24:37 -07:00
Robbie Trencheny
72fc526ee8 Html5 notifications improvements (#2840)
* Retry sending the push for 1 day instead of failing instantly if the target is unavailable

* Add timestamp to push payload

* Correctly use the title and body fields for their intended purposes

* Add callback support

* Revert changes to frontend files.

* Add default URL which will open Home Assistant. Also put all the data into the data object of the payload so it is accessible in the browser. Without doing this, things like URL wouldnt be accessible.

* Flake8 and pylint fixes

* event->type

* Dont send the default url if actions exist

* flake8/pylint fixes again

* Update html5 tests

* Remove callbacks from this branch, will re-stage on a different branch

* Remove remnant of callbacks

* Add url to data dictionary if it exists instead of copying the entire data dictionary in

* flake8 fix
2016-08-16 14:26:01 -07:00
Fabian Affolter
822b7f8770 Use voluptuous for exchange sensors (#2801)
* Use voluptuous for exchange sensors

* Remove additional checks
2016-08-16 22:22:55 +02:00
Fabian Affolter
dab5a78f88 Use voluptuous for time/date sensors (#2799)
* Use voluptuous for time/date sensors

* Extend platform

* Remove additional checks
2016-08-16 21:43:56 +02:00
Fabian Affolter
1c140de0dc Use voluptuous for NZB sensors (#2847) 2016-08-16 21:42:43 +02:00
Greg Dowling
91e24de3d5 Merge pull request #2833 from home-assistant/fix_owntracks_beacon_accuracy_bug3
Handle accuracy zero correctly in enter/leave events.
2016-08-16 10:34:27 +01:00
pavoni
41dad9a8f7 Tidy warnings. 2016-08-16 09:48:13 +01:00
Nuno Sousa
7762365b3f Add position to zwave rollershutter (#2772) 2016-08-16 00:37:58 -07:00
Open Home Automation
693098ff00 Bugfix in pknx library (#2835)
* Bugfix in pknx library

* Version pinned to 0.3.3
2016-08-15 23:42:45 -07:00
David Straub
83a043a0ea Add FritzBox call monitor sensor (#2791)
* Add FritzBox call monitor sensor

* Correct docstrings and suppress too few public methods warning

* Remove blank lines after docstrings

* Add blank lines after class docstrings

* Remove trailing white space

* Make daemon; add reconnect on disconnect
2016-08-15 23:22:54 -07:00
Juggels
a7f218f712 HP ILO component (#2844)
* HP ILO component

* HP ILO component

* Add Onboard Administrator sensor

* Add Onboard Administrator sensor

* Add period to first line

Fix D400 error on line 1
2016-08-15 23:19:11 -07:00
Assaf Inbal
72ad1d8d7c Added support for exposing light features (#2828) 2016-08-15 23:07:07 -07:00
Nolan Gilley
d281a7260d check for runtime error during db query (#2834) 2016-08-15 22:48:42 -07:00
John Arild Berentsen
27e27ee156 Exit when command_classes are missing thermostat Zwave (#2824) 2016-08-15 22:13:49 -07:00
Martin Hjelmare
9afb1d8c0d Fix unit log message (#2823)
* Fix log message for deprecated temp key

* Use string formatting and pass constant variables as arguments in log
	message to show correct name of config keys.

* Fix import order
2016-08-15 22:12:43 -07:00
Paulus Schoutsen
7594cf3c94 Merge pull request #2734 from tobiebooth/manual-alarm-improvements
Return to previous alarm state after trigger (#2580)
2016-08-15 22:10:32 -07:00
pavoni
a7703f27d8 Add missed docstring. 2016-08-15 13:14:07 +01:00
pavoni
c0b1ff0eaf Handle accuracy zero correctly in enter/leave events. 2016-08-15 13:08:30 +01:00
Paulus Schoutsen
f61f0623f8 Merge pull request #2827 from home-assistant/hotfix-0-26-2
Hotfix 0 26 2
2016-08-14 21:25:11 -07:00
Paulus Schoutsen
c4b714a10d Version bump to 0.26.2 2016-08-14 21:22:28 -07:00
Greg Dowling
8a8551132f Bump to pywemo 0.4.5 - fixes bug with requests 2.11.0 (#2818) 2016-08-14 21:22:06 -07:00
Greg Dowling
6fd0fe05f9 Bump to pywemo 0.4.5 - fixes bug with requests 2.11.0 (#2818) 2016-08-14 11:42:43 -07:00
Paulus Schoutsen
a6bbd749e4 Merge pull request #2817 from home-assistant/hotfix-0-26-1
Hotfix 0 26 1
2016-08-14 01:26:19 -07:00
Paulus Schoutsen
32051c042c Version bump to 0.26.1 2016-08-14 01:21:57 -07:00
John Arild Berentsen
c16a29b930 Fix unknown unit of measurement for hvac and thermostat component (#2816)
* Fix unknown unit of measurement for hvac and thermostat component

* Simplify
2016-08-14 01:21:36 -07:00
Heiko Rothe
12ce3deffc Check for existence of system mode on Honeywell thermostats (#2815)
* Check for existence of system mode on Honeywell thermostats

* Return None instead of undefined

* Use getattr instead of if/else
2016-08-14 01:21:28 -07:00
Open Home Automation
7c041f0797 Bugfix: removed conf_platform (#2811)
* Bugfix: removed conf_platform

* Remove unused import

* Fix for wrong update
2016-08-14 01:21:18 -07:00
Heiko Rothe
8210d65850 Check for existence of system mode on Honeywell thermostats (#2815)
* Check for existence of system mode on Honeywell thermostats

* Return None instead of undefined

* Use getattr instead of if/else
2016-08-14 01:20:28 -07:00
John Arild Berentsen
bb14239d91 Fix unknown unit of measurement for hvac and thermostat component (#2816)
* Fix unknown unit of measurement for hvac and thermostat component

* Simplify
2016-08-14 01:19:54 -07:00
Paulus Schoutsen
dc68f61261 Html5 push notifications notify platform (#2807)
* Initial work to add Chrome Push Notification support

* Remove push.js from home-assistant since it is now in Polymer

* Chrome->HTML5, general cleanup/fixes

* Make html5 generic, move manifest.json into frontend so that we can dynamically add the gcm_sender_id

* Pylint, flake8, pydocstyle frontend init

* HTML5 push fixes

* Update polymer

* Remove crypto req

* Add notify default platform.

* Fix HTML5 push

* Registration fixes

* Linting fix

* pep257 fix

* Add tests

* pep257 fix

* Update frontend
2016-08-14 01:10:07 -07:00
Open Home Automation
c6f67a5203 Implemented range checking for temperature and humidity. Out-of-range… (#2805)
* Implemented range checking for temperature and humidity. Out-of-range values will be ignored

* Removed unused import

* Use celsius_to_fahrenheit conversion method
2016-08-14 01:02:26 -07:00
Open Home Automation
8329472c72 Bugfix: removed conf_platform (#2811)
* Bugfix: removed conf_platform

* Remove unused import

* Fix for wrong update
2016-08-13 14:16:06 -07:00
Paulus Schoutsen
8ba85effd4 Version bump to 0.27.0.dev0 2016-08-13 12:02:13 -07:00
Paulus Schoutsen
0270ae05e9 Merge pull request #2760 from home-assistant/dev
0.26
2016-08-13 12:01:56 -07:00
Paulus Schoutsen
9c0b9b9ad6 Version bump to 0.26.0 2016-08-13 12:01:34 -07:00
Robbie Trencheny
7882ce1afd Add CORS fixes to support OPTIONS preflight requests. (#2773)
* Add CORS fixes to support OPTIONS preflight requests.

* Add CORS tests

* Fix formatting
2016-08-13 11:49:44 -07:00
Tobie Booth
abaffc2d8c add disarm_after_trigger to manual alarm panel 2016-08-13 12:53:32 -05:00
Tobie Booth
1e3f7ad9a4 Return to previous alarm state after trigger (#2580) 2016-08-13 12:53:32 -05:00
Paulus Schoutsen
176a078b3c Update .coveragerc 2016-08-13 10:39:13 -07:00
Fabian Affolter
5baed6acfb Add support for GPSD (#2254)
* Add support for GPSD

* Add gpsd.py

* Check if socket is open

* Fix pylint issue

* Rename file to be a sensor

* Update for being a sensor

* Rework for being a sensor
2016-08-13 10:37:12 -07:00
Paulus Schoutsen
f845893f8f Update frontend 2016-08-13 10:21:54 -07:00
Tomi Tuhkanen
9c636ab6fd Fix for braviatv get mac regex none case (#2808)
* Fix for braviatv get mac regex none case

* E128 fix
2016-08-13 09:45:49 -07:00
Brent Hughes
0df229773f Removed error log on roku connection error (#2809) 2016-08-13 09:45:09 -07:00
Paulus Schoutsen
0b404cc0be Update frontend 2016-08-13 09:41:23 -07:00
Paulus Schoutsen
18829daa65 Merge remote-tracking branch 'origin/master' into dev
Conflicts:
	homeassistant/components/recorder/__init__.py
	homeassistant/const.py
	requirements_all.txt
	setup.py
2016-08-12 18:57:15 -07:00
Pascal Vizeli
f0a138dd51 update yahooweather version (#2796) 2016-08-12 18:47:45 -07:00
Daniel Høyer Iversen
b28114fb5a Merge pull request #2804 from home-assistant/rfxtrx_log
improve logging from rfxtrx component
2016-08-12 20:56:19 +02:00
Daniel
6d83ebc5e4 improve logging from rfxtrx component 2016-08-12 20:46:54 +02:00
Daniel Høyer Iversen
29bd9b4587 Merge pull request #2803 from home-assistant/rfxtrx_log
improve logging from rfxtrx component
2016-08-12 19:35:44 +02:00
Daniel
5ed22f3ef0 improve logging from rfxtrx component 2016-08-12 19:21:12 +02:00
Daniel Høyer Iversen
a14995ed27 Merge pull request #2798 from home-assistant/flux_led_minor_bug
Fix minor bug in flux led
2016-08-12 15:41:22 +02:00
Daniel
0a78b69ee2 Fix minor bug in flux led 2016-08-12 15:21:51 +02:00
NMA
75e6ed87d6 Backend support for importing waypoints from owntracks as HA zones 2016-08-12 14:48:28 +05:30
Daniel Høyer Iversen
b7ebf3b1eb Merge pull request #2789 from home-assistant/rfxtrx_lib
update rfxtrx lib
2016-08-11 14:34:50 +02:00
Daniel
2493155f2b update rfxtrx lib 2016-08-11 14:18:23 +02:00
Fabian Affolter
e06ff95107 Remove pylint disable (#2785) 2016-08-11 12:00:37 +02:00
Daniel Høyer Iversen
eea7824a7e Merge pull request #2786 from home-assistant/rfxtrx_lib
update rfxtrx lib
2016-08-11 11:41:49 +02:00
Daniel
a3c2db70e2 update rfxtrx lib 2016-08-11 11:25:50 +02:00
Fabian Affolter
a784f48022 Minor changes (#2784)
* Update link to docs

* Use fast.com

* Update docstring

* Add link to docs

* Add link to docs

* Update docstrings

* Update docstrings

* Fix typo
2016-08-11 11:14:24 +02:00
Paulus Schoutsen
e926426af9 Recorder: Increase size of the entity column in states table (#2778)
Fixes https://github.com/home-assistant/home-assistant/issues/2697
2016-08-10 17:40:52 -07:00
Johann Kellerman
bf21d6b4e1 Update unit tests for remote.py (#2782)
* Update remote unit tests

* Sleep again
2016-08-10 17:40:35 -07:00
Nolan Gilley
dcf4fc5e9b fast.com speedtest sensor (#2783)
* fast.com speedtest sensor

* update for fastdotcom
2016-08-10 17:39:52 -07:00
Johann Kellerman
f3376ba276 Script requirement logging, db_migrator REQUIREMENTS (#2781) 2016-08-10 13:32:07 -07:00
Adam Mills
1a327d682d Fix farcy failure for logbook test (#2780) 2016-08-10 08:07:50 -07:00
Corban Mailloux
9c851790dc Add support for new mqtt_json light platform. (#2777)
* Add support for new mqtt_json light platform.

* Fix W503 errors.

* Bring in feedback from @balloob.

* Add test coverage for invalid color and brightness data.

* Add coverage for transition in turn_off.
2016-08-09 23:55:10 -07:00
Johann Kellerman
aadf6a7750 Handle requirements for scripts (#2765) 2016-08-09 23:54:34 -07:00
John Arild Berentsen
a03691455b Various fixes for missing components and rollershutter. (#2698)
* Various fixes for missing components, rollershutter.

* Setting up different method for catching value of correct type.
2016-08-10 08:31:44 +02:00
Paulus Schoutsen
1726c4b45a Merge pull request #2776 from home-assistant/add-notify-test
Add notify demo data test
2016-08-09 21:47:11 -07:00
Paulus Schoutsen
9fa1328111 Move config validation exception logging to bootstrap + humanize 2016-08-09 21:38:44 -07:00
Paulus Schoutsen
f904d06c9a Add test for new template validation logic 2016-08-09 21:09:56 -07:00
Paulus Schoutsen
253628da11 Add notify test being called from a YAML/script combi 2016-08-09 21:03:06 -07:00
Paulus Schoutsen
e773526714 Template config validator should not allow dictionaries 2016-08-09 20:58:27 -07:00
Paulus Schoutsen
6dc49ff123 Humanize service call config validation errors 2016-08-09 20:58:08 -07:00
Paulus Schoutsen
6bb6a6ebe9 Add notify demo data test 2016-08-09 20:26:17 -07:00
Paulus Schoutsen
492ade7b1a Update frontend 2016-08-09 20:12:20 -07:00
D.-L.Pohl
dc9f990ad2 Pilight component (#2742)
* New component to interface with a pilight-daemon for RF send/receive

* Fix bug that changed the received data, add connected flag, clean up

* New pilight switch component

* New optional whitelist filter to filter uninteressting devices

* Add pilight

* PEP8: too long lines, white spaces

* To keep up the good coverage ...

* PEP 257

* pylint enhancements

* pylint enhancements

* PEP 257

* Better HA config validation and cleanup following code review for #2742

* Fix requirenments to require fixed pilight version

* Change config validation to use voluptuous

* Pilight switch exclude not needed due to wildcard pilight exclude

* Enhance configuration parsing using voluptuous
2016-08-09 19:45:40 -07:00
Paulus Schoutsen
d80c05b6b6 Enforce lower case for services and warn if local unknown service called (#2764) 2016-08-09 19:41:45 -07:00
Per Sandström
180a7ec295 add changed_by attribute to lock (#2766) 2016-08-09 19:37:46 -07:00
Pascal Vizeli
431f0fd236 update pyhomematic to version 0.1.11 (#2770) 2016-08-09 22:55:25 +02:00
schneefux
3d2830278a Hyperion: backwards compatibility (#2769) 2016-08-09 08:46:47 -07:00
Adam Mills
3ac9aaf025 Filter continuous values from logbook (#2761)
* Filter continuous values from logbook

* Test filter continuous values from logbook
2016-08-09 08:01:02 -07:00
Paulus Schoutsen
0b7b0e54ba Move unit system to util (#2763) 2016-08-08 20:42:25 -07:00
Paulus Schoutsen
640a8b5a7f Limit dependencies of HA core (#2762) 2016-08-08 20:21:40 -07:00
Teagan Glenn
915b9cb3eb Fix pydoc strings 2016-08-08 20:19:56 -06:00
Phil Hansen
88734f05c6 garage door rpi_gpio.py fix (#2759) 2016-08-08 19:03:23 -07:00
Robbie Trencheny
8e6dd62853 Add an OhmConnect sensor (#2758)
* Add an OhmConnect sensor

* use .get
2016-08-08 17:54:59 -07:00
Paulus Schoutsen
9948587401 Merge branch 'pr/2726' into dev 2016-08-08 17:42:34 -07:00
Nick Touran
3c2b4f5128 Added optional embedded image attachments to notify.smtp. (#2738)
* Added optional embedded image attachments to notify.smtp.

Also restructured a bit to minimize code duplication and add some tests.

* Fixed formatting errors.

* SMTP cleanups thanks to code review.
2016-08-08 17:36:49 -07:00
Johann Kellerman
efe754636a Script to manage secrets stored in the keyring (#2743)
* Keyring script to get, set and delete secrets

* Add info & keyring version
2016-08-08 17:36:11 -07:00
Paulus Schoutsen
8081fe794e Add panel custom to load any webcomponent (#2747) 2016-08-08 17:35:46 -07:00
Paulus Schoutsen
9a575eb6d6 Link prefetch panels (#2748)
* Add link=prefetch to index.html

* Improve http request logging
2016-08-08 17:35:27 -07:00
Pascal Vizeli
98c77dc08f Add ffmpeg camera platform support (#2755) 2016-08-08 17:34:46 -07:00
Robbie Trencheny
991e292d7e Foursquare Component (#2723)
* Add a Foursquare component which accepts push notifications from Foursquare and provides a user checkin service

* @balloob requested fixes

* Sort .coveragerc list of components by name

* Revert "Sort .coveragerc list of components by name"

This reverts commit 997ae22576.

* Only sort Foursquare since I get conflicts otherwise

* Add Foursquare checkin service to services.yaml
2016-08-08 17:34:29 -07:00
Teagan Glenn
7e37634b54 Honeywell hvac mode (#2757)
* Add set hvac mode to honeywell us thermostat

* Add hvac service to the HoneywellRound entity

* Fix pydoc

* Add typing

* Typing to unit test
2016-08-08 17:32:53 -07:00
Pascal Vizeli
5445aafee7 update yahooweather to 0.5 (#2756) 2016-08-08 12:43:15 -07:00
John Arild Berentsen
7077103c4f General logmessage cleanup (#2753) 2016-08-08 20:05:45 +02:00
Daniel Høyer Iversen
fc101fbbcb Merge pull request #2754 from home-assistant/flux_led_lib
update flux led library
2016-08-08 20:03:07 +02:00
Daniel
21ffe2ed9b update flux led library 2016-08-08 19:43:04 +02:00
Paulus Schoutsen
19fae75669 Fix broken remote test 2016-08-08 09:11:15 -07:00
Per Sandström
8568773e7d add changed_by attribute to alarm control panel (#2737) 2016-08-08 09:00:20 -07:00
Dean Camera
5ff9e59b79 Update to latest Plex API, add music support. (#2739)
* Update to latest Plex API, add music support.

* Fix PyLint errors.

* Update Plex sensor module to latest PlexAPI.

* Oops - update Python sensor import.

* According to PlexAPI docs, this is the new API for Plex Pass members.

* More pylint STFUs.

* Move pylint suppression.

* Use plexapi NA type directly.

* Pylint objects to short variable names.
2016-08-08 08:55:58 -07:00
Daniel Høyer Iversen
689939ab9d Add support color and brightness for flux light (#2750) 2016-08-08 08:47:02 -07:00
Sean Dague
8daaee702b bump proliphix library to 0.3.1 (#2751)
The 0.3.1 version of the library includes fixes for time syncing the
thermostat under the covers when needed. All changes are done on the
library side, we just need to bump the required level in home
assistant.
2016-08-08 08:03:12 -07:00
John Arild Berentsen
e6ad2e8d91 Handling and improvements for zwave network (#2728) 2016-08-08 16:52:28 +02:00
Paulus Schoutsen
dd0b9f2f36 Update frontend 2016-08-08 00:41:32 -07:00
Marcelo Moreira de Mello
0383da7af1 This patch makes use of the unit_system global configuration parameter to determine the mesurement system between 'metric' or 'imperial' for Fibit component. It also supports the fitbit accept-language when en_GB measurement is desired. (#2745) 2016-08-07 21:58:16 -07:00
Paulus Schoutsen
b9b1d95514 Tweak panel parameters (#2746) 2016-08-07 21:56:17 -07:00
Daniel Høyer Iversen
23472cb44d Handle numeric device id for rfxtrx devices (#2740) 2016-08-07 17:15:39 -07:00
Fabian Heredia Montiel
0377338a81 Improvement typing (#2735)
* Fix: Circular dependencies of internal files

* Change: dt.date for Date and dt.datetime for DateTime

* Use NewType if available

* FIX: Wrong version test

* Remove: Date and DateTime types due to error

* Change to HomeAssistantType

* General Improvement of Typing

* Improve typing config_validation

* Improve typing script

* General Typing Improvements

* Improve NewType check

* Improve typing db_migrator

* Improve util/__init__ typing

* Improve helpers/location typing

* Regroup imports and remove pylint: disable=ungrouped-imports

* General typing improvements
2016-08-07 16:26:35 -07:00
Open Home Automation
a3ca3e878b Added support for serial particulate matters sensors - serial_pm (#2571) 2016-08-07 22:14:01 +02:00
Paulus Schoutsen
d1107a9cf3 Merge pull request #2731 from home-assistant/teagan-unit-system
Teagan unit system
2016-08-04 22:53:44 -07:00
Paulus Schoutsen
231656916c Address last comments 2016-08-04 22:44:37 -07:00
Teagan M. Glenn
26526ca57a Add unit system support
Add unit symbol constants

Initial unit system object

Import more constants

Pydoc for unit system file

Import constants for configuration validation

Unit system validation method

Typing for constants

Inches are valid lengths too

Typings

Change base class to dict - needed for remote api call serialization

Validation

Use dictionary keys

Defined unit systems

Update location util to use metric instead of us fahrenheit

Update constant imports

Import defined unit systems

Update configuration to use unit system

Update schema to use unit system

Update constants

Add imports to core for unit system and distance

Type for config

Default unit system

Convert distance from HASS instance

Update temperature conversion to use unit system

Update temperature conversion

Set unit system based on configuration

Set info unit system

Return unit system dictionary with config dictionary

Auto discover unit system

Update location test for use metric

Update forecast unit system

Update mold indicator unit system

Update thermostat unit system

Update thermostat demo test

Unit tests around unit system

Update test common hass configuration

Update configuration unit tests

There should always be a unit system!

Update core unit tests

Constants typing

Linting issues

Remove unused import

Update fitbit sensor to use application unit system

Update google travel time to use application unit system

Update configuration example

Update dht sensor

Update DHT temperature conversion to use the utility function

Update swagger config

Update my sensors metric flag

Update hvac component temperature conversion

HVAC conversion for temperature

Pull unit from sensor type map

Pull unit from sensor type map

Update the temper sensor unit

Update yWeather sensor unit

Update hvac demo unit test

Set unit test config unit system to metric

Use hass unit system length for default in proximity

Use the name of the system instead of temperature

Use constants from const

Unused import

Forecasted temperature

Fix calculation in case furthest distance is greater than 1000000 units

Remove unneeded constants

Set default length to km or miles

Use constants

Linting doesn't like importing just for typing

Fix reference

Test is expecting meters - set config to meters

Use constant

Use constant

PyDoc for unit test

Should be not in

Rename to units

Change unit system to be an object - not a dictionary

Return tuple in conversion

Move convert to temperature util

Temperature conversion is now in unit system

Update imports

Rename to units

Units is now an object

Use temperature util conversion

Unit system is now an object

Validate and convert unit system config

Return the scalar value in template distance

Test is expecting meters

Update unit tests around unit system

Distance util returns tuple

Fix location info test

Set units

Update unit tests

Convert distance

DOH

Pull out the scalar from the vector

Linting

I really hate python linting

Linting again

BLARG

Unit test documentation

Unit test around is metric flag

Break ternary statement into if/else blocks

Don't use dictionary - use members

is metric flag

Rename constants

Use is metric flag

Move constants to CONST file

Move to const file

Raise error if unit is not expected

Typing

No need to return unit since only performing conversion if it can work

Use constants

Line wrapping

Raise error if invalid value

Remove subscripts from conversion as they are no longer returned as tuples

No longer tuples

No longer tuples

Check for numeric type

Fix string format to use correct variable

Typing

Assert errors raised

Remove subscript

Only convert temperature if we know the unit

If no unit of measurement set - default to HASS config

Convert only if we know the unit

Remove subscription

Fix not in clause

Linting fixes

Wants a boolean

Clearer if-block

Check if the key is in the config first

Missed a couple expecting tuples

Backwards compatibility

No like-y ternary!

Error handling around state setting

Pretty unit system configuration validation

More tuple crap

Use is metric flag

Error handling around min/max temp

Explode if no unit

Pull unit from config

Celsius has a decimal

Unused import

Check if it's a temperature before we try to convert it to a temperature

Linting says too many statements - combine lat/long in a fairly reasonable manner

Backwards compatibility unit test

Better doc
2016-08-04 22:02:19 -07:00
Robby Grossman
dfad8aa6dc Remove 'remove node (secure)' service; is not a specialized implementation in Python-OZW and standard removal works fine. (#2730) 2016-08-04 21:04:08 -07:00
Matthew Treinish
496972a587 Add option to heat_control component to set min cycle duration
This commit adds a new config option to the heat_control thermostat
component, min_cycle_duration. Some heaters and/or ACs don't like
being constantly cycled on and off. Prior to this patch the
heat_control component can end up cycling the switch quite
frequently. (depending on how quickly the temperature changes) The
new option added is used for setting a minimum duration that must
have elapsed in either the on or off state before the thermostat will
send the service call to cycle the switch. This should enable users to
hand tune how frequently heat_control can switch the device on or off
to best suit the device being used.
2016-08-04 12:37:08 -04:00
mmello
ef3e7b28a9 Added whitelist option to InfluxDB to select the only entities that will be logged on InfluxDB (#2727) 2016-08-04 08:35:01 -07:00
Paulus Schoutsen
792154a6a7 Update frontend 2016-08-03 08:22:47 -07:00
Johann Kellerman
09262a36c4 Hide NewType ImportErrors (#2717)
* Hide NewType ImportErrors

* No more NewType
2016-08-03 08:21:30 -07:00
Matthew Treinish
94acda2a31 Add AC mode to heat_control component (#2719)
This commit adds a new option to the heat_control component, ac_mode.
When set to true, this treats the toggle device as a cooler instead
of a heater. The concept being if you have a window or in-wall ac
unit that doesn't have a built-in thermostat having the home assistant
implemented thermostat would be as useful as for space heaters.
2016-08-02 21:56:08 -07:00
William Scanlon
b8492832a6 Convert null to 0 for temp % sensors (#2710) 2016-08-02 21:53:26 -07:00
Assaf Inbal
bb22ad3064 Proxy requests to the media player's media image (#2693)
This is needed when the media server and UI client are not on the same network.
2016-08-02 18:31:15 -07:00
John Arild Berentsen
e36c6b24ee Add secure inclusion of nodes for zwave network (#2715)
* Add secure inclusion of nodes for zwave network

* Add secure inclusion of nodes for zwave network
2016-08-02 20:17:10 +02:00
John Arild Berentsen
ad0224e9aa Add start and stop for zwave network (#2709) 2016-08-02 19:08:04 +02:00
John Arild Berentsen
40d7361828 Implement of BARRIER_OPERATOR for garage door (#2712) 2016-08-02 18:05:38 +02:00
Paulus Schoutsen
ab377f169d Upgrade to voluptuous 0.9.2 (#2692) 2016-08-02 00:14:13 -07:00
Tomi Tuhkanen
434a7d6975 Added VS Code config folder to gitignore (#2707) 2016-08-01 23:59:09 -07:00
Paulus Schoutsen
992be38b94 Upgrade netdisco (#2706) 2016-08-01 23:50:01 -07:00
Paulus Schoutsen
f50c30bbba Merge pull request #2704 from home-assistant/hotfix-0-25-2
Hotfix 0 25 2
2016-08-01 20:58:27 -07:00
Paulus Schoutsen
b1b14f0e83 Version bump to 0.25.2 2016-08-01 20:56:59 -07:00
Tobie Booth
b51ba85a15 Reverts changes to ZWave lock status update (#2595) (#2696) 2016-08-01 20:56:43 -07:00
Paulus Schoutsen
29dbeeb41e Remove SQLAlchemy as core dependency (#2702) 2016-08-01 18:37:00 -07:00
Tobie Booth
8b57fd008f Reverts changes to ZWave lock status update (#2595) (#2696) 2016-08-01 08:08:24 -07:00
Assaf Inbal
51d5268f9f Added a screenshot to LG Netcast TVs (#2694) 2016-07-31 21:58:55 -07:00
Paulus Schoutsen
6f23869a89 Fix Mac OS install script (#2691) 2016-07-31 20:58:39 -07:00
Sean Dague
483b0045fc support cooling season in proliphix thermostat (#2689)
Instead of always assuming we want to change the heat, instead use the
setback attribute which sets heat / cool setback based on current HVAC
mode. This means that the proliphix thermostat will do sensible things
during cooling season.
2016-07-31 19:13:36 -07:00
Paulus Schoutsen
1856e0110b Update frontend 2016-07-31 19:07:06 -07:00
Paulus Schoutsen
c608740382 Merge pull request #2688 from home-assistant/hotfix-0-25-1
Hotfix 0 25 1
2016-07-31 17:34:34 -07:00
Paulus Schoutsen
08e694cac3 Version bump to 0.25.1 2016-07-31 17:21:24 -07:00
Paulus Schoutsen
628eacc83e Rollback voluptuous to 0.8.9 (#2687) 2016-07-31 17:21:02 -07:00
Stephen Hoekstra
ba72166333 Add 5 second timeout to Kodi connections (#2683) 2016-07-31 17:21:02 -07:00
Johann Kellerman
74f284d2d7 Close session after execute. (#2677) 2016-07-31 17:21:02 -07:00
Jesse Newland
a81a8c2bdf Bring back delayed zwave value update behavior (#2674) 2016-07-31 17:21:02 -07:00
Paulus Schoutsen
3686a5ed56 Try to deflake discovery tests 2016-07-31 17:21:02 -07:00
Paulus Schoutsen
e7ead73fad Rollback voluptuous to 0.8.9 (#2687) 2016-07-31 17:20:08 -07:00
HBDK
a73c2e57a8 Added mired and kelvin mode to flux (#2665)
* Added mired and kelvin mode to flux

* changed as requested

* Renamed varible

* attempt to add test for new method in flux.py

* removed line to fix lint error
2016-07-31 16:55:48 -07:00
Paulus Schoutsen
c39c10a088 update frontend 2016-07-31 16:39:07 -07:00
Fabian Affolter
72fc77b84d Upgrade fuzzywuzzy to 0.11.1 (#2685) 2016-07-31 15:00:52 -07:00
Paulus Schoutsen
f4d6ce08e4 Update frontend 2016-07-31 14:47:01 -07:00
Johann Kellerman
e9bd5d54ad Recorder typing & ensure DB ready on query (#2680)
* Recorder typing & wait on DB ready
2016-07-31 22:56:57 +02:00
Fabian Affolter
2871ab6bb0 Upgrade sendgrid to 3.1.10 (#2684) 2016-07-31 13:49:01 -07:00
Jesse Newland
cfa69fef1e Add Docker test runner (#2673)
* Add docker test runner

* Move test Dockerfile into virtualization folder

* Don't build zwave in test environment
2016-07-31 13:48:41 -07:00
Fabian Affolter
5faba21b8c Upgrade python-nmap to 0.6.1 (#2681) 2016-07-31 13:47:46 -07:00
Fabian Affolter
ca1cf44194 Upgrade cherrypy to 7.1.0 (#2682) 2016-07-31 13:47:34 -07:00
Stephen Hoekstra
125059c5ac Add 5 second timeout to Kodi connections (#2683) 2016-07-31 13:47:24 -07:00
Robbie Trencheny
63ba5044b3 Kill celcius with fire, replacing it with celsius, finally finishing what #1860 started (#2679) 2016-07-31 12:18:40 -07:00
Robbie Trencheny
a93195610a Add alarm control panel services.yaml
...because I was almost done being bored
2016-07-31 11:49:30 -07:00
Robbie Trencheny
d48f6676ab Update lock services.yaml
Was so bored I forgot some things :(
2016-07-31 11:45:57 -07:00
Robbie Trencheny
794205ad8d Add garage door services.yaml
...because I was somehow still bored
2016-07-31 11:34:18 -07:00
Robbie Trencheny
0e367ceec6 Add lock services.yaml
...because I was still bored
2016-07-31 11:31:50 -07:00
Robbie Trencheny
44b9771d8a Add rollershutter services.yaml
...because I was bored
2016-07-31 11:27:57 -07:00
Teagan Glenn
122581da7f Proximity unit of measure (#2659)
* Allow multiple proximities

* Distance conversion

* Add unit of measurement and conversion to proximity

* Shorten attribute name

* Fix get unit of measurement

* Fix the km <-> m conversion

* Add type check and errors

* first path unit test around distance utility

* Fix numeric type check

* Fix conversion type-os

* Actually set the exception thrown flag

* Test for exact conversion

* More descriptive variable names

* Update method invocation to match change in method name

* Missed a couple variables

* Line continuation

* Fix linting too many return issue

* Break out proximity setup for list of proximity and for single proximity device

* Pass hass to setup function

* Check if setup succeeded for each proximity component

* Change variable name

* Break out branches in convert to avoid too many branches linting error

* Remove disable lint line

* Variables for default properties

* Combine logic

* Test loading multiple proximities for 100% code coverage on proximity component

* Unit test to reach 100%
Fail to configure proximities missing devices

* Fail first before processing

* Combine return statements

* lstrip = bad Teagan

* Utilize string formating instead of concatenation

* Fix variable reference

* Typeo

* Clean up conversion to reduce complexity

* Update unit tests to match code changes on distance util

* Test non numeric value

* Private methods, value type has already been checked.
2016-07-31 10:20:56 -07:00
Johann Kellerman
de7e27c92c Close session after execute. (#2677) 2016-07-31 10:10:30 -07:00
Paulus Schoutsen
89ec39f629 Update frontend 2016-07-31 00:43:28 -07:00
Jesse Newland
e0cbb92c05 Bring back delayed zwave value update behavior (#2674) 2016-07-31 09:09:00 +02:00
Paulus Schoutsen
b35c44ce04 Merge pull request #2671 from home-assistant/deflake-discovery-tests
Try to deflake discovery tests
2016-07-30 22:05:22 -07:00
Paulus Schoutsen
bbff13afee Try to deflake discovery tests 2016-07-30 19:58:14 -07:00
Robbie Trencheny
ecfcc1fd41 Update authorship information
Sorry @balloob :)
2016-07-30 13:03:54 -07:00
Paulus Schoutsen
86bbfb00ad Version bump to 0.25 2016-07-30 12:43:40 -07:00
Paulus Schoutsen
af7f3bd455 Version bump to 0.26.0.dev0 2016-07-30 12:42:42 -07:00
Paulus Schoutsen
06a68d0c62 Merge pull request #2654 from home-assistant/dev
0.25
2016-07-30 11:33:41 -07:00
Paulus Schoutsen
99b27b1ec6 Update frontend 2016-07-30 11:22:44 -07:00
Paulus Schoutsen
1a64f14bea Add commented out default password (#2656) 2016-07-30 10:40:51 -07:00
Fabian Affolter
52a3aa1ca5 Add timeout (fixes #2661) (#2666) 2016-07-30 10:36:56 -07:00
Nolan Gilley
a94e8f48e0 Install mysqlclient and psycopg2 (#2662)
I don't know if this is the right place for this, but I'm tired of having to install mysqlclient or psycopg2 after every docker update if I want to use mysql of postgres.
2016-07-30 10:30:14 -07:00
Scott O'Neil
822a263622 Fixing PEP257 issues in #2633 (#2658) 2016-07-30 10:30:13 +02:00
John
caa7e770be Expand to respond to basic node events (#2615)
Allows zwave devices that can only push out basic set commands to be
captured by hass as zwave.node_events.
2016-07-29 21:56:03 +02:00
Paulus Schoutsen
48fbec0a49 Merge branch 'master' into dev 2016-07-29 12:17:50 -07:00
John Lindley
b5fb382c1c Add group state for locks (#2647)
* Add group state for locks

Added  ", (STATE_LOCKED, STATE_UNLOCKED)" to _GROUP_TYPES

Don't have a working HA right now, so can't test..

* Modified from homeassistant.const import

* Removed white space

* Line length change

* Removed white space.. again!
2016-07-29 11:55:18 -07:00
Paulus Schoutsen
d5e652d244 Update panel.html 2016-07-29 09:28:15 -07:00
Pascal Vizeli
548d154cd8 fix telegram bug (#2653) 2016-07-29 15:20:23 +02:00
Paulus Schoutsen
55624bcff9 Add custom panel example using React (#2651) 2016-07-29 00:49:58 -07:00
Nolan Gilley
3c51d2df0f load the last good state from db if speedtest data is None (#2645)
* load the last good state from db if speedtest data is None

* return if recorder is not available
2016-07-28 20:58:55 -07:00
Dean Camera
ce3c89db6e Add MPC-HC Media Player Component (#2635)
* Initial media_player component for the MPC-HC web API.

* Update .coveragerc to exclude the MPC-HC media player component.

* We don't need a session for every HTTP fetch.

* Use host in configuration YAML to match Kodi component.

* Fix PyLint errors.

* Fix PEP8 errors and use more idiomatic Python to get dict() values.

* Add MPC-HC remote command capabilities for basic control.
2016-07-28 20:54:22 -07:00
Scott O'Neil
bf3c0472bb Adding tests for sonos registration (#2633) 2016-07-28 20:40:58 -07:00
Adam Garcia
6a3c5b093b Update to group component to properly handle zone changes in tracked devices (#2631)
* pep8 fixes for group and test

* update to pass linting

* docstring fix.

* reduced length of docstring on test.
2016-07-28 20:40:25 -07:00
Nolan Gilley
bce4be88dc check for error while running speedtest (#2643) 2016-07-28 09:25:31 -07:00
Paulus Schoutsen
ec8802ec44 Update frontend 2016-07-28 09:22:15 -07:00
Fabian Affolter
6e5e97554b Merge pull request #2642 from fabaff/x10
Remove Awesome Light artefacts
2016-07-28 07:35:02 +02:00
Fabian Affolter
79783e01d7 Remove Awesoe Light artefacts 2016-07-28 07:04:12 +02:00
schneefux
26983aa646 Hyperion active (#2634)
* Hyperion lets you turn it on and off

* Update hyperion to use recent API functions

The plugin now gets the active color from the server.
Add a configuration option "default_color" to customize the turn_on color.
2016-07-27 21:11:12 -07:00
fotoetienne
a0f72e3569 Add support for x10 lights (#2637)
* Add support for x10 lights

* X10 linting and add to .coveragerc
2016-07-27 20:54:02 -07:00
Paulus Schoutsen
1620680127 Use local timezone for log and history dates (#2622)
* Use local timezone for log and history dates

* home-assistant-js fix

* Submodule updates not included so travis can build

* Separate Date and DateTime http validators

* Include submodule reference

* Update frontend
2016-07-27 20:43:46 -07:00
Johann Kellerman
4f89230251 Update icloud to respect track=false. (#2640) 2016-07-27 20:38:55 -07:00
William Scanlon
cdb6f3717d Removed Google Voice SMS notification support (#2628) 2016-07-27 20:37:07 -07:00
Fabian Heredia Montiel
ae97218582 Improvement typing core (#2624)
* Add package typing

* Add util/location typing

* FIX: lint wrong order of imports

* Fix sometyping and add helpers/entity typing

* Mypy import trick

* Add asteroid to test requiremts to fix pylint issue

* Fix deprecated function isSet for is_set

* Add loader.py typing

* Improve typing bootstrap
2016-07-27 20:33:49 -07:00
Johann Kellerman
8c728d1b4e Update icloud device_tracker (#2614)
*  slugify() for dev_id (fixes #2162) [Keep space replacement to not impact known_devices.yaml]
*  pyicloud upgrade 0.9.1
*  config validation
*  Only poll icloud every 4 minutes...
*  Immediately pull device state on HASS start
*  Added new test with icloud char e' acute [chr(233)]
* Suppress pyicloud logging
2016-07-26 23:53:31 +02:00
Fabian Affolter
fed2c33b54 Add get_config (#2627) 2016-07-26 08:50:38 -07:00
John Arild Berentsen
b4990d61f9 Make sure zwave values are updated regardles of manual or frontend update, (#2595)
* Make sure values are updated regardles of manual or frontend update,

* Devices with set_switch command was not happy with fast updating.

* Binary triggersensors command was not happy with refreshed updating.
2016-07-26 08:26:40 +02:00
Cameron Bulock
0eac187d97 DirecTV Receiver Media Player Component (#2559)
* DirecTV receiver component

* styling cleanup

* Updated coveragerc and requirements all

* using string format

* linter fixes
2016-07-25 23:20:56 -07:00
Open Home Automation
de6f49c06f Add the option to add additional tags when logging to InfluxDB (#2613) 2016-07-25 23:01:57 -07:00
Paulus Schoutsen
f1632496f0 Allow circular dependency with discovery (#2616) 2016-07-25 22:49:10 -07:00
Nathan Henrie
9c76b30e24 Add timeout kwarg to call_service() and API.__call__() (#2612)
Fixes #2611

Adds a timeout kwarg to call_service and API.__call__ with default set
to 5 (as per previous behavior). Will not change existing behavior but
will allow remote Python API calls to specify a longer (or shorter)
timeout if they know that a script takes longer than 5 seconds to
return.
2016-07-25 22:35:33 -07:00
Paulus Schoutsen
78c298e563 Fix test to test Norway fix (#2626) 2016-07-25 22:02:12 -07:00
vladonemo
14707630ae Implementing set_hvac_mode for Nest (#2621) 2016-07-25 08:29:40 -07:00
Paulus Schoutsen
8ee4503d7c Exclude tests in dependencies in test dir from pytest (#2618) 2016-07-25 08:26:07 -07:00
Johann Kellerman
4195254280 Update Qwikswitch: fix typing, add validation, shutdown (#2603)
* Update Qwikswitch: fix typing, add validation, shutdown

* Delay startup listener, fix validation

* Fix workerpool errors
2016-07-23 17:03:29 -07:00
Open Home Automation
2484ee53b8 Knx thermostat (#2575)
* Major rewrite of the KNX multi address device. This class wasn't used before, but the new class will be the base for the LNX thermostat module

* newer KNXIP version needed as the previous version had a serious bug

* Update knxip to later version

* Added thermostat module

* First implementation of a KNX thermostat module

* Minor cleanup

* Removed unsed code
2016-07-23 13:54:20 -07:00
Johann Kellerman
4cf618334c Update recorder. (#2549)
* Update recorder.

models.py:
 - Use scoped_session in models.py to fix shutdown error
__init__.py:
 - Session _commit & retry method
 - Single session var for purge_data
 - Ensure single _INSTANCE
 - repeat purge every 2 days
 - show correct time in log_error

* _commit

* Restore models to old functionality, swap purge, remove _INSTANCE cleanup from tests, typing ignore Base class

* pylint

* Remove recorder from model unit test
2016-07-23 11:25:17 -07:00
Fabian Heredia Montiel
d4f78e8552 Type Hints - Core/Utils/Helpers Part 1 (#2592)
* Fix deprecated(moved) import

* Add util/dt typing

* Green on mypy util/dt

* Fix some errors

* First part of yping util/yaml

* Add more typing to util/yaml
2016-07-23 11:07:08 -07:00
Neil Lathwood
34ca1dac7d Added Russound RNET support (#2591)
* Added Russound RNET support

* Fixed farcy issues

* Updated volume_level + fixed requirements_all.txt

* Updated syntax + changed variable
2016-07-23 10:51:56 -07:00
Fabian Affolter
d808d90d26 Upgrade sendgrid to 3.0.7 (#2604) 2016-07-23 10:51:20 -07:00
Paulus Schoutsen
487f3b2951 Update frontend 2016-07-23 10:19:26 -07:00
Nicolas Graziano
d202929de5 Float value for input slider (#2607)
* Allow input_slider value to be a float number.

* Change input_slider unit test to allow float number.
2016-07-23 09:53:16 -07:00
Fabian Affolter
6a189eb18d Merge pull request #2605 from rostved/readme-api-url-fix
Fixed REST API URL in readme.
2016-07-23 14:00:57 +02:00
Mikkel Rostved
67dada226a Fixed REST API URL in readme. 2016-07-23 12:51:25 +02:00
Fabian Affolter
57c2dea02d Add timestamp filters (#2596) 2016-07-22 19:47:43 -07:00
Fabian Affolter
3122c0279f Upgrade slacker to 0.9.24 (#2597) 2016-07-22 19:25:06 -07:00
Fabian Affolter
843e997292 Upgrade netdisco to 0.7.0 (#2598) 2016-07-22 19:24:51 -07:00
Fabian Affolter
a3ff001eec Upgrade voluptuous to 0.9.1 (#2602) 2016-07-22 19:24:23 -07:00
John Arild Berentsen
8389a0abe3 Position fix, updating fix and start-stop for zwave rollershutter (#2594) 2016-07-22 10:01:40 +02:00
Paulus Schoutsen
c21a956895 Speed up MyPy test (#2584) 2016-07-21 23:54:25 -07:00
Pascal Vizeli
e5c42a676d Update pyhomematic to version 0.1.10 (#2589) 2016-07-21 20:49:30 +02:00
Paulus Schoutsen
a513e1cc35 Update frontend 2016-07-21 08:41:48 -07:00
John Arild Berentsen
a0d71c9cb2 Positioning issue for zwave rollershutter. fix for #2581 (#2587)
This fixes issue: #2486
2016-07-21 15:07:48 +02:00
John Arild Berentsen
3441170827 Missing Fortrezz siren fix for #2581 (#2586) 2016-07-21 12:46:15 +02:00
John Arild Berentsen
c56fa7cfed Thermostat and hvac status fix for #2465 (#2585) 2016-07-21 12:20:43 +02:00
Paulus Schoutsen
2ea2a62d45 Update service worker 2016-07-20 23:40:40 -07:00
Paulus Schoutsen
a764683f3a Merge pull request #2583 from home-assistant/hotfix-24-1
Hotfix 24 1
2016-07-20 22:45:03 -07:00
Paulus Schoutsen
19cb1a954f Version bump to 0.24.1 2016-07-20 22:42:46 -07:00
Nathan Henrie
7a1e2de49f Don't overwrite the config directory (#2570)
Closes #2566

The `else` seems to have been an error and was overwriting a non-default config directory with the default location.
2016-07-20 22:42:30 -07:00
Fabian Heredia Montiel
08226a4864 Type Hints - __main__ (#2574)
* Add __main__ type hints

* Fix most errors of __main__

* Add ignore for script.run()

* Add type annotations for from_config_dict and from_config_file

* Fix errors

* Fix requirement error

* Add mypy type check to tests

* Enable travis typing check

* Messed up the tox deps

* Laxer type checker
2016-07-20 22:38:52 -07:00
Robbie Trencheny
d570d38d5c Change path to favicon in GNTP
This broke when #2537 was merged.
2016-07-20 14:46:16 -07:00
Teagan Glenn
ae5dfbdf55 Allow templates for delays in scripts (#2560) 2016-07-20 20:26:17 +02:00
William Scanlon
53f9809567 Wink water leak sensor (#2572) 2016-07-20 07:39:45 -07:00
John Arild Berentsen
aed9ab0271 Added more binary sensor and switch classes. Ref.Pepper1 database (#2573) 2016-07-20 16:21:09 +02:00
Paulus Schoutsen
59029f2830 Update frontend 2016-07-19 23:36:52 -07:00
Scott O'Neil
46216c3bda Fix services registration, and adding schema util to sonos (#2558)
* Moving service registration into def so that it can be called for both discovery methods

* Adding use of schemas to sonos
2016-07-19 22:37:24 -07:00
Nathan Henrie
aa079625d4 Don't overwrite the config directory (#2570)
Closes #2566

The `else` seems to have been an error and was overwriting a non-default config directory with the default location.
2016-07-19 21:51:38 -07:00
Brent
dee9244566 Move location lookup before zone checks. (#2557) 2016-07-19 19:51:14 -07:00
Daniel Høyer Iversen
a6e95db618 MagicLight/Flux WiFi Color LED Light Component (#2534)
* Initial version for flux light

* Update version of flux_led library

* update flux led
2016-07-19 19:32:10 -07:00
Fredrik Haglund
8f04e03f73 Added support for luminance value (#2562) 2016-07-19 19:16:31 -07:00
Daniel Høyer Iversen
d64dae8fcf Rfxtrx sensor (#2563)
* fire event rfxtrx sensor

* Add fire_event to rfxtrx sensor config

* Add test for rfxtrx fire event in sensor
2016-07-19 19:15:50 -07:00
Nolan Gilley
3dd869f0c2 expect a list of devices from config (#2567)
support multiple components. (#2565)
2016-07-19 19:14:41 -07:00
Greg Dowling
e34bfb7381 Tidy / Refactor Vera (#2569)
* Add power attribute to switch.

* Move device_state_attributes into base class.

* Fix imports following refactor.

* Bump pyvera version - should add contributed support for older (UI5) version dimmers and locks.

* Refactor device lookup to be based on vera classes, push category back into library.

* Add generic power attribute, fix inherited class order bug.

* Tidy.
2016-07-19 19:13:33 -07:00
Paulus Schoutsen
7c431911d1 Update frontend 2016-07-19 02:37:22 -07:00
Paulus Schoutsen
5001c9729f Update frontend 2016-07-18 21:29:50 -07:00
John Arild Berentsen
32f228f984 zxt 120 has changed in ozw (#2551) 2016-07-18 16:20:17 +02:00
Paulus Schoutsen
541fffc7fa Update frontend 2016-07-17 23:23:31 -07:00
Paulus Schoutsen
389c13c891 Add ensure config script (#2548) 2016-07-17 15:24:42 -07:00
Daniel Zozin
027266ed8b Fix initialization state for GPIO switches configured with inverted logic (#2550)
When switches are configured to use inverted logic, the GPIO pins initial
state has to be inverted as well (set to HIGH)
2016-07-17 15:18:16 -07:00
Fabian Affolter
ddcad275f7 Upgrade pytz to 2016.6.1 (#2541) 2016-07-17 13:07:11 -07:00
Fabian Affolter
64d5a328f3 Upgrade cherrypy to 6.1.1 (#2538) 2016-07-17 13:06:41 -07:00
Fabian Affolter
1b447fb56f Upgrade python-twitch to 1.3.0 (#2540) 2016-07-17 13:05:50 -07:00
Fabian Affolter
9bed64e9c0 Upgrade python-telegram-bot to 5.0.0 (#2542) 2016-07-17 13:05:38 -07:00
Dan
1da94928c6 Fix bug with imap sensor (#2546)
Fixed bug where the new connection was not saved when a reconnect
attempt was made; broadended the exception catching.
2016-07-17 13:02:14 -07:00
Fabian Affolter
a8f34eb728 Merge pull request #2545 from deisi/acer_pyserial_update
repaired dependency of the acer projector switch
2016-07-17 18:08:17 +02:00
Malte
1002a1b7c9 run gen_requirements.py 2016-07-17 18:00:41 +02:00
Malte Deiseroth
f261aac9cb repaired dependency of the acer projector switch 2016-07-17 16:45:58 +02:00
Daniel Høyer Iversen
cfbc749000 Merge pull request #2539 from home-assistant/rfxtrx_tests
Rfxtrx tests
2016-07-17 11:34:36 +02:00
Daniel
98550b5465 rfxtrx light tests 2016-07-17 11:14:29 +02:00
Daniel
034f1b9499 rfxtrx switch tests 2016-07-17 10:27:27 +02:00
Daniel
c79cd905fe rfxtrx sensor tests 2016-07-17 10:24:08 +02:00
Daniel
294883a174 rfxtrx core tests 2016-07-17 10:20:24 +02:00
Paulus Schoutsen
f94319e7cb Merge pull request #2537 from home-assistant/frontend-panels
Frontend panels
2016-07-16 23:54:12 -07:00
Paulus Schoutsen
38c50c830f Fix linting errors 2016-07-16 23:45:38 -07:00
Paulus Schoutsen
925a623445 Build frontend 2016-07-16 23:24:17 -07:00
Paulus Schoutsen
fd5aad1ee7 Add panel_iframe component 2016-07-16 23:21:34 -07:00
Paulus Schoutsen
22b4aebeb3 Add support for dynamic frontend panels 2016-07-16 23:21:34 -07:00
Fabian Affolter
89639822f1 Fix version 2016-07-17 00:25:49 +02:00
Fabian Affolter
35a57e1385 Prepare for next development cycle 2016-07-17 00:23:57 +02:00
Fabian Affolter
8c44ecc4ba Update version 2016-07-17 00:20:41 +02:00
Fabian Affolter
dc0f16c9dd Merge pull request #2509 from home-assistant/dev
0.24
2016-07-17 00:03:26 +02:00
Paulus Schoutsen
16c71ab207 Make sqlalchemy main dependency to help migration (#2536) 2016-07-16 11:39:44 -07:00
Johann Kellerman
06d70544bc Update rpi_gpio.py (#2530)
Should be pullup, since the sensor pulls to ground (at least the one on AndrewHilliday's site)

Or do we want this configurable?
2016-07-16 11:10:41 -07:00
Pascal Vizeli
1877906fdf small bugfix (#2532) 2016-07-16 11:06:36 -07:00
Fabian Affolter
95d033f1af Round output of wind speed and humidity (#2535) 2016-07-16 11:05:29 -07:00
Paulus Schoutsen
7cff107c17 Update frontend 2016-07-16 02:15:46 -07:00
Fabian Affolter
89972ed940 Add validation and switch python-mystrom (#2529) 2016-07-15 09:02:20 -07:00
Pascal Vizeli
6694f29918 add media_player/clear_playlist and line-in/tv support to sonos (#2527)
* add media_player/clear_playlist and line-in/tv support to sonos

* add support source radio

* fix bug

* print TV/Line-In as media_title

* implement universal player

* add to demo platform

* Update demo.py

Better handling for demo object

* add unit tests

* fix unit test
2016-07-15 09:00:41 -07:00
Fabian Affolter
c1798dbe1f Catch ImportError (#2526) 2016-07-14 15:15:53 -07:00
William Scanlon
3246b58437 Support for Wink lock user codes (#2525) 2016-07-14 13:31:16 -07:00
Michaël Arnauts
63356fb5eb supported_media_commands should check for SERVICE_SELECT_SOURCE instead of SUPPORT_SELECT_SOURCE (#2482) 2016-07-14 11:14:49 -07:00
Paulus Schoutsen
ef64e11b50 known devices yaml robustness (#2523) 2016-07-13 23:56:02 -07:00
Paulus Schoutsen
e38b7d97d2 Update frontend 2016-07-13 23:05:40 -07:00
Paulus Schoutsen
8984a6b161 update frontend 2016-07-13 19:11:33 -07:00
Paulus Schoutsen
49b595e32e Update frontend 2016-07-13 19:05:25 -07:00
Johann Kellerman
a60a342864 Logbook: Query databse as_utc(). dt: Use pytz's localize (#2521) 2016-07-13 18:45:55 -07:00
Paulus Schoutsen
88b3aa54a8 Update README.rst 2016-07-13 18:43:04 -07:00
Fabian Affolter
a0c1c918b8 Switch to xmltodict and pass over missing temperature (fixes #2433) (#2463)
* Switch to xmltodict and pass over missing temperature (fixes #2433)

* Add guard clauses
2016-07-13 18:30:11 -07:00
Pascal Vizeli
675283c23e Merge pull request #2520 from pvizeli/Homematic_pro
homematic update to pyhomematic 0.1.9
2016-07-13 23:29:22 +02:00
Pascal Vizeli
c023d1d656 homematic update to pyhomematic 0.1.9 2016-07-13 23:15:21 +02:00
John Arild Berentsen
ce4891fe8e Fix node inclusion and exclusion. Also add secure inclusion. (#2519)
Fix node inclusion and exclusion.
2016-07-13 19:56:14 +02:00
John Arild Berentsen
82d98f5b89 Zwave Node attributes was missing from binary sensors. (#2516)
Fixes #2505
2016-07-13 18:01:59 +02:00
heytcass
2900855061 Update README.rst (#2517)
Editing for typos, clarifying.
2016-07-13 08:59:26 -07:00
Greg Dowling
e31d4863c7 Merge pull request #2514 from home-assistant/bump_pyloopenergy
Bump pyloopenergy version.
2016-07-13 17:34:30 +02:00
Paulus Schoutsen
af736a3e71 Update frontend (temp map solution) 2016-07-13 08:32:13 -07:00
Daniel Høyer Iversen
16feb1c55e Fix issue #2290 for rfxtrx (#2498)
* Fix issue #2290 for rfxtrx

* update tests for rfxtrx sensor

* Replace state_unkown with None in rfxtrx sensor

* Update test_rfxtrx.py
2016-07-13 07:46:11 -07:00
Fabian Affolter
497bc6ac0d Update docstrings (#2513) 2016-07-13 14:47:29 +02:00
pavoni
cae8f8a006 Bump pyloopenergy version. 2016-07-13 13:21:17 +02:00
Fabian Affolter
82e992c63c Links docs (#2510)
* Add link to docs

* Fix link to docs

* Update docstrings

* Fix link
2016-07-13 11:10:31 +02:00
Paulus Schoutsen
3dcafafc6a Merge branch 'master' into dev
Conflicts:
	homeassistant/const.py
2016-07-12 22:31:54 -07:00
Fabian Affolter
ebcda4076e Upgrade zeroconf to 0.17.6 (#2503) 2016-07-12 21:56:23 -07:00
Robbie Trencheny
011f82f9e3 Uber sensor now works with UberPool and has a bit cleaner logic. Also upgraded to latest version of the SDK and switched all single quotes to double quotes (#2507) 2016-07-12 21:52:21 -07:00
Pascal Vizeli
8ed2c8e6a4 add photo functionality to telegram (#2506)
* add photo functionality to telegram

* basic auth need password and username
2016-07-12 21:48:33 -07:00
Brent
b9cadbecaa Allow device_tracker and sensor entity for google travel times (#2479)
* Allow owntracks entity for google travel times

* Added ability to use sensor state as location

* Added zone checks for google travel timesg

* Updated to use global constents and the location helper

* Fixed type in method name and removed redundant validation

* Changed domain condition to be a bit more elegant

* Updated to allow friendly name in any instance including the config

* Fixed bad python syntax and used helper methods
2016-07-12 21:46:11 -07:00
Dan
e1db639317 add hvac mode support to radiotherm (#2442)
* add hvac mode support to radiotherm

off/cool/heat/auto modes are supported

* Moved STATE_AUTO to thermostat component, fix lint

Moved STATE_AUTO to thermostat platform. Fixed lint error.
2016-07-12 21:43:49 -07:00
rhooper
beeae17cab Merge pull request #2489 from home-assistant/recorder-tests
Add more recorder tests
2016-07-12 11:48:22 -07:00
Paulus Schoutsen
8fcfb9136c Update frontend 2016-07-12 09:16:21 -07:00
Fabian Affolter
62c11dde17 Upgrade python-telegram-bot to 4.3.3 (#2504) 2016-07-12 17:51:11 +02:00
Nolan Gilley
e58615b2a5 Join by joaoapps component & notify platform (#2315)
* initial support for Join notifier

add more functions for Join

* rename to joaoapps_join

add message default in schema

move api_key check

* move special join services to their own component

update coveragerc and requirements_all

add icon and smallicon
2016-07-12 08:10:33 -07:00
Fabian Affolter
bef2f87ddc Docstrings (#2502)
* Update docstrings

* Update docstrings

* Add link to docs
2016-07-12 16:46:29 +02:00
John Arild Berentsen
45a8b74d7f Add missing sensor command_class into sensor component (#2501)
command_class_sensor_alarm was also missing from sensor component.
2016-07-12 15:40:55 +02:00
Daniel Høyer Iversen
09a4336bc5 Fix bug in rfxtrx for int device id (#2497) 2016-07-12 01:45:22 -07:00
Paulus Schoutsen
6d60287455 Update frontend 2016-07-12 00:10:05 -07:00
Paulus Schoutsen
6cb91e66c8 Update frontend 2016-07-11 22:07:34 -07:00
Keaton Taylor
2189516966 Clamp brightness between 0 and 255 (#2494)
* Clamp brightness between 0 and 255

Change to ensure that values over 255 supplied by the config will be
clamed to a max value of 255.

* Revert "Clamp brightness between 0 and 255"

This reverts commit c87238e8b5.

* Clamp brightness between 0 and 255

Change to ensure that values over 255 supplied by the config will be
clamed to a max value of 255.
2016-07-11 12:39:46 -07:00
Paulus Schoutsen
1738db9ccc Update models.py 2016-07-11 12:38:35 -07:00
Paulus Schoutsen
e0dd5a8558 Tweak Recorder 2016-07-11 08:56:07 -07:00
John Arild Berentsen
f4f2da5dc7 Missing command class for sensor (#2492) 2016-07-11 16:33:34 +02:00
Daniel Høyer Iversen
085d026ab6 Merge pull request #2487 from home-assistant/rfxtrx
Rfxtrx
2016-07-11 09:18:51 +02:00
Daniel
3b14189021 Make rfxtrx sensor not crash when unknown sensor is discovered 2016-07-11 08:59:14 +02:00
Daniel
6b9e1f3263 update rfxtrx to version 0.9 to support lighting4 2016-07-11 08:54:15 +02:00
Dan
bde2f0d5a0 Imap sensor (#2485)
* Imap unread email sensor

Checks the inbox of a imap account for unread emails. Tested against
gmail.

Example config:

```
sensor:
  - platform: imap
    name: gmail test
    user: USER
    password: PASSWORD
    server: imap.gmail.com
    port: 993

```

* added to .coveragerc

* Code cleanup and typo fix.

* Added port range validation

* Fix lint errors
2016-07-10 13:21:53 -07:00
Daniel Matuschek
50ea3c7744 Implementation of a KNX platform driver and a KNX switch (#2439)
* Implementation of a KNX platform driver and a KNX switch

* Starting working on a KNX thermostat implementation

* Removed KNX thermostat implementation from this branch again

* Make gateway parameter optional (can be auto-detected in many cases)

* Removed check for double initialisation

* KNX messages now will be handled internally and not send to the Home Assistant message bus

* Call update_ha_state only if should_poll is false

* Removed unused HASS variable

* knxip library version changed

* pylint optimization
2016-07-10 10:36:54 -07:00
Fabian Affolter
bde9e4e9c0 Upgrade googlemaps to 2.4.4 (#2481) 2016-07-10 10:32:38 -07:00
GadgetReactor
609458052c New Switch Platform: TPLink Switch (HS100 / HS110) (#2453)
* New Switch Platform: TPLink Switch (HS100 / HS110)

### Information

The TPLink switch platform allows you to control the state of your TPLink Wi-Fi Smart Plugs.

Supported devices (tested):
HS100 (UK)

It should also work with the HS110.

To use your D-Link smart plugs in your installation, add the following to your configuration.yaml file:

"""
# Example configuration.yaml entry
switch:
  platform: tplink
  host: IP_ADRRESS
  name: TPLink Switch
"""

### Configuration variables:

host (Required): The IP address of your TPlink plug, eg. http://192.168.1.105
name (Optional): The name to use when displaying this switch.

* Update tplink.py

Bug fixes

* Separate to a standalone library

* Removed unnecessary imports

* Code cleanup and update reference library link

* TPLink switch support (#2453)

* updated requirements
2016-07-10 09:48:02 -07:00
clach04
344fb9c8b4 Fix typos in demo switch doc strings (#2480) 2016-07-09 09:35:55 +02:00
koen01
03ef74b4ab Add 'Sound' to rfxtrx DATA_TYPES (#2477)
Fixes reception of SelectPlus and correctly adds the chime sensor.
2016-07-08 09:00:21 -07:00
Dale Higgs
ab63fbff3f Fix AsusWRT to prevent SSH key confusion (#2467)
Changed "pub_key" to "ssh_key" while maintaining backwards compatibility. Quotes were also updated to match across the file.
2016-07-08 08:58:31 -07:00
Pascal Vizeli
2ab2f68318 Yahoo! weather support (#2457)
* initial import yahoo weather

* fix temperature in HA style

* add suggestion from @fabaff

* change with suggestion from @balloob
2016-07-08 08:48:38 -07:00
John Arild Berentsen
5d6c13c12c Fix missing generic command class for binary sensors (#2475) 2016-07-08 13:40:04 +02:00
Brent
ff5c3c9f98 Added attributes to the statsd data (#2440)
* Added attributes to the statsd data

* Updated to allow optional attribute logging
2016-07-07 23:09:02 -07:00
Paulus Schoutsen
31b8e49ad2 Fix PyLint 1.6 issues (#2471) 2016-07-07 18:54:16 -07:00
Neil Lathwood
978ebb9c59 Updated braviatv media player to support power status (#2470)
* Updated braviatv media player to support power status

* Updated requirements_all.txt
2016-07-07 18:28:01 -07:00
Johann Kellerman
85e3dfe6a6 Exclude secrets.yaml in yaml !include_directories (#2450) 2016-07-06 22:17:02 -07:00
Marcelo Moreira de Mello - mmello
cf5aeebba6 - Added code validation on Simplisafe module on alarm_control_panel (#2455) 2016-07-06 21:55:47 -07:00
John Arild Berentsen
3e3d9c881e Return name of location to lock instead of serial number. (#2460) 2016-07-06 18:33:58 -07:00
Fabian Affolter
216a756590 Upgrade pyowm to 2.3.2 (fixes #2452) (#2464) 2016-07-06 18:31:11 -07:00
Dale Higgs
db23320659 Add names, units and icons to APCUPSd Sensor (#2443)
* Add names, units and icons to APCUPSd Sensor

* Fix farcy errors

* Attempt fix of errors

* Remove "type:" from configuration

* Remove duplicate "mdi:" prefix
2016-07-06 18:25:57 -07:00
Fabian Affolter
c634cbf866 Upgrade slacker to 0.9.21 (#2458) 2016-07-06 16:48:58 +02:00
Fabian Affolter
ceb332bc31 Upgrade python-telegram-bot to 4.3.2 (#2459) 2016-07-06 16:48:43 +02:00
Dale Higgs
86e3fdee1c Fix flood of errors if Plex server goes offline (#2447) 2016-07-05 10:50:43 -07:00
Fabian Affolter
0f4acb59fe Change schema for elevation to int (#2436) 2016-07-05 08:01:59 -07:00
Paulus Schoutsen
c5b2df01d9 Update frontend 2016-07-04 10:40:43 -07:00
Jordan Keith
83a72ab4dc Update unifi.py to support sites (#2434)
* Update unifi.py

Add support for a site that is not the default within the Unifi Controller.

i.e. A controller with multiple sites:

 - Home
 - Friends
 - Parents (default)

Supplying the identifier for 'Home' now means that the devices tracked will be associated with 'Home'.

* Update test_unifi.py

Fix test modules as well.
2016-07-04 08:20:00 -07:00
Johann Kellerman
2cdef7fb2f Persistent_notification service description (#2407)
* Persistent_notification service description

* Add service name to services.yaml
2016-07-03 18:33:23 -07:00
Paulus Schoutsen
659d67f362 properly cleanup after config test 2016-07-03 18:24:17 -07:00
Brent
ffccca1f60 Updated to new statsd library and added state change counters (#2429) 2016-07-03 15:21:18 -07:00
Brent
ef74bd9892 Updated to version 3.1.2 and fixed invalid host setup error (#2431) 2016-07-03 15:17:08 -07:00
Paulus Schoutsen
3447fdc76f Make scripts available via CLI (#2426)
* Rename sqlalchemy migrate script

* Add script support to CLI
2016-07-03 11:38:14 -07:00
rhooper
a2e45b8fdd Switch to SQLAlchemy for the Recorder component. Gives the ability t… (#2377)
* Switch to SQLAlchemy for the Recorder component.  Gives the ability to use MySQL or other.

* fixes for failed lint

* add conversion script

* code review fixes and refactor to use to_native() model methods and execute() helper

* move script to homeassistant.scripts module

* style fixes my tox lint/flake8 missed

* move exclusion up
2016-07-02 11:22:51 -07:00
Fabian Affolter
a65f196d19 Use XML source instead of website (#2400) 2016-07-02 11:22:29 -07:00
William Scanlon
a74cdc7b0d SimpliSafe Alarm (#2409) 2016-07-02 11:21:15 -07:00
rhooper
449be29022 support newer deCONZ api versions (#2410) 2016-07-02 11:18:54 -07:00
Fabian Affolter
ba8e417390 Upgrade python-telegram-bot to 4.3.1 (#2414) 2016-07-02 11:16:14 -07:00
Fabian Affolter
cad995a5f4 Upgrade slacker to 0.9.18 (#2415) 2016-07-02 11:15:39 -07:00
Fabian Affolter
06efee7ecf Upgrade fuzzywuzzy to 0.11.0 (#2416) 2016-07-02 11:12:48 -07:00
Paulus Schoutsen
bacc14d845 Merge pull request #2421 from armills/zwave-color-bulbs
Move Aeotec bulb color logic to Zwave workaround
2016-07-02 11:11:44 -07:00
Paulus Schoutsen
6f8a733434 Merge pull request #2424 from home-assistant/hotfix-23-1
Hotfix 0.23.1
2016-07-02 10:20:57 -07:00
Paulus Schoutsen
906e64fdb5 Bump version to 0.23.1 2016-07-02 10:06:24 -07:00
William Scanlon
8e406a70f6 Downgraded pubnub version (#2420) 2016-07-02 10:06:09 -07:00
AlucardZero
8d9f4a1754 check for OP_NO_COMPRESSION support before trying to use it (#2423) 2016-07-02 10:06:09 -07:00
rhooper
0a53b863cd bump pyvera version to 0.2.13 (#2406) 2016-07-02 10:06:09 -07:00
Fabian Affolter
80feb322f9 A mini update (#2418) 2016-07-02 10:05:19 -07:00
William Scanlon
2b514139eb Downgraded pubnub version (#2420) 2016-07-02 10:04:51 -07:00
AlucardZero
2b8dfb2a0e check for OP_NO_COMPRESSION support before trying to use it (#2423) 2016-07-02 10:03:49 -07:00
Adam Mills
6477122b23 Move Aeotec bulb color logic to Zwave workaround
Default behavior for warm/cold white channels is to assume the white
channel is mixed with the rgb. This is a sane default and should support
the Fibaro RGBW LED controller.
2016-07-02 12:08:01 -04:00
Fabian Affolter
1e9db41028 Remove unused links (#2417) 2016-07-02 15:06:13 +02:00
Fabian Affolter
21d3be4027 Fix update (#2402) 2016-07-02 09:09:22 +02:00
rhooper
48b3c98646 bump pyvera version to 0.2.13 (#2406) 2016-07-01 18:47:55 -07:00
Fabian Affolter
15803d1773 Move content to devel docs (fixes #2403) (#2408) 2016-07-02 00:47:54 +02:00
Fabian Affolter
3870d2e0cd Docstring updates (#2404)
* Fix docstring

* Fix typo

* Update docstrings

* Update docstrings
2016-07-01 21:39:30 +02:00
Paulus Schoutsen
fe0164b137 Version bump to 0.24.0.dev0 2016-07-01 00:58:29 -07:00
Paulus Schoutsen
6bc504bfcc Merge pull request #2381 from home-assistant/dev
0.23
2016-07-01 00:58:11 -07:00
Paulus Schoutsen
c44eefacb4 Version bump to 0.23.0 2016-07-01 00:57:55 -07:00
patkap
952b1a3e0c kodi platform: following jsonrpc-request version bump (0.3), let kodi file abstraction layer handle a collection item, url or file to play (#2398) 2016-06-30 16:35:20 -07:00
Pascal Vizeli
a57cd58675 Merge pull request #2399 from pvizeli/Homematic_fix
Homematic fix
2016-07-01 00:17:04 +02:00
Pascal Vizeli
d67f79e2eb remove unused pylint exeption 2016-07-01 00:01:16 +02:00
Pascal Vizeli
d326d187d1 fix bug in event handling and add cast for watersensor 2016-06-30 23:54:04 +02:00
Pascal Vizeli
d0b1619946 Merge remote-tracking branch 'refs/remotes/home-assistant/dev' into Homematic_fix 2016-06-30 23:44:27 +02:00
Lewis Juggins
21be4c1828 Add Sonos unjoin functionality (#2379) 2016-06-30 14:21:57 -07:00
Paulus Schoutsen
d1f4901d53 Migrate to cherrypy wsgi from eventlet (#2387) 2016-06-30 09:02:12 -07:00
patkap
7582eb9f63 jsonrpc-request version bump (0.3) (#2397) 2016-06-30 08:40:01 -07:00
Fabian Affolter
419ff18afb Docstrings (#2395)
* Replace switch with lock

* Update docstrings

* Add link to docs

* Add link to docs and update docstrings

* Update docstring

* Update docstrings and fix typos

* Add link to docs

* Add link to docs

* Add link to docs and update docstrings

* Fix link to docs and update docstrings

* Remove blank line

* Add link to docs
2016-06-30 10:33:34 +02:00
Fabian Affolter
8dd7ebb08e Add the two next trains (#2390) 2016-06-29 17:44:35 -07:00
rhooper
5cce02ab62 vera lock support (#2391)
* vera lock support

* fix formatting
2016-06-29 17:28:20 -07:00
William Scanlon
6a816116ab Wink subscription support (#2324) 2016-06-29 14:16:53 -07:00
Pascal Vizeli
bb0f484caf update pyhomematic and homematic use now events from HA for remotes 2016-06-29 22:42:35 +02:00
Brent
3c5c018e3e Fixed issue with roku timeouts throwing exceptions when roku losses n… (#2386)
* Fixed issue with roku timeouts throwing exceptions when roku losses networking

* Fixed pylint errors
2016-06-28 20:26:37 -07:00
Ardetus
78e7e17484 Support more types of 1wire sensors and bus masters (#2384)
* Support more types of 1wire sensors and bus masters

- Added support for DS18S20, DS1822, DS1825 and DS28EA00 temperature sensors
- Added support for bus masters which use fuse to mount device tree.
  Mount can be specified by 'mount_dir' configuration parameter.

* Correct the lint problem
2016-06-28 18:39:16 -07:00
AlucardZero
31d2a5d2d1 Reenable TLS1.1 and 1.2 while leaving SSLv3 disabled (#2385) 2016-06-28 16:48:25 -07:00
Pascal Vizeli
baa9bdf6fc change homematic to autodetect only 2016-06-28 22:53:53 +02:00
Fabian Affolter
00179763ef Upgrade influxdb to 3.0.0 (#2383) 2016-06-28 07:56:14 -07:00
Fabian Affolter
7a73dc7d6a Upgrade websocket-client to 0.37.0 (#2382) 2016-06-27 23:47:35 -07:00
Paulus Schoutsen
d0b9b588a9 Merge branch 'master' into dev
Conflicts:
	homeassistant/const.py
2016-06-27 23:26:46 -07:00
Fabian Affolter
592c599488 Upgrade Werkzeug to 0.11.10 (#2380) 2016-06-27 17:39:44 -07:00
Paulus Schoutsen
6714392e9c Move elevation to core config and clean up HTTP mocking in tests (#2378)
* Stick version numbers

* Move elevation to core config

* Migrate forecast test to requests-mock

* Migrate YR tests to requests-mock

* Add requests_mock to requirements_test.txt

* Move conf code from bootstrap to config

* More config fixes

* Fix some more issues

* Add test for set config and failing auto detect
2016-06-27 09:02:45 -07:00
Adam Mills
dc75b28b90 Initial Support for Zwave color bulbs (#2376)
* Initial Support for Zwave color bulbs

* Revert name override for ZwaveColorLight
2016-06-27 09:01:41 -07:00
Pascal Vizeli
d2509ce9e3 Merge remote-tracking branch 'refs/remotes/home-assistant/dev' into dev 2016-06-27 15:57:01 +02:00
Pascal Vizeli
3afc566be1 Fix timing bug while linking HM device to HA object
https://github.com/danielperna84/home-assistant/issues/14
2016-06-26 23:18:18 +02:00
Dan
fb3e388f04 Depreciate ssl2/3 (#2375)
* Depreciate ssl2/3

Following the best practices as defind here:
https://mozilla.github.io/server-side-tls/ssl-config-generator/

* Updated comment with better decription

Links to the rational rather than the config generator; explains link.

* add comment mentioning intermediate
2016-06-26 11:49:46 -07:00
Fabian Affolter
254b1c46ac Remove lxml dependency (#2374) 2016-06-26 10:13:52 -07:00
Philip Lundrigan
d13cc227cc Push State (#2365)
* Add ability to push state changes

* Add tests for push state changes

* Fix style issues

* Use better name to force an update
2016-06-26 00:33:23 -07:00
Paulus Schoutsen
446f998759 Merge pull request #2368 from pvizeli/Homematic
Homematic Support (clean)
2016-06-25 20:37:53 -07:00
Paulus Schoutsen
206e7d7a67 Extend persistent notification support (#2371) 2016-06-25 16:40:33 -07:00
Pascal Vizeli
c3b25f2cd5 fix logging-not-lazy 2016-06-25 22:20:09 +02:00
Pascal Vizeli
f3199e7dae fix wrong import 2016-06-25 22:13:29 +02:00
Pascal Vizeli
4ecd724578 fix linter errors 2016-06-25 22:10:47 +02:00
Pascal Vizeli
e4d3b25f1e Merge remote-tracking branch 'refs/remotes/home-assistant/dev' into Homematic
# Conflicts:
#	homeassistant/components/thermostat/homematic.py
2016-06-25 22:02:14 +02:00
Pascal Vizeli
7e7f7b64e5 Merge remote-tracking branch 'refs/remotes/home-assistant/dev' into dev 2016-06-25 21:58:34 +02:00
Pascal Vizeli
e0e9d3c57b change autodiscovery 2016-06-25 21:37:51 +02:00
Pascal Vizeli
a687bdb388 Revert "Third batch of (minor) fixes as suggested by @balloob"
This reverts commit 87c138c559.
2016-06-25 21:03:41 +02:00
Pascal Vizeli
199fbc7a15 Revert "fix autodiscovery"
This reverts commit 86ccf26a1a.
2016-06-25 21:03:37 +02:00
Pascal Vizeli
57754cd2ff Revert "fix discovery function"
This reverts commit be72b04855.
2016-06-25 21:03:33 +02:00
John Arild Berentsen
21381a95d4 Zwave fixes. (#2373)
* Fix move_up and move_down

I managed to switch up the zwave move_up and move_down commands.
This PR fixes it.
Thank you @nunofgs for bringing this to my attention :)

* Fix for aeotec 6 multisensor
2016-06-25 20:35:36 +02:00
Pascal Vizeli
be72b04855 fix discovery function 2016-06-25 20:30:02 +02:00
Pascal Vizeli
86ccf26a1a fix autodiscovery 2016-06-25 20:12:49 +02:00
Pascal Vizeli
87c138c559 Third batch of (minor) fixes as suggested by @balloob 2016-06-25 19:25:59 +02:00
Pascal Vizeli
b3acd7d21d add resolvenames function support from pyhomematic (homegear only) 2016-06-25 18:54:14 +02:00
Pascal Vizeli
a19f7bff28 fix false autodetect with HM GongSensor types 2016-06-25 18:36:52 +02:00
Pascal Vizeli
30b7c6b694 Second batch of (minor) fixes as suggested by @balloob 2016-06-25 18:34:35 +02:00
Daniel Perna
43faeff42a Moved trx/except, added debug messages, minor fixes 2016-06-25 18:19:05 +02:00
Daniel Perna
5ca26fc13f Moved try/except-block and moved delay to link_homematic 2016-06-25 16:25:33 +02:00
Daniel Perna
04748e3ad1 First batch of (minor) fixes as suggested by @balloob 2016-06-25 15:10:19 +02:00
Johann Kellerman
7b02dc434a Secrets support for configuration files (#2312)
* ! secret based on yaml.py

* Private Secrets Dict, removed cmdline, fixed log level

* Secrets limited to yaml only

* Add keyring & debug tests
2016-06-25 00:10:03 -07:00
Matthew Treinish
1c1d18053b Add cmus media device (#2321)
This commit adds support for the cmus console music player as a media
device.
2016-06-25 00:06:36 -07:00
arsaboo
2ac752d67a Add OpenExchangeRates sensor (#2356)
* Create openexchangerates.py

* Create OpenExchangeRates Sensor

* Add openexchangerate sensor

* Update openexchangerates.py

* Added params dict

* Update openexchangerates.py

* Update openexchangerates.py

* Update openexchangerates.py

* Update openexchangerates.py

* Added API key validation

* Update openexchangerates.py
2016-06-25 00:02:28 -07:00
John Arild Berentsen
a1ef1c996c Fix physical manual update of state of device (#2372) 2016-06-24 23:22:14 -07:00
Paulus Schoutsen
cbb897b2cf Update frontend 2016-06-24 22:34:55 -07:00
Fabian Affolter
e4b67c9574 Add persistent notification component (#1844) 2016-06-24 21:43:44 -07:00
Daniel Høyer Iversen
7a8c5a0709 Add frontend to the example config (#2367) 2016-06-24 21:40:02 -07:00
Paulus Schoutsen
aadd730ddd Merge branch 'pr/2348' into dev
Conflicts:
	.coveragerc
2016-06-24 21:30:08 -07:00
Paulus Schoutsen
68df3deee0 ABC consistent not implemented behavior (#2359) 2016-06-24 21:27:40 -07:00
Johann Kellerman
c616115419 rpi_gpi garage_door controller (#2369) 2016-06-24 21:22:10 -07:00
Daniel Perna
dfe1b8d934 Fixed minor feature-detection bug with incomplet configuration 2016-06-24 19:46:42 +02:00
John Arild Berentsen
ec8dc25c9c Zwave garagedoor (#2361)
* First go at zwave Garage door

* Refactor of zwave discovery

* Allaround fixes for rollershutter and garage door
2016-06-24 11:44:24 -04:00
Pascal Vizeli
67a04c2a0e Initial clean import 2016-06-24 10:06:58 +02:00
Dale Higgs
600a3e3965 Allow service data to be passed to shell_command (#2362) 2016-06-23 08:47:56 -07:00
Fabian Affolter
3349bdc2bd Log successful and failed login attempts (#2347) 2016-06-23 12:34:13 +02:00
Dan Cinnamon
12e26d25a5 Bump to pyenvisalink 1.0 (#2358) 2016-06-22 22:48:16 -07:00
Matthew Treinish
aa3d0e1047 Fix incorrect check on presence of password and pub_key (#2355)
This commit fixes an issue with the use of None in default values
for the config get() calls in __init__() of AsusWrtDeviceScanner.
These values are cast as strings and when a NoneType is cast it
returns the string "None" this broke the check for the existence
of these fields. This commit fixes the issue by changing the default
value to be an empty string '' which will conform with the behavior
expected by the ssh login code.

Closes #2343
2016-06-22 17:01:39 -07:00
happyleaves
d0ee8abcb8 couple fixes 2016-06-22 17:29:22 -04:00
happyleaves
94b47d8bc3 addressed review 2016-06-22 17:07:46 -04:00
Fabian Affolter
7b942243ab Increase interval (#2353) 2016-06-22 20:12:36 +02:00
Paulus Schoutsen
a70f922a71 ps - add reload core config service (#2350) 2016-06-22 09:13:18 -07:00
Jean-Philippe Bouillot
9ce9b8debb Add support for wind, battery, radio signals for Netatmo sensor (#2351)
* Add support for wind, battery, radio signals

* Fix indentation error

* second indentation fix

* Fix for pylint too many statements error

* Moving "pylint: disable=too-many-statements"
2016-06-22 09:01:53 -07:00
Dale Higgs
d7b006600e [notify.pushover] Fix 'NoneType' error on data retrieval (#2352)
* Fix 'NoneType' error on data retrieval

* Reduce code for empty dict as the default
2016-06-22 08:54:44 -07:00
Paulus Schoutsen
a564fe8286 Fix error log (#2349) 2016-06-21 22:26:40 -07:00
happyleaves
7fc9fa4b0c satisfy farcy 2016-06-21 19:31:40 -04:00
happyleavesaoc
d87e969671 add cec platform 2016-06-21 18:36:34 -04:00
Fabian Affolter
278514b994 Add support for Fixer.io (#2336)
* Add support for Fixer.io

* Add unit of measurment and set throttle to one day
2016-06-21 07:43:02 -07:00
Fabian Affolter
38b0336694 Upgrade paho-mqtt to 1.2 (#2339) 2016-06-20 21:51:50 -07:00
Fabian Affolter
caa096ebd5 Upgrade psutil to 4.3.0 (#2342)
* Upgrade psutil to 4.3.0

* Remove period
2016-06-20 21:51:07 -07:00
Fabian Affolter
ba417a730b Upgrade slacker to 0.9.17 (#2340) 2016-06-20 08:55:57 -07:00
dale3h
6fa095f4a7 Add additional Pushover parameters (#2309)
* Add additional Pushover parameters

Add support for more Pushover parameters: target (device), sound, url, url_title, priority, timestamp

* Remove data dictionary reference

https://github.com/home-assistant/home-assistant/pull/2309#discussion_r67603127
2016-06-19 23:08:30 -07:00
John Arild Berentsen
5efa076080 Make sure we exit loop when value is set (#2326) 2016-06-19 22:42:23 -07:00
Antonio Párraga Navarro
cbc0833360 Support for Sony Bravia TV (#2243)
* Added Sony Bravia support to HA

* Improvements to make it work on my poor raspberry 1

* Just a typo

* A few fixes in order to pass pylint

* - Remove noqa: was due to the 80 characters max per line restriction
- Move communication logic to a separate library at https://github.com/aparraga/braviarc.git
- Added dependency and adapt the code according to that

* A few improvements

* Just a typo in a comment

* Rebase from HM/dev

* Update requirements by executing the script/gen_requirements_all.py

* More isolation level for braviarc lib

* Remove unnecessary StringIO usage

* Revert submodule polymer commit

* Small refactorization and clean up of unused functions

* Executed script/gen_requirements_all.py

* Added a missing condition to ensure that a map is not null

* Fix missing parameter detected by pylint

* A few improvements, also added an empty line to avoid the lint error

* A typo
2016-06-19 22:35:26 -07:00
John Arild Berentsen
2e62053629 Basic implementation of Zwave Rollershutters (#2313)
* Basic implementation of Zwave Rollershutters

* Better filtering, by @wokar

* Fix typo

* Remove polling from component, and loop fix

* linter fix

* Filter to channel devices to correct component

* Remove overwriting of parent node name
2016-06-19 22:30:57 -07:00
Paulus Schoutsen
4f09279524 Merge pull request #2334 from home-assistant/hotfix-22-1
Hotfix 0.22.1
2016-06-19 21:16:22 -07:00
Paulus Schoutsen
57dfce1583 Version bump to 0.22.1 2016-06-19 20:55:21 -07:00
Paulus Schoutsen
33bafb8451 fix insteon hub discovery 2016-06-19 20:54:22 -07:00
Paulus Schoutsen
f59e242c63 fix insteon hub discovery 2016-06-19 20:53:56 -07:00
Dan Cinnamon
cb6f50b7ff Envisalink support (#2304)
* Created a new platform for envisalink-based alarm panels (Honeywell/DSC)

* Added a sensor component and cleanup

* Completed initial development.

* Fixing pylint issues.

* Fix more pylint issues

* Fixed more validation issues.

* Final pylint issues

* Final tweaks prior to PR.

* Fixed final pylint issue

* Resolved a few minor issues, and used volumptous for validation.

* Fixing final lint issues

* Fixes to validation schema and refactoring.
2016-06-19 10:45:07 -07:00
Paulus Schoutsen
44177a7fde Version bump to 0.23.0.dev0 2016-06-18 13:21:04 -07:00
Paulus Schoutsen
8c505e625b Merge pull request #2323 from home-assistant/dev
0.22
2016-06-18 13:20:51 -07:00
Paulus Schoutsen
314fa42298 Version bump to 0.22 2016-06-18 13:19:57 -07:00
Paulus Schoutsen
a80a74b586 Add camera timeouts 2016-06-18 13:06:14 -07:00
Paulus Schoutsen
2508e9f9ff Add timeout to mjpeg streams 2016-06-18 12:34:39 -07:00
Paulus Schoutsen
71157dbec9 Merge branch 'master' into dev
Conflicts:
	homeassistant/components/frontend/version.py
	homeassistant/components/frontend/www_static/core.js.gz
	homeassistant/components/frontend/www_static/frontend.html
	homeassistant/components/frontend/www_static/frontend.html.gz
	homeassistant/components/frontend/www_static/service_worker.js
	homeassistant/components/frontend/www_static/service_worker.js.gz
	homeassistant/const.py
2016-06-18 12:00:38 -07:00
devdelay
1f7792678b Add service set_hvac_mode (#2303)
* set hvac_mode

* Update __init__.py

* Update __init__.py
2016-06-18 10:20:39 -07:00
Phil Kates
40840044ca Wink Rollershutter (#2294)
* Update python-wink to 0.7.7

* Add Wink Rollershutter component
2016-06-18 09:59:13 -07:00
Nick Touran
2882f05f2c Added template rendering to shell_command component (#2268)
* Added template rendering to `shell_command` component

* Security upgrades to template rendering in shell_command.

* Added new unit tests for shell_command templates.
Better failure when template is invalid in shell_command
2016-06-18 09:57:18 -07:00
Fabian Affolter
b646accf87 Catch ValueError (#2296)
* Catch ValueError

* Less options and don't use state
2016-06-18 09:48:32 -07:00
Nick Touran
e7ea6ecf5a Better handling for when user hasn't properly configured Pandora client (#2317) 2016-06-18 08:23:35 -07:00
Paulus Schoutsen
29343ad651 Fix pep257 bt home hub 5 test 2016-06-18 08:20:14 -07:00
Fabian Affolter
28d86207e1 Add support for hydrological data from FOEN (#2318) 2016-06-18 08:18:48 -07:00
Fabian Affolter
6a01227635 Upgrade python-telegram-bot to 4.2.1 (#2319) 2016-06-18 08:16:28 -07:00
Nolan Gilley
b6fb21edaf Plex sensor (#2210)
add option to name in config

fix const import

use plexapi

add myplex support for remote access

use first server if server not specified

use list comprehension

use dictionary comprehension
2016-06-14 23:07:00 -07:00
Paulus Schoutsen
a65a122464 Fix discovery (#2305) 2016-06-14 22:51:46 -07:00
Nick Touran
5c601f1d5f Stability improvement in Pandora and proper shutdown in LIRC (#2299)
* Pandora cleanups and enhancements

Added media_content_type
reduced debug messages
made more robust station list
Eliminated auto-pause detection issue

* Added proper de-init of LIRC

* Now won't re-spawn Pandora client if turn_on command is sent twice
2016-06-14 22:42:54 -07:00
Lewis Juggins
7b8b78ec0e BT Home Hub 5 device tracker support (#2250) 2016-06-14 22:41:49 -07:00
Per Sandström
38030fcfca ASUSWRT Autodetect protocol (#2300) 2016-06-14 22:17:32 -07:00
Paulus Schoutsen
39913075f4 Fix Locative view name 2016-06-14 22:12:44 -07:00
Paulus Schoutsen
2036c44364 Hotfix 21 2 (#2302)
* Update frontend

Conflicts:
	homeassistant/components/frontend/version.py
	homeassistant/components/frontend/www_static/core.js.gz
	homeassistant/components/frontend/www_static/frontend.html
	homeassistant/components/frontend/www_static/frontend.html.gz
	homeassistant/components/frontend/www_static/home-assistant-polymer
	homeassistant/components/frontend/www_static/service_worker.js
	homeassistant/components/frontend/www_static/service_worker.js.gz

* Add a default OPTIONS handler for wsgi (#2301)

When a browser makes a CORS request, it often makes a 'preflight'
options request in order to make sure the resource is valid, and that
it has the right CORS access. This adds a default OPTIONS handler for
all views. If a view needs to customize the OPTIONS handler for some
reason, it's free to, but this way CORS will work.

* Version bump to 0.21.2
2016-06-14 19:54:09 -07:00
Josh Wright
3fcc07af04 Add a default OPTIONS handler for wsgi (#2301)
When a browser makes a CORS request, it often makes a 'preflight'
options request in order to make sure the resource is valid, and that
it has the right CORS access. This adds a default OPTIONS handler for
all views. If a view needs to customize the OPTIONS handler for some
reason, it's free to, but this way CORS will work.
2016-06-14 19:44:12 -07:00
Paulus Schoutsen
65750f667b Update frontend 2016-06-14 18:39:44 -07:00
Per Sandström
f07ba1e9a6 Merge pull request #2298 from persandstrom/verisure_lower_severity_of_message
lower severity of non critical error
2016-06-14 20:56:49 +02:00
Per Sandström
6e5e0e7acc lower severity of non critical error 2016-06-14 20:21:42 +02:00
Paulus Schoutsen
9d7c9d1262 Update frontend 2016-06-13 20:11:01 -07:00
Paulus Schoutsen
42c5475284 Fix Wink discovery 2016-06-13 20:06:32 -07:00
Edward Romano
8e839be938 Refactor Forecast.io (#2217)
* Refactor Forecast.io

* Some more refactoring and code review workoff

* Dict switch refactor

* CamelCase for data lookup

* Fixing unit_of_measure update

* Better default return for unit_of_measurement

* Test fix
2016-06-13 18:54:49 -07:00
Paulus Schoutsen
ab48010d14 Add 1024x1024 favicon 2016-06-13 00:04:54 -07:00
Matthew Treinish
1381984b77 Add ssh public key support to the asuswrt component (#2287)
The pexpect.pxssh module has support for using public key
authentication. [1] This commit adds support for leveraging that and
establishing a ssh connection with a public key instead of a password.

[1] http://pexpect.readthedocs.io/en/stable/api/pxssh.html#pexpect.pxssh.pxssh.login
2016-06-12 21:27:41 -07:00
Paulus Schoutsen
6dcf3682df Tweak event helper 2016-06-12 20:37:37 -07:00
Nick Touran
65d1f7af50 Added Pandora radio media player (#2274)
* Added Pandora media player utilizing the Pianobar client

* Added Pandora to .coveragerc ignore

* Fixes some docstring formats in Pandora

* More minor formatting tweaks for Pandora

* Eliminated non-portable assumption from Pandora component

* Updated Pandora to properly update currently-playing song.

* Docstring fixes in Pandora

* Added check to ensure Pianobar client is available in path for Pandora.

* Made Pandora client verification a function instead of method.

* Better handling of dependency verification in Pandora.
2016-06-12 18:35:12 -07:00
Jesse Zoldak
16f4695a13 Add tests for forecast.io (#2227)
* Add tests for forecast.io

* Fix linting items and don't call a platform a component
2016-06-12 17:22:58 -07:00
Landrash
c7ee74a573 Local file - Camera platform (#2282) 2016-06-12 16:26:29 -07:00
arsaboo
8e2c1ff4aa Include the Voltage sensor (#2285)
The API provides the voltage information and will be useful for people to troubleshoot their BloomSky.
2016-06-12 16:19:13 -07:00
thejacko12354
e437151881 Update samsungtv.py (#2286)
Changed line 75 'KEY_POWER' to 'KEY'
Fixes the problem that every 10 sec the tv interprets that the Up-button is pressed
2016-06-12 16:03:40 -07:00
Martin Hjelmare
81ca175906 Add mysensors IR switch device and service (#2239)
* Add mysensors IR switch device and service

* Add MySensorsIRSwitch as child class to MySensorsSwitch.
* Add platform specific service mysensors_send_ir_code. Only call
	device method in service function if device is IR device.
* Add service and required attribute to state helper to support scenes.
* Move V_IR_SEND type from sensor.mysensors to switch.mysensors
	platform.
* Populate switch.services.yaml with service descriptions.

* Fix check of entity_id in service function

Since multiple entity_ids can be passed as service data, and the
entity_id service attribute is forced to a list by the service
validation schema, the check in the service function should iterate
over any entity ids.
2016-06-12 23:04:45 +02:00
Paulus Schoutsen
ebe4c39020 Merge branch '0-21-1' into dev
Conflicts:
	homeassistant/components/frontend/www_static/core.js.gz
	homeassistant/components/frontend/www_static/frontend.html.gz
	homeassistant/components/frontend/www_static/service_worker.js.gz
	homeassistant/const.py
	requirements_all.txt
	setup.py
2016-06-12 00:25:36 -07:00
Paulus Schoutsen
952afeb717 Merge pull request #2281 from home-assistant/0-21-1
Hotfix 0.21.1
2016-06-12 00:23:03 -07:00
Paulus Schoutsen
40be883c0e version bump to 0.21.1 2016-06-12 00:06:37 -07:00
Paulus Schoutsen
5c87883c86 Update frontend 2016-06-12 00:04:37 -07:00
St. John Johnson
b2b1804f5e Fixing MJPEG streaming in Werkzeug by taking advantage of direct_passthrough (#2277) 2016-06-12 00:03:18 -07:00
Paulus Schoutsen
f5fc4cd97f Alexa: run script before generating response text (#2276) 2016-06-12 00:03:18 -07:00
Paulus Schoutsen
bc78997bbd Bugfixes random (#2270)
* Fix Z-Wave autoheal network

* Make config_per_platform handle bad config better
2016-06-12 00:03:18 -07:00
Paulus Schoutsen
35dd3b8d0d Update screenshot README 2016-06-12 00:03:17 -07:00
Nick Touran
491c06f53b Recover from rare error condition from LIRC (#2267)
* More resilient accessing of LIRC codes to handle rare error case.

* Line length fix in LIRC
2016-06-12 00:03:17 -07:00
Gergely Imreh
31c1b7f6ad sensor/gtfs: add sanity check, origin earlier than destination (#2265)
Previously experienced issues on routes where services operate in both
directions. The query picked up not just paths where service goes
from Origin ->  Destination, but trips going Destination -> Origin,
and shown bogus results.

Ensure that this doesn't happen by requiring the origin station's
stop_sequence value to be lower than the destination station.
2016-06-12 00:03:17 -07:00
Paulus Schoutsen
da5b50848a Add eventlet to base requirements (#2264)
Conflicts:
	requirements_all.txt
	setup.py
2016-06-12 00:02:58 -07:00
Paulus Schoutsen
586f69ac95 Update frontend 2016-06-11 23:57:24 -07:00
St. John Johnson
3723c3a7e8 Fixing MJPEG streaming in Werkzeug by taking advantage of direct_passthrough (#2277) 2016-06-11 20:50:10 -07:00
Paulus Schoutsen
145c98c40c Alexa: run script before generating response text (#2276) 2016-06-11 17:57:04 -07:00
Paulus Schoutsen
30f74bb3ca Migrate to generic discovery method (#2271)
* Migrate to generic discovery method

* Add tests for discovery
2016-06-11 17:43:13 -07:00
Paulus Schoutsen
c9756c40e2 Bugfixes random (#2270)
* Fix Z-Wave autoheal network

* Make config_per_platform handle bad config better
2016-06-10 22:53:31 -07:00
Paulus Schoutsen
b60806583c Update asuswrt.py 2016-06-10 21:14:11 -07:00
Michaël Arnauts
868c08e34b Add stop command to google cast component (#2269)
* Add stop command to google cast component

* Add SUPPORT_STOP capabilities to google cast component
2016-06-10 21:12:50 -07:00
Paulus Schoutsen
71eb09ee5e Fix configurator tests 2016-06-10 20:50:04 -07:00
Paulus Schoutsen
809e613148 Update frontend 2016-06-10 19:45:15 -07:00
Paulus Schoutsen
0dbc023f5b Fix lint errors 2016-06-09 23:41:26 -07:00
Joseph Piron
b6d75e6c5a Netio Switch platform support (#2181)
* WSGI based request handler

with a bit of polishing

Signed-off-by: eagleamon <joseph.piron@gmail.com>

* removed stale comment and fixed version, but failed tests do not seem to be related

* removing the wrapper hack

* added in requirements file

* Found the caved in lint error..
2016-06-09 23:40:14 -07:00
wind-rider
c78e6c088e Add a swagger.yaml file (#2182)
* Add a swagger.yaml file

@balloob
I created a swagger configuration file that will help people create clients (apps / frontends) for Home Assistant more easily. Based upon this code it is even possible to generate client code for several programming languages.

I created it by hand now, so when the API changes it will need to be updated. That's why it would be better to generate this specification automatically. This is possible for API frameworks but I don't know whether it is possible for the handwritten endpoints in Home Assistant. Maybe you could assist here?

This documentation could be used to replace a part of https://home-assistant.io/developers/rest_api/.

* Added restrict parameter

* Moved swagger file to docs folder
2016-06-09 23:35:47 -07:00
Thiago Oliveira
02f342b670 add fan_min_on_time service to ecobee (#2159) 2016-06-09 23:34:29 -07:00
Hugo Dupras
213a738240 Add Netatmo component and add support for Netatmo Welcome Camera (#2233)
* Introducing the Netatmo component

As Netatmo is providing several type of device (sensor, camera), a new Netatmo
component needs to be created in order to centralize the Netatmo login data.
Currently this change only impacts the Netatmo Weather station

* Add new Netatmo library

This new API will provide access to the Welcome Camera

* Basic support for Netatmo Welcome camera

This change introduces support for Netatmo Welcome camera. Currently, it will
add all detected camera to Home Assistant, camera filtering (similar to the one
used for weather station modules) will be added later

* Remove useless REQUIREMENTS

* Fixes for Netatmo Welcome support

* Allow to filter Welcome cameras by name and/or home

* Update requirements for Netatmo components

* Fix multi-camera support for Welcome

* Fix pep8 error/warning

* This commit also adds improved logging for bad credentials

* Add Throttle decorator for Welcome update function

As the update function updates the data for all cameras, we should prevent this
function to be called several time during an interval
2016-06-09 23:31:36 -07:00
Paulus Schoutsen
e4fe8336cc Update frontend 2016-06-09 23:27:35 -07:00
Paulus Schoutsen
068e62623d Update frontend 2016-06-09 22:12:45 -07:00
Jeffrey Lin
30f5727b40 Added support for AP mode in asuswrt (#2263)
* Added support for AP mode in asuswrt

* Corrected number of return values in asuswrt
2016-06-09 21:30:47 -07:00
Paulus Schoutsen
815a6999b1 Update screenshot README 2016-06-09 21:23:20 -07:00
Nick Touran
c229d9e90f Recover from rare error condition from LIRC (#2267)
* More resilient accessing of LIRC codes to handle rare error case.

* Line length fix in LIRC
2016-06-09 20:53:41 -07:00
Gergely Imreh
abc353c083 sensor/gtfs: add sanity check, origin earlier than destination (#2265)
Previously experienced issues on routes where services operate in both
directions. The query picked up not just paths where service goes
from Origin ->  Destination, but trips going Destination -> Origin,
and shown bogus results.

Ensure that this doesn't happen by requiring the origin station's
stop_sequence value to be lower than the destination station.
2016-06-09 20:48:12 -07:00
Paulus Schoutsen
38639d26ea Add eventlet to base requirements (#2264) 2016-06-09 18:47:35 -07:00
Hugo Dupras
1c637558bf Round download speed for nzbget sensor (#2255) 2016-06-09 08:06:01 -07:00
mikebarris
5223d20668 Removed webcolors dependency in favor of dictionary lookup. (#2215)
* Removed webcolors dependency in favor of dictionary lookup.

* Fixed code style errors.

* Moved color dictionary to module per suggestion.

* Removed try/except per suggestion.
2016-06-08 22:25:32 -07:00
Dan Sullivan
ce829d194c Added Sonos snapshot feature (#2240)
* Added Sonos snapshot feature

* Fix lint errors

* Use snake case

* Import dependency in a method
2016-06-08 21:47:49 -07:00
srirams
4a5ad24ae0 fix zwave thermostat with multiple setpoints (#2237)
* fix zwave thermostat with multiple setpoints

* fix zwave thermostat with multiple setpoints
2016-06-08 21:39:44 -07:00
Fabian Affolter
33cb1b3be6 SNMP sensor (#2244)
* Add snmp sensor

* Add ATTR_UNIT_OF_MEASUREMENT
2016-06-08 21:16:43 -07:00
Paulus Schoutsen
0525af920c Update betamax casettes 2016-06-08 21:06:14 -07:00
Fabian Affolter
831799a7af Upgrade betamax to 0.7.0 2016-06-08 21:06:14 -07:00
Fabian Affolter
8e5da5776d Add missing key 'forecast' (#2256) 2016-06-08 20:59:20 -07:00
Fabian Affolter
be9730cc6c Upgrade astral to 1.2 (#2259) 2016-06-08 20:58:16 -07:00
Daniel Høyer Iversen
e44c2a4016 Improve config validation for group (#2206)
* Improve config validation if invalid entity for groups

* Improve error message when entity id is invalid
2016-06-08 20:55:08 -07:00
Paulus Schoutsen
29ffa5c282 Version bump to 0.22.0.dev0 2016-06-07 19:28:13 -07:00
Paulus Schoutsen
d7b0929a32 Merge pull request #2183 from home-assistant/dev
0.21
2016-06-07 19:27:55 -07:00
Paulus Schoutsen
31489a56db Merge remote-tracking branch 'origin/master' into dev
Conflicts:
	homeassistant/const.py
2016-06-07 19:27:23 -07:00
Paulus Schoutsen
3e09a7360e Version bump to 0.21 2016-06-07 19:26:43 -07:00
Daniel Høyer Iversen
0cdd752d6c Fixed bug in google time travel (#2202)
Fixed bug in google time travel  when arrival time is given
2016-06-07 19:19:47 -07:00
Adam Mills
027c0b3168 Add turn_off_action to kodi media player (#2224)
A new configuration option `turn_off_action` is added to kodi. It may be
one of: none, quit, hibernate, suspend, reboot, or poweroff. The
appropriate command is sent to kodi when the turn_off action is
requested. Default value is none.

Kodi will only report turn_off supported if it is configured to
something other than none.
2016-06-07 19:18:25 -07:00
Paulus Schoutsen
271546d101 Merge branch 'pr/2251' into dev
Conflicts:
	homeassistant/components/switch/template.py
2016-06-07 19:16:14 -07:00
Johann Kellerman
d1ed17e7db Default parameter for .run() 2016-06-07 23:00:09 +02:00
Alex Harvey
fb2fb5ea73 zwave auto heal at midnight (#2213)
* zwave auto heal at midnight

* fix debug to info, running heal, any heal will send a logger event
2016-06-07 09:29:15 -07:00
John Arild Berentsen
202a8dba8e Hvac fix (#2221)
* Zwave hvac fix

* Zwave hvac fix and move max min temp to base

* Tests
2016-06-07 08:43:46 -07:00
Kyle Hendricks
042a482ef1 Add sensor for DTE Energy Bridge (#2247)
Currently only measures instantaneous energy usage in kW
2016-06-07 08:42:34 -07:00
Alexander Fortin
fff413e04e Improve vagrant provisioner resiliency (#2252)
This should make it easier to fix race conditions that might arise if
box is destroyed but setup_done placeholder file is not removed
properly
2016-06-07 08:35:40 -07:00
Dan Smith
e29459a1ae Merge pull request #2241 from kk7ds/unifi-3.2
Add support for UniFi Video >= 3.2.0
2016-06-06 20:33:45 -07:00
Dan Smith
49de55e75b Add support for UniFi Video >= 3.2.0
Unfortunately, Ubiquiti changed their (supposedly versioned) API in
3.2.0 which causes us to have to refer to cameras by id instead of
UUID. The firmware for 3.2.x also changed the on-camera login procedures
and snapshot functionality significantly.

This bumps the requirement for uvcclient to 0.9.0, which supports the
newer API and makes the tweaks necessary to interact properly.
2016-06-06 20:28:52 -07:00
Hugo D
ee4b1e2b78 The metric unit of pressure is mbar not mBar (#2248)
This is useful to vaoid having several graph for the same type of data
According to wikipedia:
Units derived from the bar include the megabar (symbol: Mbar),
kilobar (symbol: kbar), decibar (symbol: dbar), centibar (symbol: cbar),
and millibar (symbol: mbar or mb).
2016-06-06 08:00:26 -07:00
Johann Kellerman
ed44d28fc0 service helper replaced with script helper (#2242) 2016-06-06 07:36:04 -07:00
Johann Kellerman
d5f9c1bc01 Updated template switch to cache Script objects 2016-06-06 06:41:29 +02:00
Fabian Affolter
f69c900977 Add schema (#2226) 2016-06-05 16:00:51 -07:00
Fabian Affolter
9a7ea72fa0 Upgrade schiene to 0.17 (#2231) 2016-06-05 15:59:54 -07:00
Fabian Affolter
fd4a9cf7c5 Upgrade fuzzywuzzy to 0.10.0 (#2234) 2016-06-05 15:58:54 -07:00
Fabian Affolter
0fe375049a Upgrade slacker to 0.9.16 (#2235) 2016-06-05 15:58:21 -07:00
Fabian Affolter
69f2f0f34a Upgrade pysnmp to 4.3.2 (#2236)
* Upgrade pysnmp to 4.3.2

* Fix pylint issue
2016-06-05 15:57:46 -07:00
Alex Harvey
076fdc3f8b Add a robots.txt (#2207) 2016-06-05 18:48:59 -04:00
Johann Kellerman
8887c2a8af service helper replaced with script helper 2016-06-05 21:44:57 +02:00
Fabian Affolter
f4594027fd Upgrade blockchain to 1.3.3 (#2220) 2016-06-04 12:55:46 +02:00
Robbie Trencheny
59a0005e5c Add CORS to WSGI (#2209)
* Add CORS support to WSGI

* Remove X-HA-Access as a CORS header, because as @JshWright so elegantly put it: "CORS controls access to response headers, not request headers"
2016-06-03 12:53:43 -07:00
Johann Kellerman
9157f722a4 Update Qwikswitch library version (#2214) 2016-06-02 18:47:29 -07:00
Fabian Affolter
7f2a1c61da Upgrade python-telegram-bot to 4.2.0 (#2204) 2016-06-02 04:38:39 -07:00
Sam Riley
0eb9516ea7 Support for RFY protocol (#2199) 2016-06-02 03:48:42 -07:00
Greg Dowling
3bb3a70347 Merge pull request #2203 from home-assistant/bump_loopenergy
Bump pyloopenergy version.
2016-06-02 11:21:48 +01:00
pavoni
0262269b00 Bump loopenergy version. Increased interval before deciding connection is dead and reconnecting. 2016-06-02 11:08:24 +01:00
Greg Dowling
780d62ac5c Merge pull request #2201 from home-assistant/fix_pywemo_ssdp_decode_utf8
Bump pywemo version to fix ssdp discovery encoding issue.
2016-06-02 10:09:13 +01:00
pavoni
5fca9e170e Bump pywemo version to fix ssdp discovery encoding issue. 2016-06-02 09:58:54 +01:00
Jacob Tomlinson
ca7415e935 Added rfxtrx rollershutter (#2030)
* Added rfxtrx rollershutter

* Updated mock command with real one

* Corrected test string
2016-06-02 00:39:58 -07:00
Alex Harvey
26d3c3b0d6 Update PULL_REQUEST_TEMPLATE.md (#2198)
* Update PULL_REQUEST_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md
2016-06-01 23:57:03 -07:00
Paulus Schoutsen
81f8764bb8 Update frontend 2016-06-01 23:47:31 -07:00
Nolan Gilley
24d2eaa6ca flux platform as a switch (#2097)
* flux platform as a switch

* use track_time_change. broken :(

* use track_utc_time_change instead of track_time_change

* add some basic tests

* use brightness from RGB_to_xy

* config_schema validation

* back to platform schema. what was i doing?

* more broken tests :(

* 644

* fix some time bugs

* add working tests. config validation still not right

* bug fixes and more test cases.
2016-06-01 23:38:19 -07:00
Paulus Schoutsen
f868df1035 Fix Norway (#2197) 2016-06-01 23:02:46 -07:00
Paulus Schoutsen
d0988422d4 Merge pull request #2196 from home-assistant/revert-2192-expose-required-ssl-in-discoveries
Revert "Report whether SSL is required in discovery"
2016-06-01 22:48:17 -07:00
Robbie Trencheny
f522d95328 Revert "Report whether SSL is required in discovery" 2016-06-01 22:37:16 -07:00
Robbie Trencheny
c856c67790 Report whether SSL is required in discoverables, like /api/discovery_info and ZeroConf (#2192) 2016-06-01 19:45:19 -07:00
Paulus Schoutsen
6c5efd5b7e Merge pull request #2195 from home-assistant/hotfix-20-3
Hotfix 20 3
2016-06-01 17:39:42 -07:00
Paulus Schoutsen
c3b6086d80 Version bump to 0.20.3 2016-06-01 17:36:04 -07:00
Paulus Schoutsen
0d93369154 Optimize foreacast.io API calls 2016-06-01 17:35:50 -07:00
Paulus Schoutsen
4e064f91fd Merge pull request #2191 from home-assistant/forecast-api-calls
Optimize foreacast.io API calls
2016-06-01 17:32:55 -07:00
Fabian Affolter
f9e53ca22f Add windows 10 tile (#2166) 2016-06-01 14:04:08 -07:00
Paulus Schoutsen
f8bdc835f8 Optimize foreacast.io API calls 2016-06-01 09:20:29 -07:00
Fabian Affolter
1f602be80a Remove print (already covered by logger) (#2184) 2016-05-31 14:02:31 -07:00
Josh Wright
fe4d971427 Re-add config validation for the http component (#2186)
This commit adds back the config validation for the http component. It
was removed during the WSGI shuffle. This is just a direct copy of what
@robbiet480 added in ab294d12f7 (with some testing to verify it still
works).
2016-05-31 14:00:12 -07:00
Paul Philippov
e5efc2e430 Improve Internet Time calculation. (#2185) 2016-05-31 07:19:00 -07:00
Paulus Schoutsen
537a2a6ef6 Improve index.html template 2016-05-30 23:45:02 -07:00
Paulus Schoutsen
11cc065845 Merge remote-tracking branch 'origin/master' into dev
Conflicts:
	homeassistant/const.py
2016-05-30 10:40:50 -07:00
Paulus Schoutsen
3ac31b2c1b Fix broken tests + linting 2016-05-30 10:19:12 -07:00
Paulus Schoutsen
a91f937245 Fix linting issues 2016-05-30 10:08:49 -07:00
Fabian Affolter
fed2584d8a Add azimuth (#1951)
* Add azimuth

* Place elevation and azimuth together in update part
2016-05-29 15:03:29 -07:00
Paulus Schoutsen
eaa8e5f29d Merge branch 'pr/2139' into dev
Conflicts:
	.coveragerc
2016-05-29 15:02:24 -07:00
Bart274
65fbba0e79 List entity_ids in config and only react to them (#2144)
* List entity_ids in config and only react to them

This allows us to define a list of entity_ids in the config to make the
template sensor, binary sensor and switch only react to state changes of
these entities instead of listening to all state changes.

* Forgot to import the track_state_change function

* Changed test for added entity_ids to config

* Use default MATCH_ALL and remove event_listener
2016-05-29 14:34:21 -07:00
Alexander Fortin
19522b1f39 Feedreader: add file data storage (#2147)
Right now we ignore already parsed entries and store the information
at runtime, but it will not survive a restart. This patch adds storage
functionality storing pickled file into default config folder when
feed has `published_parsed` support.
2016-05-29 14:33:53 -07:00
Jan Harkes
afe84c2a8b Allow time condition windows to cross midnight. (#2158)
* Allow time condition windows to cross midnight.

* Address comments.

Fold _in_time_window back into the time() condition test.
Use specific time values to test the time window.
2016-05-29 14:32:32 -07:00
Warren Konkel
952436aa0b Insteon support for brightness (#2169)
* Insteon support for brightness

* Farcy fix for unused constants.

* Remove unused constant and fix whitespace.

* Prevent toggle switches from jumping between states.

* 255 not 256
2016-05-29 14:31:14 -07:00
Olimpiu Rob
8a577c8e0d Added Osram lightify platform (#2170)
* Added Osram Lightify light component

* Added color temperature and fade transition support to Osram Lightify

* Added Osram Lightify light component

* Added color temperature and fade transition support to Osram Lightify

* Updated docstring

* Added osramlightify to ignore list on coveragerc and updated docstrings

* Fixed linting issues
2016-05-29 14:29:49 -07:00
rubund
bf940bd1f3 Initial support for EnOcean (#2177)
* Initial support for EnOcean

Tested to work with:
 - Eltako FUD61 dimmer
 - Eltako FT55 battery-less switch
 - Permundo PSC234 (switch and power monitor)

* Rerun gen_requirements_all.py
2016-05-29 14:28:03 -07:00
rubund
03e8627b12 New option for the netatmo platform: station (#2178)
This is necessary if multiple weather stations are associated with
one Netatmo account.
2016-05-29 14:25:11 -07:00
Brent
e886303f08 Fixed roku exception when device is powered off or looses connection (#2173) 2016-05-29 14:24:06 -07:00
Fabian Affolter
4b0df51b40 Vendorize vincenty requirement (#2176) 2016-05-29 11:55:16 -07:00
Paulus Schoutsen
8494ac7cef Update frontend 2016-05-29 09:50:30 -07:00
Alexander Fortin
5076ebe43c Add Vagrant setup (#2171) 2016-05-28 23:58:09 -07:00
Paulus Schoutsen
05b2559df8 Update frontend 2016-05-28 23:28:57 -07:00
Paulus Schoutsen
70b74da3eb Update frontend 2016-05-28 18:38:46 -07:00
Paulus Schoutsen
9e0b107991 Update frontend 2016-05-28 11:32:35 -07:00
Paulus Schoutsen
92d05ccb5c Fix lint errors 2016-05-28 10:52:44 -07:00
Paulus Schoutsen
bfdb51a558 Bugfixes for urls with dates 2016-05-28 10:37:22 -07:00
Paulus Schoutsen
e10b00f341 Update frontend 2016-05-27 21:45:38 -07:00
Paulus Schoutsen
cd87c40bbf Update frontend 2016-05-27 01:29:48 -07:00
Paulus Schoutsen
d02bc3deaa Update frontend gzip 2016-05-26 23:08:15 -07:00
Paulus Schoutsen
1798df7686 Handle invalid dev ids for dev tracker + owntracks (#2174) 2016-05-26 21:49:44 -07:00
ntouran
d505398917 Locked in required version of python-lirc for LIRC component 2016-05-26 07:53:17 -07:00
s1gnalrunner
70d6ce5b79 Fixed issue with edimax SP-1101 switches (#2105)
* Fixed issue with edimax SP-1101 switches

* Added missing ValueError exception
2016-05-26 05:53:10 -07:00
Daniel Høyer Iversen
71452c11c1 Fix bug in google travel time. Default option dictionary must contain mode. (#2134) 2016-05-26 05:52:17 -07:00
ntouran
e30f2bf912 Cleanups to LIRC module 2016-05-25 22:26:00 -07:00
ntouran
262d95b7b1 Merge remote-tracking branch 'origin/dev' into lirc 2016-05-25 09:21:58 -07:00
William Scanlon
ca3da0e53e Round temp and percentage for octoprint sensors (#2128) 2016-05-25 09:10:59 -07:00
Fabian Affolter
49882255c4 Upgrade astral to 1.1 (#2131) 2016-05-25 09:10:08 -07:00
Scott Bartuska
3db31cb951 Update PyISY to 1.0.6 (#2133)
* Update PyISY to 1.0.6 

1.0.6 is the newest version of PyISY

* PyISY to 1.0.6
2016-05-25 09:09:40 -07:00
Paulus Schoutsen
415cfc2537 WSGI: Hide password in logs (#2164)
* WSGI: Hide password in logs

* Add auth + pw in logs tests
2016-05-24 23:19:37 -07:00
wokar
88bb136813 lg_netcast: fix exception on missing access_token (#2150)
* specified default value for acccess_token to prevent exception on init
2016-05-24 08:36:40 -07:00
Paulus Schoutsen
4cecc626f4 manifest.json: remove trailing commas 2016-05-23 22:45:35 -07:00
Paulus Schoutsen
644d5de890 Merge pull request #2154 from home-assistant/hotfix-20-2
Hotfix 20 2
2016-05-23 22:25:59 -07:00
ntouran
148b8c5055 Updated requirements for LIRC 2016-05-23 21:47:46 -07:00
ntouran
09161ae615 Moved lirc out of sensor package. 2016-05-23 21:36:48 -07:00
ntouran
c1f96aabb0 Changed LIRC component so that it just fires events on the bus. 2016-05-23 21:26:49 -07:00
Robbie Trencheny
343625d539 If we have duration_in_traffic use that as the state, otherwise use duration 2016-05-23 23:43:22 -04:00
Robbie Trencheny
2e10b4bf67 If no departure time is set, use now as the default. If departure time is set but does not have a :, assume its a preformed Unix timestamp and send along as raw input. Assume same for arrival_time. 2016-05-23 23:43:06 -04:00
Jan Harkes
dc8e55fb8b Don't even bother trying to kill stray child processes.
When we change our process group id we don't get keyboard interrupt
signals passed if our parent is a bash script.
2016-05-23 23:30:41 -04:00
Jan Harkes
d86a5a1e91 Don't even bother trying to kill stray child processes.
When we change our process group id we don't get keyboard interrupt
signals passed if our parent is a bash script.
2016-05-23 23:29:53 -04:00
Jan Harkes
1327051277 Version bump to 0.20.2 2016-05-23 23:29:53 -04:00
Josh Wright
712c51e283 Fix TLS with eventlet (#2151)
* Fix TLS with eventlet

This fixes a simple error on my part when implementing the WSGI stuff.

eventlet.wrap_ssl() returns a wrapped socket, it does not modify the
object passed to it. We need to grab the returned value and use that.

* Fix style issue
2016-05-23 17:39:55 -07:00
Robbie Trencheny
c96f73d1be If we have duration_in_traffic use that as the state, otherwise use duration 2016-05-23 14:05:12 -07:00
Robbie Trencheny
b3afb386b7 If no departure time is set, use now as the default. If departure time is set but does not have a :, assume its a preformed Unix timestamp and send along as raw input. Assume same for arrival_time. 2016-05-23 13:48:47 -07:00
Robbie Trencheny
2544635921 Update issue template to prettify the header. 2016-05-23 13:08:47 -07:00
ntouran
4e5b5f2204 LIRC: Responded to some code review requests but not the big one 2016-05-22 22:19:10 -07:00
Paulus Schoutsen
98de7c9287 Upgrade eventlet to 0.19 2016-05-22 20:14:46 -07:00
ntouran
80e60efd8f Removed LIRC dependency from requirements due to "complex" compliation
User will have to install lirc and python-lirc manually.
2016-05-22 16:28:20 -07:00
ntouran
b3e9e1dfcd added LIRC component to .coveragerc 2016-05-22 16:11:26 -07:00
ntouran
40bc49aaae Added LIRC component for responding to IR remote commands 2016-05-22 14:15:09 -07:00
Paulus Schoutsen
3c364fa7e9 Merge pull request #2132 from home-assistant/hotfix-20-1
Hotfix 0.20.1
2016-05-22 09:11:47 -07:00
Jan Harkes
05946ae5a2 Ignore assertions from python threading when looking for leaked threads. (#2130)
While looking for leaked resources (threads) after shutdown and before restart
we in some cases get an assertion in the python threading module where we find
a thread marked as running at the python level but it has no associated thread
at the C level.
2016-05-22 00:35:33 -04:00
Jan Harkes
ceb0ec5fa4 Ignore assertions from python threading when looking for leaked threads.
While looking for leaked resources (threads) after shutdown and before restart
we in some cases get an assertion in the python threading module where we find
a thread marked as running at the python level but it has no associated thread
at the C level.
2016-05-22 00:22:19 -04:00
Jan Harkes
a28196df9a Version bump to 0.20.1 2016-05-22 00:21:19 -04:00
Paulus Schoutsen
c7cc045acd Use only 1 event listener for event stream. 2016-05-21 18:24:03 -07:00
Paulus Schoutsen
225a672a92 Fix Dockerfile 2016-05-21 17:03:46 -07:00
Paulus Schoutsen
4d5eb0e3fc EventStream to sent ping on start to notify browser 2016-05-21 16:31:22 -07:00
Paulus Schoutsen
a68ab07e72 Another attempt to fix SSL in Docker 2016-05-21 16:23:03 -07:00
Paulus Schoutsen
ec4fe7e6e6 update frontend gz 2016-05-21 16:00:59 -07:00
Paulus Schoutsen
0b4b46d80b Merge pull request #2063 from home-assistant/feature/wsgi
Feature/wsgi
2016-05-21 15:14:12 -07:00
Paulus Schoutsen
3bbdd9fedd Remove unused import 2016-05-21 15:01:55 -07:00
Paulus Schoutsen
2ed135439a Remove gzip API 2016-05-21 15:01:35 -07:00
Paulus Schoutsen
1750b22e59 Gzip all the things 2016-05-21 15:01:35 -07:00
Paulus Schoutsen
9c5e7a9584 Add gzip for static resources 2016-05-21 15:01:35 -07:00
Paulus Schoutsen
9b03848a2e Comment out eventstream tests 2016-05-21 15:01:35 -07:00
Paulus Schoutsen
548d415f94 Clean up EventStream 2016-05-21 15:01:35 -07:00
Paulus Schoutsen
18be276b08 Make event stream tests work on Travis ? 2016-05-21 15:01:35 -07:00
Paulus Schoutsen
9aa9e57890 Cleanup 2016-05-21 15:01:35 -07:00
Paulus Schoutsen
8fe2654862 Update requirements with new static update 2016-05-21 15:01:34 -07:00
Paulus Schoutsen
794ff20987 Get EventStream working 2016-05-21 15:01:34 -07:00
Paulus Schoutsen
fe794d7fd8 Access camera images using access token 2016-05-21 15:01:34 -07:00
Paulus Schoutsen
585fbb1c02 Cache files in static folder for a year 2016-05-21 15:01:34 -07:00
Paulus Schoutsen
e4b697b1ed Generate gzip for frontend/mdi 2016-05-21 15:01:34 -07:00
Paulus Schoutsen
de5533e3c2 Fix auth frontend 2016-05-21 15:01:34 -07:00
Paulus Schoutsen
5aa0158761 Add url validators 2016-05-21 15:01:34 -07:00
Paulus Schoutsen
4d7555957c Fix camera 2016-05-21 15:01:34 -07:00
Josh Wright
aa34fe15b2 Friendlier exceptions for misconfigured views
If a view is missing a url or name attribute, this will result
in a more actionable exception being raised.
2016-05-21 15:01:34 -07:00
Paulus Schoutsen
1096232e17 More WIP 2016-05-21 15:01:34 -07:00
Josh Wright
54ecab7590 Improve view registration comments
Clarify that HomeAssistantWSGI.register_view() can handle either instantiated or uninstantiated view classes.
2016-05-21 15:01:33 -07:00
Paulus Schoutsen
15e329a588 Tons of fixes - WIP 2016-05-21 15:01:33 -07:00
Paulus Schoutsen
768c98d359 Fix import issues 2016-05-21 15:01:02 -07:00
Josh Wright
6490378de3 Add some missing view registrations 2016-05-21 15:01:01 -07:00
Josh Wright
d0320a9099 WIP: Add WSGI stack
This is a fair chunk of the way towards adding a WSGI compatible stack
for Home Assistant. The majot missing piece is auth/sessions. I was
undecided on implementing the current auth mechanism, or adding a new
mechanism (likely based on Werkzeug's signed cookies).

Plenty of TODOs...
2016-05-21 15:01:01 -07:00
Paulus Schoutsen
9116eb166b Version bump to 0.21.0.dev0 2016-05-21 14:19:06 -07:00
Paulus Schoutsen
37bd93a975 Version bump to 0.20 2016-05-21 14:17:02 -07:00
Paulus Schoutsen
b78765a41f Merge pull request #2113 from home-assistant/dev
0.20
2016-05-21 14:15:42 -07:00
Paulus Schoutsen
ab60b32326 Update frontend 2016-05-21 14:06:07 -07:00
Jan Harkes
3ea179cc0b Let systemd handle home-assistant process restarts. (#2127) 2016-05-21 12:58:14 -07:00
Paulus Schoutsen
5bedf5d604 Upgrade Nest to 2.9.2 (#2126) 2016-05-21 11:57:33 -07:00
Ardi Mehist
d8c1959715 Add support for Logentries (#1945)
* Add support for Logentries

Supports sending has events to Logentries web hook endpoint
see logentries.com for more

Inspired by the Splunk component

* bugfix

* fix summary

* fix test

* fix logentries url and tests

* update tests

* mock token

* Bug fixes

* typo

* typo

* fix string splitting

* remove redundant backslash
2016-05-21 11:21:23 -07:00
Robbie Trencheny
0f1c4d2f8c GTFS fixes (#2119)
* Change to official PyGTFS source

* Threading fixes for GTFS

* Actually pygtfs 0.1.3

* Update requirements_all.txt

* Update gtfs version
2016-05-21 11:04:18 -07:00
Igor Shults
3ce6c732ab #2120 Fix hvac z-wave fan list (#2121)
* #2120 Fix hvac z-wave fan list

* Properly name methods
2016-05-21 10:56:20 -07:00
Nolan Gilley
191fc8f8d4 Change color_RGB_to_xy formula & return brightness (#2095)
* Use RGB to XY calculations from Philips Hue developer site

* uppercase X,Y,Z

* rename cx,cy to x,y

* return brightness in color_RGB_to_xy

* remove try/catch

* update existing platforms using color_RGB_to_xy

* improve wemo w/ jaharkes suggestion

* allow brightness override of rgb_to_xy
2016-05-21 10:19:27 -07:00
Johann Kellerman
31c2d45a7a Updated pyqwikswitch & QS<->HA UI behaviour (#2123)
* Updated pyqwikswitch & constants

* Disable too-many-locals
2016-05-21 10:12:42 -07:00
Dan
dee6355cc5 Onkyo updates (#2084)
* use sane defaults for openzwave config

Use sane default if libopenzwave is installed. In most cases this will
mean that the zwave config path will not need to e manually specified.

* Resuming work on onkyo component

* Source control added to UI for onkyo receiver

Source will now display in the UI. Source mappings can be defined in the
config, and a rudimentary mapping is defined by default as a fallback.
When the onkyo source is updated, it will resolve to a defined name if
possible. This may break existing automations.

* fix lint errors

* Updated Onkyo receiver

Now takes an optional ip/name in additional to atempting to discover
deivces.

Source select will now take a sources mapping in the config. It will
provide default values if no source mapping is provided.

example:

- platform: onkyo
  host: 10.0.0.2
  name: receiver
  sources:
    HTPC: 'pc'
    Chromecast: 'aux1'
    Bluray: 'bd'
    Wii U: 'game'

* fix pylint error

* Use HA's error log instead of stack trace

* Flipped source mappings, code cleanup
2016-05-21 10:04:08 -07:00
Robbie Trencheny
c9b5ea97da Fix docstring issues with MoldIndicator 2016-05-21 10:03:24 -07:00
Felix
eaebe83429 Moldindicator Sensor (#1575)
* Adds MoldIndicator sensor platform

This sensor may be used to get an indication for possible mold growth in rooms.
It calculates the humidity at a pre-calibrated indoor point (wall, window).

* Automatic conversion to Fahrenheit for mold_indicator

* Minor change to critical temp label

* Fixed docstrings and styles

* Minor changes to MoldIndicator implementation

* Added first (non-working) implementation for mold_indicator test

* Small style changes

* Minor improvements to mold_indicator

* Completed unit test for mold indicator

* Fix to moldindicator initialization

* Adds missing period. Now that really matters..

* Adds test for sensor_changed function
2016-05-21 09:58:59 -07:00
Fabian Affolter
7f0b8c5e70 Docs (#2124)
* Add link to docs

* Update link
2016-05-21 16:59:52 +02:00
Jan Harkes
53d51a467d Single process restart fixes (#2118)
* Ignore permission errors on setpgid.

When launched in a docker container we got a permission denied error
from setpgid.

* Don't fail if we find our own pidfile.

When we restart using exec we are running a new instance of home-assistant with
the same process id so we shouldn't be surprised to find an existing pidfile in
that case.

* Allow restart to work when started as python -m homeassistant.

When we are started with `python -m homeassistant`, the restart command line
becomes `python /path/to/hass/homeassistant/__main__.py`. But in that case the
python path includes `/path/to/hass/homeassistant` instead of `/path/to/hass`
and we fail on the first import.

Fix this by recognizing `/__main__.py` as part of the first argument and
injecting the proper path as PYTHONPATH environment before we start the new
home-assistant instance.
2016-05-20 11:45:16 -07:00
Alexander Fortin
7eeb623b8f Add media_player.sonos_group_players service (#2087)
Sonos platform supports a `party mode` feature that groups all
available players into a single group, of which the calling player
will be the coordinator.
2016-05-20 09:54:15 -07:00
Jan Harkes
6b724f7da4 Not sure why, but this fixed a bad filedescriptor error. (#2116) 2016-05-20 07:03:08 -07:00
Alexander Fortin
a4409da700 Add add_uri_to_queue support to (sonos) media player (#1946)
Sonos (SoCo) supports add_uri_to_queue capability, making it possible
to stream media available via HTTP for example. This patch extends
media_player component and sonos platform to support this feature
2016-05-19 23:30:19 -07:00
John Arild Berentsen
1eb3181c14 Fix fitbit KeyError (#2077)
* Fix fitbit KeyError

* Set units compared to temperature_unit

* Pass true or false for is_metric
2016-05-19 23:28:53 -07:00
wokar
f7b401a20e Added the lg_netcast platform to control a LG Smart TV running NetCast 3.0 or 4.0 (#2081)
* Added the `lgtv` platform to control a LG Smart TV running NetCast 3.0
(LG Smart TV models released in 2012) and NetCast 4.0 (LG Smart TV models released in 2013).

* Fixed multi-line docstring closing quotes

* Rename lgtv to lg_netcast

* Rename lgtv to lg_netcast

* Extracted class to control the LG TV into a separate Python package 'pylgnetcast' and changed requirements accordingly.

* regenerated requirements_all.txt with script

* now uses pylgnetcast v0.2.0 which uses the requests package for the communication with the TV

* fixed lint error: Catching too general exception Exception
2016-05-19 23:27:47 -07:00
Jan Harkes
5f92ceeea9 Allow for restart without using parent/child processes. (#1793)
* Allow for restart without using parent/child processes.

Assuming that we normally correctly shut down running threads and
release resources, we just do some minimal scrubbing of open file
descriptors and child processes which would stay around across an
exec() boundary.

* Use sys.executable instead of multiprocessing.spawn.get_executable()

* Limit how many file descriptors we try to close.

Don't even try to close on OSX/Darwin until we figure out how to
recognize guarded fds because the kernel will yell at us, and kill
the process.

* Use the close on exec flag on MacOS to clean up.

* Introduce a small process runner to handle restart on windows.

* Handle missing signal.SIGHUP on Windows.
2016-05-19 23:20:59 -07:00
Per Sandström
f0f1fadee1 redirect daemon file descriptors (#2103) 2016-05-19 23:20:07 -07:00
Paulus Schoutsen
32f97dc578 Merge remote-tracking branch 'origin/master' into dev
Conflicts:
	homeassistant/const.py
2016-05-19 22:32:34 -07:00
Greg Dowling
631ba2ef0d Merge pull request #2110 from home-assistant/bump_loop_energy
Bump loop energy library version.
2016-05-19 17:19:06 +01:00
pavoni
62de16804b Bump loop energy library version. 2016-05-19 17:12:19 +01:00
Paulus Schoutsen
3d919f1235 Merge pull request #2108 from home-assistant/owntracks_fixes
Owntracks fixes
2016-05-19 08:28:36 -07:00
pavoni
8ff9506138 Ignore acc: 0 updates. 2016-05-19 16:16:43 +01:00
pavoni
dd1703469e Handle region enter/leave with spaces. 2016-05-19 16:04:55 +01:00
Daniel Høyer Iversen
5f98a70c21 Fix bug in flaky rfxtrx test (#2107) 2016-05-19 06:36:11 -07:00
Fabian Affolter
bfd64ce96e Upgrade python-telegram-bot to 4.1.1 (#2102) 2016-05-18 17:05:08 -07:00
Fabian Affolter
a032e649f5 Upgrade psutil to 4.2.0 (#2101) 2016-05-18 17:04:59 -07:00
Robbie Trencheny
c96a5d5b2b Fix profile usage with aws notify platforms (#2100) 2016-05-17 16:51:38 -07:00
Robbie Trencheny
a565cc4b73 Catch a gntp networkerror (#2099) 2016-05-17 16:51:32 -07:00
froz
8d34b76d51 Restored telnet as an option. Activate with config option 'protocol: telnet'. Default is ssh (#2096) 2016-05-17 15:55:12 -07:00
happyleavesaoc
15f89fc636 add some include_dir options (#2074)
* add some include_dir options

* validate, and extend instead of add

* add yaml include tests
2016-05-17 15:47:44 -07:00
Robbie Trencheny
a431277de1 Accept human readable color names to change light colors (#2075)
* Add support for providing color_name which accepts a CSS3 valid, human readable string such as red or blue

* Forgot the schema validation!

* ugh farcy

* use html5_parse_legacy_color for more input options

* Add webcolors==1.5 to setup.py

* Block pylint no-member errors on tuple

* add color_name_to_rgb test

* whoops

* revert changes to individual platforms

* If color_name is set, pop it off params and set rgb_color with it

* Forgot to reset wink.py

* Import the legacy function as color_name_to_rgb directly

* reset test_color.py

* Improve light services.yaml
2016-05-17 00:06:55 -07:00
Alexander Fortin
7208ff515e Better handle exceptions from Sonos players (#2085)
Sonos players can be dynamically set in various modes, for example
as TV players or Line-IN or straming from radios channels, therefore
some methods could not be available, and when invoked they cause
long exceptions to be logged. This partially solves the problem
reducing the output and logging some more informative error message
2016-05-16 22:58:57 -07:00
Paulus Schoutsen
0a79a5e964 Update frontend repo 2016-05-16 21:59:39 -07:00
Daniel Høyer Iversen
8e766daa11 Merge pull request #2086 from home-assistant/time_travel_fix
Round minutes to integer in google travel time, Fix issue #2080
2016-05-16 11:45:43 +02:00
Daniel
4ded795740 Round minutes to integer in google travel time, Fix issue #2080 2016-05-16 11:37:17 +02:00
Robbie Trencheny
84cb7a4f20 Add AWS notify platforms (Lambda, SNS, SQS) (#2073)
* AWS SNS notify platform

* Attach kwargs as MessageAttributes

* Initial pass of AWS SQS platform

* Add Lambda notify platform

* Remove unused import

* Change single quotes to double quotes because I am crazy

* Forgot to run pydocstyle

* Improve context support for Lambda

* compress the message_attributes logic
2016-05-15 13:17:35 -07:00
Rowan
cbf0caa88a Last.fm sensor (#2071)
* Last.fm component

* Pylint fixes

* Last.fm component

* Pylint fixes

* Updated with `.coveragerc` and `requirements_all.txt`

* Pylint fixes

* Updated

* Pylint fix

* Pylint fix
2016-05-15 13:11:41 -07:00
Brent
88d13f0ac9 Added support for the roku media player (#2046) 2016-05-15 13:00:31 -07:00
mnestor
3ed6be5b4e add link ability to configurator (#2035) 2016-05-15 12:56:29 -07:00
Richard Cox
0340710e5c Support for Nest Protect smoke alarms (#2076)
* Support for Nest Protect smoke alarms

* Fixing formatting issues from tox
2016-05-15 12:29:12 -07:00
froz
49acdaa8fd Device Tracker - ASUSWRT: Replaced telnet with ssh (#2079) 2016-05-15 12:20:17 -07:00
Alex Harvey
ffbc99fac2 Merge pull request #2059 from infamy/justyns-purge_old_data
Justyns purge old data
2016-05-14 23:55:28 -07:00
Johann Kellerman
6dae005b65 Resolved UI flicker, new config vars, brightness up to 255, fixed buttons, fixed race condition (#2072) 2016-05-14 14:21:05 -07:00
Robbie Trencheny
0adc853741 Add notify.twilio_sms component (#2070) 2016-05-14 14:09:28 -07:00
Robbie Trencheny
6254d4a983 Add lines for associated documentation PR 2016-05-14 14:02:14 -07:00
Robbie Trencheny
a7db208b8a Fix Google Voice documentation URL 2016-05-14 13:32:00 -07:00
Rowan
429bf2c143 Google Play Music Desktop Player component (#1788)
* Added GPM Desktop Plaeyr component

* Updated requirements_all.txt

* Pylint fix

* Updated GPMDP.py to include @balloob's comments

* Updated to work with the latest version of GPMDP

* Removed setting "self._ws.recv()" as a variable

* Made line 52 shorter

* Updated to check weather it is connected or not

* Pylint and @balloob fixes

* Updated with simplified code and pylint fix

* Made `json.loads` shorter

* Pylint fix
2016-05-14 13:28:42 -07:00
happyleavesaoc
8df91e6a17 numeric state: validate multiple entities (#2066)
* validate multiple entities

* point to current entity
2016-05-14 12:29:57 -07:00
Daniel Høyer Iversen
8656bbbc79 fix bugs in google travel time (#2069) 2016-05-14 12:14:13 -07:00
Daniel Høyer Iversen
630b7377bd Refactor get_age in util/dt (#2067) 2016-05-14 12:05:46 -07:00
Daniel Høyer Iversen
0626a80186 Merge pull request #2068 from home-assistant/yaml_env
Add test for yaml enviroment
2016-05-14 20:33:46 +02:00
Daniel
24788b106b Add test for yaml enviroment 2016-05-14 20:20:27 +02:00
Igor Shults
c5401b21c2 Fix typo in system monitor ('recieved') (#2062) 2016-05-14 09:45:32 -07:00
mnestor
954b56475e YAML: add !include_named_dir and ! include_list_dir (#2054)
* add include_dir constructor for yaml parsing

* changed to allow for flat and name based directory including

* fixed ci errors

* changed flat to list
2016-05-13 21:16:04 -07:00
Alex Harvey
53d7e0730c Fixes for farcy 2016-05-13 14:43:22 -07:00
Alex Harvey
cba85cad8d Fixes for farcy 2016-05-13 14:42:08 -07:00
Lewis Juggins
96b73684eb Update Dockerfile to use OpenSSL 1.0.2h to resolve certificate issues (#2057) 2016-05-13 07:55:52 -07:00
Robbie Trencheny
aa7fa7b550 Dont default to driving anymore, re: #2047 2016-05-12 22:49:12 -07:00
Robbie Trencheny
d229cb46b1 Google travel time improvements (#2047)
* Update google_travel_time.py

* Update google_travel_time.py

* pylint: disable=too-many-instance-attributes

* Add the mode to the title of the sensor

* Expose the travel mode on the sensor attributes

* Big improvements to the Google Travel Time sensor. Allow passing any options that Google supports in the options dict of your configuration. Deprecate travel_mode. Change name format to show the mode

* fu farcy

* Dynamically convert departure and arrival times

* Add a warning if user provides both departure and arrival times

* Add deprecation warning for travel_mode outside options and other minor fixes

* Use a copy of options dict to not overwrite the departure/arrival times constantly.

* Remove default travel_mode, but set default options.mode to driving

* Google doesnt let us query time in the past, so if the date we generate from a time string is in the past, add 1 day

* spacing fix

* Add config validation for all possible parameters

* flake8 and pylint fixes
2016-05-12 22:37:08 -07:00
happyleavesaoc
8682e2def8 supervisord sensor (#2056) 2016-05-12 22:16:58 -07:00
Johann Kellerman
65ac1ae84a Added QwikSwitch component & platforms (#1970)
* Added QwikSwitch platform

farcy - worst than my english teacher

* Clean up comments

* Import only inside functions

* Moved imports, no global var, load_platform

* add_device reworked

* Only serializable content on bus

* Fixed imports & removed some logging
2016-05-12 21:39:30 -07:00
Alex Harvey
93fd6fa11b fixes for pep and delay start 2016-05-12 10:33:22 -07:00
Alex Harvey
67b0365f62 update to latest base 2016-05-12 10:32:28 -07:00
Paulus Schoutsen
f1eda430cd Update rpi_rf.py 2016-05-12 00:13:48 -07:00
Paulus Schoutsen
69929f15fb Ignore RPI-RF in requirements_all 2016-05-11 22:56:05 -07:00
Robbie Trencheny
d553c7c8e7 Merge pull request #2027 from robbiet480/relative-time-filter
Add a Jinja filter for relative time
2016-05-11 22:50:56 -07:00
Robbie Trencheny
4d0b9f1e94 Stupid blank lines 2016-05-11 22:44:44 -07:00
Robbie Trencheny
fca4ec2b3e simplify the relative_time function 2016-05-11 22:37:37 -07:00
Robbie Trencheny
b75aa6ac08 Add get_age tests 2016-05-11 22:29:55 -07:00
Nolan Gilley
894ceacd40 Add Ecobee notify platform (#2021)
* add send_message to ecobee via service call

* farcy fixes

* fix pydocstyle

* ecobee notify component
2016-05-11 22:03:21 -07:00
Johann Kellerman
fbe940139a Discovery listener on all EntityComponents (#2042) 2016-05-11 21:58:22 -07:00
happyleavesaoc
c341ae0a39 Media Player - MPD: handle more exceptions (#2045) 2016-05-11 21:53:56 -07:00
Nolan Gilley
f9d97c4356 fix away mode. issue 2032 (#2044) 2016-05-11 21:52:56 -07:00
Nolan Gilley
b8a5d392c5 Fix speedtest by removing Throttle and adding second parameter for track_time_change (#2040) 2016-05-11 08:24:50 -07:00
Paulus Schoutsen
fd8240241f Merge pull request #2038 from home-assistant/hotfix-19-4
Hotfix 0.19.4: Fix script syntax validation of AND and OR condition
2016-05-10 21:57:22 -07:00
Paulus Schoutsen
3c9e493494 Make AND and OR conditions valid (#2037) 2016-05-10 21:49:58 -07:00
Paulus Schoutsen
786a0154b1 Version bump to 0.19.4 2016-05-10 21:48:05 -07:00
Paulus Schoutsen
dd6ab79e35 Make AND and OR conditions valid 2016-05-10 21:47:46 -07:00
Erik Eriksson
2f118c5327 log received mqtt messages (#2031) 2016-05-10 21:12:14 -07:00
Nolan Gilley
a7d1f52ac8 Use Throttle on speedtest update (#2036)
* use throttle

* fix flake8
2016-05-10 20:51:55 -07:00
Robbie Trencheny
5317f700d7 Merge pull request #2033 from home-assistant/hotfix-0193
Hotfix 0193
2016-05-10 13:56:15 -07:00
Robbie Trencheny
01eb2d5c84 Increment version 2016-05-10 13:42:23 -07:00
Paulus Schoutsen
0893ddcab7 Update README.rst 2016-05-10 13:41:23 -07:00
Landrash
e77a7f4385 Fixed minor miss-spelling (#2028)
Changed millileters to milliliters.
Changed case of mmol/l to mmol/L.
2016-05-10 13:40:39 -07:00
Robbie Trencheny
39e7942dce Fitbit flake8 and pylint fixes. Forgot to do it before pushing :( 2016-05-10 13:40:34 -07:00
Robbie Trencheny
faf5ffe610 Minor Fitbit tweaks. Correct the copy, dont require auth on the routes, get the client_id/client_secret from fitbit.conf instead of the YAML 2016-05-10 13:40:25 -07:00
Robbie Trencheny
8d2dc48261 en_UK->en_GB. Closes #2019. 2016-05-10 13:40:17 -07:00
Paulus Schoutsen
c7cfa8d245 Update README.rst 2016-05-10 13:36:03 -07:00
Robbie Trencheny
16933abce9 Remove humanize and use a relative time thing that @balloob found on Github 2016-05-10 00:04:53 -07:00
Landrash
8163b986c9 Fixed minor miss-spelling (#2028)
Changed millileters to milliliters.
Changed case of mmol/l to mmol/L.
2016-05-09 23:48:48 -07:00
Robbie Trencheny
d5a1c52359 Add a Jinja filter for relative time 2016-05-09 23:31:02 -07:00
Nolan Gilley
26ea4e41cb Bring back custom scan intervals and service for speedtest.net component (#1980)
* Bring back the functionality that was removed in PR 1717. This includes the speedtest service and the ability to define the scan times in the configuration file.  Restore default functionality of 1 scan per hour on the hour.

* remove unnecessary code.
2016-05-09 22:49:26 -07:00
Johann Kellerman
ec9544b9c3 Add a load_platform mechanism (#2012)
* discovery.load_platform method

* rm grep
2016-05-09 22:48:03 -07:00
Fabian Affolter
1d0bc1ee66 Upgrade flake8 to 2.5.4 (#2018) 2016-05-09 22:33:21 -07:00
Robbie Trencheny
9729c44d53 Merge pull request #2023 from philipbl/fix_slack
Fix problem with Slack default channel
2016-05-09 16:37:38 -07:00
Robbie Trencheny
a7292af3b1 Fitbit flake8 and pylint fixes. Forgot to do it before pushing :( 2016-05-09 15:33:04 -07:00
Robbie Trencheny
c8cbc528eb Minor Fitbit tweaks. Correct the copy, dont require auth on the routes, get the client_id/client_secret from fitbit.conf instead of the YAML 2016-05-09 15:31:47 -07:00
Philip Lundrigan
8735bfe926 Fix problem with default channel 2016-05-09 16:19:19 -06:00
Robbie Trencheny
25e8c7bc5f en_UK->en_GB. Closes #2019. 2016-05-09 15:14:33 -07:00
jazzaj
499257c8e1 Corrected link to documentation (#2022) 2016-05-09 23:30:22 +02:00
Paulus Schoutsen
6856283896 Make HVAC naming consistent (#2017) 2016-05-09 07:53:01 -07:00
Paulus Schoutsen
20dad9f194 Add HVAC to demo 2016-05-08 23:21:26 -07:00
Paulus Schoutsen
09483e3be4 More fault tolerant discovery 2016-05-08 21:23:03 -07:00
Paulus Schoutsen
8ae5708fa2 Merge pull request #2010 from home-assistant/hotfix-0192
Hotfix 0192
2016-05-08 10:19:54 -07:00
Paulus Schoutsen
1e42f85a9c Version bump to 0.19.2 2016-05-08 09:53:22 -07:00
John Arild Berentsen
92d71a6612 Fix for not recognizing Z-Wave thermostats (#2006)
* Fix for not recognizing thermostats

* Properly ignore zxt-120

* fix
2016-05-08 09:53:09 -07:00
John Arild Berentsen
ab2e85840f Fix for not recognizing Z-Wave thermostats (#2006)
* Fix for not recognizing thermostats

* Properly ignore zxt-120

* fix
2016-05-08 09:52:16 -07:00
Paulus Schoutsen
8257e3f384 Fix automation deprecation warning 2016-05-07 22:31:22 -07:00
Paulus Schoutsen
e40908d67c Improve config validation error message 2016-05-07 22:31:22 -07:00
Paulus Schoutsen
1abbb43ebd Merge pull request #2004 from home-assistant/hotfix-019-1
Hotfix 019 1
2016-05-07 22:31:00 -07:00
Paulus Schoutsen
69ecedefad Version bump to 0.19.1 2016-05-07 22:24:20 -07:00
Paulus Schoutsen
0f6c9d2f75 Fix automation deprecation warning 2016-05-07 22:24:13 -07:00
Paulus Schoutsen
c58fb00f03 Improve config validation error message 2016-05-07 22:24:04 -07:00
Paulus Schoutsen
e67729b2f4 Version bump to 0.20.0.dev0 2016-05-07 12:55:41 -07:00
Paulus Schoutsen
6b1f9a32dd Merge pull request #1995 from home-assistant/dev
0.19
2016-05-07 12:55:27 -07:00
Paulus Schoutsen
7c8c5e7763 Version bump to 0.19 2016-05-07 12:51:40 -07:00
Robbie Trencheny
8cb48615af Fitbit Sensor Take Deux (#2002)
* Fitbit Sensor

* Add configurator image
2016-05-07 12:46:45 -07:00
Robbie Trencheny
952d1c796e Add CORS (Cross Origin Resource Sharing) support to HTTP (#2000) 2016-05-07 12:21:28 -07:00
Fabian Affolter
89c22e6d8a Upgrade pytest to 2.9.1 (#2001) 2016-05-07 12:12:52 -07:00
Fabian Affolter
16adc30210 Upgrade pylint to 1.5.5 (#1999) 2016-05-07 11:49:58 -07:00
Paulus Schoutsen
2a9c822454 Update HBMQTT (#1998) 2016-05-07 10:59:23 -07:00
Daniel Høyer Iversen
6cae7c0307 Add google maps travel time sensor (#1987)
* Add travel time sensor

* Throttle update of Time travel sensor

* Rename travel time to google travel time, validate the api key
2016-05-07 10:17:28 -07:00
Paulus Schoutsen
6901e5ea5e Random fixes (#1996)
* OwnTracks handle malformed data better

Fixes #1991 .

* Remove dependency for util.dt
2016-05-07 10:16:14 -07:00
Paulus Schoutsen
8a16a7d943 Update frontend 2016-05-07 10:10:09 -07:00
Daniel Høyer Iversen
21dd8162b3 Improve error message for invalid key in config (#1975)
* Improve error message for invalid key in config

* Refactor log exception in config validation
2016-05-07 07:35:42 -07:00
Paulus Schoutsen
67f3fcc5cf Update frontend 2016-05-06 23:35:15 -07:00
Robbie Trencheny
a1480582d9 Add /api/discovery_info (#1791)
* Allow /api/ and /api/config to be accessed without auth. If config is accessed without auth, only show minimal information. Also improves comments

* Re-enable auth on /api/ since a lot of tests get broken if it does not require auth

* Move the discovery info from /api/config to /api/discovery_info

* Flake8 fixes
2016-05-06 22:11:35 -07:00
Paulus Schoutsen
713c7a5fd7 Merge branch 'master' into dev
Conflicts:
	homeassistant/const.py
2016-05-06 21:46:50 -07:00
Nolan Gilley
fb3b3db04e Check for 'unknown' sensor values in ecobee (#1983) 2016-05-06 18:50:32 -07:00
Charles Spirakis
b86a1ece01 Allow conversion from date strings to "unix" timestamp. (#1985)
"unix" timestamp is number of seconds since Jan 1, 1970 UTC.
This allows scripts that use templates to generate time
deltas in seconds if desired from state attributes such
as last_updated.

Some examples:

timestamp now is
{{ as_timestamp(now) }}

timstamp of last change is
{{ as_timestamp(states.binary_sensor.garage_door.last_changed) }}

seconds since last change is
{{ as_timestamp(now) - as_timestamp(states.binary_sensor.garage_door.last_changed) }}
2016-05-06 18:33:46 -07:00
Daniel Høyer Iversen
ca0ea6c2f3 Rfxtrx bug fix (#1992)
* Rfxtrx bug fix

* Added Sensor Status to data_types

Missing dataype for security1 sensors

* Misspelling
2016-05-06 18:24:43 -07:00
William Scanlon
1cd59cf2a9 Added battery level to wink devices (#1979) 2016-05-06 18:19:37 -07:00
Fabian Affolter
72cf7fd9c2 Add timeout to request for location elevation (#1978) 2016-05-06 18:10:13 -07:00
Ellis Percival
c72ab42c19 Enable ZigBee "push" updates for digital/analog sensors. (#1976) 2016-05-06 18:09:18 -07:00
Fabian Affolter
d73f8d5253 Upgrade to PyMata 2.12 (#1993) 2016-05-06 18:03:28 -07:00
Fabian Affolter
98bedf1bd6 Update links to docs and doc strings (#1994) 2016-05-06 18:03:18 -07:00
Kyle Hendricks
4a28be9a94 [Pioneer AVR] Display the currently select input source as the media title (#1974) 2016-05-06 17:57:57 -07:00
Hernán
393bd88091 Add Media Player Stop command + Kodi support for it (#1960)
* Started adding Stop command to Kodi media player

* minor

* minor

* minor

* abstract-method fixed
2016-05-06 17:57:00 -07:00
Fabian Affolter
e5d1ed9439 Add dweet export component (#1818) 2016-05-06 17:55:26 -07:00
Fabian Affolter
ddfda89fc9 Update link to docs 2016-05-05 09:49:52 +02:00
Fabian Affolter
2274806bee UPdate link to docs 2016-05-05 00:32:11 +02:00
Fabian Affolter
7995829790 Fix typo 2016-05-05 00:28:51 +02:00
Alex Harvey
d5031d90c4 Update README.rst (#1981)
Splitting dev and general chat links in the badges
2016-05-04 22:40:31 +02:00
Robbie Trencheny
2874ad3445 Merge pull request #1973 from kylehendricks/fix-unresolved-merge-conflict
Fix an unresolved merge conflict
2016-05-03 19:42:27 -07:00
Kyle Hendricks
8fc07ee6cd Fix an unresolved merge conflict 2016-05-03 22:34:26 -04:00
Per Sandström
4850a65ed0 add reconnect retry and longer timeouts for verisure (#1944) 2016-05-03 18:53:11 -07:00
Paulus Schoutsen
4643dcde9c Merge branch 'pr/1969' into dev
Conflicts:
	homeassistant/components/zwave.py
2016-05-03 18:48:48 -07:00
devdelay
39e03eebcf Add Z-Wave lock support 2016-05-03 18:47:52 -07:00
Brent
34193de158 Update yaml parser for handling environment variables (#1967) 2016-05-03 18:41:14 -07:00
Alexander Fortin
298b9d1f12 Limit number of processed entries by Feedreader (#1966)
* process only last 20 available entries to avoid bombing event
  bus when parsing huge feeds
* trigger first update only when HA has completed startup,
  allowing components to complete subscriptions to feedreader
  events
* quote url in logs for better readability
2016-05-03 18:40:30 -07:00
William Scanlon
6d9254ce25 Support for OctoPrint sensors (#1924) 2016-05-03 18:35:11 -07:00
John Arild Berentsen
1a59ba735f Initial HVAC component + Z-Wave platform (#1912) 2016-05-03 18:27:51 -07:00
deisi
b2abe552a0 Added a switch to control beamers from acer (#1913) 2016-05-03 18:23:38 -07:00
Paulus Schoutsen
2a972b7fe3 Fix script condition issue (Thanks @bart274) (#1972) 2016-05-03 18:19:55 -07:00
Kyle Hendricks
f2176e54ba Add Pioneer AVR media_player support (#1968) 2016-05-02 22:09:27 -07:00
Paulus Schoutsen
79653a672d Script cleanup (#1963) 2016-05-02 22:05:09 -07:00
Andrew LeCody
a6a5e4fda2 Forecast.io: Added minutely, hourly, and daily summary (#1943)
* Forecast.io: Added minutely, hourly, and daily summary

* Resolve pylint issue (Too many instance attributes)
2016-05-02 21:56:15 -07:00
Tim Harton
f6df5bc390 Mqtt client key auth (#1935)
* Made changes so that the mqtt configuration can accept client keys and certs for auth.

* Need to figure out how the broker_config works, it's failing tests

* Fixed it so all tests passed and ssl feature works for all brokers
which are't embedded

* Bring into line with pep8

* Added config validation which has allowed me to make the code simpler
2016-05-01 23:21:28 -07:00
Brent
b51561cd9b Fixed slack component bug with getting the channel when sending a message (#1954) 2016-05-01 23:10:21 -07:00
Fabian Affolter
4710b38fad Add support for sensor classes (#1950) 2016-05-01 23:05:53 -07:00
Martin Hjelmare
069a4b1706 Refactor mysensors component
* Add MySensorsDeviceEntity class to hold the common attributes,
	properties and methods for mysensors entities.
* Inherit from MySensorsDeviceEntity class in binary_sensor, light,
	sensor and switch mysensors platforms.
* Remove not needed attribute and method for const in GatewayWrapper
	class. The const attribute is already set in the wrapped object.
* Clean up state property for mysensors sensor entities.
* Inherit from MySensorsLightRGB in MySensorsLightRGBW class.
* Remove use of get_component in mysensors component and platforms.
* Clean up update method in MySensorsDeviceEntity class.
2016-04-30 15:27:59 +02:00
Fabian Affolter
cfd7ca344e Upgrade pushbullet.py to 0.10.0 (#1939) 2016-04-29 07:49:46 +02:00
Robbie Trencheny
abc00c76bc Merge pull request #1914 from robbiet480/uber-metered-fix
Uber: Dont load price sensors for metered (read: taxi/cabs) products
2016-04-28 17:57:59 -07:00
Robbie Trencheny
f8340b94bc Fix variable name 2016-04-28 17:57:03 -07:00
Erik Eriksson
cc202b886b ELIQ Online platform cleanup (#1942) 2016-04-28 17:33:33 +02:00
Paulus Schoutsen
588a0cc947 Update frontend 2016-04-28 16:32:25 +02:00
Alexander Fortin
8c943c966a Improve feedreader roboustness (#1926)
* bugfix: ignore not existing property in feedreader item
* add info and debug data
* split logic in smaller and hopefully easier to understand functions
2016-04-28 15:01:44 +02:00
Paulus Schoutsen
1d28fa712f Fix script merge conflict 2016-04-28 13:39:44 +02:00
gwendalg
31e019e88a script: Fix log output (#1918)
Signed-off-by: Gwendal Grignou <gwendal@gmail.com>
2016-04-28 13:19:38 +02:00
Fabian Affolter
157036c1d2 Upgrade pytz to 2016.4 (#1932)
* Upgrade pytz to 2016.4

* Upgrade pytz to 2016.4
2016-04-28 13:02:21 +02:00
Paulus Schoutsen
6354399d55 Initial script condition support (#1910) 2016-04-28 12:03:57 +02:00
Dennis Karpienski
953223b81b Yamaha: added mapping and exclude lists (#1880)
* added mapping and exclude lists

* reworked pr

* made code more pythonic
2016-04-28 12:03:24 +02:00
Paulus Schoutsen
0d261be6ce Update ISSUE_TEMPLATE.md 2016-04-28 11:38:38 +02:00
Fabian Affolter
d608153dbb Upgrade jsonrpc-requests to 0.2 (#1937) 2016-04-28 10:06:15 +02:00
Fabian Affolter
f5429c89b6 Upgrade TwitterAPI to 2.4.1 (#1931) 2016-04-28 08:25:55 +02:00
Fabian Affolter
7331f4910e Upgrade schiene to 0.15 (#1929) 2016-04-28 08:23:23 +02:00
Fabian Affolter
6b81773075 Upgrade messagebird to 1.2.0 (#1928) 2016-04-28 08:23:03 +02:00
Brad Johnson
725b336683 Upgrading to python-wink 0.7.5. (#1925)
This fixes a bug where light bulb statuses were failing to update on the HA polling update call.
2016-04-28 08:22:39 +02:00
Fabian Affolter
f0bcdc6bd8 Upgrade python-telegram-bot to 4.0.1 (#1927) 2016-04-28 08:09:38 +02:00
Kyle Hendricks
59e95f0d86 Fix a couple dead links in the README (#1936) 2016-04-28 07:35:36 +02:00
Josh Wright
1859c84e6d Ignore .venv (#1923)
When using virtualfish ('virtualenvwrapper' for the fish shell), you
can create a .venv file in a directory that contains the name of a
virtualenv that will be activated automatically when you cd into that
directory. This is a good and useful thing, but since folks will have
different names for their virtualenvs, we should ignore this file.

That... and I'm probably the only one using fish/virtualfish...
2016-04-27 15:27:49 -04:00
gwendalg
2b7e1a2cc9 mqtt: Fix logic when embedded and broker configs are present. (#1919)
Fix test to prevent early exit of mqtt init handler when
both embedded and broker configs are present.

Signed-off-by: Gwendal Grignou <gwendal@gmail.com>
2016-04-26 12:17:56 +02:00
Daniel Høyer Iversen
6717215438 Merge pull request #1905 from home-assistant/rfxtrx_sensor_fix
Rfxtrx: Simplified configuration
2016-04-26 11:54:11 +02:00
blackdog70
5159cc525b Arduino: Fixed pin_mode digital input (#1909) 2016-04-26 11:46:54 +02:00
happyleavesaoc
9b3403943c update snapcast with source select (#1908)
* update snapcast

* fix id
2016-04-26 11:46:08 +02:00
Dan
b4be508741 Make zwave component user sane defaults. (#1891)
Change the zwave config default path to be valid in all but rare
edge cases. This will let that config value be truely optional.

Also check that libopenzwave is installed and print a warrning if
it cannot be found pointing at the site.
2016-04-26 11:41:20 +02:00
Micha LaQua
08d60fb04b Initial support for generic 433Mhz GPIO adapters on a Raspberry Pi (#1865)
* initial support for generic 433mhz gpio adapters

* rpi-rf: refactor id_on/id_off to code_on/code_off

fits the purpose better and improves understanding

* rpi-rf: use v0.9.4

* rpi-rf: update features and dependencies to v0.9.5

includes the ability to optionally specify a protocol for each switch

* rpi-rf: remove explicit RPi.GPIO dependency

already a dependency of the rpi-rf module

* rpi-rf: make setting gpio, code_on and code_off mandatory

* rpi-rf: remove unused value_template

* rpi-rf: only enable TX once if there are switches
2016-04-26 11:35:01 +02:00
Dan Cinnamon
7154603567 Summary: Enhanced to make more robust and efficient. (#1917)
Prevented a switch from being turned on twice.

Made the module regex more robust.

Refactored the code to reduce the amount of network traffic to/from pulseaudio.

Fixed pylint issues
2016-04-26 11:29:20 +02:00
Robbie Trencheny
ee9996374c Dont load price sensors for metered (read: taxi/cabs) products 2016-04-25 11:43:18 -07:00
John Arild Berentsen
69daa383dd Exclude locally built python-openzwave from tox. (#1911)
Excludes `build` directory built by running build_python_openzwave script. When running tox test locally.
2016-04-25 12:06:28 +02:00
Daniel
2ca1f7542f Refactor rfxtrx code 2016-04-24 13:42:59 +02:00
Bart274
d4fe6f385a Update pyicloud version (#1849)
* Update requirements_all.txt

* Update icloud.py
2016-04-24 06:49:04 +02:00
deisi
3b0a35f571 Ontime and delay attribute are allways present in deutsche_bahn sensor (#1875) 2016-04-24 06:43:25 +02:00
Jeff Schroeder
448edecdd1 Merge pull request #1896 from fabaff/slacker-upgrade
Upgrade slacker to 0.9.10
2016-04-23 21:43:03 -05:00
Jeff Schroeder
d0357cd42f Merge pull request #1901 from ishults/dev
Use protocol of web page for yr.no pictures
2016-04-23 21:18:31 -05:00
Igor Shults
7afdca1121 Use protocol of web page for yr.no pictures 2016-04-23 21:09:39 -05:00
Daniel
55b51cb3fa Update rfxtrx tests to handle new config 2016-04-23 20:13:24 +02:00
Daniel
74022a3978 New configuration for rfxtrx sensor 2016-04-23 19:55:05 +02:00
Fabian Affolter
d232020de4 Upgrade slacker to 0.9.10 2016-04-23 18:20:28 +02:00
sander76
27ce394571 external dependency evohomeclient 0.2.4 gave a json decode error. (#1895)
* external dependency evohomeclient 0.2.4 gave a json decode error.
upped to 0.2.5
2016-04-23 18:03:43 +02:00
Paulus Schoutsen
413b8d34e4 Merge pull request #1892 from home-assistant/netdisco-update
Netdisco update
2016-04-23 08:41:08 +02:00
Paulus Schoutsen
8f8d936539 Netdisco bump to 0.6.6 2016-04-23 08:34:07 +02:00
Paulus Schoutsen
197d9639f9 Merge pull request #1882 from home-assistant/service-parameters
Trigger variables in automation actions
2016-04-23 07:46:26 +02:00
Paulus Schoutsen
14bd630c1d Service/Script cleanup 2016-04-23 07:11:21 +02:00
Paulus Schoutsen
533799656e Cache script object for Alexa 2016-04-23 07:10:57 +02:00
Paulus Schoutsen
1d8554359c Allow setting entity namespace (#1887) 2016-04-23 06:34:49 +02:00
Paulus Schoutsen
cc42f2d8be Show error message frontend if can't find server (#1886) 2016-04-23 06:30:34 +02:00
Per Sandström
ba696888c1 Merge pull request #1889 from persandstrom/verisure_updated_links
Verisure: new version and changed "key" in smartplug
2016-04-22 20:15:26 +02:00
Per Sandström
a4083bab1a new version and changed "key" 2016-04-22 20:02:54 +02:00
Fabian Affolter
1c6a2f87eb Add link to docs 2016-04-22 15:48:40 +02:00
Paulus Schoutsen
4a5411a957 Allow calling scripts from Alexa 2016-04-22 05:30:30 -04:00
Paulus Schoutsen
612a017bc6 Automation: Allow embedding script definition 2016-04-21 22:36:14 -04:00
Paulus Schoutsen
b8e4db9161 Script entities to allow passing in variables 2016-04-21 22:24:23 -04:00
Paulus Schoutsen
26863284b6 Script helper: support variables 2016-04-21 21:42:20 -04:00
Paulus Schoutsen
09a771a026 Move script component tests to script helper tests 2016-04-21 21:29:28 -04:00
Paulus Schoutsen
f76d545a08 Add script logic into helper. 2016-04-21 21:06:05 -04:00
Dennis Karpienski
2333c0ca3b WebOS component fixes
* fixed some exceptions

* add requirements to notify

* added optimistic state to power off

* run requirements script
2016-04-21 20:35:56 -04:00
Paulus Schoutsen
4e568f8b99 Automation: Add trigger context and expose to action 2016-04-21 13:59:42 -07:00
Paulus Schoutsen
c4913a87e4 Alexa: Expose intent variables to service calls 2016-04-21 12:27:23 -07:00
Paulus Schoutsen
4acb121689 Allow variables in service.call_from_config 2016-04-21 12:22:19 -07:00
Daniel Høyer Iversen
3318c55c65 Heat control config validation
* heat control configuration validation

* fix heat contol test
2016-04-21 07:59:35 -07:00
Daniel Høyer Iversen
d3fb69783d Tellstick config validation 2016-04-21 07:57:28 -07:00
Dan
43a94995c2 Update unifi version
New unifi version has a fix that will allow it to install correctly
2016-04-21 07:56:19 -07:00
John Arild Berentsen
dfa37511ad Improve recognition for zwave thermostats 2016-04-21 07:51:31 -07:00
Paulus Schoutsen
4745282a95 Update underline of header README 2016-04-20 19:00:12 -07:00
Paulus Schoutsen
1d3c6da6c8 Version bump to 0.18.2 for pypi 2016-04-20 18:59:47 -07:00
Paulus Schoutsen
623b023ac0 Version bump to 0.19.0.dev0 2016-04-20 18:44:27 -07:00
Paulus Schoutsen
8f18cb34d6 Release 0.18 #1854
0.18
2016-04-20 18:43:54 -07:00
Paulus Schoutsen
b6e956a3d0 Version bump to 0.18 2016-04-20 18:43:21 -07:00
Paulus Schoutsen
3e0f64e4f6 Update frontend 2016-04-20 18:13:25 -07:00
Dennis Karpienski
934cd876b4 fixed some issues with webos (#1856)
* fixed some issues

* fixed linter
2016-04-20 14:09:50 -07:00
Christoph Wagner
fbfdf5a286 Removed redundant Throttle decorator (#1862) 2016-04-20 00:20:30 -07:00
Paulus Schoutsen
7d4b11f4ec Fix wrong merge 2016-04-19 22:59:29 -07:00
Paulus Schoutsen
4abbbf0f50 Merge remote-tracking branch 'origin/master' into dev
Conflicts:
	homeassistant/bootstrap.py
	homeassistant/components/frontend/version.py
	homeassistant/const.py
2016-04-19 22:53:26 -07:00
Paulus Schoutsen
0c58a1a499 Sort .coveragerc 2016-04-19 21:45:29 -07:00
Paulus Schoutsen
bdc39ff905 Update frontend 2016-04-19 21:39:44 -07:00
Paulus Schoutsen
9d391becc1 Add mysensors tcp ethernet gateway (#1861)
* Bump version of pymysensors to 0.6, which includes the tcp gateway.
* Update requirements_all.txt.
* Replace CONF_PORT with CONF_DEVICE and ATTR_PORT with ATTR_DEVICE.
* Add tcp_port in config.
* Try to guess if tcp or serial gateway is configured, by validating
	device name as an ip address. If successful setup tcp gateway, if it
	fails, setup serial gateway.
* Update device_state_attributes to show correct device, ethernet or
	serial.
2016-04-19 21:00:56 -07:00
Paulus Schoutsen
2e79e9d5bb Correct celcius to celsius (#1860) 2016-04-19 20:30:44 -07:00
Jon Evans
9090672146 Pass format through to temper_device so that Fahrenheit works (#1858) 2016-04-19 20:00:03 -07:00
Dennis Karpienski
46274d4393 add media_player webos tv platform (#1853)
* added webos tv platform

* moved coverage entries
2016-04-19 08:53:58 -07:00
Paulus Schoutsen
177d0c20d9 Add bluepy package dependency to Dockerfile 2016-04-19 08:49:05 -07:00
Chema García
b9fd4919b3 Set name to hyperion assets (#1822)
* set name to hyperion assets

by specifying the name in the configuration:

light kodi_xxx:
  name: "Kodi XXX"
  platform: hyperion
  host: 192.168.1.222
  port: 19444

* Update hyperion.py

fix extra space
2016-04-19 08:19:27 -07:00
Manoj
c1ca13d613 Add bluetooth device tracker (#1830)
This tracker discovers new devices on boot and tracks bluetooth devices
periodically based on interval_seconds value. Devices discovered are
stored with 'BT_' as the prefix for device mac.

Requires PyBluez
2016-04-19 08:18:46 -07:00
Alexander Fortin
c0a7b0f474 Add feedreader component (#1836) 2016-04-19 08:14:36 -07:00
Markus Peter
e61ffff646 Support for EQ3 Bluetooth Smart Thermostats (#1839)
* Initial Support for EQ3 Bluetooth Smart Radiator Thermostats

* tox runs successfully

* Moved device specific stuff to bluepy_devices library

* lint fix
2016-04-19 08:12:27 -07:00
Daniel Høyer Iversen
16fe7dd937 rfxtrx config validation 2016-04-19 07:13:58 -07:00
Greg Dowling
5b0ab5c118 Merge pull request #1842 from home-assistant/add_imperial_meter
Add support for imperial gas meter and user specified gas calorific value.
2016-04-18 12:10:07 +01:00
Dan
276c2070be Do not setup or configure a hue bridge twice (#1848)
Tracks previously configured bridges by IP and prevents duplicates
from being configured
2016-04-17 22:41:31 -07:00
Paulus Schoutsen
c89e9d87e8 Catch platform setup error (#1847) 2016-04-17 22:07:53 -07:00
Brad Johnson
09693bf16c Upgrading to python-wink 0.7.4 and improving RGB color support in HA (#1832) 2016-04-17 19:07:21 -07:00
Jan Harkes
bb439129e6 Bump pywemo version to 0.4.2 2016-04-17 21:02:31 -04:00
Jan-Preben Mossin
5931bac695 Only add visible sonos devices
Some Sonos devices (e.g SUB) does not have
a upnp media renderer, but are discovered as sonos
devices. Creating a SonosDevice object from such a
device will fail.
2016-04-17 16:45:16 -07:00
John Arild Berentsen
b45c0cd735 Zwave import fixes for stability (#1845) 2016-04-17 14:46:51 -07:00
Paulus Schoutsen
ea38742067 Update bootstrap frontend script 2016-04-17 13:59:11 -07:00
Flavio Castelli
b5f1c1332a Sonos: better handling of offline players (#1829)
When a sonos player goes offline an endless stream of
exceptions is raised. That happens because homeassistant keeps trying
to refresh its status.

This can happen even when a sonos player has gone offline **before**
homeassistant is started. The sonos players take some time before
realizing one of their mates is no longer online, leading to the same
stream of exceptions inside of homeassistant.

Three types of exceptions of can be raised:

  - `requests.packages.urllib3.exceptions.MaxRetryError`
  - `requests.packages.urllib3.exceptions.NewConnectionError`
  - `TimeoutError`

It's not possible to handle all of them with a single `except` block
because they are raised in a random order and after some delays. That
means a 2nd or 3rd exception can take place while handling the 1st one.

The only solution is to check whether a a player is actually reachable
by attempting to connect to a service that must be running on it.

Also all the players in a 'unknown' state should not be polled by
homeassistant (despite of their brand).

I'm going to upstream the `_is_reachable` method I added to the
`sonos.py` file into `SoCo`. In the meantime we must ship this piece
of code with homeassistant.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
2016-04-17 13:17:13 -07:00
Dan Cinnamon
a482c4b2a1 Allow mpd to handle the play_media service. (#1831)
Even though there's not really a place in the UI for it, it will now be possible to set a playlist as part of a script, and ultimately a scene.
2016-04-17 12:34:33 -07:00
deisi
e8bf47ff59 Fix for the issue #1323 (#1835) 2016-04-17 12:32:04 -07:00
Paulus Schoutsen
ecf411c4c5 Merge pull request #1838 from MartinHjelmare/fix-influxdb
Fix field type conflict in influxdb
2016-04-17 10:43:47 -07:00
pavoni
31f061f4d3 Add support for imperial meter and user soecified calorific value. 2016-04-17 18:34:40 +01:00
icovada
b29dedaecf SCSGATE: Actually cycle through all devices to register (#1841)
* SCSGATE: Actually cycle through all devices to register

Modify _activate_next_device function to actually cycle through self-devices_to_register instead of simply checking whether there are any and onl registering one

* Deleted extra white lines
2016-04-17 10:17:42 -07:00
MartinHjelmare
ca2d969198 Fix field type conflict in influxdb
* Add STATE_UNAVAILABLE to states that are ignored when writing to the
  database. This will avoid a field type error for string if the field
  already contains a different type, eg integer.
* Add test for ignored states for influxdb.
* Clean up influxdb tests.
2016-04-16 20:25:39 +02:00
Paulus Schoutsen
37a28c799f Merge pull request #1833 from home-assistant/iso8601
Use standardised datetime format
2016-04-16 10:06:33 -07:00
Paulus Schoutsen
1cfbeabaec Update frontend 2016-04-16 10:05:29 -07:00
Paulus Schoutsen
68d92c3196 Use standardised datetime format 2016-04-16 01:46:50 -07:00
Justyn Shull
bf3b77e1f2 Change sqlite queries to work with older versions of sqlite 2016-04-15 21:18:51 -05:00
Justyn Shull
d5ca97b1f6 Add tests for purging old states and events 2016-04-15 21:02:17 -05:00
Justyn Shull
fd48fc5f83 Add CONFIG_SCHEMA to verify config. Move purge_days key name to
CONF_PURGE_DAYS so it can be changed easier later.

Use 'recorder' domain instead of 'history' domain.

Pass purge_days config directly into Recorder object instead of passing
the config object around.
2016-04-15 19:54:30 -05:00
Justyn Shull
c89cd6a68c Add 'purge_days' option to the history/recorder component
Issue https://github.com/balloob/home-assistant/issues/1337

When purge_days is set under the history component, recorder.py will
delete all events and states that are older than purge_days days ago.

Currently, this is only done once at start up.   A vacuum command is
also run to free up the disk space sqlite would still use after deleting
records.
2016-04-15 19:54:30 -05:00
Paulus Schoutsen
e7520ef401 Update frontend + mdi 2016-04-14 22:57:41 -07:00
Paulus Schoutsen
f5ee3e6e13 Merge pull request #1821 from home-assistant/service-validations
Service validations
2016-04-13 22:38:14 -07:00
Alex Harvey
0abedd8b46 fix for plex not detecting plex players after power up (#1824) 2016-04-13 22:33:30 -07:00
Paulus Schoutsen
abd376cbba Merge pull request #1816 from JshWright/feature/accurate-away-temps-nest
Improve Nest target temp display
2016-04-13 22:01:01 -07:00
Øystein Hansen
8b986b0b97 mysensors.py Prevent sensor name mixup (#1802)
Change the sensor name schema so nodes are not mixed up. The dot that was pressent before was ignored by home-assistant.
Before name:  <skeatchname> <node_id><child_id>  eg. wall 107
New name   :  <skeatchname> <node_id> <child_id>  eg. wall 10 7
This will result in a Home Assistant Entity ID of: sensor.wall_10_7
2016-04-13 21:22:40 -07:00
Dennis Karpienski
f1d8667d7e Yamaha AVR Input Select (#1796)
* added select input for yamaha

* set source_list to none on init
2016-04-13 21:13:12 -07:00
Jan Harkes
298a1c2af7 Service validation for alarm_control_panel component. 2016-04-13 13:45:11 -04:00
Fabian Affolter
9d71a8c4b9 Merge pull request #1819 from fabaff/typos
Update file header and fix typos
2016-04-13 19:35:06 +02:00
Jan Harkes
5cdaee7ebb Service validation for browser component. 2016-04-13 12:57:47 -04:00
Jan Harkes
7c9729b9c1 Service validation for conversation component. 2016-04-13 12:48:39 -04:00
Jan Harkes
003bd24976 Service validation for downloader component. 2016-04-13 12:35:08 -04:00
Jan Harkes
652fe7e0f2 Service validation for garage_door component. 2016-04-13 12:35:08 -04:00
Jan Harkes
49b002dc53 Service validation for ifttt component. 2016-04-13 12:35:07 -04:00
Jan Harkes
7e0d9bc709 Service validation for input_boolean component. 2016-04-13 12:35:07 -04:00
Jan Harkes
bfdbbbddac Service validation for input_select component. 2016-04-13 12:35:07 -04:00
Jan Harkes
620d7a92f0 Service validation for input_slider component. 2016-04-13 12:35:07 -04:00
Jan Harkes
8b40346db3 Service validation for keyboard component. 2016-04-13 12:35:07 -04:00
Jan Harkes
5c520b0d35 Service validation for lock component. 2016-04-13 12:35:07 -04:00
Jan Harkes
d6f3123937 Service validation for logbook component. 2016-04-13 12:35:07 -04:00
Jan Harkes
7ffc254a87 Service validation for notify component. 2016-04-13 12:35:07 -04:00
Jan Harkes
40e36126bc Service validation for rollershutter component. 2016-04-13 12:35:07 -04:00
Jan Harkes
ad6f5d3b1d Service validation for scene component. 2016-04-13 12:35:07 -04:00
Jan Harkes
567d1065b2 Service validation for script component. 2016-04-13 12:35:07 -04:00
Jan Harkes
d90f31bf6e Config and service validation for shell_command component. 2016-04-13 12:35:07 -04:00
Jan Harkes
1deaf2fe8f Service validation for switch component. 2016-04-13 12:35:07 -04:00
Jan Harkes
730514cea8 Service validation for the thermostat component. 2016-04-13 12:35:07 -04:00
Fabian Affolter
85901d60c4 Update file header and fix typos 2016-04-13 13:50:28 +02:00
Robbie Trencheny
05469e6d9b Update pyGTFS version 2016-04-13 00:40:12 -07:00
Paulus Schoutsen
1f96c4ad88 Update submodule 2016-04-12 23:57:07 -07:00
Robbie Trencheny
c121c9aa39 Fix links in README.rst 2016-04-12 21:37:10 -07:00
Paulus Schoutsen
3ed104529c Merge pull request #1811 from fabaff/moving
Update links
2016-04-12 21:16:01 -07:00
Jan Harkes
0e10f7ced9 Ignore tests/config/deps/ for both git and flake8.
Sometimes py.test leave some packages around in tests/config/deps.
Make sure these do not accidentally get pulled into a commit or
cause a local tox run to fail.
2016-04-12 18:46:34 -04:00
Jan Harkes
4aa43bbf7a New version of betamax breaks the yr.no sensor test.
Pin to betamax-0.5.1 for now.
2016-04-12 18:46:34 -04:00
Josh Wright
1685bbe1f7 Fix copy/paste logic error 2016-04-12 18:45:57 -04:00
Josh Wright
942d722dcf Improve target temperature selection logic
When picking which of the high/low temperatures to display as the
"target", it makes more sense to take the outside temperature into
consideration, rather than the current temperature of the thermostat.

If the temperature outside is less than the temperature of the
thermostat, then we are far more likely to end up in "heating" mode
eventually, and vice versa, regardless of where the current inside
temp falls in the range between high and low.
2016-04-12 18:25:24 -04:00
Josh Wright
c4a71fbfa7 Include away temps in target temps
The target temperature methods were not taking the 'away' status
into account. leading to misleading target temps being reported.
2016-04-12 18:15:24 -04:00
Jan Harkes
ebf45012fb Ignore tests/config/deps/ for both git and flake8.
Sometimes py.test leave some packages around in tests/config/deps.
Make sure these do not accidentally get pulled into a commit or
cause a local tox run to fail.
2016-04-12 14:58:02 -04:00
Jan Harkes
0bf49aea6f New version of betamax breaks the yr.no sensor test.
Pin to betamax-0.5.1 for now.
2016-04-12 14:43:04 -04:00
Daniel Høyer Iversen
cd80e41b32 Allow negative elevation in yr config 2016-04-12 07:54:03 -07:00
Fabian Affolter
4ecd8d5f11 Update links 2016-04-12 14:18:18 +02:00
Paulus Schoutsen
5b8a2b00df Update frontend 2016-04-12 00:24:19 -07:00
Alexander Fortin
24569e6169 Make owntracks.py pylint clean (#1808)
* refactor validation logic into validate_payload function
* add debugging messages to validation
2016-04-11 22:02:47 -07:00
Fabian Affolter
4a16d8064d Enable certificate verification and allow non-encrypted communication (#1763) 2016-04-11 21:55:17 -07:00
Jan Harkes
9d848731d9 Nest config validation (#1810)
* Config validation for Nest platforms.
2016-04-11 21:52:19 -07:00
Jan Harkes
656e187729 Some fixes for yr config validation. (#1809)
The setup_platform function is trying to get CONF_LATITUDE and CONF_LONGITUDE,
but the validation schema was not accepting these.

Also moved CONF_MONITORED_CONDITIONS and CONF_ELEVATION to homeassistant.const
because they are used in other places.
2016-04-11 21:44:39 -07:00
Jan Harkes
241735c924 Change local library path from {config_dir}/lib to {config_dir}/deps. (#1799)
Just on the off chance that someone who happens to run as root and also
doesn't correctly parse "just remove config /lib and restart".
2016-04-11 20:07:50 -07:00
Paulus Schoutsen
3de51bf75d Merge pull request #1807 from balloob/release-0.17.3
0.17.3
2016-04-11 19:56:41 -07:00
Paulus Schoutsen
4023021b21 Version bump to 0.17.3 2016-04-11 19:48:37 -07:00
Jan Harkes
2c665ca3e4 Do not propagate api password (#1797)
* Do not propagate API password in service requests.

It makes service validation fail. The choice is to either handle it as an
optional key in every service handler and make sure it doesn't end up in event
stream and notifications, or to strip it as early as possible.

* Some places still need a forwarded api password.

- Event forwarding/remote api uses the local api password to
  authenticate against the remote instance.
- The generated index.html at '/' embeds the api password.
2016-04-11 19:48:16 -07:00
Jan Harkes
4857117dda Do not propagate api password (#1797)
* Do not propagate API password in service requests.

It makes service validation fail. The choice is to either handle it as an
optional key in every service handler and make sure it doesn't end up in event
stream and notifications, or to strip it as early as possible.

* Some places still need a forwarded api password.

- Event forwarding/remote api uses the local api password to
  authenticate against the remote instance.
- The generated index.html at '/' embeds the api password.
2016-04-11 19:37:15 -07:00
Josh Wright
80d6e9f08f Use constant time comparison for http authentication (#1804)
In order to prevent a potential timing attack, it's important to make
sure the password check takes the same amount of time, regardless of
how many characters in the candidate password match the real password.

This commit does increase the verbosity of the authentication check.
Generally it is a good idea for authentication logic to be very clear,
even if that requires some extra verbosity.
2016-04-11 19:36:25 -07:00
Robbie Trencheny
0018d2b3f5 Fix flake8 error on zeroconf.py 2016-04-10 18:55:54 -07:00
Robbie Trencheny
5d8cd6d49d Merge pull request #1790 from robbiet480/upnp
UPnP port mapping component
2016-04-10 18:47:47 -07:00
Robbie Trencheny
ed6958f477 Change needs_auth ZeroConf key 2016-04-10 18:46:57 -07:00
Robbie Trencheny
27d624fc4a Merge remote-tracking branch 'upstream/dev' into upnp 2016-04-10 18:24:04 -07:00
Paulus Schoutsen
948aa6838d Remove stale print 2016-04-10 18:22:25 -07:00
Robbie Trencheny
6f149d414a Disable import-error on upnp 2016-04-10 18:19:32 -07:00
Robbie Trencheny
f1e46e63c0 Merge pull request #1733 from robbiet480/http-zeroconf
ZeroConf component
2016-04-10 18:17:06 -07:00
Robbie Trencheny
a3959d5e01 Update netdisco dependency to 0.6.4 (deja vu all over again!) 2016-04-10 18:10:31 -07:00
Robbie Trencheny
eca1631f1b Update netdisco dependency to 0.6.3 2016-04-10 18:05:30 -07:00
Robbie Trencheny
f30b406334 Merge remote-tracking branch 'upstream/dev' into http-zeroconf 2016-04-10 18:04:56 -07:00
Robbie Trencheny
1de45ebe8b Fix api_password conditional and close zeroconf when we shut down 2016-04-10 17:59:21 -07:00
Robbie Trencheny
5b51f682ca Remove unnecessary disable=no-name-in-module 2016-04-10 17:49:07 -07:00
Robbie Trencheny
41c3f695b4 UPnP port mapping component 2016-04-10 17:44:57 -07:00
Paulus Schoutsen
197388a9b2 Prevent device tracker error 2016-04-10 17:35:33 -07:00
Dennis Karpienski
a862e994c7 Thinkingcleaner support (#1784)
* added first implementation of thinking cleaner

* fix lock release

* fixed tox flaws

* updated coveragerc

* fixed lock

* changed update lock

* fixed codestyle
2016-04-10 16:59:53 -07:00
Markus Peter
fec45033bc Expanded homematic component with MAX! support via homegear (#1783)
* Expanded homematic component with MAX! support via homegear
Also multithreading fixes

* fixed tox errors

* incorporate changes suggested by balloob

* replaced HomematicConfig Container Class with namedtuple

* fixed lint errors
2016-04-10 16:26:08 -07:00
Robbie Trencheny
e1ffdcc5f1 Use hass.config.api instead of hass.http 2016-04-10 16:09:52 -07:00
Robbie Trencheny
085d90ed67 Revert all http.py changes 2016-04-10 16:08:00 -07:00
Daniel Høyer Iversen
769d958464 Config validation for rfxtrx sensor (#1780) 2016-04-10 16:05:32 -07:00
Robbie Trencheny
e70338dfe1 Block zeroconf from tests 2016-04-10 16:03:40 -07:00
Robbie Trencheny
beac69ad17 Final clean up, flake8, pylint, change a variable name, remove unnecessary imports 2016-04-10 16:02:07 -07:00
Robbie Trencheny
c33c2c01d2 Break Zeroconf into its own component 2016-04-10 15:34:04 -07:00
Paulus Schoutsen
4f834ba3f1 Make all entity_ids lowercase (#1786) 2016-04-10 15:20:20 -07:00
Paulus Schoutsen
6d65b0bbd7 Update frontend 2016-04-10 15:18:44 -07:00
Daniel Høyer Iversen
d3493c7e5a Config validation of yr sensor (#1767) 2016-04-10 10:43:05 -07:00
Josh Wright
24257fe4a3 Don't round values in Thermostat internal state (#1782)
Since all values coming out of the Thermostat component pass though the
_convert_for_display() method (which handles any necessary rounding),
there is no need to round values that only exist in the internal state
of the thermostat device. It serves no purpose and risks rounding
errors/precision loss.
2016-04-10 10:41:13 -07:00
Paulus Schoutsen
3d98b8b5b3 Update frontend 2016-04-10 01:43:40 -07:00
Paulus Schoutsen
988dd2ca83 Update frontend 2016-04-10 01:33:01 -07:00
Joel Asher Friedman
9808c0e3fd mqtt garage door component (#1742) 2016-04-09 20:31:53 -07:00
OpenDave15
91b1ebaeb7 Allow use of pynetgear 3.3 port parameter. (#1777)
* Allow use of pynetgear 3.3 port parameter.

* Fix lint problem
2016-04-09 20:29:06 -07:00
Paulus Schoutsen
1e86044590 Update netdisco to 0.6.2 2016-04-09 20:24:34 -07:00
Paulus Schoutsen
c98b56a807 Merge pull request #1778 from balloob/hotfix/0.17.2
Hotfix/0.17.2
2016-04-09 16:23:20 -07:00
Paulus Schoutsen
fa0be21342 Version bump to 0.17.2 2016-04-09 16:16:05 -07:00
Jan Harkes
7be29468d5 Make yaml config parser errors look less like bugs. (#1776)
Instead of nested tracebacks, show a simpler error message.

    Config directory: /home/user/.homeassistant
    ERROR:homeassistant.util.yaml:duplicate key: "script"
      in "/home/user/.homeassistant/configuration.yaml", line 95, column 0
      in "/home/user/.homeassistant/configuration.yaml", line 108, column 0
2016-04-09 16:15:49 -07:00
Paulus Schoutsen
9924351a42 Prevent device tracker from creating invalid YAML (#1774) 2016-04-09 16:15:49 -07:00
Jan Harkes
73859f59f0 Make yaml config parser errors look less like bugs. (#1776)
Instead of nested tracebacks, show a simpler error message.

    Config directory: /home/user/.homeassistant
    ERROR:homeassistant.util.yaml:duplicate key: "script"
      in "/home/user/.homeassistant/configuration.yaml", line 95, column 0
      in "/home/user/.homeassistant/configuration.yaml", line 108, column 0
2016-04-09 15:25:01 -07:00
Paulus Schoutsen
b87e2437aa Prevent device tracker from creating invalid YAML (#1774) 2016-04-09 13:38:51 -07:00
Paulus Schoutsen
a41514ca50 0.17.1 (#1771)
* We need to allow extra keys on top level componenet config

fixes #1756

* Add comment about location of hass (fixes #1723)

* Fix for MQTT config validation on the protocol field. (#1765)

* Update frontend with weblink fix

* Fix for light service validation. (#1770)

Incorrect validation tested if passed value was a list instead of
a member of the list.

* Accept group without entities in configuration. (#1768)

* Accept group without entities in configuration.

People seem to use these as placeholders for future expansion of their
home automation dreams, and we used to accept them.  We still have to
specify at least one of 'name', 'view' or 'icon' so that the group is
parsed as a dictionary.

* Also accept empty entities: key in a group.

* Additional fix for empty entities value in a group config.

* Version bump to 0.17.1
2016-04-09 09:55:52 -07:00
Jan Harkes
446d367aeb Accept group without entities in configuration. (#1768)
* Accept group without entities in configuration.

People seem to use these as placeholders for future expansion of their
home automation dreams, and we used to accept them.  We still have to
specify at least one of 'name', 'view' or 'icon' so that the group is
parsed as a dictionary.

* Also accept empty entities: key in a group.

* Additional fix for empty entities value in a group config.
2016-04-09 09:24:18 -07:00
Paulus Schoutsen
982f8f41ae Update frontend with weblink fix 2016-04-09 09:09:17 -07:00
Jan Harkes
7a25ae3e2c Fix for light service validation. (#1770)
Incorrect validation tested if passed value was a list instead of
a member of the list.
2016-04-09 09:07:13 -07:00
Jan Harkes
3aa4727b18 Fix for MQTT config validation on the protocol field. (#1765) 2016-04-09 09:03:41 -07:00
Paulus Schoutsen
b3bad10dab Merge pull request #1758 from turbokongen/patch-1
We need to allow extra keys on top level componenet config
2016-04-09 09:02:55 -07:00
Fabian Affolter
c210242c80 Add comment about location of hass (fixes #1723) 2016-04-09 10:55:42 +02:00
John Arild Berentsen
f36cfcdbd9 We need to allow extra keys on top level componenet config
fixes #1756
2016-04-09 10:50:46 +02:00
Paulus Schoutsen
ff47cffe8a Version bump to 0.18.0.dev0 2016-04-08 21:43:29 -07:00
Paulus Schoutsen
e97667aea0 Merge pull request #1727 from balloob/dev
0.17
2016-04-08 21:43:15 -07:00
Paulus Schoutsen
66bf8df768 Version bump to 0.17 2016-04-08 21:32:26 -07:00
Paulus Schoutsen
db3f848905 Correct frontend version 2016-04-08 21:32:18 -07:00
Paulus Schoutsen
2ec9cc15f4 Build frontend 2016-04-08 21:28:59 -07:00
Daniel Høyer Iversen
cac555fc69 Rfxtrx config validating (#1747)
* config validation

* Config validation of rfxtrx switch

* Config validation of rfxtrx light

* Config validation of rfxtrx

* Config validation of rfxtrx
2016-04-08 20:55:31 -07:00
Jan Harkes
d6abdc0d4e Add line numbers when we find duplicate keys. (#1750) 2016-04-08 20:53:27 -07:00
Jan Harkes
db2783c2d1 Upgrade astral (#1754)
* Upgrade astral to 1.0

* Pass timezone as string, not object, to astral.Location.
2016-04-08 20:51:48 -07:00
Jan Harkes
c481cbce7e Make tox run faster by using in-memory sqlite db. (#1752)
Two tests were invariably grinding my system to a halt as it was
applying migrations to an empty sqlite database. This patch reduces
the time of a pytest run from 50 to about 16 seconds on my desktop.

The difference is even more noticable on a slower laptop drive, but
is probably insignificant for all you fancy SSD users.
2016-04-08 18:28:19 -07:00
Greg Dowling
f5227e1de0 Fix vera breaking component loading order. (#1749) 2016-04-08 11:38:02 -07:00
Fabian Affolter
f6331da000 Remove print 2016-04-08 08:03:14 -07:00
Paulus Schoutsen
3dc874dcf5 Update frontend (embed Roboto) 2016-04-08 00:15:02 -07:00
Paulus Schoutsen
98543072dd Add feature request link to issue template 2016-04-07 19:42:21 -07:00
Jan Harkes
9e0e61fec9 Trying to fix failing sun component tests. (#1741)
Make sure we set a timezone to make UTC calculations predictable
and don't override the location of the test_home_assistant config.
2016-04-07 18:32:21 -07:00
Greg Dowling
a7f80608c6 Handle Share off for events in OwnTracks app (#1737) 2016-04-07 12:21:25 -07:00
Jan Harkes
29c30861bf Be flexible in what we accept for script.delay configuration. (#1738)
Accept delay configuration even when someone forgets to indent the time

specification.



Also removed 'weeks' and 'microseconds' from acceptable delay values.

There is a new homeassistant release every 2 weeks and running scripts

are not persisting across restarts. And there is still the option of

using (weeks*7) days if the long delay is really necessary.



And if someone really depends on microsecond delay precision we are

unlikely to be able to provide this accuracy, even milliseconds is

suspect for that matter but will at least allow us to specify some

subsecond delay.
2016-04-07 12:19:28 -07:00
Jan Harkes
5b17f629ad Test function for mqtt topic validators and IsFile() linting fix (#1740)
* Add test function for mqtt topic validators.
* Fix for linting error on vol.IsFile()
2016-04-07 13:52:25 -04:00
Paulus Schoutsen
7d9b13a6a2 Merge pull request #1739 from JshWright/fix/mqtt-config-validation
vol.IsFile() needs to be called
2016-04-07 10:13:53 -07:00
Josh Wright
3539193bae vol.IsFile() needs to be called
vol.IsFile results in an instance of the IsFile method being returned by
the schema validation process. It needs to be called in order to do the
right thing.
2016-04-07 12:39:27 -04:00
Paulus Schoutsen
5ff9479f0b Merge pull request #1703 from jaharkes/config-validation-mqtt
Config validation for MQTT
2016-04-07 08:43:01 -07:00
Hernán
7b80ed8135 Add Kodi play media
* Added media_player/play_media service to Kodi

* revert

* fixes

* lint fixed, base class fixed
2016-04-07 08:41:41 -07:00
Daniel Høyer Iversen
a1a2e456ad Add test for fire event in rfxtrx component 2016-04-07 08:40:15 -07:00
Greg Dowling
26c24b8ed3 Merge pull request #1736 from balloob/wemo-light-fix
Bump pywemo to 0.4.1 - fix non native light issue.
2016-04-07 14:29:14 +01:00
pavoni
54aa7b80ea Bump pywemo to 0.4.1 - fix non native light issue. 2016-04-07 10:00:25 +01:00
Jan Harkes
3bc06ac79e We need to allow extra keys on the top-level component config. 2016-04-07 00:42:56 -04:00
Jan Harkes
94835235a4 Config validation for mqtt_eventstream component. 2016-04-06 23:25:28 -04:00
Jan Harkes
a7016e4b32 Move CONF_STATE_TOPIC, CONF_COMMAND_TOPIC and CONF_RETAIN to mqtt component. 2016-04-06 22:51:39 -04:00
Jan Harkes
0ef0d4bac7 Config validation for automation MQTT trigger 2016-04-06 22:51:39 -04:00
Jan Harkes
fca08b095a Config validation for MQTT rollershutter platform. 2016-04-06 22:51:39 -04:00
Jan Harkes
deecec5e4e Config validation for MQTT switch platform. 2016-04-06 22:51:39 -04:00
Jan Harkes
eb3f812e38 Config validation for MQTT sensor platform. 2016-04-06 22:51:39 -04:00
Jan Harkes
3383854506 Move CONF_OPTIMISTIC to homeassistant.const. 2016-04-06 22:51:39 -04:00
Jan Harkes
c8df06bb9f Config validation for MQTT lock platform. 2016-04-06 22:51:38 -04:00
Jan Harkes
4e864b5caa Rename _mqtt_topic to valid_subscribe_topic. 2016-04-06 22:51:38 -04:00
Jan Harkes
29a8403741 Config validation for MQTT light platform. 2016-04-06 22:51:38 -04:00
Jan Harkes
88da42fe62 Config validation for MQTT device_tracker platform. 2016-04-06 22:51:38 -04:00
Jan Harkes
287f0f4f68 Config validation for MQTT binary_sensor platform. 2016-04-06 22:51:38 -04:00
Jan Harkes
0bd4e15fcb Config validation for MQTT alarm_control_panel platform. 2016-04-06 22:51:38 -04:00
Jan Harkes
2c119091dc Add MQTT schema validation functions for platform schemas. 2016-04-06 22:51:38 -04:00
Jan Harkes
58ea589f99 Fixes for mqtt config validation tests. 2016-04-06 22:51:38 -04:00
Jan Harkes
8cca2bb344 Config validation for MQTT 2016-04-06 22:51:38 -04:00
Josh Wright
2e9bf42688 Disable updater.updater on dev versions
The Updater component doesn't make much sense on dev versions. If you

want to run a production config with the updater enabled, you end up

with an 'Update Available' badge pointing you to the last release

version. This change disables the Updater component on dev and updates

the tests to use a faked version number.



A warning is emitted if the Updater component is disabled to ensure

there is no confusion.
2016-04-06 18:46:48 -07:00
Andrew McClure
c99617d6e5 Ensure server_host is respected in configuration.yaml 2016-04-06 18:45:40 -07:00
Will Hughes
5a32ddbe6f Update Orvibo platform to the switch component, add 'mac' option
This adds an optional 'mac' configuration option to the platform which

is passed to the underlying Orvibo library. The 'mac' option is required

when the switch is connected to a different subnet to the Home Assistant

host
2016-04-06 14:52:21 -07:00
Robbie Trencheny
27aabd961c Remove unnecessary variable 2016-04-06 13:51:43 -07:00
Robbie Trencheny
86dad0c045 Add ZeroConf support to http.py 2016-04-06 13:51:26 -07:00
Fabian Affolter
3bc37397d2 Merge pull request #1728 from fabaff/conf-sample
Fix typos and update freegeoip URL
2016-04-06 22:37:30 +02:00
Fabian Affolter
b3a6ac74fa Fix typos and update freegeoip URL 2016-04-06 22:30:05 +02:00
Josh Wright
29fb6faa40 Use whole degrees fahrenheit for thermostats
Users of fahrenheit generally expect to see whole degrees. The fahreneit

scale is suffiently precise that decimals aren't really useful in terms

of temperatures humans care about.



This change rounds fahrenheit values to whole degrees and celsius values

to one decimal place. It also renames the ThermostatDevice._convert()

method to _convert_for_display(), making its purpose more clear. It is

not useful for the min_temp() and max_temp() methods, as those relate to

the internal state of the ThermostatDevice object, and may use different

units. Adding optional source and target units to _convert() would have

added needless complexity, it's cleaner to just use convert() in those

methods.
2016-04-06 11:54:50 -07:00
Paulus Schoutsen
71196d32bc Merge branch 'master' into dev
Conflicts:
	homeassistant/const.py
	requirements_all.txt
2016-04-06 11:51:03 -07:00
Alexander Fortin
e8efcd21df Increase sonos volume increment from 1 to 5 2016-04-06 11:32:27 -07:00
Daniel Høyer Iversen
cfb318287d Refactor rfxtrx component 2016-04-06 10:34:51 -07:00
Fabian Affolter
2e44166854 Change to freegeoip.io and add a second service as fall-back 2016-04-06 10:25:40 -07:00
Paulus Schoutsen
b4ddc86304 Fix speedtest with external installed package 2016-04-06 07:38:35 -07:00
Florian Holzapfel
ecc440f459 add panasonic viera tv media player device 2016-04-05 22:51:55 -07:00
Jan Harkes
dbbbed404c Detect duplicate keys in configuration.yaml. 2016-04-05 21:21:16 -07:00
Jan Harkes
3bb571b578 Bump rxv to 0.1.11.
Fixes socket read/write timeout issues.
2016-04-05 14:17:42 -04:00
Paulus Schoutsen
8ef542927f Add automation config validation
* Add automation config validation

* Remove unnecessary dict validator

* Downgrade voluptuous to 0.8.9

* Fix linting

* Address issues
2016-04-04 12:18:58 -07:00
Jan Harkes
cbe9a7d2a3 Add case insensitive testing to boolean string validation. 2016-04-03 21:38:58 -07:00
Robbie Trencheny
eb415d7b96 Allow passing in a dictionary of provider specific data 2016-04-03 17:54:58 -07:00
Justyn Shull
c232242af0 Add support for monitoring nzbget
Calculate average download rate the same way as downloadrate



Add config option for choosing which nzbget variables to monitor, and provide a default



Pep8 fixes



Refactoring and changes based on @balloob's comments



Add nzbget.py to .coveragerc omit list.  Check if there are any http

errors (like bad auth) when creating the nzbgetapi class.   If there

are, the setup_platform() function will return false.  Exceptions are

logged as well.

When a new sensor is created, assign the initial value from the api

instead of simply using None until the first update call.
2016-04-03 15:57:50 -07:00
Robbie Trencheny
8308e2335a Merge pull request #1698 from robbiet480/fix-broken-rest-notify
This code never properly worked because the incorrect variable was used
2016-04-03 15:47:20 -07:00
Robbie Trencheny
d00e63486a This code never properly worked because the incorrect variable was used 2016-04-03 15:45:44 -07:00
Paulus Schoutsen
e140e9b8ab Add script + extra config validators
* Add config validation and extra validators

* Address PR comments
2016-04-03 10:19:09 -07:00
Paulus Schoutsen
7ed5055fa2 Fix MQTT linting 2016-04-03 02:25:02 -07:00
Jan Harkes
9ce2081110 Coerce ascii flags in MQTT publish service call.
Also fixes a bug where the test when no payload is given succeeds only

because we run the jinja templating out of memory. Sending an empty

payload instead of trying to fix it through validation for now.
2016-04-03 00:54:05 -07:00
Fabian Affolter
24b7a7b964 Add source ip to log entry 2016-04-03 00:46:05 -07:00
Paulus Schoutsen
f6d584af09 Allow platforms to specify PLATFORM_SCHEMA 2016-04-02 20:10:57 -07:00
Kai
4fba89b789 Add Z-Wave thermostat
based on @coteyr work and with a help from @turbokongen
2016-04-02 20:01:03 -07:00
Fabian Affolter
c7fd0eb9d9 Upgrade to pytz 2016.3 2016-04-02 19:30:25 -07:00
Greg Dowling
61a9562811 Reconnect loopenergy
* Bump pyloopenergy version to handle disconnects. Round floats.

* Bump pyloopenergy version - to support reconnect.
2016-04-02 08:47:21 -07:00
Jan Harkes
5c753f8ffd Service validation for MQTT component.
* Service validation for MQTT component.

* Fixes for failing mqtt tests.

- Changed behaviour when both 'payload' and 'payload_template' are provided
  instead of silently ignoring the payload_template value.
- Have validation accept any type of payload and leave encoding to paho-mqtt.
2016-04-02 08:46:09 -07:00
sander76
ebd053824d changed scene name to unique powerview id's 2016-04-02 08:41:57 -07:00
Jan Harkes
afd1e6a5cc Service validation for media_player component 2016-04-02 03:51:03 -04:00
Paulus Schoutsen
5c262753d4 Merge pull request #1677 from jaharkes/config-validation-nest
Config validation for Nest component
2016-04-01 08:07:31 -07:00
Paulus Schoutsen
a0df7d9ff3 Merge pull request #1674 from jaharkes/group-order
Maintain group ordering across validation.
2016-04-01 08:06:01 -07:00
Paulus Schoutsen
2c6b4db448 Merge pull request #1669 from fabaff/vincenty
Upgrade vincenty to 0.1.4 (fixes #1666)
2016-04-01 08:00:10 -07:00
Paulus Schoutsen
cde86831ee Merge pull request #1676 from balloob/loopenergy-shutdown
Fix thread termination on exit for Loopenergy, Vera and Wemo
2016-04-01 07:52:29 -07:00
pavoni
6ee086c0bb Fix thread termination on exit. 2016-04-01 15:36:33 +01:00
Jan Harkes
faebc9e2c4 Config validation for nest component 2016-04-01 10:31:39 -04:00
Jan Harkes
5aa04de006 Merge pull request #1675 from jaharkes/pywemo-version
Bump pywemo version
2016-04-01 10:10:20 -04:00
Jan Harkes
d0b7f6cfb0 Bump pywemo version 2016-04-01 10:02:55 -04:00
Jan Harkes
e5eb3b13c4 Maintain group ordering across validation. 2016-04-01 09:45:27 -04:00
Fabian Affolter
6731560a7d Upgrade vincenty to 0.1.4 (fixes #1666) 2016-04-01 11:08:13 +02:00
Paulus Schoutsen
deffbeb922 Update frontend 2016-04-01 00:37:30 -07:00
Paulus Schoutsen
7df8e010f3 Merge pull request #1665 from balloob/update-netdisco
Update netdisco dependency
2016-03-31 23:35:32 -07:00
Paulus Schoutsen
ee91bcc601 Update netdisco dependency 2016-03-31 23:30:08 -07:00
Paulus Schoutsen
c8e88d923a Merge pull request #1648 from balloob/yr_default_config
Add yr weather component to default config
2016-03-31 23:28:14 -07:00
Paulus Schoutsen
423d8be83f Merge pull request #1658 from balloob/add_loop_energy
Add loop Energy sensors.
2016-03-31 23:16:23 -07:00
Paulus Schoutsen
b063fa3165 Merge pull request #1646 from balloob/rfxtrx
Fixed bug in rfxtrx sensor
2016-03-31 22:12:04 -07:00
Paulus Schoutsen
d710940819 Merge pull request #1663 from balloob/fix-config-dependency
bootstrap platform components: adjust instead of replace config
2016-03-31 21:38:40 -07:00
Paulus Schoutsen
489c5b8188 bootstrap platform components: adjust instead of replace config 2016-03-31 21:11:14 -07:00
Jan Harkes
b45bbbcecf Merge pull request #1661 from jaharkes/service-call-validation
Service call validation
2016-03-31 23:36:11 -04:00
Jan Harkes
6d914126fa Validate data read from light_profiles.csv 2016-03-31 23:29:07 -04:00
Jan Harkes
4f3dc2ce8b Coerce RGB and XY color values to tuples instead of lists. 2016-03-31 22:59:18 -04:00
Jan Harkes
017f47dd2c Service validation for light.turn_on/.turn_off/.toggle 2016-03-31 22:03:38 -04:00
Robbie Trencheny
2e105e408a Merge pull request #1659 from shaftoe/sonosfix
FIX enable volume commands for non-coordinators too
2016-03-31 18:29:41 -07:00
Jan Harkes
5bd58351c7 Move service scheme validation into Service.__call__
Keeps where the schema is stored and validated close.
2016-03-31 21:13:40 -04:00
Alexander Fortin
b304b77005 FIX enable volume commands for non-coordinators too 2016-03-31 21:36:58 +02:00
Jan Harkes
64030b9d48 Add validation schema as optional argument to service registration. 2016-03-31 14:59:36 -04:00
pavoni
c41e63806c Add loop Energy sensors. 2016-03-31 17:00:43 +01:00
Paulus Schoutsen
bcb0eb53f3 Merge pull request #1650 from turbokongen/dev
Fix crash of Rfxtrx component when using config option fire_event
2016-03-30 08:42:16 -07:00
root
7b1ec418f2 Fix crash of Rfxtrx component when using config option fire_event 2016-03-30 16:20:19 +02:00
Daniel
00eda74c7e Add yr weather component to default config 2016-03-30 11:33:35 +02:00
Daniel
c4062bf6ea Fixed bug in rfxtrx sensor 2016-03-30 10:57:26 +02:00
Paulus Schoutsen
4a504a9f03 Merge pull request #1645 from srcLurker/zwave_polling
Enable zwave test_network command.
2016-03-30 01:36:13 -07:00
Charles Spirakis
b8ea743843 Enable zwave test_network command.
Allows for testing the zwave network by sending
a no-op command to all the nodes. In theory,
this will also bring back nodes which have been
put in the "presumed dead" state.
2016-03-30 01:29:11 -07:00
Paulus Schoutsen
5b00919bed Merge branch 'pr/1643' into dev
Conflicts:
	requirements_all.txt
2016-03-29 23:23:45 -07:00
Paulus Schoutsen
a4ffec341b Merge pull request #1633 from balloob/config-validation
Add initial config validation
2016-03-29 23:01:36 -07:00
Paulus Schoutsen
ac28228e6b Either validate component config or platform config 2016-03-29 22:51:33 -07:00
Paulus Schoutsen
8ceab5d4ba Add extra tests 2016-03-29 22:50:38 -07:00
Paulus Schoutsen
d0e613194e Merge pull request #1644 from robbiet480/uber-fixes
Uber sensor breaking fix
2016-03-29 22:20:21 -07:00
Robbie Trencheny
56e64d477a Little fixes 2016-03-29 21:02:17 -07:00
Paulus Schoutsen
79391d23ae Merge pull request #1642 from robbiet480/uber-requirements-fix
Change Uber requirements to point to master repo
2016-03-29 20:54:28 -07:00
Robbie Trencheny
55daf51108 Dont set default value for price_details to empty dict since we want to check price_details for is None 2016-03-29 20:42:15 -07:00
Robbie Trencheny
60b427accc Flake8 and Pylint fixes 2016-03-29 20:36:04 -07:00
Robbie Trencheny
0ac34aaa52 Fix for when you have an Uber product that doesnt give a price estimate 2016-03-29 20:14:27 -07:00
Daniel J. Kemp
86199c8277 Add onkyo receiver, and source select support
Added onkyo receiver component

Added support for input source selection to media players,
and do the onkyo receiver component.
2016-03-29 22:17:36 -04:00
Robbie Trencheny
9f5e192761 Uber Rides SDK has been updated upstream to support Python3. No need for this fork anymore! 2016-03-29 18:44:36 -07:00
Paulus Schoutsen
25269cdb6b Add tests for bootstrap config validation 2016-03-29 00:17:53 -07:00
Paulus Schoutsen
a35173a5ff Surpress silly warnings 2016-03-28 23:46:19 -07:00
Paulus Schoutsen
5baa98b79f Add initial config validation 2016-03-28 23:46:12 -07:00
Paulus Schoutsen
0549bc0290 Merge pull request #1636 from srcLurker/zwave_polling
Zwave cleanup for startup and poll_intensity.
2016-03-28 14:12:10 -07:00
Charles Spirakis
f28aa030e6 Zwave cleanup for startup and poll_intensity.
If the polling intensity is zero, specifically
disable polling for that device/sub device.

Have zwave startup wait until the zwave
nework is ready (defined by python openzwave docs):

https://python-openzwave.googlecode.com

SIGNAL_NETWORK_AWAKED : all awake nodes are queried. Some sleeping nodes may be missing.

and

You can safely ask node informations when state >= STATE_AWAKED

This appears to make the polling of nodes a bit more deterministic.
2016-03-28 10:49:58 -07:00
Paulus Schoutsen
69fd927656 Update frontend 2016-03-28 00:15:26 -07:00
Paulus Schoutsen
e989c8a24a Merge pull request #1624 from balloob/http-11
Use HTTP 1.1
2016-03-27 23:21:52 -07:00
Paulus Schoutsen
9089f19165 Merge pull request #1627 from balloob/python-check
Fix broken Python check for Python 2
2016-03-27 22:41:24 -07:00
Paulus Schoutsen
f30376443f Merge pull request #1623 from robbiet480/gtfs-sensor
GTFS sensor
2016-03-27 22:40:20 -07:00
Paulus Schoutsen
fe73cbbcb6 Revert pyicloud upgrade 2016-03-27 22:14:51 -07:00
Paulus Schoutsen
d5498dfb83 Merge pull request #1634 from balloob/hotfix/revert-pyicloud
0.16.1: Revert pyicloud upgrade
2016-03-27 22:13:43 -07:00
Paulus Schoutsen
2c0e8a75a7 Version bump to 0.16.1 2016-03-27 22:12:48 -07:00
Paulus Schoutsen
5dca81d602 Revert pyicloud upgrade 2016-03-27 22:06:27 -07:00
Paulus Schoutsen
79a2d40f4d Merge pull request #1590 from LucaSoldi/some-feature
Added Raspberry Pi Camera Component
2016-03-27 14:00:28 -07:00
Paulus Schoutsen
7cb69ae9d9 Make sure we always sent content-length header 2016-03-27 12:15:41 -07:00
Luca Soldi
5704a319ca Merge branch 'some-feature' of https://github.com/LucaSoldi/home-assistant into some-feature 2016-03-27 20:59:28 +02:00
Luca Soldi
d0503cc021 Add feature
√ add file_path config
√ changed subprocess call
2016-03-27 20:49:04 +02:00
Paulus Schoutsen
c63a3311f4 Fix broken Python check for Python 2 2016-03-27 08:44:15 -07:00
Paulus Schoutsen
fad13beea6 Merge pull request #1626 from fabaff/connection-class
Add connectivity to sensor classes
2016-03-27 08:25:18 -07:00
Fabian Affolter
2db49ebca5 Add connectivity to sensor classes 2016-03-27 11:48:48 +02:00
Paulus Schoutsen
4cbd49921f Use HTTP 1.1 2016-03-26 19:03:16 -07:00
Robbie Trencheny
2a194d8861 Use named string formatting for safety 2016-03-26 18:55:49 -07:00
Paulus Schoutsen
d8121ed8b2 Merge pull request #1621 from balloob/fix-owntracks-acc-bug
Cast acc to float before comparison.
2016-03-26 18:55:11 -07:00
Robbie Trencheny
dac3c9d1b5 Pylint and flake8 2016-03-26 18:53:21 -07:00
Robbie Trencheny
5a35e4a9ba Data source validation 2016-03-26 18:52:03 -07:00
Robbie Trencheny
1fd96296f7 Use parameterized queries when possible 2016-03-26 18:47:54 -07:00
Paulus Schoutsen
5ad95418dd Merge pull request #1622 from fabaff/sensor-class-arest
Add support for sensor classes
2016-03-26 18:40:32 -07:00
Robbie Trencheny
116b83b53f Fix PyGTFS import errors 2016-03-26 18:25:49 -07:00
Robbie Trencheny
f31ba11861 Lock SQLAlchemy 2016-03-26 18:05:34 -07:00
Robbie Trencheny
982baaba22 Annoying missing period 2016-03-26 17:59:38 -07:00
Robbie Trencheny
8a5f60ee23 .coveragerc and requirements_all.txt 2016-03-26 17:54:48 -07:00
Robbie Trencheny
8fe1a9f008 Pylint and flake8 2016-03-26 17:53:46 -07:00
Robbie Trencheny
90f1b57ed8 Initial GTFS sensor 2016-03-26 17:41:09 -07:00
Fabian Affolter
ee36c36783 Add support for sensor classes 2016-03-26 23:39:56 +01:00
pavoni
c7e49f20d3 Cast acc to float before comparison. 2016-03-26 22:38:24 +00:00
Paulus Schoutsen
37b6aa593e Merge pull request #1620 from JshWright/add-shebang
Add shebang for script/setup
2016-03-26 13:33:59 -07:00
Josh Wright
90ec2c274b Add shebang for script/setup 2016-03-26 16:21:27 -04:00
Paulus Schoutsen
80b65f1895 Merge pull request #1618 from balloob/flyte-patch-1
Remove unnecessary dependency from TCP binary sensor for #1617
2016-03-26 11:43:35 -07:00
Flyte
ada561df30 Remove unused import and unnecessary DOMAIN constant from TCP components. 2016-03-26 17:33:18 +00:00
Ellis Percival
15303fd32d Remove unnecessary dependency from TCP binary sensor for #1617 2016-03-26 16:42:53 +00:00
Fabian Affolter
d308b065a9 Merge pull request #1615 from fabaff/upgrade-pyowm
Upgrade pyowm to 2.3.1
2016-03-26 12:56:16 +01:00
Fabian Affolter
2c45d1f27d Upgrade pyowm to 2.3.1 2016-03-26 12:50:12 +01:00
Fabian Affolter
1d198579b7 Merge pull request #1614 from harrykantas/hk/systemd
systemd unit fixes
2016-03-26 12:47:35 +01:00
Harry Kantas
863c111449 systemd unit fixes 2016-03-26 09:58:16 +00:00
Paulus Schoutsen
9d0b15421c Version bump to 0.17.0.dev0 2016-03-26 01:02:30 -07:00
Paulus Schoutsen
763a9ce8c6 Merge pull request #1594 from balloob/dev
0.16
2016-03-26 01:02:12 -07:00
Paulus Schoutsen
e53adf003c Version bump to 0.16 2016-03-26 01:01:46 -07:00
Paulus Schoutsen
3df946aa9e Merge pull request #1598 from aoakeson/dev
Yamaha Receiver Support
2016-03-26 00:05:05 -07:00
Andrew
2285a6761c Initial Yamaha Receiver Implementation
Text Update

Additional additions and better support for volume, and mute.  Cleanup

Added rxv to requirements_all

Added yamaha.py to .coveragerc

Made uppercase, and removed tabs

Added requirements variable

Added doc string for lint

Removed global variable, and simplified state as per balloobs suggestion

Refactored the component with balloobs suggestions

-Added import in the method
- Only get receiver information on init
- A bit of cleanup

Remove up and down volume

Uneeded as this is handled by set volume instead

Fixed a lint build error

More lint fixes

Removed unused imports

Lint Fixes

Simplified if statement

Minor refactoring since the init calls update.

Fixed lint error

Just variable naming change

Added support for an optional name for the receiver.

Better error handling, a bit of refactoring based on balloobs suggestions

Fixed lint error.

Another lint error fix

Changed raise to return

Disable pylint error handling

Pylint broad exception

Made exception handling in the setup platform instead of the constructor.

Lint error fix

Refactored the way devices are found.  This allows for multiple receivers
2016-03-26 00:47:00 -06:00
Paulus Schoutsen
b85753d5da Merge pull request #1613 from robbiet480/media_player_services_yaml
Fill out services.yaml for media_player
2016-03-25 23:45:31 -07:00
Robbie Trencheny
ce4933d637 Fill out services.yaml for media_player 2016-03-25 23:38:10 -07:00
Paulus Schoutsen
de6fc771cb Merge pull request #1607 from fabaff/sensor-class-rest
Add support for sensor classes
2016-03-25 23:27:21 -07:00
Paulus Schoutsen
7f5109e8f3 Merge pull request #1612 from robbiet480/sonos_play_media
Sonos play_media Support
2016-03-25 23:12:29 -07:00
Robbie Trencheny
de68be06dd Misspelling fix 2016-03-25 22:57:28 -07:00
Robbie Trencheny
950cc9e618 Add play_media support to Sonos 2016-03-25 22:57:14 -07:00
Paulus Schoutsen
a3d505f45e Merge pull request #1610 from robbiet480/gntp
Add GNTP notifier
2016-03-25 22:09:13 -07:00
Paulus Schoutsen
befdecc3b0 Merge pull request #1602 from robbiet480/uber-sensor
Uber sensor
2016-03-25 21:51:03 -07:00
Paulus Schoutsen
b92a51c1c3 Merge pull request #1603 from balloob/chore/template-race-condition
Clean up template platforms
2016-03-25 21:48:36 -07:00
Robbie Trencheny
20f8935b86 Clean up a lot of pep8 and syntax errors. 2016-03-25 19:32:49 -07:00
Robbie Trencheny
652c666d14 Add GNTP notifier 2016-03-25 18:39:08 -07:00
Fabian Affolter
9157bd38e8 Update docstrings 2016-03-25 20:35:38 +01:00
Fabian Affolter
f0970f4104 Add support for sensor classes 2016-03-25 18:34:58 +01:00
Paulus Schoutsen
41f205e09d Clean up template platforms 2016-03-24 23:22:17 -07:00
Robbie Trencheny
72c40ab826 Add Uber requirements to requirements_all.txt 2016-03-24 22:30:42 -07:00
Robbie Trencheny
01b216f6cb Block uber.py tests 2016-03-24 22:30:22 -07:00
Robbie Trencheny
5b18ea4237 Fix all pylint, flake8 and pydocstyle issues 2016-03-24 22:30:10 -07:00
Paulus Schoutsen
70ce179224 Merge pull request #1551 from w1ll1am23/command_line_assumed
Added assumed state to command_line switch
2016-03-24 21:54:36 -07:00
Robbie Trencheny
0b9699fd4b Uber sensor 2016-03-24 19:48:10 -07:00
Fabian Affolter
8797ea8f37 Merge pull request #1600 from Bart274/pyiclo
upgrade pyicloud version
2016-03-24 17:31:15 +01:00
Bart274
dd691a4684 upgrade pyicloud version 2016-03-24 17:22:44 +01:00
Fabian Affolter
b6a4257753 Merge pull request #1599 from fabaff/forecast.io
Upgrade to python-forecastio 1.3.4
2016-03-24 17:10:56 +01:00
Fabian Affolter
40e17da415 Upgrade to python-forecastio 1.3.4 2016-03-24 16:42:25 +01:00
Fabian Affolter
fef682b192 Revert "Upgrade pysnmp to 4.3.2"
This reverts commit 38e6f8fdab.
2016-03-24 16:23:57 +01:00
Fabian Affolter
369d234bda Remove wallet 2016-03-24 12:38:18 +01:00
Paulus Schoutsen
5085e337e5 Update frontend 2016-03-24 00:48:21 -07:00
Fabian Affolter
10cb8c0799 Upgrade python-telegram-bot to 3.4 2016-03-24 08:07:59 +01:00
Fabian Affolter
565ae8d30f Upgrade python-mpd2 to 0.5.5 2016-03-24 08:07:06 +01:00
Fabian Affolter
2c770164f2 Upgrade blockchain to 1.3.1 2016-03-24 08:00:05 +01:00
Fabian Affolter
38e6f8fdab Upgrade pysnmp to 4.3.2 2016-03-23 23:57:32 +01:00
Fabian Affolter
a0be348f3a Upgrade psutil to 4.1.0 2016-03-23 22:44:05 +01:00
Fabian Affolter
f7943d9448 Upgrade python-nmap to 0.6.0 (attempt to fix #1592) 2016-03-23 22:25:35 +01:00
Paulus Schoutsen
890930ea32 Merge pull request #1596 from jaharkes/lms-avoid-discovery-error
Assume we only run one Logitech Media server on a host.
2016-03-23 14:14:50 -07:00
Jan Harkes
2d91dce6d0 Assume we only run one Logitech Media server on a host.
Because the LMS discovery mechanism uses the SlimProto protocol to discover the
presence of a Logitech Media server which operates on port 3483/udp and
3483/tcp. But HA uses a different 'CLI' protocol that is typically on port
9090/tcp to query player state.

However the CLI port number is configurable and if someone runs the CLI on a
different port, and has the server configured in configuration.yaml, we get an
error in the logs when we try to connect to 9090/tcp when we find the server
through discovery. Because of the way local slim player discover the server
using SlimProto we can be fairly certain only a single server will run on a
given IP address so if one is already configured with a user defined port, we
should ignore the discovered one that assumes the default port.
2016-03-23 14:47:29 -04:00
LucaSoldi
800397dbe4 Delete python2.7 2016-03-23 14:55:32 +01:00
LucaSoldi
9584f2dab4 Delete .Python 2016-03-23 14:53:52 +01:00
Paulus Schoutsen
154d184247 Merge pull request #1593 from balloob/nest-sensor-fix
Nest sensor - remove broken sensor types
2016-03-23 00:26:07 -07:00
Luca Soldi
65ef836313 Check raspistill exisance and check parameters in setup_platform 2016-03-22 22:35:09 +01:00
Paulus Schoutsen
015527aa5f Nest sensor - remove broken sensor types 2016-03-22 08:45:44 -07:00
Paulus Schoutsen
5bd004ee38 Merge pull request #1526 from tilutza/dev
Arduino switch: add support for default stat and negate port function…
2016-03-22 08:40:39 -07:00
Paulus Schoutsen
8fe0740b7f Update PULL_REQUEST_TEMPLATE.md 2016-03-22 08:39:41 -07:00
Paulus Schoutsen
c22e106d44 Update PULL_REQUEST_TEMPLATE.md 2016-03-22 08:39:24 -07:00
Paulus Schoutsen
4792b9f40c Merge pull request #1583 from Cinntax/pulseaudio-loopback-switch
Pulseaudio loopback switch
2016-03-22 08:30:17 -07:00
Luca Soldi
bf915cf3b4 Added Raspberry Pi Camera Component 2016-03-22 08:33:56 +01:00
Fabian Affolter
0490514d9e Merge pull request #1585 from jaharkes/wemo
Bump pywemo to new version.
2016-03-21 23:50:00 +01:00
Per Sandström
fcfa6f2691 Merge pull request #1586 from persandstrom/vsure_ver_bump
bump vsure version
2016-03-21 20:48:56 +01:00
Per Sandström
ca788b6e4d bump vsure verisure 2016-03-21 20:39:03 +01:00
Jan Harkes
fd7d6a9d53 Bump pywemo to new version. 2016-03-21 10:05:06 -04:00
Dan Cinnamon
6ee3ca8264 Creation of a new platform for the existing switch component. 2016-03-20 23:10:57 -05:00
dtila
a8761e1ef8 Add support for having default state on arduino switch and negate functionality
Arduino switch: add support for default stat and negate port functionality

Travis changes

Arduino switch: add support for default stat and negate port functionality
Because Travis was configured to have maxiimum 5 arguments allowed in functions, I changed the function constructor signature too ... Paul, 6 parameters for a function is really ok

Arduino Switch: add default state config and negate functionality
2016-03-20 12:52:06 +02:00
Paulus Schoutsen
557dae7ab3 Fix typo in light docs 2016-03-19 19:44:20 -07:00
Paulus Schoutsen
454688cc17 Merge pull request #1579 from seedzero/dev
ZwaveDimmer turn_on brightness changed from float to integer
2016-03-19 19:33:45 -07:00
seedzero
59dc8da365 ZwaveDimmer turn_on brightness changed from float to integer 2016-03-20 13:14:59 +11:00
Fabian Affolter
bb658412c4 Revert "Allow encrypted passwords"
This reverts commit 505b3b198e.
2016-03-19 22:19:08 +01:00
Fabian Affolter
505b3b198e Allow encrypted passwords 2016-03-19 22:15:23 +01:00
Martin Hjelmare
0bf13dbf26 Merge pull request #1573 from MartinHjelmare/service-warnings
Log error for servicecall without required data
2016-03-19 08:45:40 +01:00
MartinHjelmare
4e4b24fcff Log error for servicecall without required data
* Log error for services called without required attributes, in
	media_player, notify and thermostat platforms.
* Add fan property and methods in thermostat demo component.
* Add tests for notify file and thermostat demo component.
* Increase coverage of tests for media_player, notify and thermostat
	platforms.
* Fix some PEP issues, but not all. Tests still have old linting
	errors.
2016-03-19 08:06:57 +01:00
Paulus Schoutsen
72fdd94b29 Merge pull request #1576 from joopert/kodi_log_once
log "unable to fetch kodi data" only once
2016-03-18 15:37:52 -07:00
joopert
c6f66de16e log "unable to fetch kodi data" only once 2016-03-18 18:29:50 +01:00
Paulus Schoutsen
41021e63d0 Merge pull request #1574 from joopert/dev
wake on lan platform
2016-03-18 07:21:10 -07:00
joopert
0bbcc81285 wake on lan platform 2016-03-18 15:01:53 +01:00
Paulus Schoutsen
302f32eacd Merge pull request #1553 from florianholzapfel/notify-messagebird
provide sms notifications via messagebird
2016-03-17 22:02:08 -07:00
Paulus Schoutsen
c093a2bf54 Merge pull request #1564 from balloob/fix_template_race_condition
Fix remaining race condition in template components.
2016-03-17 21:18:38 -07:00
Paulus Schoutsen
792954adc9 Merge pull request #1566 from jaharkes/squeezebox-discovery
Add discovery for squeezebox (logitech media) servers.
2016-03-17 21:12:13 -07:00
Paulus Schoutsen
bb5c80b8f5 Merge pull request #1567 from jaharkes/wemo-color-lights
Update to new pywemo bridge API
2016-03-17 21:11:02 -07:00
Paulus Schoutsen
3f3bfbbb94 Merge pull request #1572 from balloob/update-netdisco
Update netdisco to 0.5.5
2016-03-17 21:08:48 -07:00
Paulus Schoutsen
a1f8466754 Merge pull request #1570 from w1ll1am23/wink_availability
Added available method to all wink components
2016-03-17 21:00:42 -07:00
Paulus Schoutsen
8a38ba5954 Update netdisco to 0.5.5 2016-03-17 20:57:58 -07:00
William Scanlon
208a7c9e60 Added available method to all wink components 2016-03-17 15:57:26 -04:00
Jan Harkes
27aba5c834 Update to new pywemo bridge API
Support RGBW and tunable white lights.
2016-03-17 12:27:06 -04:00
William Scanlon
a64726e321 Added assumed state to command_line switch 2016-03-17 10:41:26 -04:00
Jan Harkes
c2204433bd Add discovery for squeezebox (logitech media) servers. 2016-03-17 09:38:56 -04:00
Greg Dowling
fa15d86c2b Merge pull request #1562 from balloob/bump_pywemo_version
Bump pywemo version.
2016-03-17 12:17:42 +00:00
pavoni
4e7160139e Fix race condition in template components. 2016-03-17 12:10:19 +00:00
pavoni
47d5c4f437 Bump pywemo version. 2016-03-17 11:40:25 +00:00
pavoni
179c6efff7 Bump pywemo version. 2016-03-16 23:25:00 +00:00
Florian Holzapfel
6e32d99174 provide update message_bird.py to include the suggested changes 2016-03-16 10:34:06 +01:00
Greg Dowling
fd27e4fc7d Merge pull request #1550 from balloob/restructure_vera
Refactor vera into a platform.
2016-03-16 09:28:27 +00:00
pavoni
9fc73fa644 Refactor vera into a platform. 2016-03-16 09:03:56 +00:00
Paulus Schoutsen
ba0cbab6cb Merge pull request #1552 from balloob/hue-allow-unreachable
Hue Lights - Allow Unreachable Lights
2016-03-15 18:27:49 -07:00
Paulus Schoutsen
83778a0f55 Merge pull request #1558 from fabaff/login
Log failed login attempts
2016-03-15 18:26:26 -07:00
Fabian Affolter
b29eff5ef1 UPdate log messages 2016-03-15 23:52:55 +01:00
Fabian Affolter
c865ff852d Log failed login attempts 2016-03-15 23:40:24 +01:00
Fabian Affolter
1f7e0936fa Add missing comments 2016-03-15 19:22:21 +01:00
Florian Holzapfel
a855a9bfcd provide sms notifications via messagebird 2016-03-15 18:09:19 +01:00
Jon Maddox
9fe17423ea pass allow_unreachable for callback 2016-03-15 10:37:47 -04:00
Jon Maddox
b7b34b280f just pass them in 2016-03-15 10:27:56 -04:00
Jon Maddox
971fe8bc7b style 2016-03-15 10:27:46 -04:00
Jon Maddox
95d5c456d7 ignore unreachable state if opted in 2016-03-15 10:15:29 -04:00
Jon Maddox
dd33831cb1 pass allow_unreachable all the way down the line 2016-03-15 10:15:10 -04:00
Jon Maddox
5abff70a87 read in allow_unreachable config value 2016-03-15 10:13:57 -04:00
Paulus Schoutsen
d28116f2bf Update frontend 2016-03-14 23:55:52 -07:00
Paulus Schoutsen
cde05b91ce Better netgear logging 2016-03-14 21:12:42 -07:00
Paulus Schoutsen
663e4d57d9 Merge pull request #1546 from persandstrom/input_slider
input slider
2016-03-14 20:26:34 -07:00
Paulus Schoutsen
cf285e0a0a Merge pull request #1548 from bradsk88/wink063
Upgrading python-wink to 0.6.3
2016-03-14 20:16:55 -07:00
Paulus Schoutsen
dd607ea84a Merge pull request #1540 from balloob/slowtests_rfxtrx
Fixed close connection issue with rfxtrx device and update rfxtrx lib
2016-03-14 19:09:15 -07:00
Paulus Schoutsen
b4458b7f52 Merge pull request #1538 from balloob/script-allow-template-service
Remove support for old deprecated script call service config
2016-03-14 19:05:34 -07:00
bradsk88
8a6cc49438 Upgrading python-wink to 0.6.3
This corrects a bug where multi-sensors' internal states were rendered null when downloading state updates from the Wink API.
2016-03-14 19:16:54 -06:00
Per Sandström
2bdad928d0 input slider 2016-03-14 22:03:30 +01:00
Paulus Schoutsen
3e3d1ae9de Merge pull request #1542 from balloob/fix_race_condition
Handle Wemo startup race condition.
2016-03-14 07:47:50 -07:00
Paulus Schoutsen
fb3586c18f Merge pull request #1541 from balloob/catch_template_exceptions
Catch template automation exception common during startup.
2016-03-14 07:43:59 -07:00
pavoni
fe2adff017 Handle startup race condition. 2016-03-14 10:29:12 +00:00
pavoni
e5c8dd03e1 Catch exception common during startup. 2016-03-14 10:10:38 +00:00
Daniel
d6344d6492 Fixed close connection issue with rfxtrx device and update rfxtrx lib 2016-03-14 08:33:59 +01:00
Paulus Schoutsen
399fda079f Merge pull request #1539 from srcLurker/zwave-heal
Enable openzwave's network heal and soft reset.
2016-03-13 22:42:49 -07:00
Paulus Schoutsen
6bc3e0bb58 Merge pull request #1530 from balloob/content-length
Add content-length header to http resonses
2016-03-13 22:32:59 -07:00
Paulus Schoutsen
54b60c6564 Merge pull request #1531 from balloob/cleanup-automation
Remove support for old deprecated automation config
2016-03-13 22:32:48 -07:00
Paulus Schoutsen
61b387cd0b Script: fix template service calls and remove old config support 2016-03-13 22:29:36 -07:00
Charles Spirakis
b7044a79b2 Enable openzwave's network heal and soft reset.
Makes Zwave's network heal and the controller's soft reset
commands available as service calls. They can be used
in automation to help keep the zwave netwrok healthy.

For example:

automation:
 alias: At 2:35am, heal problematic zwave network routes
 trigger:
   platform: time
   after: '2:35:00'
 action:
   service: zwave.heal
2016-03-13 21:48:07 -07:00
Paulus Schoutsen
368668784a Merge pull request #1534 from balloob/allow_entry_passive_zones
Allow entry into passive zones.
2016-03-13 15:58:42 -07:00
Paulus Schoutsen
7099030cd7 Merge pull request #1529 from stefan-jonasson/tellstick-rewrite
Rewrite of the tellstick module. It now uses a common base for all sh…
2016-03-13 15:56:54 -07:00
Stefan Jonasson
eb9ed5ccfe Rewrite of the tellstick module. It now uses a common base for all shared functionality.
The rewrite addresses a problem with the tellstick hardware dropping
commands when too many simultaneous calls is being made from HA. Also fixes a bug when the dim level was changed externally.
This breaks previous configurations.

The new config for tellstick is

```yaml
tellstick:
  signal_repetitions: X
```
Lights and Switches are detected automatically.
Sensors work like before because they do not share any functionality with the other devices and they also needs a complete other configuration.
2016-03-13 19:28:42 +01:00
pavoni
fc455a1047 Allow entry into passive zones. 2016-03-13 18:01:29 +00:00
Paulus Schoutsen
956f6056f9 Remove support for old deprecated automation config 2016-03-13 00:00:05 -08:00
Paulus Schoutsen
f8d2da2ace Add content-length header to http resonses 2016-03-12 23:41:00 -08:00
Paulus Schoutsen
7d23a5f7e4 Merge pull request #1496 from balloob/mqtt-server
Add MQTT server component
2016-03-12 21:53:06 -08:00
Paulus Schoutsen
8386bda4e4 MQTT: Start embedded server if no config given 2016-03-12 21:42:47 -08:00
Paulus Schoutsen
13d7f742a7 Add thread names 2016-03-12 16:54:31 -08:00
Paulus Schoutsen
b67964274b Version bump to 0.16.0.dev0 2016-03-12 11:29:42 -08:00
Paulus Schoutsen
6797365d4f Merge pull request #1502 from balloob/dev
0.15
2016-03-12 11:29:30 -08:00
Paulus Schoutsen
2410942fd0 Version bump to 0.15 2016-03-12 11:23:43 -08:00
Paulus Schoutsen
2a75c6fcf6 Update frontend build scripts for pep257 2016-03-12 10:52:48 -08:00
Paulus Schoutsen
159e287959 Update frontend 2016-03-12 10:42:07 -08:00
Paulus Schoutsen
a01111ae56 Merge pull request #1457 from fabaff/sensor-classes
Add support for sensor classes
2016-03-11 22:50:32 -08:00
Paulus Schoutsen
4599fd6dae Update .coveragerc 2016-03-11 22:47:39 -08:00
Paulus Schoutsen
ddc139b853 Merge pull request #1510 from persandstrom/automation_templating
Use templates in service calls
2016-03-11 21:49:47 -08:00
Paulus Schoutsen
2b6f0586b4 Merge pull request #1524 from turbokongen/dev
Workaround for no off motion sensor: Wenzhou tkd slim sensor 3/4 in 1…
2016-03-11 21:45:40 -08:00
Paulus Schoutsen
9904667a80 Merge pull request #1520 from balloob/mqtt-fixes
Type checks for MQTT config
2016-03-11 21:45:17 -08:00
Paulus Schoutsen
097ded73b1 Merge pull request #1519 from sander76/dev
changed powerview version requirement to solve error in installing
2016-03-11 21:44:11 -08:00
Paulus Schoutsen
5b2093ebc1 Merge pull request #1523 from Bart274/patch-1
add gps_accuracy and battery information to the see function
2016-03-11 16:21:26 -08:00
Fabian Affolter
1fa2f23864 Revert "Upgrade limitlessled to 1.1.0"
This reverts commit 2e2537de2a.
2016-03-11 23:37:32 +01:00
Fabian Affolter
2e2537de2a Upgrade limitlessled to 1.1.0 2016-03-11 23:27:18 +01:00
root
1f8b66511d Workaround for no off motion sensor: Wenzhou tkd slim sensor 3/4 in 1 sensor 2016-03-11 20:51:40 +01:00
Bart274
312d0320c6 Update __init__.py 2016-03-11 14:20:08 +01:00
Bart274
284a1fd08e add gps_accuracy and battery information to the see function
the see function from device_tracker doesn't pass the gps_accuracy and the battery information to the see service, so this information gets lost.
2016-03-11 14:10:04 +01:00
sander
1fbf7afc6a changed the powerview version 2016-03-11 06:44:04 +01:00
Paulus Schoutsen
025713ee41 Type checks for MQTT config 2016-03-10 21:42:17 -08:00
Per Sandström
81e5a852f0 Use templates in service calls 2016-03-10 21:36:05 +01:00
Fabian Affolter
4637a83c29 Add sensor_class to MQTT binary sensor 2016-03-10 20:51:58 +01:00
Fabian Affolter
ce82bd7515 Fix formatting 2016-03-10 19:17:36 +01:00
Greg Dowling
534308e461 Merge pull request #1473 from balloob/add_wemo_motion
Add Wemo Motion device as a binary sensor.
2016-03-10 18:13:04 +00:00
pavoni
84bdba28b3 Add Wemo Motion 2016-03-10 17:58:24 +00:00
Fabian Affolter
8af7858415 Merge pull request #1513 from balloob/pep257
Enable Pep257 checking on CI
2016-03-10 09:29:04 +01:00
Paulus Schoutsen
56ef16e858 Add pydocstyle to requirements_test.txt 2016-03-09 23:39:38 -08:00
Paulus Schoutsen
b9856a2af5 Fix final pep257 issues 2016-03-09 23:34:38 -08:00
Paulus Schoutsen
14a9b9fe3f Add pep257 checking 2016-03-09 23:34:28 -08:00
Paulus Schoutsen
47c4f66886 Merge pull request #1485 from MartinHjelmare/refactor-scene-reproduce_state
Refactor reproduce_state for scene component
2016-03-09 15:29:10 -08:00
Fabian Affolter
0d9b8a0d06 Fix docstring 2016-03-09 23:49:54 +01:00
MartinHjelmare
c56701baaf Refactor reproduce_state for scene component
* Add tests to reach full coverage for helpers/state.py.
* Refactor reproduce_state function in helpers/state.py. Add two dicts,
	as global constants, service_attributes and service_to_state. Use
	these in combination with the dict of services per domain from
	ServiceRegistry, to find the correct service to use in a scene state
	change.
* Use break statement in for loop, to break if service was selected
	to update state, in preference to update state attributes, ie state
	update takes precedence.
* Add ATTR_CODE and ATTR_CODE_FORMAT in const. Import these in
	alarm_control_panel and lock platforms instead of making duplicate
	constants in multiple modules.
* Use ATTR_MEDIA_CONTENT_TYPE and ATTR_MEDIA_CONTENT_ID in media_player
	platform in SERVICE_PLAY_MEDIA and play_media methods, instead of
	'media_type' and 'media_id'.
* Fix PEP257 in modified files.
2016-03-09 18:52:05 +01:00
Fabian Affolter
f22a40c3e8 Fix PEP257 issues 2016-03-09 11:15:04 +01:00
Fabian Affolter
986c9c55bf Merge branch 'pep257-tests' into dev 2016-03-09 10:26:49 +01:00
Fabian Affolter
9838697d2b Fix PEP257 issues 2016-03-09 10:25:50 +01:00
Per Sandström
d1256d4889 Merge pull request #1508 from persandstrom/verisure_typo_thermometers
verisure configuration value typo fix
2016-03-08 21:42:43 +01:00
Fabian Affolter
d6eab03a61 Remove parenthesis 2016-03-08 18:05:01 +01:00
Fabian Affolter
b534244e40 Fix PEEP257 issues 2016-03-08 17:55:57 +01:00
Fabian Affolter
d784610c52 Merge branch 'pep257-sensor' into dev 2016-03-08 16:47:18 +01:00
Fabian Affolter
8bff97083c Fix PEPE257 issues 2016-03-08 16:46:34 +01:00
Paulus Schoutsen
3e4412d375 Merge pull request #1507 from sander76/dev
change module name to correct brand name "douglas" to "hunterdouglas"
2016-03-08 07:20:43 -08:00
Per Sandström
567727fb3b verisure configuration value typo fix 2016-03-08 14:10:47 +01:00
Fabian Affolter
49ebc6d0b0 Fix PEP257 issues 2016-03-08 13:35:39 +01:00
sander
fd5e2d1321 change module name to correct brand name "douglas" to "hunterdouglas" 2016-03-08 11:59:46 +01:00
Fabian Affolter
652f059d6a Fix PEP257 issues 2016-03-08 11:46:32 +01:00
Fabian Affolter
cf7c2c492a Fix PEP257 issues 2016-03-08 10:34:33 +01:00
Fabian Affolter
7f1e181c9b Merge branch 'pep257-utils' into dev 2016-03-08 08:34:50 +01:00
Fabian Affolter
08233da8a7 Merge branch 'pep257-thermostats' into dev 2016-03-08 08:11:38 +01:00
Fabian Affolter
5423252a52 Merge branch 'pep257-scene-mqtt' into dev 2016-03-08 08:11:30 +01:00
Fabian Affolter
036cfe4ef6 Merge branch 'pep257-lock' into dev 2016-03-08 08:11:21 +01:00
Fabian Affolter
db6212dae3 Merge branch 'pep257-light' into dev 2016-03-08 08:11:12 +01:00
Fabian Affolter
391c6a358a Merge branch 'pep257-garage' into dev 2016-03-08 08:10:25 +01:00
Fabian Affolter
29a651dd92 Merge branch 'pep257-device-tracker' into dev 2016-03-08 08:08:35 +01:00
Paulus Schoutsen
20dd782d9e Rename powerview to douglas_powerview 2016-03-07 22:43:38 -08:00
Paulus Schoutsen
9d76c58bd4 Merge pull request #1490 from sander76/powerview
Powerview
2016-03-07 22:42:20 -08:00
Paulus Schoutsen
c21918233b Merge pull request #1506 from fabaff/pep257-camera
PEP257 - Camera
2016-03-07 17:10:21 -08:00
Paulus Schoutsen
87008f23a1 Merge pull request #1505 from fabaff/pep257-binary-sensor
PEP257 - Binary sensor
2016-03-07 17:09:59 -08:00
Paulus Schoutsen
ba0a25aef6 Merge pull request #1503 from fabaff/pep257-automation
PEP257 - Automation
2016-03-07 17:09:11 -08:00
Paulus Schoutsen
ee728345f6 Merge pull request #1501 from fabaff/pep257-alarm
PEP257 - Alarm control panel
2016-03-07 17:08:39 -08:00
Paulus Schoutsen
2db873322d Update frontend 2016-03-07 15:17:51 -08:00
Paulus Schoutsen
8ecced5fe6 Merge branch 'master' into dev
Conflicts:
	homeassistant/components/wemo.py
	homeassistant/const.py
2016-03-07 15:15:57 -08:00
Fabian Affolter
897b5c668f Fix PEP257 issues 2016-03-08 00:06:04 +01:00
Fabian Affolter
4f536ac63d Fix PEP257 issues 2016-03-07 23:39:52 +01:00
Fabian Affolter
876978d64a Fix PEP257 issues 2016-03-07 23:20:48 +01:00
Fabian Affolter
91731c7234 Fix PEP257 issues 2016-03-07 23:01:34 +01:00
Fabian Affolter
1b8b2acb51 Fix PEP257 issues 2016-03-07 22:50:56 +01:00
Fabian Affolter
095dd70391 Fix PEP257 issues 2016-03-07 22:44:35 +01:00
Fabian Affolter
6879e39d6c Fix PEP257 issues 2016-03-07 22:13:18 +01:00
Fabian Affolter
7e8e91ef3c Fix PEP257 issues 2016-03-07 22:08:21 +01:00
Fabian Affolter
ac43d23bd7 Fix PEP257 issues 2016-03-07 21:22:21 +01:00
Fabian Affolter
cc7a4d545e Fix PEP257 issues 2016-03-07 21:18:53 +01:00
sander
40be9f4e0c Powerview hub implementation 2016-03-07 21:07:38 +01:00
Fabian Affolter
cd5b5c55e2 Fix PEP257 issues 2016-03-07 20:29:54 +01:00
Fabian Affolter
3a4250133a Fix PEP257 issues 2016-03-07 20:21:43 +01:00
Fabian Affolter
7035af6634 Fix PEP257 issues 2016-03-07 20:21:08 +01:00
Fabian Affolter
fb7bd1bfe1 Fix PEP257 issues 2016-03-07 20:20:07 +01:00
Fabian Affolter
f6bc1a4575 Revert change (FIXME) 2016-03-07 20:18:48 +01:00
Fabian Affolter
5ba9ac6465 Fix PEP257 issues 2016-03-07 20:18:48 +01:00
Paulus Schoutsen
cfd65e48cb Merge pull request #1495 from balloob/mqtt-light
MQTT Light: fix brightness issues
2016-03-07 10:20:36 -08:00
Fabian Affolter
b8a40457ee Update docstrings to match PEP257 2016-03-07 18:50:30 +01:00
Fabian Affolter
7ff9aecd4e Update docstrings to match PEP257 2016-03-07 18:50:30 +01:00
Fabian Affolter
032f06e015 Modify docstrings to match PEP257 2016-03-07 18:50:30 +01:00
Fabian Affolter
6ac9210919 Modify docstrings to match PEP257 2016-03-07 18:50:30 +01:00
Paulus Schoutsen
b47f1c3a96 MQTT Light: fix brightness issues 2016-03-07 08:54:08 -08:00
Paulus Schoutsen
5222c19b4c Fix TP-Link get auth token 2016-03-07 08:29:05 -08:00
Fabian Affolter
1e97d31711 Modify docstrings to match PEP257 2016-03-07 16:45:21 +01:00
Paulus Schoutsen
18f48191d9 Merge pull request #1482 from balloob/history-significant-states
History: update significant states
2016-03-06 21:45:48 -08:00
Paulus Schoutsen
abc7243bc8 Merge pull request #1484 from balloob/device-tracker-remove-old-conf-format
Device tracker remove old conf format
2016-03-06 21:41:59 -08:00
Paulus Schoutsen
4c64be5cfa Merge pull request #1488 from balloob/template_component_fix
Fix noisy error on template component startup.
2016-03-06 13:47:42 -08:00
Paulus Schoutsen
199375bd25 Merge pull request #1489 from balloob/zone_fix
Force zone params to be float
2016-03-06 13:47:11 -08:00
Paulus Schoutsen
69bbfe5372 Merge pull request #1491 from persandstrom/verisure_disable_password_lock
After maintenance false password errors are expected
2016-03-06 13:43:07 -08:00
Per Sandström
d2c94da938 After maintenance false password errors are expected 2016-03-06 22:09:15 +01:00
pavoni
4e3c8a8697 Fix noisy error on startup. Make callbacks code consistent. 2016-03-06 19:19:07 +00:00
pavoni
d75d08e97c Force float for zone parameters. 2016-03-06 19:07:30 +00:00
Paulus Schoutsen
cd30f2de0d Device Sun Light Trigger: Clean up 2016-03-05 20:15:33 -08:00
Paulus Schoutsen
bdad69307a Group: fix thread safety 2016-03-05 19:55:05 -08:00
Paulus Schoutsen
b16c17fae5 Merge pull request #1480 from balloob/fix-slow-tests
Fix slow tests
2016-03-05 19:05:47 -08:00
Paulus Schoutsen
91ee889527 Merge pull request #1434 from nunofgs/enhancement/add-archer-c7-support
Add ArcherC7 150427 support
2016-03-05 18:48:59 -08:00
Nuno Sousa
7b45001879 Add ArcherC7 150427 support 2016-03-05 23:15:48 +00:00
Paulus Schoutsen
fb46eff5f8 Device tracker: remove support for old config 2016-03-05 11:43:23 -08:00
Paulus Schoutsen
9701be9e9c History: ignore scripts that we cannot cancel 2016-03-05 10:28:48 -08:00
Paulus Schoutsen
605a572c86 History: Ignore insignificant domains 2016-03-05 09:49:04 -08:00
Paulus Schoutsen
1159360281 Skip rfxtrx tests because of speed reasons 2016-03-05 09:28:47 -08:00
Paulus Schoutsen
41214fd082 TCP test to work offline 2016-03-05 09:27:22 -08:00
Paulus Schoutsen
d30fb7f04a Merge pull request #1476 from stefan-jonasson/assumed-state
Add assumed state for Tellstick devices.
2016-03-05 01:41:55 -08:00
Stefan Jonasson
e57eca517b Add assumed state for Tellstick devices.
Tellstick device states are always assumed so this should be set to true.
2016-03-05 10:24:22 +01:00
Paulus Schoutsen
931dc27300 Merge pull request #1465 from bestlibre/influxdb_blacklist
Possibility to blacklist events for influxdb
2016-03-05 00:57:26 -08:00
bestlibre
d7094b996a Use global variable and merge two if in one 2016-03-04 23:32:24 +01:00
Greg Dowling
9654f6b4e4 Merge pull request #1474 from HydrelioxGitHub/Fix-Owntracks-GPS-Accuracy
Add GPS accuracy check for a location update or an event update
2016-03-04 20:07:37 +00:00
Hydreliox
c04555d7b1 Add GPS accuracy check for a location update or an event update
Add tests related to this
Great thanks to @pavoni for his support on this fix
2016-03-04 20:19:50 +01:00
Paulus Schoutsen
e755731588 Merge pull request #1471 from balloob/cast-update
Update pychromecast 0.7.2
2016-03-03 22:30:43 -08:00
Paulus Schoutsen
a687a3decb Update pychromecast 0.7.2 2016-03-03 21:59:27 -08:00
Paulus Schoutsen
88c834fdd3 Merge pull request #1466 from balloob/tests_rfxtrx_device
Tests rfxtrx device
2016-03-03 09:11:50 -08:00
Daniel Hoyer Iversen
feb1a15489 update rfxtrx lib to ver 0.5 2016-03-03 17:47:50 +01:00
bestlibre
4d5e9f2931 Possibility to blacklist events
Possibility to blacklist some events based on the entity_id
2016-03-03 17:02:41 +01:00
Paulus Schoutsen
1e3199eb8c Merge pull request #1458 from jaharkes/track-wemos-by-serial
Track wemos by serial
2016-03-02 23:10:13 -08:00
Paulus Schoutsen
17493660df Merge pull request #1463 from kk7ds/snmp-track-macless-things
Fix SNMP device_tracker results without MAC addresses
2016-03-02 14:58:31 -08:00
Dan Smith
e59d6b7da0 Fix SNMP device_tracker results without MAC addresses
@llauren reported that his router returns empty MAC addresses for things
on different subnets, which causes heartache for the HA snmp device tracker.
2016-03-02 11:43:08 -08:00
Daniel
2fd0b28c53 Added tests for RFxtrx device, updated rfxtrx to ver 0.5, fixed bug in setting brightness for rfxtrx light 2016-03-02 20:36:41 +01:00
Jan Harkes
bbd3a43585 Update netdisco to 0.5.4 2016-03-01 23:25:18 -05:00
Dan Smith
a02840379d Track WeMo devices by serial number
This makes us track WeMo devices by serial number instead of URL. Per
@jaharkes' suggestion, tracking via URL could potentially be a problem
if a device changes to another IP and then appears to be discovered again.
Since we can't track based on mac (for static-configured devices), we
can use the serial number exposed to make sure we're always looking at
a list of unique devices.
2016-03-01 10:49:38 -08:00
Paulus Schoutsen
d641cd5eef Merge pull request #1452 from balloob/rfxtrx_tests
Added tests for rfxtrx sensor
2016-03-01 08:07:21 -08:00
Daniel
6c518c74ec Added tests for rfxtrx sensor 2016-03-01 10:14:02 +01:00
Paulus Schoutsen
fcbeafc6db Update Dockerfile: link Z-Wave config 2016-02-29 23:15:14 -08:00
Paulus Schoutsen
4370f5170b Merge pull request #1374 from sander76/scene_with_platforms
scene with platforms
2016-02-29 23:00:03 -08:00
Paulus Schoutsen
49c6484f72 Merge pull request #1433 from fabaff/mqtt-lock
Add MQTT lock support
2016-02-29 22:58:55 -08:00
Paulus Schoutsen
ec642cbeff Merge pull request #1450 from kk7ds/mfi-tls-verify
Give mFi options to control TLS usage
2016-02-29 19:18:06 -08:00
Martin Hjelmare
2823d8f0d8 Merge pull request #1451 from MartinHjelmare/mysensors-assumed-state
Add assumed_state to mysensors switch and light
2016-03-01 03:37:40 +01:00
MartinHjelmare
bfa579f8b2 Add assumed_state to mysensors switch and light
* Return true for assumed_state if optimistic config setting is true.
* Fix PEP257
2016-03-01 03:09:55 +01:00
Dan Smith
be04ebf9ed Give mFi options to control TLS usage
The default configuration of the mFi controller generates self-signed
certificates which are valid for short periods of time, and which are
regnerated on start or as needed. This makes requests mad. Since most
people will be using the self-signed certificates anyway, add options
to let them choose non-TLS, or unverified connections if they want/need.

This bumps the mficlient requirement to 0.3.0 for proper handling of
verify=False.
2016-02-29 17:37:41 -08:00
Paulus Schoutsen
395a8663b5 Merge pull request #1446 from balloob/hotfix/0.14.2
Hotfix/0.14.2
2016-02-29 08:22:26 -08:00
Paulus Schoutsen
f9eb62dd9e Version bump to 0.14.2 2016-02-29 08:10:52 -08:00
Stefan Jonasson
c6a6eaee9f Fixed the z-wave sensor workarounds for empty manufacturer ids 2016-02-29 08:10:26 -08:00
Paulus Schoutsen
87e23e7d73 Merge pull request #1440 from stefan-jonasson/fix-manufacturer-id
Fixed the z-wave sensor workarounds for empty manufacturer ids
2016-02-29 08:01:41 -08:00
Stefan Jonasson
c586111c8c Fixed the z-wave sensor workarounds for empty manufacturer ids 2016-02-29 11:05:11 +01:00
Paulus Schoutsen
e92c77a113 Update frontend 2016-02-28 21:39:42 -08:00
Paulus Schoutsen
2d2b26ff1a Update Dockerfile 2016-02-28 21:08:11 -08:00
Paulus Schoutsen
eed5b1e41b Merge pull request #1437 from balloob/update-docker-zwave
Docker + Z-Wave <3
2016-02-28 20:47:49 -08:00
Paulus Schoutsen
029094e549 Docker + Z-Wave <3 2016-02-28 20:46:16 -08:00
Paulus Schoutsen
28d80e6e2d Merge pull request #1436 from partofthething/zwave-unfork
updated build script for unforking of python-openzwave
2016-02-28 20:24:56 -08:00
Paulus Schoutsen
5449d53e07 Update netdisco to 0.5.3 2016-02-28 15:32:11 -08:00
ntouran
112b85877f updated build script for unforking of python-openzwave 2016-02-28 12:40:17 -08:00
sander
0f6ec9b7ac Added your suggestions.
Looking at your code suggestion below I am not sure exactly how other people might want to put in lists. (But I am missing a more general overview of the code)

 ```
if not isinstance(scene_config,list):
  scene_config=[scene_config]
```

But it is there !
And changed "config" to "states" !
2016-02-28 21:00:51 +01:00
Fabian Affolter
a82931022c Add MQTT lock support 2016-02-28 18:25:28 +01:00
Paulus Schoutsen
1974e2cfbe Merge pull request #1430 from ggruner/dev
Add support for NetAtmo rain gauge
2016-02-28 09:19:41 -08:00
Paulus Schoutsen
e0ba33300a Merge pull request #1431 from kk7ds/fix-wemo-fix
Gracefully handle having no wemo config section
2016-02-28 08:20:04 -08:00
Dan Smith
566c143ee3 Gracefully handle having no wemo config section
I broke this with my fix, where I assumed that we'd always have a wemo
config section if we're running the wemo code. However, if we're fully
auto-detected, we might not.
2016-02-28 07:58:44 -08:00
Fabian Affolter
014b11c61d Upgrade to psutil 4.0.0 2016-02-28 16:34:06 +01:00
Fabian Affolter
b70a455a13 Upgrade py-cpuinfo to 0.2.3 2016-02-28 16:16:03 +01:00
Fabian Affolter
9da8679dbd Add link to docs 2016-02-28 15:35:20 +01:00
Gregor Gruener
c14ca9983c Add support for NetAtmo rain gauge
Example Config:
...
modules:
    Bedroom:
      - temperature
    LivingRoom:
      - temperature
    Outside:
      - temperature
    Garden:
      - rain
      - sum_rain_1
      - sum_rain_24

The three new parameters stand for:
- rain # Estimated rainfall for today in "mm"
- sum_rain_1 # Rainfall in the last hour in "mm"
- sum_rain_24 # Rainfall in "mm" from 00:00am - 23:59pm
2016-02-28 12:24:45 +01:00
Fabian Affolter
9c4fe6e7fe Modify docstrings to match PEP257 2016-02-28 12:03:47 +01:00
sander
a8edcfd315 removed logger.
I guess I should add some error checking, but I'd like you to okay this code first.
2016-02-28 10:29:21 +01:00
sander
0193454064 removed logger.
I guess I should add some error checking, but I'd like you to okay this code first.
2016-02-28 10:28:34 +01:00
sander
94633b3795 1. added platform per scene entry.
2. changed homeassistant scene setup_platform method to work with 1.
2016-02-28 10:24:02 +01:00
Paulus Schoutsen
49982ac83c Update PULL_REQUEST_TEMPLATE.md 2016-02-28 00:59:28 -08:00
Paulus Schoutsen
72940da874 Update frontend 2016-02-28 00:42:10 -08:00
Paulus Schoutsen
5acf995d71 Merge pull request #1429 from balloob/fix-script-can_cancel
Fix incorrectly setting can_cancel on scripts
2016-02-28 00:38:54 -08:00
Paulus Schoutsen
f623a332cf Fix incorrectly setting can_cancel on scripts 2016-02-27 23:11:51 -08:00
Paulus Schoutsen
f5dd41e019 Merge pull request #1425 from kk7ds/fix-static-wemos
Fix static configured wemo devices
2016-02-27 21:02:57 -08:00
Paulus Schoutsen
97edc39d0a Merge pull request #1426 from shaftoe/python_constant
Move hardcoded required Python version into homeassistant.const
2016-02-27 21:00:28 -08:00
Dan Smith
2b4be33a3d Fix wemo known device tracking
The wemo component was tracking devices by mac to avoid adding duplicates,
but this means we'd never be able to load more than one static wemo, since
they all have mac=None.

This changes the code to track by url, which has to be unique per wemo
anyway, and which we also have for even static wemos.
2016-02-27 20:56:02 -08:00
Alexander Fortin
ac69db8133 Move hardcoded required Python version into homeassistant.const 2016-02-28 05:41:03 +01:00
Dan Smith
5a126736e4 Fix static configured wemo devices
The new wemo code was pulling 'static' from the global config instead of
the wemo component config.
2016-02-27 20:11:32 -08:00
Martin Hjelmare
8e9c557a2c Merge pull request #1423 from MartinHjelmare/fix-mysensors-sensor-types
Fix mysensors sensor types
2016-02-28 02:16:32 +01:00
MartinHjelmare
d12dfc33a5 Fix mysensors sensor types
* Remove sprinkler and water leak from sensor types. These two are
  supported by binary sensor.
2016-02-28 01:58:22 +01:00
Paulus Schoutsen
1be90081ef Version bump to 0.15.0.dev0 2016-02-27 16:22:21 -08:00
sander
019af42e94 removed unnecessary properties. 2016-02-23 09:42:34 +01:00
sander
88e7967a7d - removed update method
- removed failing tests from test_scene
2016-02-22 22:01:05 +01:00
sander
e37c232bf6 flake8 correction 2016-02-22 20:05:42 +01:00
sander
fb449cbc82 first commit 2016-02-22 19:53:55 +01:00
1554 changed files with 207271 additions and 36860 deletions

View File

@@ -3,164 +3,565 @@ source = homeassistant
omit =
homeassistant/__main__.py
homeassistant/scripts/*.py
homeassistant/helpers/typing.py
homeassistant/helpers/signal.py
# omit pieces of code that rely on external devices being present
homeassistant/components/alarm_control_panel/alarmdotcom.py
homeassistant/components/alarm_control_panel/nx584.py
homeassistant/components/alarmdecoder.py
homeassistant/components/*/alarmdecoder.py
homeassistant/components/arduino.py
homeassistant/components/*/arduino.py
homeassistant/components/amcrest.py
homeassistant/components/*/amcrest.py
homeassistant/components/apcupsd.py
homeassistant/components/*/apcupsd.py
homeassistant/components/apple_tv.py
homeassistant/components/*/apple_tv.py
homeassistant/components/arduino.py
homeassistant/components/*/arduino.py
homeassistant/components/android_ip_webcam.py
homeassistant/components/*/android_ip_webcam.py
homeassistant/components/arlo.py
homeassistant/components/*/arlo.py
homeassistant/components/asterisk_mbox.py
homeassistant/components/*/asterisk_mbox.py
homeassistant/components/axis.py
homeassistant/components/*/axis.py
homeassistant/components/bbb_gpio.py
homeassistant/components/*/bbb_gpio.py
homeassistant/components/blink.py
homeassistant/components/*/blink.py
homeassistant/components/bloomsky.py
homeassistant/components/*/bloomsky.py
homeassistant/components/insteon_hub.py
homeassistant/components/*/insteon_hub.py
homeassistant/components/comfoconnect.py
homeassistant/components/*/comfoconnect.py
homeassistant/components/isy994.py
homeassistant/components/*/isy994.py
homeassistant/components/digital_ocean.py
homeassistant/components/*/digital_ocean.py
homeassistant/components/modbus.py
homeassistant/components/*/modbus.py
homeassistant/components/dweet.py
homeassistant/components/*/dweet.py
homeassistant/components/*/tellstick.py
homeassistant/components/tellduslive.py
homeassistant/components/*/tellduslive.py
homeassistant/components/*/vera.py
homeassistant/components/eight_sleep.py
homeassistant/components/*/eight_sleep.py
homeassistant/components/ecobee.py
homeassistant/components/*/ecobee.py
homeassistant/components/enocean.py
homeassistant/components/*/enocean.py
homeassistant/components/envisalink.py
homeassistant/components/*/envisalink.py
homeassistant/components/google.py
homeassistant/components/*/google.py
homeassistant/components/hdmi_cec.py
homeassistant/components/*/hdmi_cec.py
homeassistant/components/homematic.py
homeassistant/components/*/homematic.py
homeassistant/components/insteon_local.py
homeassistant/components/*/insteon_local.py
homeassistant/components/insteon_plm.py
homeassistant/components/*/insteon_plm.py
homeassistant/components/ios.py
homeassistant/components/*/ios.py
homeassistant/components/isy994.py
homeassistant/components/*/isy994.py
homeassistant/components/joaoapps_join.py
homeassistant/components/*/joaoapps_join.py
homeassistant/components/juicenet.py
homeassistant/components/*/juicenet.py
homeassistant/components/kira.py
homeassistant/components/*/kira.py
homeassistant/components/knx.py
homeassistant/components/*/knx.py
homeassistant/components/lametric.py
homeassistant/components/*/lametric.py
homeassistant/components/lutron.py
homeassistant/components/*/lutron.py
homeassistant/components/lutron_caseta.py
homeassistant/components/*/lutron_caseta.py
homeassistant/components/mailgun.py
homeassistant/components/*/mailgun.py
homeassistant/components/maxcube.py
homeassistant/components/*/maxcube.py
homeassistant/components/mochad.py
homeassistant/components/*/mochad.py
homeassistant/components/modbus.py
homeassistant/components/*/modbus.py
homeassistant/components/mysensors.py
homeassistant/components/*/mysensors.py
homeassistant/components/neato.py
homeassistant/components/*/neato.py
homeassistant/components/nest.py
homeassistant/components/*/nest.py
homeassistant/components/netatmo.py
homeassistant/components/*/netatmo.py
homeassistant/components/octoprint.py
homeassistant/components/*/octoprint.py
homeassistant/components/opencv.py
homeassistant/components/*/opencv.py
homeassistant/components/qwikswitch.py
homeassistant/components/*/qwikswitch.py
homeassistant/components/rachio.py
homeassistant/components/*/rachio.py
homeassistant/components/raspihats.py
homeassistant/components/*/raspihats.py
homeassistant/components/rfxtrx.py
homeassistant/components/*/rfxtrx.py
homeassistant/components/rpi_gpio.py
homeassistant/components/*/rpi_gpio.py
homeassistant/components/rpi_pfio.py
homeassistant/components/*/rpi_pfio.py
homeassistant/components/scsgate.py
homeassistant/components/*/scsgate.py
homeassistant/components/tado.py
homeassistant/components/*/tado.py
homeassistant/components/tellduslive.py
homeassistant/components/*/tellduslive.py
homeassistant/components/tellstick.py
homeassistant/components/*/tellstick.py
homeassistant/components/*/thinkingcleaner.py
homeassistant/components/tradfri.py
homeassistant/components/*/tradfri.py
homeassistant/components/twilio.py
homeassistant/components/notify/twilio_sms.py
homeassistant/components/notify/twilio_call.py
homeassistant/components/velbus.py
homeassistant/components/*/velbus.py
homeassistant/components/velux.py
homeassistant/components/*/velux.py
homeassistant/components/vera.py
homeassistant/components/*/vera.py
homeassistant/components/verisure.py
homeassistant/components/*/verisure.py
homeassistant/components/volvooncall.py
homeassistant/components/*/volvooncall.py
homeassistant/components/*/webostv.py
homeassistant/components/wemo.py
homeassistant/components/*/wemo.py
homeassistant/components/wink.py
homeassistant/components/*/wink.py
homeassistant/components/xiaomi.py
homeassistant/components/binary_sensor/xiaomi.py
homeassistant/components/cover/xiaomi.py
homeassistant/components/light/xiaomi.py
homeassistant/components/sensor/xiaomi.py
homeassistant/components/switch/xiaomi.py
homeassistant/components/zabbix.py
homeassistant/components/*/zabbix.py
homeassistant/components/zha/__init__.py
homeassistant/components/zha/const.py
homeassistant/components/*/zha.py
homeassistant/components/zigbee.py
homeassistant/components/*/zigbee.py
homeassistant/components/zwave.py
homeassistant/components/*/zwave.py
homeassistant/components/rfxtrx.py
homeassistant/components/*/rfxtrx.py
homeassistant/components/mysensors.py
homeassistant/components/*/mysensors.py
homeassistant/components/nest.py
homeassistant/components/*/nest.py
homeassistant/components/rpi_gpio.py
homeassistant/components/*/rpi_gpio.py
homeassistant/components/scsgate.py
homeassistant/components/*/scsgate.py
homeassistant/components/zoneminder.py
homeassistant/components/*/zoneminder.py
homeassistant/components/alarm_control_panel/alarmdotcom.py
homeassistant/components/alarm_control_panel/concord232.py
homeassistant/components/alarm_control_panel/egardia.py
homeassistant/components/alarm_control_panel/manual_mqtt.py
homeassistant/components/alarm_control_panel/nx584.py
homeassistant/components/alarm_control_panel/simplisafe.py
homeassistant/components/alarm_control_panel/totalconnect.py
homeassistant/components/apiai.py
homeassistant/components/binary_sensor/arest.py
homeassistant/components/binary_sensor/concord232.py
homeassistant/components/binary_sensor/flic.py
homeassistant/components/binary_sensor/hikvision.py
homeassistant/components/binary_sensor/iss.py
homeassistant/components/binary_sensor/mystrom.py
homeassistant/components/binary_sensor/pilight.py
homeassistant/components/binary_sensor/ping.py
homeassistant/components/binary_sensor/rest.py
homeassistant/components/binary_sensor/tapsaff.py
homeassistant/components/browser.py
homeassistant/components/camera/bloomsky.py
homeassistant/components/camera/ffmpeg.py
homeassistant/components/camera/foscam.py
homeassistant/components/camera/generic.py
homeassistant/components/camera/mjpeg.py
homeassistant/components/camera/rpi_camera.py
homeassistant/components/camera/onvif.py
homeassistant/components/camera/synology.py
homeassistant/components/climate/eq3btsmart.py
homeassistant/components/climate/flexit.py
homeassistant/components/climate/heatmiser.py
homeassistant/components/climate/homematic.py
homeassistant/components/climate/knx.py
homeassistant/components/climate/oem.py
homeassistant/components/climate/proliphix.py
homeassistant/components/climate/radiotherm.py
homeassistant/components/climate/sensibo.py
homeassistant/components/cover/garadget.py
homeassistant/components/cover/homematic.py
homeassistant/components/cover/knx.py
homeassistant/components/cover/myq.py
homeassistant/components/cover/opengarage.py
homeassistant/components/cover/rpi_gpio.py
homeassistant/components/cover/scsgate.py
homeassistant/components/device_tracker/actiontec.py
homeassistant/components/device_tracker/aruba.py
homeassistant/components/device_tracker/asuswrt.py
homeassistant/components/device_tracker/ddwrt.py
homeassistant/components/device_tracker/automatic.py
homeassistant/components/device_tracker/bbox.py
homeassistant/components/device_tracker/bluetooth_le_tracker.py
homeassistant/components/device_tracker/bluetooth_tracker.py
homeassistant/components/device_tracker/bt_home_hub_5.py
homeassistant/components/device_tracker/cisco_ios.py
homeassistant/components/device_tracker/fritz.py
homeassistant/components/device_tracker/gpslogger.py
homeassistant/components/device_tracker/huawei_router.py
homeassistant/components/device_tracker/icloud.py
homeassistant/components/device_tracker/linksys_ap.py
homeassistant/components/device_tracker/linksys_smart.py
homeassistant/components/device_tracker/luci.py
homeassistant/components/device_tracker/mikrotik.py
homeassistant/components/device_tracker/netgear.py
homeassistant/components/device_tracker/nmap_tracker.py
homeassistant/components/device_tracker/ping.py
homeassistant/components/device_tracker/sky_hub.py
homeassistant/components/device_tracker/snmp.py
homeassistant/components/device_tracker/swisscom.py
homeassistant/components/device_tracker/thomson.py
homeassistant/components/device_tracker/tomato.py
homeassistant/components/device_tracker/tado.py
homeassistant/components/device_tracker/tplink.py
homeassistant/components/device_tracker/trackr.py
homeassistant/components/device_tracker/ubus.py
homeassistant/components/discovery.py
homeassistant/components/downloader.py
homeassistant/components/garage_door/wink.py
homeassistant/components/emoncms_history.py
homeassistant/components/emulated_hue/upnp.py
homeassistant/components/fan/mqtt.py
homeassistant/components/feedreader.py
homeassistant/components/foursquare.py
homeassistant/components/ifttt.py
homeassistant/components/image_processing/dlib_face_detect.py
homeassistant/components/image_processing/dlib_face_identify.py
homeassistant/components/image_processing/seven_segments.py
homeassistant/components/keyboard.py
homeassistant/components/keyboard_remote.py
homeassistant/components/light/avion.py
homeassistant/components/light/blinkt.py
homeassistant/components/light/blinksticklight.py
homeassistant/components/light/decora.py
homeassistant/components/light/decora_wifi.py
homeassistant/components/light/flux_led.py
homeassistant/components/light/hue.py
homeassistant/components/light/hyperion.py
homeassistant/components/light/lifx.py
homeassistant/components/light/lifx_legacy.py
homeassistant/components/light/limitlessled.py
homeassistant/components/light/mystrom.py
homeassistant/components/light/osramlightify.py
homeassistant/components/light/rpi_gpio_pwm.py
homeassistant/components/light/piglow.py
homeassistant/components/light/sensehat.py
homeassistant/components/light/tikteck.py
homeassistant/components/light/tplink.py
homeassistant/components/light/tradfri.py
homeassistant/components/light/x10.py
homeassistant/components/light/yeelight.py
homeassistant/components/light/yeelightsunflower.py
homeassistant/components/light/zengge.py
homeassistant/components/lirc.py
homeassistant/components/lock/nuki.py
homeassistant/components/lock/lockitron.py
homeassistant/components/lock/sesame.py
homeassistant/components/media_extractor.py
homeassistant/components/media_player/anthemav.py
homeassistant/components/media_player/aquostv.py
homeassistant/components/media_player/bluesound.py
homeassistant/components/media_player/braviatv.py
homeassistant/components/media_player/cast.py
homeassistant/components/media_player/clementine.py
homeassistant/components/media_player/cmus.py
homeassistant/components/media_player/denon.py
homeassistant/components/media_player/denonavr.py
homeassistant/components/media_player/directv.py
homeassistant/components/media_player/dunehd.py
homeassistant/components/media_player/emby.py
homeassistant/components/media_player/firetv.py
homeassistant/components/media_player/frontier_silicon.py
homeassistant/components/media_player/gpmdp.py
homeassistant/components/media_player/gstreamer.py
homeassistant/components/media_player/itunes.py
homeassistant/components/media_player/kodi.py
homeassistant/components/media_player/lg_netcast.py
homeassistant/components/media_player/liveboxplaytv.py
homeassistant/components/media_player/mpchc.py
homeassistant/components/media_player/mpd.py
homeassistant/components/media_player/nad.py
homeassistant/components/media_player/nadtcp.py
homeassistant/components/media_player/onkyo.py
homeassistant/components/media_player/openhome.py
homeassistant/components/media_player/panasonic_viera.py
homeassistant/components/media_player/pandora.py
homeassistant/components/media_player/philips_js.py
homeassistant/components/media_player/pioneer.py
homeassistant/components/media_player/plex.py
homeassistant/components/media_player/roku.py
homeassistant/components/media_player/russound_rio.py
homeassistant/components/media_player/russound_rnet.py
homeassistant/components/media_player/samsungtv.py
homeassistant/components/media_player/snapcast.py
homeassistant/components/media_player/sonos.py
homeassistant/components/media_player/spotify.py
homeassistant/components/media_player/squeezebox.py
homeassistant/components/media_player/vizio.py
homeassistant/components/media_player/vlc.py
homeassistant/components/media_player/volumio.py
homeassistant/components/media_player/yamaha.py
homeassistant/components/notify/aws_lambda.py
homeassistant/components/notify/aws_sns.py
homeassistant/components/notify/aws_sqs.py
homeassistant/components/notify/ciscospark.py
homeassistant/components/notify/clicksend.py
homeassistant/components/notify/discord.py
homeassistant/components/notify/facebook.py
homeassistant/components/notify/free_mobile.py
homeassistant/components/notify/googlevoice.py
homeassistant/components/notify/gntp.py
homeassistant/components/notify/group.py
homeassistant/components/notify/instapush.py
homeassistant/components/notify/kodi.py
homeassistant/components/notify/lannouncer.py
homeassistant/components/notify/llamalab_automate.py
homeassistant/components/notify/matrix.py
homeassistant/components/notify/message_bird.py
homeassistant/components/notify/nfandroidtv.py
homeassistant/components/notify/nma.py
homeassistant/components/notify/pushbullet.py
homeassistant/components/notify/pushetta.py
homeassistant/components/notify/pushover.py
homeassistant/components/notify/pushsafer.py
homeassistant/components/notify/rest.py
homeassistant/components/notify/sendgrid.py
homeassistant/components/notify/simplepush.py
homeassistant/components/notify/slack.py
homeassistant/components/notify/smtp.py
homeassistant/components/notify/syslog.py
homeassistant/components/notify/telegram.py
homeassistant/components/notify/telstra.py
homeassistant/components/notify/twitter.py
homeassistant/components/notify/xmpp.py
homeassistant/components/nuimo_controller.py
homeassistant/components/prometheus.py
homeassistant/components/remote/harmony.py
homeassistant/components/remote/itach.py
homeassistant/components/scene/hunterdouglas_powerview.py
homeassistant/components/scene/lifx_cloud.py
homeassistant/components/sensor/arest.py
homeassistant/components/sensor/arwn.py
homeassistant/components/sensor/bbox.py
homeassistant/components/sensor/bh1750.py
homeassistant/components/sensor/bitcoin.py
homeassistant/components/sensor/blockchain.py
homeassistant/components/sensor/bme280.py
homeassistant/components/sensor/bom.py
homeassistant/components/sensor/broadlink.py
homeassistant/components/sensor/buienradar.py
homeassistant/components/sensor/citybikes.py
homeassistant/components/sensor/coinmarketcap.py
homeassistant/components/sensor/cert_expiry.py
homeassistant/components/sensor/comed_hourly_pricing.py
homeassistant/components/sensor/cpuspeed.py
homeassistant/components/sensor/crimereports.py
homeassistant/components/sensor/cups.py
homeassistant/components/sensor/currencylayer.py
homeassistant/components/sensor/darksky.py
homeassistant/components/sensor/deutsche_bahn.py
homeassistant/components/sensor/dht.py
homeassistant/components/sensor/dweet.py
homeassistant/components/sensor/efergy.py
homeassistant/components/sensor/dnsip.py
homeassistant/components/sensor/dovado.py
homeassistant/components/sensor/dte_energy_bridge.py
homeassistant/components/sensor/dublin_bus_transport.py
homeassistant/components/sensor/ebox.py
homeassistant/components/sensor/eddystone_temperature.py
homeassistant/components/sensor/eliqonline.py
homeassistant/components/sensor/forecast.py
homeassistant/components/sensor/emoncms.py
homeassistant/components/sensor/envirophat.py
homeassistant/components/sensor/etherscan.py
homeassistant/components/sensor/fastdotcom.py
homeassistant/components/sensor/fedex.py
homeassistant/components/sensor/fido.py
homeassistant/components/sensor/fitbit.py
homeassistant/components/sensor/fixer.py
homeassistant/components/sensor/fritzbox_callmonitor.py
homeassistant/components/sensor/fritzbox_netmonitor.py
homeassistant/components/sensor/geizhals.py
homeassistant/components/sensor/gitter.py
homeassistant/components/sensor/glances.py
homeassistant/components/sensor/netatmo.py
homeassistant/components/sensor/google_travel_time.py
homeassistant/components/sensor/gpsd.py
homeassistant/components/sensor/gtfs.py
homeassistant/components/sensor/haveibeenpwned.py
homeassistant/components/sensor/hddtemp.py
homeassistant/components/sensor/hp_ilo.py
homeassistant/components/sensor/htu21d.py
homeassistant/components/sensor/hydroquebec.py
homeassistant/components/sensor/imap.py
homeassistant/components/sensor/imap_email_content.py
homeassistant/components/sensor/influxdb.py
homeassistant/components/sensor/kwb.py
homeassistant/components/sensor/lastfm.py
homeassistant/components/sensor/linux_battery.py
homeassistant/components/sensor/loopenergy.py
homeassistant/components/sensor/lyft.py
homeassistant/components/sensor/metoffice.py
homeassistant/components/sensor/miflora.py
homeassistant/components/sensor/modem_callerid.py
homeassistant/components/sensor/mqtt_room.py
homeassistant/components/sensor/mvglive.py
homeassistant/components/sensor/netdata.py
homeassistant/components/sensor/neurio_energy.py
homeassistant/components/sensor/nut.py
homeassistant/components/sensor/nzbget.py
homeassistant/components/sensor/ohmconnect.py
homeassistant/components/sensor/onewire.py
homeassistant/components/sensor/openevse.py
homeassistant/components/sensor/openexchangerates.py
homeassistant/components/sensor/opensky.py
homeassistant/components/sensor/openweathermap.py
homeassistant/components/sensor/rest.py
homeassistant/components/sensor/otp.py
homeassistant/components/sensor/pi_hole.py
homeassistant/components/sensor/plex.py
homeassistant/components/sensor/pocketcasts.py
homeassistant/components/sensor/pushbullet.py
homeassistant/components/sensor/pvoutput.py
homeassistant/components/sensor/qnap.py
homeassistant/components/sensor/radarr.py
homeassistant/components/sensor/ripple.py
homeassistant/components/sensor/sabnzbd.py
homeassistant/components/sensor/steam_online.py
homeassistant/components/sensor/scrape.py
homeassistant/components/sensor/sensehat.py
homeassistant/components/sensor/serial_pm.py
homeassistant/components/sensor/shodan.py
homeassistant/components/sensor/skybeacon.py
homeassistant/components/sensor/sma.py
homeassistant/components/sensor/snmp.py
homeassistant/components/sensor/sonarr.py
homeassistant/components/sensor/speedtest.py
homeassistant/components/sensor/steam_online.py
homeassistant/components/sensor/supervisord.py
homeassistant/components/sensor/swiss_hydrological_data.py
homeassistant/components/sensor/swiss_public_transport.py
homeassistant/components/sensor/synologydsm.py
homeassistant/components/sensor/systemmonitor.py
homeassistant/components/sensor/ted5000.py
homeassistant/components/sensor/temper.py
homeassistant/components/sensor/time_date.py
homeassistant/components/sensor/torque.py
homeassistant/components/sensor/transmission.py
homeassistant/components/sensor/twitch.py
homeassistant/components/sensor/worldclock.py
homeassistant/components/sensor/uber.py
homeassistant/components/sensor/upnp.py
homeassistant/components/sensor/ups.py
homeassistant/components/sensor/usps.py
homeassistant/components/sensor/vasttrafik.py
homeassistant/components/sensor/waqi.py
homeassistant/components/sensor/xbox_live.py
homeassistant/components/sensor/yweather.py
homeassistant/components/sensor/zamg.py
homeassistant/components/shiftr.py
homeassistant/components/spc.py
homeassistant/components/switch/acer_projector.py
homeassistant/components/switch/anel_pwrctrl.py
homeassistant/components/switch/arest.py
homeassistant/components/switch/edimax.py
homeassistant/components/switch/broadlink.py
homeassistant/components/switch/digitalloggers.py
homeassistant/components/switch/dlink.py
homeassistant/components/switch/edimax.py
homeassistant/components/switch/fritzdect.py
homeassistant/components/switch/hikvisioncam.py
homeassistant/components/switch/hook.py
homeassistant/components/switch/kankun.py
homeassistant/components/switch/mystrom.py
homeassistant/components/switch/netio.py
homeassistant/components/switch/orvibo.py
homeassistant/components/switch/pilight.py
homeassistant/components/switch/pulseaudio_loopback.py
homeassistant/components/switch/rainmachine.py
homeassistant/components/switch/rest.py
homeassistant/components/switch/rpi_rf.py
homeassistant/components/switch/tplink.py
homeassistant/components/switch/transmission.py
homeassistant/components/thermostat/heatmiser.py
homeassistant/components/thermostat/homematic.py
homeassistant/components/thermostat/proliphix.py
homeassistant/components/thermostat/radiotherm.py
homeassistant/components/switch/wake_on_lan.py
homeassistant/components/telegram_bot/*
homeassistant/components/thingspeak.py
homeassistant/components/tts/amazon_polly.py
homeassistant/components/tts/picotts.py
homeassistant/components/upnp.py
homeassistant/components/vacuum/roomba.py
homeassistant/components/weather/bom.py
homeassistant/components/weather/buienradar.py
homeassistant/components/weather/metoffice.py
homeassistant/components/weather/openweathermap.py
homeassistant/components/weather/yweather.py
homeassistant/components/weather/zamg.py
homeassistant/components/zeroconf.py
homeassistant/components/zwave/util.py
[report]
# Regexes for lines to exclude from consideration

14
.dockerignore Normal file
View File

@@ -0,0 +1,14 @@
# General files
.git
.github
config
# Test related files
.tox
# Other virtualization methods
venv
.vagrant
# Temporary files
**/__pycache__

View File

@@ -1,3 +1,7 @@
Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in [the Feature Requests section](https://community.home-assistant.io/c/feature-requests) of our community forum:
**Home Assistant release (`hass --version`):**

View File

@@ -1,28 +1,30 @@
**Description:**
## Description:
**Related issue (if applicable):** #
**Example entry for `configuration.yaml` (if applicable):**
**Related issue (if applicable):** fixes #<home-assistant issue number goes here>
**Pull request in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io) with documentation (if applicable):** home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
## Example entry for `configuration.yaml` (if applicable):
```yaml
```
**Checklist:**
## Checklist:
- [ ] Local tests with `tox` ran successfully.
- [ ] No CI failures. **Your PR cannot be merged unless CI is green!**
- [ ] [Fork is up to date][fork] and was rebased on the `dev` branch before creating the PR.
- If code communicates with devices:
- [ ] 3rd party library/libraries for communication is/are added as dependencies via the `REQUIREMENTS` variable ([example][ex-requir]).
- [ ] 3rd party dependencies are imported inside functions that use them ([example][ex-import]).
- [ ] `requirements_all.txt` is up-to-date, `script/gen_requirements_all.py` ran and the updated file is included in the PR.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io)
If the code communicates with devices, web services, or third-party tools:
- [ ] Local tests with `tox` run successfully. **Your PR cannot be merged unless tests pass**
- [ ] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
- [ ] New dependencies are only imported inside functions that use them ([example][ex-import]).
- [ ] New dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
- [ ] New files were added to `.coveragerc`.
- If the code does not depend on external Python module:
- [ ] Tests to verify that the code works are included.
- [ ] [Commits will be squashed][squash] when the PR is ready to be merged.
[fork]: http://stackoverflow.com/a/7244456
[squash]: https://github.com/ginatrapani/todo.txt-android/wiki/Squash-All-Commits-Related-to-a-Single-Issue-into-a-Single-Commit
[ex-requir]: https://github.com/balloob/home-assistant/blob/dev/homeassistant/components/keyboard.py#L16
[ex-import]: https://github.com/balloob/home-assistant/blob/dev/homeassistant/components/keyboard.py#L51
If the code does not interact with devices:
- [ ] Local tests with `tox` run successfully. **Your PR cannot be merged unless tests pass**
- [ ] Tests have been added to verify that the new code works.
[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L54

34
.gitignore vendored
View File

@@ -1,15 +1,7 @@
config/*
!config/home-assistant.conf.default
homeassistant/components/frontend/www_static/polymer/bower_components/*
# There is not a better solution afaik..
!config/custom_components
config/custom_components/*
!config/custom_components/example.py
!config/custom_components/hello_world.py
!config/custom_components/mqtt_example.py
tests/config/home-assistant.log
tests/testing_config/deps
tests/testing_config/home-assistant.log
# Hide sublime text stuff
*.sublime-project
@@ -51,13 +43,15 @@ develop-eggs
lib
lib64
# Installer logs
# Logs
*.log
pip-log.txt
# Unit test / coverage reports
.coverage
.tox
nosetests.xml
htmlcov/
# Translations
*.mo
@@ -78,7 +72,25 @@ nosetests.xml
pyvenv.cfg
pip-selfcheck.json
venv
.venv
Pipfile*
# vimmy stuff
*.swp
*.swo
ctags.tmp
# vagrant stuff
virtualization/vagrant/setup_done
virtualization/vagrant/.vagrant
virtualization/vagrant/config
# Visual Studio Code
.vscode
# Built docs
docs/build
# Windows Explorer
desktop.ini

2
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "homeassistant/components/frontend/www_static/home-assistant-polymer"]
path = homeassistant/components/frontend/www_static/home-assistant-polymer
url = https://github.com/balloob/home-assistant-polymer.git
url = https://github.com/home-assistant/home-assistant-polymer.git

2
.hound.yml Normal file
View File

@@ -0,0 +1,2 @@
python:
enabled: true

6
.ignore Normal file
View File

@@ -0,0 +1,6 @@
# Patterns matched in this file will be ignored by supported search utilities
# Ignore generated html and javascript files
/homeassistant/components/frontend/www_static/*.html
/homeassistant/components/frontend/www_static/*.js
/homeassistant/components/frontend/www_static/panels/*.html

View File

@@ -1,19 +1,33 @@
sudo: false
addons:
apt:
packages:
- libudev-dev
matrix:
fast_finish: true
include:
- python: "3.4"
env: TOXENV=py34
- python: "3.4"
env: TOXENV=requirements
- python: "3.5"
- python: "3.4.2"
env: TOXENV=lint
- python: "3.4.2"
env: TOXENV=py34
# - python: "3.5"
# env: TOXENV=typing
- python: "3.5"
env: TOXENV=py35
- python: "3.6"
env: TOXENV=py36
# - python: "3.6-dev"
# env: TOXENV=py36
- python: "3.4.2"
env: TOXENV=requirements
# allow_failures:
# - python: "3.5"
# env: TOXENV=typing
cache:
directories:
- $HOME/.cache/pip
install: pip install -U tox coveralls
language: python
script: tox
script: travis_wait tox
after_success: coveralls

39
CLA.md Normal file
View File

@@ -0,0 +1,39 @@
# Contributor License Agreement
```
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the Apache 2.0 license; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the Apache 2.0 license; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it) is maintained indefinitely
and may be redistributed consistent with this project or the open
source license(s) involved.
```
## Attribution
The text of this license is available under the [Creative Commons Attribution-ShareAlike 3.0 Unported License](http://creativecommons.org/licenses/by-sa/3.0/). It is based on the Linux [Developer Certificate Of Origin](http://elinux.org/Developer_Certificate_Of_Origin), but is modified to explicitly use the Apache 2.0 license
and not mention sign-off.
## Signing
To sign this CLA you must first submit a pull request to a repository under the Home Assistant organization.
## Adoption
This Contributor License Agreement (CLA) was first announced on January 21st, 2017 in [this][cla-blog] blog post and adopted January 28th, 2017.
[cla-blog]: https://home-assistant.io/blog/2017/01/21/home-assistant-governance/

41
CODEOWNERS Normal file
View File

@@ -0,0 +1,41 @@
# People marked here will be automatically requested for a review
# when the code that they own is touched.
# https://github.com/blog/2392-introducing-code-owners
setup.py @home-assistant/core
homeassistant/*.py @home-assistant/core
homeassistant/helpers/* @home-assistant/core
homeassistant/util/* @home-assistant/core
homeassistant/components/api.py @home-assistant/core
homeassistant/components/automation/* @home-assistant/core
homeassistant/components/configurator.py @home-assistant/core
homeassistant/components/group.py @home-assistant/core
homeassistant/components/history.py @home-assistant/core
homeassistant/components/http/* @home-assistant/core
homeassistant/components/input_*.py @home-assistant/core
homeassistant/components/introduction.py @home-assistant/core
homeassistant/components/logger.py @home-assistant/core
homeassistant/components/mqtt/* @home-assistant/core
homeassistant/components/panel_custom.py @home-assistant/core
homeassistant/components/panel_iframe.py @home-assistant/core
homeassistant/components/persistent_notification.py @home-assistant/core
homeassistant/components/scene/__init__.py @home-assistant/core
homeassistant/components/scene/hass.py @home-assistant/core
homeassistant/components/script.py @home-assistant/core
homeassistant/components/shell_command.py @home-assistant/core
homeassistant/components/sun.py @home-assistant/core
homeassistant/components/updater.py @home-assistant/core
homeassistant/components/weblink.py @home-assistant/core
homeassistant/components/websocket_api.py @home-assistant/core
homeassistant/components/zone.py @home-assistant/core
Dockerfile @home-assistant/docker
virtualization/Docker/* @home-assistant/docker
homeassistant/components/zwave/* @home-assistant/z-wave
homeassistant/components/*/zwave.py @home-assistant/z-wave
# Indiviudal components
homeassistant/components/cover/template.py @PhracturedBlue
homeassistant/components/device_tracker/automatic.py @armills
homeassistant/components/media_player/kodi.py @armills

80
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,80 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [safety@home-assistant.io][email]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available [here][version].
## Adoption
This Code of Conduct was first adopted January 21st, 2017 and announced in [this][coc-blog] blog post.
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
[email]: mailto:safety@home-assistant.io
[coc-blog]: https://home-assistant.io/blog/2017/01/21/home-assistant-governance/

View File

@@ -1,87 +1,14 @@
# Contributing to Home Assistant
Everybody is invited and welcome to contribute to Home Assistant. There is a lot to do...if you are not a developer perhaps you would like to help with the documentation on [home-assistant.io](https://home-assistant.io/)? If you are a developer and have devices in your home which aren't working with Home Assistant yet, why not spent a couple of hours and help to integrate them?
Everybody is invited and welcome to contribute to Home Assistant. There is a lot to do...if you are not a developer perhaps you would like to help with the documentation on [home-assistant.io](https://home-assistant.io/)? If you are a developer and have devices in your home which aren't working with Home Assistant yet, why not spent a couple of hours and help to integrate them?
The process is straight-forward.
- Fork the Home Assistant [git repository](https://github.com/balloob/home-assistant).
- Read [How to get faster PR reviews](https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md#best-practices-for-faster-reviews) by Kubernetes (but skip step 0)
- Fork the Home Assistant [git repository](https://github.com/home-assistant/home-assistant).
- Write the code for your device, notification service, sensor, or IoT thing.
- Ensure tests work.
- Create a Pull Request against the [**dev**](https://github.com/balloob/home-assistant/tree/dev) branch of Home Assistant.
- Create a Pull Request against the [**dev**](https://github.com/home-assistant/home-assistant/tree/dev) branch of Home Assistant.
Still interested? Then you should read the next sections and get more details.
Still interested? Then you should take a peek at the [developer documentation](https://home-assistant.io/developers/) to get more details.
## Adding support for a new device
For help on building your component, please see the [developer documentation](https://home-assistant.io/developers/) on [home-assistant.io](https://home-assistant.io/).
After you finish adding support for your device:
- 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](https://home-assistant.io/developers/website/) for further information on contributing to [home-assistant.io](https://github.com/balloob/home-assistant.io).
- Make sure all your code passes ``pylint`` and ``flake8`` (PEP8 and some more) validation. To check your repository, run `tox` or `script/lint`.
- Create a Pull Request against the [**dev**](https://github.com/balloob/home-assistant/tree/dev) branch of Home Assistant.
- Check for comments and suggestions on your Pull Request and keep an eye on the [CI output](https://travis-ci.org/balloob/home-assistant/).
If you add a platform for an existing component, there is usually no need for updating the frontend. Only if you've added a new component that should show up in the frontend, there are more steps needed:
- Update the file [`home-assistant-icons.html`](https://github.com/balloob/home-assistant/blob/master/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-icons.html) with an icon for your domain ([pick one from this list](https://www.polymer-project.org/1.0/components/core-elements/demo.html#core-icon)).
- Update the demo component with two states that it provides.
- Add your component to `home-assistant.conf.example`.
Since you've updated `home-assistant-icons.html`, you've made changes to the frontend:
- Run `build_frontend`. This will build a new version of the frontend. Make sure you add the changed files `frontend.py` and `frontend.html` to the commit.
### Setting 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.components](https://github.com/balloob/home-assistant/blob/master/homeassistant/components/__init__.py#L25).
### Proper Visibility Handling
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/balloob/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).
### Working on the frontend
The frontend is composed of [Polymer](https://www.polymer-project.org) web-components and compiled into the file `frontend.html`. During development you do not want to work with the compiled version but with the seperate files. To have Home Assistant serve the seperate files, set `development=1` for the *http-component* in your config.
When you are done with development and ready to commit your changes, run `build_frontend`, set `development=0` in your config and validate that everything still works.
## Testing your code
To test your code before submission, used the `tox` tool.
```shell
> pip install -U 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.
### 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.

View File

@@ -1,27 +1,35 @@
FROM python:3.4
# Notice:
# When updating this file, please also update virtualization/Docker/Dockerfile.dev
# This way, the development image and the production image are kept in sync.
FROM python:3.6
MAINTAINER Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>
# Uncomment any of the following lines to disable the installation.
#ENV INSTALL_TELLSTICK no
#ENV INSTALL_OPENALPR no
#ENV INSTALL_FFMPEG no
#ENV INSTALL_LIBCEC no
#ENV INSTALL_PHANTOMJS no
#ENV INSTALL_COAP_CLIENT no
#ENV INSTALL_SSOCR no
VOLUME /config
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
RUN pip3 install --no-cache-dir colorlog
# For the nmap tracker
RUN apt-get update && \
apt-get install -y --no-install-recommends nmap net-tools && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY script/build_python_openzwave script/build_python_openzwave
RUN apt-get update && \
apt-get install -y cython3 libudev-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
pip3 install "cython<0.23" && \
script/build_python_openzwave
# Copy build scripts
COPY virtualization/Docker/ virtualization/Docker/
RUN virtualization/Docker/setup_docker_prereqs
# Install hass component dependencies
COPY requirements_all.txt requirements_all.txt
RUN pip3 install --no-cache-dir -r requirements_all.txt
# Uninstall enum34 because some depenndecies install it but breaks Python 3.4+.
# See PR #8103 for more info.
RUN pip3 install --no-cache-dir -r requirements_all.txt && \
pip3 install --no-cache-dir mysqlclient psycopg2 uvloop cchardet
# Copy source
COPY . .

20
LICENSE
View File

@@ -1,20 +0,0 @@
The MIT License (MIT)
Copyright (c) 2016 Paulus Schoutsen
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

194
LICENSE.md Normal file
View File

@@ -0,0 +1,194 @@
Apache License
==============
_Version 2.0, January 2004_
_&lt;<http://www.apache.org/licenses/>&gt;_
### Terms and Conditions for use, reproduction, and distribution
#### 1. Definitions
“License” shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
“Licensor” shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
“Legal Entity” shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, “control” means **(i)** the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the
outstanding shares, or **(iii)** beneficial ownership of such entity.
“You” (or “Your”) shall mean an individual or Legal Entity exercising
permissions granted by this License.
“Source” form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
“Object” form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.
“Work” shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).
“Derivative Works” shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.
“Contribution” shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative Works
thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit
on behalf of the copyright owner. For the purposes of this definition,
“submitted” means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for
the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as “Not a Contribution.”
“Contributor” shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.
#### 2. Grant of Copyright License
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.
#### 3. Grant of Patent License
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination
of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License
for that Work shall terminate as of the date such litigation is filed.
#### 4. Redistribution
You may reproduce and distribute copies of the Work or Derivative Works thereof
in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions:
* **(a)** You must give any other recipients of the Work or Derivative Works a copy of
this License; and
* **(b)** You must cause any modified files to carry prominent notices stating that You
changed the files; and
* **(c)** You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source form
of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
* **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any
Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices
that do not pertain to any part of the Derivative Works, in at least one of the
following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of
the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works that
You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as
modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.
#### 5. Submission of Contributions
Unless You explicitly state otherwise, any Contribution intentionally submitted
for inclusion in the Work by You to the Licensor shall be under the terms and
conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of
any separate license agreement you may have executed with Licensor regarding
such Contributions.
#### 6. Trademarks
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
#### 7. Disclaimer of Warranty
Unless required by applicable law or agreed to in writing, Licensor provides the
Work (and each Contributor provides its Contributions) on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of
permissions under this License.
#### 8. Limitation of Liability
In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License or
out of the use or inability to use the Work (including but not limited to
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.
#### 9. Accepting Warranty or Additional Liability
While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However,
in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor, and only if You
agree to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability.
_END OF TERMS AND CONDITIONS_
### APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets `[]` replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same “printed page” as the copyright notice for easier identification within
third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,5 +1,5 @@
include README.rst
include LICENSE
include LICENSE.md
graft homeassistant
prune homeassistant/components/frontend/www_static/home-assistant-polymer
recursive-exclude * *.py[co]

View File

@@ -1,9 +1,7 @@
Home Assistant |Build Status| |Coverage Status| |Join the chat at https://gitter.im/balloob/home-assistant|
===========================================================================================================
Home Assistant |Build Status| |Coverage Status| |Chat Status|
=============================================================
Home Assistant is a home automation platform running on Python 3. The
goal of Home Assistant is to be able to track and control all devices at
home and offer a platform for automating control.
Home Assistant is a home automation platform running on Python 3. It is able to track and control all devices at home and offer a platform for automating control.
To get started:
@@ -12,87 +10,34 @@ To get started:
python3 -m pip install homeassistant
hass --open-ui
Check out `the website <https://home-assistant.io>`__ for `a
demo <https://home-assistant.io/demo/>`__, installation instructions,
tutorials and documentation.
Check out `home-assistant.io <https://home-assistant.io>`__ for `a
demo <https://home-assistant.io/demo/>`__, `installation instructions <https://home-assistant.io/getting-started/>`__,
`tutorials <https://home-assistant.io/getting-started/automation-2/>`__ and `documentation <https://home-assistant.io/docs/>`__.
|screenshot-states|
Examples of devices it can interface it:
Featured integrations
---------------------
- Monitoring connected devices to a wireless router:
`OpenWrt <https://openwrt.org/>`__,
`Tomato <http://www.polarcloud.com/tomato>`__,
`Netgear <http://netgear.com>`__,
`DD-WRT <http://www.dd-wrt.com/site/index>`__,
`TPLink <http://www.tp-link.us/>`__,
`ASUSWRT <http://event.asus.com/2013/nw/ASUSWRT/>`__ and any SNMP
capable Linksys WAP/WRT
- `Philips Hue <http://meethue.com>`__ lights,
`WeMo <http://www.belkin.com/us/Products/home-automation/c/wemo-home-automation/>`__
switches, `Edimax <http://www.edimax.com/>`__ switches,
`Efergy <https://efergy.com>`__ energy monitoring, and
`Tellstick <http://www.telldus.se/products/tellstick>`__ devices and
sensors
- `Google
Chromecasts <http://www.google.com/intl/en/chrome/devices/chromecast>`__,
`Music Player Daemon <http://www.musicpd.org/>`__, `Logitech
Squeezebox <https://en.wikipedia.org/wiki/Squeezebox_%28network_music_player%29>`__,
`Plex <https://plex.tv/>`__, `Kodi (XBMC) <http://kodi.tv/>`__,
iTunes (by way of
`itunes-api <https://github.com/maddox/itunes-api>`__), and Amazon
Fire TV (by way of
`python-firetv <https://github.com/happyleavesaoc/python-firetv>`__)
- Support for
`ISY994 <https://www.universal-devices.com/residential/isy994i-series/>`__
(Insteon and X10 devices), `Z-Wave <http://www.z-wave.com/>`__, `Nest
Thermostats <https://nest.com/>`__,
`RFXtrx <http://www.rfxcom.com/>`__,
`Arduino <https://www.arduino.cc/>`__, `Raspberry
Pi <https://www.raspberrypi.org/>`__, and
`Modbus <http://www.modbus.org/>`__
- Interaction with `IFTTT <https://ifttt.com/>`__
- Integrate data from the `Bitcoin <https://bitcoin.org>`__ network,
meteorological data from
`OpenWeatherMap <http://openweathermap.org/>`__ and
`Forecast.io <https://forecast.io/>`__,
`Transmission <http://www.transmissionbt.com/>`__, or
`SABnzbd <http://sabnzbd.org>`__.
- `See full list of supported
devices <https://home-assistant.io/components/>`__
|screenshot-components|
Built home automation on top of your devices:
- Keep a precise history of every change to the state of your house
- Turn on the lights when people get home after sun set
- Turn on lights slowly during sun set to compensate for less light
- Turn off all lights and devices when everybody leaves the house
- Offers a `REST API <https://home-assistant.io/developers/api/>`__
and can interface with MQTT for easy integration with other projects
like `OwnTracks <http://owntracks.org/>`__
- Allow sending notifications using
`Instapush <https://instapush.im>`__, `Notify My Android
(NMA) <http://www.notifymyandroid.com/>`__,
`PushBullet <https://www.pushbullet.com/>`__,
`PushOver <https://pushover.net/>`__, `Slack <https://slack.com/>`__,
`Telegram <https://telegram.org/>`__, and `Jabber
(XMPP) <http://xmpp.org>`__
The system is built modular so support for other devices or actions can
be implemented easily. See also the `section on
architecture <https://home-assistant.io/developers/architecture.html>`__
and the `section on creating your own
components <https://home-assistant.io/developers/creating_components.html>`__.
The system is built using a modular approach so support for other devices or actions can be implemented easily. See also the `section on architecture <https://home-assistant.io/developers/architecture/>`__ and the `section on creating your own
components <https://home-assistant.io/developers/creating_components/>`__.
If you run into issues while using Home Assistant or during development
of a component, check the `Home Assistant help
section <https://home-assistant.io/help/>`__ how to reach us.
of a component, check the `Home Assistant help section <https://home-assistant.io/help/>`__ of our website for further help and information.
.. |Build Status| image:: https://travis-ci.org/balloob/home-assistant.svg?branch=master
:target: https://travis-ci.org/balloob/home-assistant
.. |Coverage Status| image:: https://img.shields.io/coveralls/balloob/home-assistant.svg
:target: https://coveralls.io/r/balloob/home-assistant?branch=master
.. |Join the chat at https://gitter.im/balloob/home-assistant| image:: https://badges.gitter.im/Join%20Chat.svg
:target: https://gitter.im/balloob/home-assistant?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
.. |screenshot-states| image:: https://raw.github.com/balloob/home-assistant/master/docs/screenshots.png
.. |Build Status| image:: https://travis-ci.org/home-assistant/home-assistant.svg?branch=master
:target: https://travis-ci.org/home-assistant/home-assistant
.. |Coverage Status| image:: https://img.shields.io/coveralls/home-assistant/home-assistant.svg
:target: https://coveralls.io/r/home-assistant/home-assistant?branch=master
.. |Chat Status| image:: https://img.shields.io/discord/330944238910963714.svg
:target: https://discord.gg/c5DvZ4e
.. |Join the chat at https://gitter.im/home-assistant/home-assistant| image:: https://img.shields.io/badge/gitter-general-blue.svg
:target: https://gitter.im/home-assistant/home-assistant?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
.. |Join the dev chat at https://gitter.im/home-assistant/home-assistant/devs| image:: https://img.shields.io/badge/gitter-development-yellowgreen.svg
:target: https://gitter.im/home-assistant/home-assistant/devs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
.. |screenshot-states| image:: https://raw.github.com/home-assistant/home-assistant/master/docs/screenshots.png
:target: https://home-assistant.io/demo/
.. |screenshot-components| image:: https://raw.github.com/home-assistant/home-assistant/dev/docs/screenshot-components.png
:target: https://home-assistant.io/components/

View File

@@ -1,200 +0,0 @@
homeassistant:
# Omitted values in this section will be auto detected using freegeoip.net
# Location required to calculate the time the sun rises and sets.
# Cooridinates are also used for location for weather related components.
# Google Maps can be used to determine more precise GPS cooridinates.
latitude: 32.87336
longitude: 117.22743
# C for Celcius, F for Fahrenheit
temperature_unit: C
# Pick yours from here:
# http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: America/Los_Angeles
# Name of the location where Home Assistant is running
name: Home
http:
api_password: mypass
# Set to 1 to enable development mode
# development: 1
light:
# platform: hue
wink:
# Get your token at https://winkbearertoken.appspot.com
access_token: 'YOUR_TOKEN'
device_tracker:
# The following types are available: ddwrt, netgear, tomato, luci,
# and nmap_tracker
platform: netgear
host: 192.168.1.1
username: admin
password: PASSWORD
# http_id is needed for Tomato routers only
# http_id: ABCDEFGHH
# For nmap_tracker, only the IP addresses to scan are needed:
# hosts: 192.168.1.1/24 # netmask prefix notation or
# hosts: 192.168.1.1-255 # address range
chromecast:
switch:
platform: wemo
thermostat:
platform: nest
# Required: username and password that are used to login to the Nest thermostat.
username: myemail@mydomain.com
password: mypassword
downloader:
download_dir: downloads
notify:
platform: pushbullet
api_key: ABCDEFGHJKLMNOPQRSTUVXYZ
device_sun_light_trigger:
# Optional: specify a specific light/group of lights that has to be turned on
light_group: group.living_room
# Optional: specify which light profile to use when turning lights on
light_profile: relax
# Optional: disable lights being turned off when everybody leaves the house
# disable_turn_off: 1
# A comma separated list of states that have to be tracked as a single group
# Grouped states should share the same type of states (ON/OFF or HOME/NOT_HOME)
# You can also have groups within groups.
group:
Home:
- group.living_room
- group.kitchen
living_room:
- light.Bowl
- light.Ceiling
- light.TV_back_light
kitchen:
- light.fan_bulb_1
- light.fan_bulb_2
children:
- device_tracker.child_1
- device_tracker.child_2
process:
# items are which processes to look for: <entity_id>: <search string within ps>
xbmc: XBMC.App
example:
simple_alarm:
# Which light/light group has to flash when a known device comes home
known_light: light.Bowl
# Which light/light group has to flash red when light turns on while no one home
unknown_light: group.living_room
browser:
keyboard:
automation:
- alias: 'Rule 1 Light on in the evening'
trigger:
- platform: sun
event: sunset
offset: "-01:00:00"
- platform: state
entity_id: group.all_devices
state: home
condition:
- platform: state
entity_id: group.all_devices
state: home
- platform: time
after: "16:00:00"
before: "23:00:00"
action:
service: homeassistant.turn_on
entity_id: group.living_room
- alias: 'Rule 2 - Away Mode'
trigger:
- platform: state
entity_id: group.all_devices
state: 'not_home'
condition: use_trigger_values
action:
service: light.turn_off
entity_id: group.all_lights
# Sensors need to be added into the configuration.yaml as sensor:, sensor 2:, sensor 3:, etc.
# Each sensor label should be unique or your sensors might not load correctly.
sensor:
platform: systemmonitor
resources:
- type: 'disk_use_percent'
arg: '/'
- type: 'disk_use_percent'
arg: '/home'
- type: 'disk_use'
arg: '/home'
- type: 'disk_free'
arg: '/'
- type: 'memory_use_percent'
- type: 'memory_use'
- type: 'memory_free'
- type: 'processor_use'
- type: 'process'
arg: 'octave-cli'
sensor 2:
platform: forecast
api_key: <register on Forecast.io for your PRIVATE API>
monitored_conditions:
- summary
- precip_type
- precip_intensity
- temperature
- dew_point
- wind_speed
- wind_bearing
- cloud_cover
- humidity
- pressure
- visibility
- ozone
script:
# Turns on the bedroom lights and then the living room lights 1 minute later
wakeup:
alias: Wake Up
sequence:
# alias is optional
- alias: Bedroom lights on
execute_service: light.turn_on
service_data:
entity_id: group.bedroom
- delay:
# supports seconds, milliseconds, minutes, hours, etc.
minutes: 1
- alias: Living room lights on
execute_service: light.turn_on
service_data:
entity_id: group.living_room
scene:
- name: Romantic
entities:
light.tv_back_light: on
light.ceiling:
state: on
xy_color: [0.33, 0.66]
brightness: 200

View File

@@ -1,147 +0,0 @@
"""
Example of a custom component.
Example component to target an entity_id to:
- turn it on at 7AM in the morning
- turn it on if anyone comes home and it is off
- turn it off if all lights are turned off
- turn it off if all people leave the house
- offer a service to turn it on for 10 seconds
Configuration:
To use the Example custom component you will need to add the following to
your configuration.yaml file.
example:
target: TARGET_ENTITY
Variable:
target
*Required
TARGET_ENTITY should be one of your devices that can be turned on and off,
ie a light or a switch. Example value could be light.Ceiling or switch.AC
(if you have these devices with those names).
"""
import time
import logging
from homeassistant.const import STATE_HOME, STATE_NOT_HOME, STATE_ON, STATE_OFF
from homeassistant.helpers import validate_config
from homeassistant.helpers.event_decorators import \
track_state_change, track_time_change
from homeassistant.helpers.service import service
import homeassistant.components as core
from homeassistant.components import device_tracker
from homeassistant.components import light
# The domain of your component. Should be equal to the name of your component.
DOMAIN = "example"
# List of component names (string) your component depends upon.
# We depend on group because group will be loaded after all the components that
# initialize devices have been setup.
DEPENDENCIES = ['group', 'device_tracker', 'light']
# Configuration key for the entity id we are targeting.
CONF_TARGET = 'target'
# Variable for storing configuration parameters.
TARGET_ID = None
# Name of the service that we expose.
SERVICE_FLASH = 'flash'
# Shortcut for the logger
_LOGGER = logging.getLogger(__name__)
def setup(hass, config):
"""Setup example component."""
global TARGET_ID
# Validate that all required config options are given.
if not validate_config(config, {DOMAIN: [CONF_TARGET]}, _LOGGER):
return False
TARGET_ID = config[DOMAIN][CONF_TARGET]
# Validate that the target entity id exists.
if hass.states.get(TARGET_ID) is None:
_LOGGER.error("Target entity id %s does not exist",
TARGET_ID)
# Tell the bootstrapper that we failed to initialize and clear the
# stored target id so our functions don't run.
TARGET_ID = None
return False
# Tell the bootstrapper that we initialized successfully.
return True
@track_state_change(device_tracker.ENTITY_ID_ALL_DEVICES)
def track_devices(hass, entity_id, old_state, new_state):
"""Called when the group.all devices change state."""
# If the target id is not set, return
if not TARGET_ID:
return
# If anyone comes home and the entity is not on, turn it on.
if new_state.state == STATE_HOME and not core.is_on(hass, TARGET_ID):
core.turn_on(hass, TARGET_ID)
# If all people leave the house and the entity is on, turn it off.
elif new_state.state == STATE_NOT_HOME and core.is_on(hass, TARGET_ID):
core.turn_off(hass, TARGET_ID)
@track_time_change(hour=7, minute=0, second=0)
def wake_up(hass, now):
"""
Turn it on in the morning (7 AM) if there are people home and
it is not already on.
"""
if not TARGET_ID:
return
if device_tracker.is_on(hass) and not core.is_on(hass, TARGET_ID):
_LOGGER.info('People home at 7AM, turning it on')
core.turn_on(hass, TARGET_ID)
@track_state_change(light.ENTITY_ID_ALL_LIGHTS, STATE_ON, STATE_OFF)
def all_lights_off(hass, entity_id, old_state, new_state):
"""If all lights turn off, turn off."""
if not TARGET_ID:
return
if core.is_on(hass, TARGET_ID):
_LOGGER.info('All lights have been turned off, turning it off')
core.turn_off(hass, TARGET_ID)
@service(DOMAIN, SERVICE_FLASH)
def flash_service(hass, call):
"""
Service that will turn the target off for 10 seconds if on and vice versa.
"""
if not TARGET_ID:
return
if core.is_on(hass, TARGET_ID):
core.turn_off(hass, TARGET_ID)
time.sleep(10)
core.turn_on(hass, TARGET_ID)
else:
core.turn_on(hass, TARGET_ID)
time.sleep(10)
core.turn_off(hass, TARGET_ID)

View File

@@ -1,28 +0,0 @@
"""
The "hello world" custom component.
This component implements the bare minimum that a component should implement.
Configuration:
To use the hello_word component you will need to add the following to your
configuration.yaml file.
hello_world:
"""
# The domain of your component. Should be equal to the name of your component.
DOMAIN = "hello_world"
# List of component names (string) your component depends upon.
DEPENDENCIES = []
def setup(hass, config):
"""Setup our skeleton component."""
# States are in the format DOMAIN.OBJECT_ID.
hass.states.set('hello_world.Hello_World', 'Works!')
# Return boolean to indicate that initialization was successfully.
return True

View File

@@ -1,55 +0,0 @@
"""
Example of a custom MQTT component.
Shows how to communicate with MQTT. Follows a topic on MQTT and updates the
state of an entity to the last message received on that topic.
Also offers a service 'set_state' that will publish a message on the topic that
will be passed via MQTT to our message received listener. Call the service with
example payload {"new_state": "some new state"}.
Configuration:
To use the mqtt_example component you will need to add the following to your
configuration.yaml file.
mqtt_example:
topic: home-assistant/mqtt_example
"""
import homeassistant.loader as loader
# The domain of your component. Should be equal to the name of your component.
DOMAIN = "mqtt_example"
# List of component names (string) your component depends upon.
DEPENDENCIES = ['mqtt']
CONF_TOPIC = 'topic'
DEFAULT_TOPIC = 'home-assistant/mqtt_example'
def setup(hass, config):
"""Setup the MQTT example component."""
mqtt = loader.get_component('mqtt')
topic = config[DOMAIN].get('topic', DEFAULT_TOPIC)
entity_id = 'mqtt_example.last_message'
# Listen to a message on MQTT.
def message_received(topic, payload, qos):
"""A new MQTT message has been received."""
hass.states.set(entity_id, payload)
mqtt.subscribe(hass, topic, message_received)
hass.states.set(entity_id, 'No messages')
# Service to publish a message on MQTT.
def set_state_service(call):
"""Service to send a message."""
mqtt.publish(hass, topic, call.data.get('new_state'))
# Register our service with Home Assistant.
hass.services.register(DOMAIN, 'set_state', set_state_service)
# Return boolean to indicate that initialization was successfully.
return True

230
docs/Makefile Normal file
View File

@@ -0,0 +1,230 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " livehtml to make standalone HTML files via sphinx-autobuild"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " epub3 to make an epub3"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
@echo " dummy to check syntax errors of document sources"
.PHONY: clean
clean:
rm -rf $(BUILDDIR)/*
.PHONY: html
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
.PHONY: livehtml
livehtml:
sphinx-autobuild -z ../homeassistant/ --port 0 -B -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
.PHONY: dirhtml
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
.PHONY: singlehtml
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
.PHONY: pickle
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
.PHONY: json
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
.PHONY: htmlhelp
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
.PHONY: qthelp
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Home-Assistant.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Home-Assistant.qhc"
.PHONY: applehelp
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
.PHONY: devhelp
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/Home-Assistant"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Home-Assistant"
@echo "# devhelp"
.PHONY: epub
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
.PHONY: epub3
epub3:
$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
@echo
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
.PHONY: latex
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
.PHONY: latexpdf
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: latexpdfja
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: text
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
.PHONY: man
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
.PHONY: texinfo
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
.PHONY: info
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
.PHONY: gettext
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
.PHONY: changes
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
.PHONY: linkcheck
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
.PHONY: doctest
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
.PHONY: coverage
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
.PHONY: xml
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
.PHONY: pseudoxml
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
.PHONY: dummy
dummy:
$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
@echo
@echo "Build finished. Dummy builder generates no files."

281
docs/make.bat Normal file
View File

@@ -0,0 +1,281 @@
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
set I18NSPHINXOPTS=%SPHINXOPTS% source
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. epub3 to make an epub3
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. xml to make Docutils-native XML files
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
echo. coverage to run coverage check of the documentation if enabled
echo. dummy to check syntax errors of document sources
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
REM Check if sphinx-build is available and fallback to Python version if any
%SPHINXBUILD% 1>NUL 2>NUL
if errorlevel 9009 goto sphinx_python
goto sphinx_ok
:sphinx_python
set SPHINXBUILD=python -m sphinx.__init__
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
:sphinx_ok
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Home-Assistant.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Home-Assistant.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "epub3" (
%SPHINXBUILD% -b epub3 %ALLSPHINXOPTS% %BUILDDIR%/epub3
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub3 file is in %BUILDDIR%/epub3.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdf" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdfja" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf-ja
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
if "%1" == "coverage" (
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
if errorlevel 1 exit /b 1
echo.
echo.Testing of coverage in the sources finished, look at the ^
results in %BUILDDIR%/coverage/python.txt.
goto end
)
if "%1" == "xml" (
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The XML files are in %BUILDDIR%/xml.
goto end
)
if "%1" == "pseudoxml" (
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
goto end
)
if "%1" == "dummy" (
%SPHINXBUILD% -b dummy %ALLSPHINXOPTS% %BUILDDIR%/dummy
if errorlevel 1 exit /b 1
echo.
echo.Build finished. Dummy builder generates no files.
goto end
)
:end

BIN
docs/screenshot-components.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 232 KiB

View File

@@ -0,0 +1,45 @@
"""
Sphinx extension to add ReadTheDocs-style "Edit on GitHub" links to the
sidebar.
Loosely based on https://github.com/astropy/astropy/pull/347
"""
import os
import warnings
__licence__ = 'BSD (3 clause)'
def get_github_url(app, view, path):
github_fmt = 'https://github.com/{}/{}/{}/{}{}'
return (
github_fmt.format(app.config.edit_on_github_project, view,
app.config.edit_on_github_branch,
app.config.edit_on_github_src_path, path))
def html_page_context(app, pagename, templatename, context, doctree):
if templatename != 'page.html':
return
if not app.config.edit_on_github_project:
warnings.warn("edit_on_github_project not specified")
return
if not doctree:
warnings.warn("doctree is None")
return
path = os.path.relpath(doctree.get('source'), app.builder.srcdir)
show_url = get_github_url(app, 'blob', path)
edit_url = get_github_url(app, 'edit', path)
context['show_on_github_url'] = show_url
context['edit_on_github_url'] = edit_url
def setup(app):
app.add_config_value('edit_on_github_project', '', True)
app.add_config_value('edit_on_github_branch', 'master', True)
app.add_config_value('edit_on_github_src_path', '', True) # 'eg' "docs/"
app.connect('html-page-context', html_page_context)

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,6 @@
<ul>
<li><a href="https://home-assistant.io/">Homepage</a></li>
<li><a href="https://community.home-assistant.io">Community Forums</a></li>
<li><a href="https://github.com/home-assistant/home-assistant">GitHub</a></li>
<li><a href="https://gitter.im/home-assistant/home-assistant">Gitter</a></li>
</ul>

View File

@@ -0,0 +1,13 @@
{%- if show_source and has_source and sourcename %}
<h3>{{ _('This Page') }}</h3>
<ul class="this-page-menu">
{%- if show_on_github_url %}
<li><a href="{{ show_on_github_url }}"
rel="nofollow">{{ _('Show on GitHub') }}</a></li>
{%- endif %}
{%- if edit_on_github_url %}
<li><a href="{{ edit_on_github_url }}"
rel="nofollow">{{ _('Edit on GitHub') }}</a></li>
{%- endif %}
</ul>
{%- endif %}

View File

@@ -0,0 +1,7 @@
.. _bootstrap_module:
:mod:`homeassistant.bootstrap`
-------------------------
.. automodule:: homeassistant.bootstrap
:members:

38
docs/source/api/core.rst Normal file
View File

@@ -0,0 +1,38 @@
.. _core_module:
:mod:`homeassistant.core`
-------------------------
.. automodule:: homeassistant.core
.. autoclass:: Config
:members:
.. autoclass:: Event
:members:
.. autoclass:: EventBus
:members:
.. autoclass:: HomeAssistant
:members:
.. autoclass:: State
:members:
.. autoclass:: StateMachine
:members:
.. autoclass:: ServiceCall
:members:
.. autoclass:: ServiceRegistry
:members:
Module contents
---------------
.. automodule:: homeassistant.core
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,10 @@
.. _components_device_tracker_module:
:mod:`homeassistant.components.device_tracker`
----------------------------------------------
.. automodule:: homeassistant.components.device_tracker
:members:
.. autoclass:: Device
:members:

View File

@@ -0,0 +1,12 @@
.. _helpers_entity_module:
:mod:`homeassistant.helpers.entity`
-----------------------------------
.. automodule:: homeassistant.helpers.entity
.. autoclass:: Entity
:members:
.. autoclass:: ToggleEntity
:members:

20
docs/source/api/event.rst Normal file
View File

@@ -0,0 +1,20 @@
.. _helpers_event_module:
:mod:`homeassistant.helpers.event`
----------------------------------
.. automodule:: homeassistant.helpers.event
.. autofunction:: track_state_change
.. autofunction:: track_point_in_time
.. autofunction:: track_point_in_utc_time
.. autofunction:: track_sunrise
.. autofunction:: track_sunset
.. autofunction:: track_utc_time_change
.. autofunction:: track_time_change

118
docs/source/api/helpers.rst Normal file
View File

@@ -0,0 +1,118 @@
homeassistant.helpers package
=============================
Submodules
----------
homeassistant.helpers.condition module
--------------------------------------
.. automodule:: homeassistant.helpers.condition
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.config_validation module
----------------------------------------------
.. automodule:: homeassistant.helpers.config_validation
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.discovery module
--------------------------------------
.. automodule:: homeassistant.helpers.discovery
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.entity module
-----------------------------------
.. automodule:: homeassistant.helpers.entity
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.entity_component module
---------------------------------------------
.. automodule:: homeassistant.helpers.entity_component
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.event module
----------------------------------
.. automodule:: homeassistant.helpers.event
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.event_decorators module
---------------------------------------------
.. automodule:: homeassistant.helpers.event_decorators
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.location module
-------------------------------------
.. automodule:: homeassistant.helpers.location
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.script module
-----------------------------------
.. automodule:: homeassistant.helpers.script
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.service module
------------------------------------
.. automodule:: homeassistant.helpers.service
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.state module
----------------------------------
.. automodule:: homeassistant.helpers.state
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.template module
-------------------------------------
.. automodule:: homeassistant.helpers.template
:members:
:undoc-members:
:show-inheritance:
homeassistant.helpers.typing module
-----------------------------------
.. automodule:: homeassistant.helpers.typing
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: homeassistant.helpers
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,78 @@
homeassistant package
=====================
Subpackages
-----------
.. toctree::
helpers
util
Submodules
----------
bootstrap module
------------------------------
.. automodule:: homeassistant.bootstrap
:members:
:undoc-members:
:show-inheritance:
config module
---------------------------
.. automodule:: homeassistant.config
:members:
:undoc-members:
:show-inheritance:
const module
--------------------------
.. automodule:: homeassistant.const
:members:
:undoc-members:
:show-inheritance:
core module
-------------------------
.. automodule:: homeassistant.core
:members:
:undoc-members:
:show-inheritance:
exceptions module
-------------------------------
.. automodule:: homeassistant.exceptions
:members:
:undoc-members:
:show-inheritance:
loader module
---------------------------
.. automodule:: homeassistant.loader
:members:
:undoc-members:
:show-inheritance:
remote module
---------------------------
.. automodule:: homeassistant.remote
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: homeassistant
:members:
:undoc-members:
:show-inheritance:

86
docs/source/api/util.rst Normal file
View File

@@ -0,0 +1,86 @@
homeassistant.util package
==========================
Submodules
----------
homeassistant.util.async module
-------------------------------
.. automodule:: homeassistant.util.async
:members:
:undoc-members:
:show-inheritance:
homeassistant.util.color module
-------------------------------
.. automodule:: homeassistant.util.color
:members:
:undoc-members:
:show-inheritance:
homeassistant.util.distance module
----------------------------------
.. automodule:: homeassistant.util.distance
:members:
:undoc-members:
:show-inheritance:
homeassistant.util.dt module
----------------------------
.. automodule:: homeassistant.util.dt
:members:
:undoc-members:
:show-inheritance:
homeassistant.util.location module
----------------------------------
.. automodule:: homeassistant.util.location
:members:
:undoc-members:
:show-inheritance:
homeassistant.util.package module
---------------------------------
.. automodule:: homeassistant.util.package
:members:
:undoc-members:
:show-inheritance:
homeassistant.util.temperature module
-------------------------------------
.. automodule:: homeassistant.util.temperature
:members:
:undoc-members:
:show-inheritance:
homeassistant.util.unit_system module
-------------------------------------
.. automodule:: homeassistant.util.unit_system
:members:
:undoc-members:
:show-inheritance:
homeassistant.util.yaml module
------------------------------
.. automodule:: homeassistant.util.yaml
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: homeassistant.util
:members:
:undoc-members:
:show-inheritance:

419
docs/source/conf.py Normal file
View File

@@ -0,0 +1,419 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Home-Assistant documentation build configuration file, created by
# sphinx-quickstart on Sun Aug 28 13:13:10 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import sys
import os
from os.path import relpath
import inspect
from homeassistant.const import (__version__, __short_version__, PROJECT_NAME,
PROJECT_LONG_DESCRIPTION,
PROJECT_COPYRIGHT, PROJECT_AUTHOR,
PROJECT_GITHUB_USERNAME,
PROJECT_GITHUB_REPOSITORY,
GITHUB_PATH, GITHUB_URL)
sys.path.insert(0, os.path.abspath('_ext'))
sys.path.insert(0, os.path.abspath('../homeassistant'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.linkcode',
'sphinx_autodoc_annotation',
'edit_on_github'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The encoding of source files.
#
# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = PROJECT_NAME
copyright = PROJECT_COPYRIGHT
author = PROJECT_AUTHOR
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = __short_version__
# The full version, including alpha/beta/rc tags.
release = __version__
code_branch = 'dev' if 'dev' in __version__ else 'master'
# Edit on Github config
edit_on_github_project = GITHUB_PATH
edit_on_github_branch = code_branch
edit_on_github_src_path = 'docs/source/'
def linkcode_resolve(domain, info):
"""
Determine the URL corresponding to Python object
"""
if domain != 'py':
return None
modname = info['module']
fullname = info['fullname']
submod = sys.modules.get(modname)
if submod is None:
return None
obj = submod
for part in fullname.split('.'):
try:
obj = getattr(obj, part)
except:
return None
try:
fn = inspect.getsourcefile(obj)
except:
fn = None
if not fn:
return None
try:
source, lineno = inspect.findsource(obj)
except:
lineno = None
if lineno:
linespec = "#L%d" % (lineno + 1)
else:
linespec = ""
fn = relpath(fn, start='../')
return '{}/blob/{}/{}{}'.format(GITHUB_URL, code_branch, fn, linespec)
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#
# today = ''
#
# Else, today_fmt is used as the format for a strftime call.
#
# today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = []
# The reST default role (used for this markup: `text`) to use for all
# documents.
#
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#
# add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
html_theme_options = {
'logo': 'logo.png',
'logo_name': PROJECT_NAME,
'description': PROJECT_LONG_DESCRIPTION,
'github_user': PROJECT_GITHUB_USERNAME,
'github_repo': PROJECT_GITHUB_REPOSITORY,
'github_type': 'star',
'github_banner': True,
'travis_button': True,
'touch_icon': 'logo-apple.png',
# 'fixed_sidebar': True, # Re-enable when we have more content
}
# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#
# html_title = 'Home-Assistant v0.27.0'
# A shorter title for the navigation bar. Default is the same as html_title.
#
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#
# html_logo = '_static/logo.png'
# The name of an image file (relative to this directory) to use as a favicon of
# the docs.
# This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#
html_favicon = '_static/favicon.ico'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#
# html_extra_path = []
# If not None, a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
# The empty string is equivalent to '%b %d, %Y'.
#
html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#
html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#
html_sidebars = {
'**': [
'about.html',
'links.html',
'searchbox.html',
'sourcelink.html',
'navigation.html',
'relations.html'
]
}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#
# html_additional_pages = {}
# If false, no module index is generated.
#
# html_domain_indices = True
# If false, no index is generated.
#
# html_use_index = True
# If true, the index is split into individual pages for each letter.
#
# html_split_index = False
# If true, links to the reST sources are added to the pages.
#
# html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#
# html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#
# html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#
# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
#
# html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# 'ja' uses this config value.
# 'zh' user can custom change `jieba` dictionary path.
#
# html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#
# html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'Home-Assistantdoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'home-assistant.tex', 'Home Assistant Documentation',
'Home Assistant Team', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#
# latex_use_parts = False
# If true, show page references after internal links.
#
# latex_show_pagerefs = False
# If true, show URL addresses after external links.
#
# latex_show_urls = False
# Documents to append as an appendix to all manuals.
#
# latex_appendices = []
# It false, will not define \strong, \code, itleref, \crossref ... but only
# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
# packages.
#
# latex_keep_old_macro_names = True
# If false, no module index is generated.
#
# latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'home-assistant', 'Home Assistant Documentation',
[author], 1)
]
# If true, show URL addresses after external links.
#
# man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'Home-Assistant', 'Home Assistant Documentation',
author, 'Home Assistant', 'Open-source home automation platform.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#
# texinfo_appendices = []
# If false, no module index is generated.
#
# texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#
# texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#
# texinfo_no_detailmenu = False

22
docs/source/index.rst Normal file
View File

@@ -0,0 +1,22 @@
================================
Home Assistant API Documentation
================================
Public API documentation for `Home Assistant developers`_.
Contents:
.. toctree::
:maxdepth: 2
:glob:
api/*
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
.. _Home Assistant developers: https://home-assistant.io/developers/

606
docs/swagger.yaml Normal file
View File

@@ -0,0 +1,606 @@
swagger: '2.0'
info:
title: Home Assistant
description: Home Assistant REST API
version: "1.0.1"
# the domain of the service
host: localhost:8123
# array of all schemes that your API supports
schemes:
- http
- https
securityDefinitions:
#api_key:
# type: apiKey
# description: API password
# name: api_password
# in: query
api_key:
type: apiKey
description: API password
name: x-ha-access
in: header
# will be prefixed to all paths
basePath: /api
consumes:
- application/json
produces:
- application/json
paths:
/:
get:
summary: API alive message
description: Returns message if API is up and running.
tags:
- Core
security:
- api_key: []
responses:
200:
description: API is up and running
schema:
$ref: '#/definitions/Message'
default:
description: Error
schema:
$ref: '#/definitions/Message'
/config:
get:
summary: API alive message
description: Returns the current configuration as JSON.
tags:
- Core
security:
- api_key: []
responses:
200:
description: Current configuration
schema:
$ref: '#/definitions/ApiConfig'
default:
description: Error
schema:
$ref: '#/definitions/Message'
/discovery_info:
get:
summary: Basic information about Home Assistant instance
tags:
- Core
responses:
200:
description: Basic information
schema:
$ref: '#/definitions/DiscoveryInfo'
default:
description: Error
schema:
$ref: '#/definitions/Message'
/bootstrap:
get:
summary: Returns all data needed to bootstrap Home Assistant.
tags:
- Core
security:
- api_key: []
responses:
200:
description: Bootstrap information
schema:
$ref: '#/definitions/BootstrapInfo'
default:
description: Error
schema:
$ref: '#/definitions/Message'
/events:
get:
summary: Array of event objects.
description: Returns an array of event objects. Each event object contain event name and listener count.
tags:
- Events
security:
- api_key: []
responses:
200:
description: Events
schema:
type: array
items:
$ref: '#/definitions/Event'
default:
description: Error
schema:
$ref: '#/definitions/Message'
/services:
get:
summary: Array of service objects.
description: Returns an array of service objects. Each object contains the domain and which services it contains.
tags:
- Services
security:
- api_key: []
responses:
200:
description: Services
schema:
type: array
items:
$ref: '#/definitions/Service'
default:
description: Error
schema:
$ref: '#/definitions/Message'
/history:
get:
summary: Array of state changes in the past.
description: Returns an array of state changes in the past. Each object contains further detail for the entities.
tags:
- State
security:
- api_key: []
responses:
200:
description: State changes
schema:
type: array
items:
$ref: '#/definitions/History'
default:
description: Error
schema:
$ref: '#/definitions/Message'
/states:
get:
summary: Array of state objects.
description: |
Returns an array of state objects. Each state has the following attributes: entity_id, state, last_changed and attributes.
tags:
- State
security:
- api_key: []
responses:
200:
description: States
schema:
type: array
items:
$ref: '#/definitions/State'
default:
description: Error
schema:
$ref: '#/definitions/Message'
/states/{entity_id}:
get:
summary: Specific state object.
description: |
Returns a state object for specified entity_id.
tags:
- State
security:
- api_key: []
parameters:
- name: entity_id
in: path
description: entity_id of the entity to query
required: true
type: string
responses:
200:
description: State
schema:
$ref: '#/definitions/State'
404:
description: Not found
schema:
$ref: '#/definitions/Message'
default:
description: Error
schema:
$ref: '#/definitions/Message'
post:
description: |
Updates or creates the current state of an entity.
tags:
- State
consumes:
- application/json
parameters:
- name: entity_id
in: path
description: entity_id to set the state of
required: true
type: string
- $ref: '#/parameters/State'
responses:
200:
description: State of existing entity was set
schema:
$ref: '#/definitions/State'
201:
description: State of new entity was set
schema:
$ref: '#/definitions/State'
headers:
location:
type: string
description: location of the new entity
default:
description: Error
schema:
$ref: '#/definitions/Message'
/error_log:
get:
summary: Error log
description: |
Retrieve all errors logged during the current session of Home Assistant as a plaintext response.
tags:
- Core
security:
- api_key: []
produces:
- text/plain
responses:
200:
description: Plain text error log
default:
description: Error
schema:
$ref: '#/definitions/Message'
/camera_proxy/camera.{entity_id}:
get:
summary: Camera image.
description: |
Returns the data (image) from the specified camera entity_id.
tags:
- Camera
security:
- api_key: []
produces:
- image/jpeg
parameters:
- name: entity_id
in: path
description: entity_id of the camera to query
required: true
type: string
responses:
200:
description: Camera image
schema:
type: file
default:
description: Error
schema:
$ref: '#/definitions/Message'
/events/{event_type}:
post:
description: |
Fires an event with event_type
tags:
- Events
security:
- api_key: []
consumes:
- application/json
parameters:
- name: event_type
in: path
description: event_type to fire event with
required: true
type: string
- $ref: '#/parameters/EventData'
responses:
200:
description: Response message
schema:
$ref: '#/definitions/Message'
default:
description: Error
schema:
$ref: '#/definitions/Message'
/services/{domain}/{service}:
post:
description: |
Calls a service within a specific domain. Will return when the service has been executed or 10 seconds has past, whichever comes first.
tags:
- Services
security:
- api_key: []
consumes:
- application/json
parameters:
- name: domain
in: path
description: domain of the service
required: true
type: string
- name: service
in: path
description: service to call
required: true
type: string
- $ref: '#/parameters/ServiceData'
responses:
200:
description: List of states that have changed while the service was being executed. The result will include any changed states that changed while the service was being executed, even if their change was the result of something else happening in the system.
schema:
type: array
items:
$ref: '#/definitions/State'
default:
description: Error
schema:
$ref: '#/definitions/Message'
/template:
post:
description: |
Render a Home Assistant template.
tags:
- Template
security:
- api_key: []
consumes:
- application/json
produces:
- text/plain
parameters:
- $ref: '#/parameters/Template'
responses:
200:
description: Returns the rendered template in plain text.
schema:
type: string
default:
description: Error
schema:
$ref: '#/definitions/Message'
/event_forwarding:
post:
description: |
Setup event forwarding to another Home Assistant instance.
tags:
- Core
security:
- api_key: []
consumes:
- application/json
parameters:
- $ref: '#/parameters/EventForwarding'
responses:
200:
description: It will return a message if event forwarding was setup successful.
schema:
$ref: '#/definitions/Message'
default:
description: Error
schema:
$ref: '#/definitions/Message'
delete:
description: |
Cancel event forwarding to another Home Assistant instance.
tags:
- Core
consumes:
- application/json
parameters:
- $ref: '#/parameters/EventForwarding'
responses:
200:
description: It will return a message if event forwarding was cancelled successful.
schema:
$ref: '#/definitions/Message'
default:
description: Error
schema:
$ref: '#/definitions/Message'
/stream:
get:
summary: Server-sent events
description: The server-sent events feature is a one-way channel from your Home Assistant server to a client which is acting as a consumer.
tags:
- Core
- Events
security:
- api_key: []
produces:
- text/event-stream
parameters:
- name: restrict
in: query
description: comma-separated list of event_types to filter
required: false
type: string
responses:
default:
description: Stream of events
schema:
type: object
x-events:
state_changed:
type: object
properties:
entity_id:
type: string
old_state:
$ref: '#/definitions/State'
new_state:
$ref: '#/definitions/State'
definitions:
ApiConfig:
type: object
properties:
components:
type: array
description: List of component types
items:
type: string
description: Component type
latitude:
type: number
format: float
description: Latitude of Home Assistant server
longitude:
type: number
format: float
description: Longitude of Home Assistant server
location_name:
type: string
unit_system:
type: object
properties:
length:
type: string
mass:
type: string
temperature:
type: string
volume:
type: string
time_zone:
type: string
version:
type: string
DiscoveryInfo:
type: object
properties:
base_url:
type: string
location_name:
type: string
requires_api_password:
type: boolean
version:
type: string
BootstrapInfo:
type: object
properties:
config:
$ref: '#/definitions/ApiConfig'
events:
type: array
items:
$ref: '#/definitions/Event'
services:
type: array
items:
$ref: '#/definitions/Service'
states:
type: array
items:
$ref: '#/definitions/State'
Event:
type: object
properties:
event:
type: string
listener_count:
type: integer
Service:
type: object
properties:
domain:
type: string
services:
type: object
additionalProperties:
$ref: '#/definitions/DomainService'
DomainService:
type: object
properties:
description:
type: string
fields:
type: object
description: Object with service fields that can be called
State:
type: object
properties:
attributes:
$ref: '#/definitions/StateAttributes'
state:
type: string
entity_id:
type: string
last_changed:
type: string
format: date-time
StateAttributes:
type: object
additionalProperties:
type: string
History:
allOf:
- $ref: '#/definitions/State'
- type: object
properties:
last_updated:
type: string
format: date-time
Message:
type: object
properties:
message:
type: string
parameters:
State:
name: body
in: body
description: State parameter
required: false
schema:
type: object
required:
- state
properties:
attributes:
$ref: '#/definitions/StateAttributes'
state:
type: string
EventData:
name: body
in: body
description: event_data
required: false
schema:
type: object
ServiceData:
name: body
in: body
description: service_data
required: false
schema:
type: object
Template:
name: body
in: body
description: Template to render
required: true
schema:
type: object
required:
- template
properties:
template:
description: Jinja2 template string
type: string
EventForwarding:
name: body
in: body
description: Event Forwarding parameter
required: true
schema:
type: object
required:
- host
- api_password
properties:
host:
type: string
api_password:
type: string
port:
type: integer

View File

@@ -0,0 +1 @@
"""Init file for Home Assistant."""

View File

@@ -1,33 +1,53 @@
""" Starts home assistant. """
"""Start Home Assistant."""
from __future__ import print_function
import argparse
import os
import signal
import platform
import subprocess
import sys
import threading
import time
from multiprocessing import Process
import homeassistant.config as config_util
from homeassistant import bootstrap
from typing import Optional, List
from homeassistant import monkey_patch
from homeassistant.const import (
EVENT_HOMEASSISTANT_START, RESTART_EXIT_CODE, __version__)
__version__,
EVENT_HOMEASSISTANT_START,
REQUIRED_PYTHON_VER,
REQUIRED_PYTHON_VER_WIN,
RESTART_EXIT_CODE,
)
def validate_python():
""" Validate we're running the right Python version. """
major, minor = sys.version_info[:2]
def attempt_use_uvloop():
"""Attempt to use uvloop."""
import asyncio
if major < 3 or (major == 3 and minor < 4):
print("Home Assistant requires atleast Python 3.4")
try:
import uvloop
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
except ImportError:
pass
def validate_python() -> None:
"""Validate that the right Python version is running."""
if sys.platform == "win32" and \
sys.version_info[:3] < REQUIRED_PYTHON_VER_WIN:
print("Home Assistant requires at least Python {}.{}.{}".format(
*REQUIRED_PYTHON_VER_WIN))
sys.exit(1)
elif sys.version_info[:3] < REQUIRED_PYTHON_VER:
print("Home Assistant requires at least Python {}.{}.{}".format(
*REQUIRED_PYTHON_VER))
sys.exit(1)
def ensure_config_path(config_dir):
""" Validates configuration directory. """
lib_dir = os.path.join(config_dir, 'lib')
def ensure_config_path(config_dir: str) -> None:
"""Validate the configuration directory."""
import homeassistant.config as config_util
lib_dir = os.path.join(config_dir, 'deps')
# Test if configuration directory exists
if not os.path.isdir(config_dir):
@@ -53,8 +73,9 @@ def ensure_config_path(config_dir):
sys.exit(1)
def ensure_config_file(config_dir):
""" Ensure configuration file exists. """
def ensure_config_file(config_dir: str) -> str:
"""Ensure configuration file exists."""
import homeassistant.config as config_util
config_path = config_util.ensure_config_exists(config_dir)
if config_path is None:
@@ -64,8 +85,9 @@ def ensure_config_file(config_dir):
return config_path
def get_arguments():
""" Get parsed passed in arguments. """
def get_arguments() -> argparse.Namespace:
"""Get parsed passed in arguments."""
import homeassistant.config as config_util
parser = argparse.ArgumentParser(
description="Home Assistant: Observe, Control, Automate.")
parser.add_argument('--version', action='version', version=__version__)
@@ -81,8 +103,7 @@ def get_arguments():
parser.add_argument(
'--debug',
action='store_true',
help='Start Home Assistant in debug mode. Runs in single process to '
'enable use of interactive debuggers.')
help='Start Home Assistant in debug mode')
parser.add_argument(
'--open-ui',
action='store_true',
@@ -106,55 +127,64 @@ def get_arguments():
default=None,
help='Enables daily log rotation and keeps up to the specified days')
parser.add_argument(
'--install-osx',
'--runner',
action='store_true',
help='Installs as a service on OS X and loads on boot.')
help='On restart exit with code {}'.format(RESTART_EXIT_CODE))
parser.add_argument(
'--uninstall-osx',
action='store_true',
help='Uninstalls from OS X.')
parser.add_argument(
'--restart-osx',
action='store_true',
help='Restarts on OS X.')
if os.name != "nt":
'--script',
nargs=argparse.REMAINDER,
help='Run one of the embedded scripts')
if os.name == "posix":
parser.add_argument(
'--daemon',
action='store_true',
help='Run Home Assistant as daemon')
arguments = parser.parse_args()
if os.name == "nt":
arguments.daemon = False
if os.name != "posix" or arguments.debug or arguments.runner:
setattr(arguments, 'daemon', False)
return arguments
def daemonize():
""" Move current process to daemon process """
# create first fork
def daemonize() -> None:
"""Move current process to daemon process."""
# Create first fork
pid = os.fork()
if pid > 0:
sys.exit(0)
# decouple fork
# Decouple fork
os.setsid()
os.umask(0)
# create second fork
# Create second fork
pid = os.fork()
if pid > 0:
sys.exit(0)
# redirect standard file descriptors to devnull
infd = open(os.devnull, 'r')
outfd = open(os.devnull, 'a+')
sys.stdout.flush()
sys.stderr.flush()
os.dup2(infd.fileno(), sys.stdin.fileno())
os.dup2(outfd.fileno(), sys.stdout.fileno())
os.dup2(outfd.fileno(), sys.stderr.fileno())
def check_pid(pid_file):
""" Check that HA is not already running """
# check pid file
def check_pid(pid_file: str) -> None:
"""Check that Home Assistant is not already running."""
# Check pid file
try:
pid = int(open(pid_file, 'r').readline())
except IOError:
# PID File does not exist
return
# If we just restarted, we just found our own pidfile.
if pid == os.getpid():
return
try:
os.kill(pid, 0)
except OSError:
@@ -164,8 +194,8 @@ def check_pid(pid_file):
sys.exit(1)
def write_pid(pid_file):
""" Create PID File """
def write_pid(pid_file: str) -> None:
"""Create a PID File."""
pid = os.getpid()
try:
open(pid_file, 'w').write(str(pid))
@@ -174,138 +204,151 @@ def write_pid(pid_file):
sys.exit(1)
def install_osx():
""" Setup to run via launchd on OS X """
with os.popen('which hass') as inp:
hass_path = inp.read().strip()
def closefds_osx(min_fd: int, max_fd: int) -> None:
"""Make sure file descriptors get closed when we restart.
with os.popen('whoami') as inp:
user = inp.read().strip()
cwd = os.path.dirname(__file__)
template_path = os.path.join(cwd, 'startup', 'launchd.plist')
with open(template_path, 'r', encoding='utf-8') as inp:
plist = inp.read()
plist = plist.replace("$HASS_PATH$", hass_path)
plist = plist.replace("$USER$", user)
path = os.path.expanduser("~/Library/LaunchAgents/org.homeassistant.plist")
try:
with open(path, 'w', encoding='utf-8') as outp:
outp.write(plist)
except IOError as err:
print('Unable to write to ' + path, err)
return
os.popen('launchctl load -w -F ' + path)
print("Home Assistant has been installed. \
Open it here: http://localhost:8123")
def uninstall_osx():
""" Unload from launchd on OS X """
path = os.path.expanduser("~/Library/LaunchAgents/org.homeassistant.plist")
os.popen('launchctl unload ' + path)
print("Home Assistant has been uninstalled.")
def setup_and_run_hass(config_dir, args, top_process=False):
"""
Setup HASS and run. Block until stopped. Will assume it is running in a
subprocess unless top_process is set to true.
We cannot call close on guarded fds, and we cannot easily test which fds
are guarded. But we can set the close-on-exec flag on everything we want to
get rid of.
"""
from fcntl import fcntl, F_GETFD, F_SETFD, FD_CLOEXEC
for _fd in range(min_fd, max_fd):
try:
val = fcntl(_fd, F_GETFD)
if not val & FD_CLOEXEC:
fcntl(_fd, F_SETFD, val | FD_CLOEXEC)
except IOError:
pass
def cmdline() -> List[str]:
"""Collect path and arguments to re-execute the current hass instance."""
if sys.argv[0].endswith(os.path.sep + '__main__.py'):
modulepath = os.path.dirname(sys.argv[0])
os.environ['PYTHONPATH'] = os.path.dirname(modulepath)
return [sys.executable] + [arg for arg in sys.argv if
arg != '--daemon']
return [arg for arg in sys.argv if arg != '--daemon']
def setup_and_run_hass(config_dir: str,
args: argparse.Namespace) -> Optional[int]:
"""Set up HASS and run."""
from homeassistant import bootstrap
# Run a simple daemon runner process on Windows to handle restarts
if os.name == 'nt' and '--runner' not in sys.argv:
nt_args = cmdline() + ['--runner']
while True:
try:
subprocess.check_call(nt_args)
sys.exit(0)
except subprocess.CalledProcessError as exc:
if exc.returncode != RESTART_EXIT_CODE:
sys.exit(exc.returncode)
if args.demo_mode:
config = {
'frontend': {},
'demo': {}
}
hass = bootstrap.from_config_dict(
config, config_dir=config_dir, daemon=args.daemon,
verbose=args.verbose, skip_pip=args.skip_pip,
log_rotate_days=args.log_rotate_days)
config, config_dir=config_dir, verbose=args.verbose,
skip_pip=args.skip_pip, log_rotate_days=args.log_rotate_days)
else:
config_file = ensure_config_file(config_dir)
print('Config directory:', config_dir)
hass = bootstrap.from_config_file(
config_file, daemon=args.daemon, verbose=args.verbose,
skip_pip=args.skip_pip, log_rotate_days=args.log_rotate_days)
config_file, verbose=args.verbose, skip_pip=args.skip_pip,
log_rotate_days=args.log_rotate_days)
if hass is None:
return None
if args.open_ui:
# Imported here to avoid importing asyncio before monkey patch
from homeassistant.util.async import run_callback_threadsafe
def open_browser(event):
""" Open the webinterface in a browser. """
"""Open the webinterface in a browser."""
if hass.config.api is not None:
import webbrowser
webbrowser.open(hass.config.api.base_url)
hass.bus.listen_once(EVENT_HOMEASSISTANT_START, open_browser)
run_callback_threadsafe(
hass.loop,
hass.bus.async_listen_once,
EVENT_HOMEASSISTANT_START, open_browser
)
hass.start()
exit_code = int(hass.block_till_stopped())
if not top_process:
sys.exit(exit_code)
return exit_code
return hass.start()
def run_hass_process(hass_proc):
""" Runs a child hass process. Returns True if it should be restarted. """
requested_stop = threading.Event()
hass_proc.daemon = True
def request_stop(*args):
""" request hass stop, *args is for signal handler callback """
requested_stop.set()
hass_proc.terminate()
def try_to_restart() -> None:
"""Attempt to clean up state and start a new Home Assistant instance."""
# Things should be mostly shut down already at this point, now just try
# to clean up things that may have been left behind.
sys.stderr.write('Home Assistant attempting to restart.\n')
# Count remaining threads, ideally there should only be one non-daemonized
# thread left (which is us). Nothing we really do with it, but it might be
# useful when debugging shutdown/restart issues.
try:
signal.signal(signal.SIGTERM, request_stop)
nthreads = sum(thread.is_alive() and not thread.daemon
for thread in threading.enumerate())
if nthreads > 1:
sys.stderr.write(
"Found {} non-daemonic threads.\n".format(nthreads))
# Somehow we sometimes seem to trigger an assertion in the python threading
# module. It seems we find threads that have no associated OS level thread
# which are not marked as stopped at the python level.
except AssertionError:
sys.stderr.write("Failed to count non-daemonic threads.\n")
# Try to not leave behind open filedescriptors with the emphasis on try.
try:
max_fd = os.sysconf("SC_OPEN_MAX")
except ValueError:
print('Could not bind to SIGTERM. Are you running in a thread?')
max_fd = 256
hass_proc.start()
try:
hass_proc.join()
except KeyboardInterrupt:
request_stop()
try:
hass_proc.join()
except KeyboardInterrupt:
return False
if platform.system() == 'Darwin':
closefds_osx(3, max_fd)
else:
os.closerange(3, max_fd)
return (not requested_stop.isSet() and
hass_proc.exitcode == RESTART_EXIT_CODE,
hass_proc.exitcode)
# Now launch into a new instance of Home Assistant. If this fails we
# fall through and exit with error 100 (RESTART_EXIT_CODE) in which case
# systemd will restart us when RestartForceExitStatus=100 is set in the
# systemd.service file.
sys.stderr.write("Restarting Home Assistant\n")
args = cmdline()
os.execv(args[0], args)
def main():
""" Starts Home Assistant. """
def main() -> int:
"""Start Home Assistant."""
validate_python()
if os.environ.get('HASS_NO_MONKEY') != '1':
if sys.version_info[:2] >= (3, 6):
monkey_patch.disable_c_asyncio()
monkey_patch.patch_weakref_tasks()
attempt_use_uvloop()
args = get_arguments()
if args.script is not None:
from homeassistant import scripts
return scripts.run(args.script)
config_dir = os.path.join(os.getcwd(), args.config)
ensure_config_path(config_dir)
# os x launchd functions
if args.install_osx:
install_osx()
return 0
if args.uninstall_osx:
uninstall_osx()
return 0
if args.restart_osx:
uninstall_osx()
# A small delay is needed on some systems to let the unload finish.
time.sleep(0.5)
install_osx()
return 0
# daemon functions
# Daemon functions
if args.pid_file:
check_pid(args.pid_file)
if args.daemon:
@@ -313,21 +356,10 @@ def main():
if args.pid_file:
write_pid(args.pid_file)
# Run hass in debug mode if requested
if args.debug:
sys.stderr.write('Running in debug mode. '
'Home Assistant will not be able to restart.\n')
exit_code = setup_and_run_hass(config_dir, args, top_process=True)
if exit_code == RESTART_EXIT_CODE:
sys.stderr.write('Home Assistant requested a '
'restart in debug mode.\n')
return exit_code
exit_code = setup_and_run_hass(config_dir, args)
if exit_code == RESTART_EXIT_CODE and not args.runner:
try_to_restart()
# Run hass as child process. Restart if necessary.
keep_running = True
while keep_running:
hass_proc = Process(target=setup_and_run_hass, args=(config_dir, args))
keep_running, exit_code = run_hass_process(hass_proc)
return exit_code

View File

@@ -1,173 +1,46 @@
"""Provides methods to bootstrap a home assistant instance."""
"""Provide methods to bootstrap a Home Assistant instance."""
import asyncio
import logging
import logging.handlers
import os
import shutil
import sys
from collections import defaultdict
from threading import RLock
from time import time
from collections import OrderedDict
from typing import Any, Optional, Dict
import voluptuous as vol
import homeassistant.components as core_components
import homeassistant.components.group as group
import homeassistant.config as config_util
from homeassistant.components import persistent_notification
import homeassistant.config as conf_util
import homeassistant.core as core
from homeassistant.const import EVENT_HOMEASSISTANT_CLOSE
from homeassistant.setup import async_setup_component
import homeassistant.loader as loader
import homeassistant.util.dt as date_util
import homeassistant.util.location as loc_util
import homeassistant.util.package as pkg_util
from homeassistant.const import (
CONF_CUSTOMIZE, CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME,
CONF_TEMPERATURE_UNIT, CONF_TIME_ZONE, EVENT_COMPONENT_LOADED,
TEMP_CELCIUS, TEMP_FAHRENHEIT, __version__)
from homeassistant.helpers import event_decorators, service
from homeassistant.helpers.entity import Entity
from homeassistant.util.logging import AsyncHandler
from homeassistant.util.package import async_get_user_site, get_user_site
from homeassistant.util.yaml import clear_secret_cache
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.signal import async_register_signal_handling
_LOGGER = logging.getLogger(__name__)
_SETUP_LOCK = RLock()
_CURRENT_SETUP = []
ATTR_COMPONENT = 'component'
PLATFORM_FORMAT = '{}.{}'
ERROR_LOG_FILENAME = 'home-assistant.log'
FIRST_INIT_COMPONENT = set((
'recorder', 'mqtt', 'mqtt_eventstream', 'logger', 'introduction',
'frontend', 'history'))
def setup_component(hass, domain, config=None):
""" Setup a component and all its dependencies. """
if domain in hass.config.components:
return True
_ensure_loader_prepared(hass)
if config is None:
config = defaultdict(dict)
components = loader.load_order_component(domain)
# OrderedSet is empty if component or dependencies could not be resolved
if not components:
return False
for component in components:
if not _setup_component(hass, component, config):
return False
return True
def _handle_requirements(hass, component, name):
""" Installs requirements for component. """
if hass.config.skip_pip or not hasattr(component, 'REQUIREMENTS'):
return True
for req in component.REQUIREMENTS:
if not pkg_util.install_package(req, target=hass.config.path('lib')):
_LOGGER.error('Not initializing %s because could not install '
'dependency %s', name, req)
return False
return True
def _setup_component(hass, domain, config):
"""Setup a component for Home Assistant."""
# pylint: disable=too-many-return-statements
if domain in hass.config.components:
return True
with _SETUP_LOCK:
# It might have been loaded while waiting for lock
if domain in hass.config.components:
return True
if domain in _CURRENT_SETUP:
_LOGGER.error('Attempt made to setup %s during setup of %s',
domain, domain)
return False
component = loader.get_component(domain)
missing_deps = [dep for dep in getattr(component, 'DEPENDENCIES', [])
if dep not in hass.config.components]
if missing_deps:
_LOGGER.error(
'Not initializing %s because not all dependencies loaded: %s',
domain, ", ".join(missing_deps))
return False
if not _handle_requirements(hass, component, domain):
return False
_CURRENT_SETUP.append(domain)
try:
if not component.setup(hass, config):
_LOGGER.error('component %s failed to initialize', domain)
return False
except Exception: # pylint: disable=broad-except
_LOGGER.exception('Error during setup of component %s', domain)
return False
finally:
_CURRENT_SETUP.remove(domain)
hass.config.components.append(component.DOMAIN)
# Assumption: if a component does not depend on groups
# it communicates with devices
if group.DOMAIN not in getattr(component, 'DEPENDENCIES', []):
hass.pool.add_worker()
hass.bus.fire(
EVENT_COMPONENT_LOADED, {ATTR_COMPONENT: component.DOMAIN})
return True
def prepare_setup_platform(hass, config, domain, platform_name):
""" Loads a platform and makes sure dependencies are setup. """
_ensure_loader_prepared(hass)
platform_path = PLATFORM_FORMAT.format(domain, platform_name)
platform = loader.get_component(platform_path)
# Not found
if platform is None:
_LOGGER.error('Unable to find platform %s', platform_path)
return None
# Already loaded
elif platform_path in hass.config.components:
return platform
# Load dependencies
for component in getattr(platform, 'DEPENDENCIES', []):
if not setup_component(hass, component, config):
_LOGGER.error(
'Unable to prepare setup for platform %s because '
'dependency %s could not be initialized', platform_path,
component)
return None
if not _handle_requirements(hass, platform, platform_path):
return None
return platform
def mount_local_lib_path(config_dir):
""" Add local library to Python Path """
sys.path.insert(0, os.path.join(config_dir, 'lib'))
# pylint: disable=too-many-branches, too-many-statements, too-many-arguments
def from_config_dict(config, hass=None, config_dir=None, enable_log=True,
verbose=False, daemon=False, skip_pip=False,
log_rotate_days=None):
"""
Tries to configure Home Assistant from a config dict.
def from_config_dict(config: Dict[str, Any],
hass: Optional[core.HomeAssistant]=None,
config_dir: Optional[str]=None,
enable_log: bool=True,
verbose: bool=False,
skip_pip: bool=False,
log_rotate_days: Any=None) \
-> Optional[core.HomeAssistant]:
"""Try to configure Home Assistant from a configuration dictionary.
Dynamically loads required components and its dependencies.
"""
@@ -176,96 +49,194 @@ def from_config_dict(config, hass=None, config_dir=None, enable_log=True,
if config_dir is not None:
config_dir = os.path.abspath(config_dir)
hass.config.config_dir = config_dir
mount_local_lib_path(config_dir)
hass.loop.run_until_complete(
async_mount_local_lib_path(config_dir, hass.loop))
process_ha_config_upgrade(hass)
process_ha_core_config(hass, config.get(core.DOMAIN, {}))
# run task
hass = hass.loop.run_until_complete(
async_from_config_dict(
config, hass, config_dir, enable_log, verbose, skip_pip,
log_rotate_days)
)
return hass
@asyncio.coroutine
def async_from_config_dict(config: Dict[str, Any],
hass: core.HomeAssistant,
config_dir: Optional[str]=None,
enable_log: bool=True,
verbose: bool=False,
skip_pip: bool=False,
log_rotate_days: Any=None) \
-> Optional[core.HomeAssistant]:
"""Try to configure Home Assistant from a configuration dictionary.
Dynamically loads required components and its dependencies.
This method is a coroutine.
"""
start = time()
core_config = config.get(core.DOMAIN, {})
try:
yield from conf_util.async_process_ha_core_config(hass, core_config)
except vol.Invalid as ex:
conf_util.async_log_exception(ex, 'homeassistant', core_config, hass)
return None
yield from hass.async_add_job(conf_util.process_ha_config_upgrade, hass)
if enable_log:
enable_logging(hass, verbose, daemon, log_rotate_days)
async_enable_logging(hass, verbose, log_rotate_days)
hass.config.skip_pip = skip_pip
if skip_pip:
_LOGGER.warning('Skipping pip installation of required modules. '
'This may cause issues.')
_LOGGER.warning("Skipping pip installation of required modules. "
"This may cause issues")
_ensure_loader_prepared(hass)
if not loader.PREPARED:
yield from hass.async_add_job(loader.prepare, hass)
# Merge packages
conf_util.merge_packages_config(
config, core_config.get(conf_util.CONF_PACKAGES, {}))
# Make a copy because we are mutating it.
# Convert it to defaultdict so components can always have config dict
# Use OrderedDict in case original one was one.
# Convert values to dictionaries if they are None
config = defaultdict(
dict, {key: value or {} for key, value in config.items()})
new_config = OrderedDict()
for key, value in config.items():
new_config[key] = value or {}
config = new_config
# Filter out the repeating and common config section [homeassistant]
components = set(key.split(' ')[0] for key in config.keys()
if key != core.DOMAIN)
if not core_components.setup(hass, config):
_LOGGER.error('Home Assistant core failed to initialize. '
'Further initialization aborted.')
# setup components
# pylint: disable=not-an-iterable
res = yield from core_components.async_setup(hass, config)
if not res:
_LOGGER.error("Home Assistant core failed to initialize. "
"further initialization aborted")
return hass
_LOGGER.info('Home Assistant core initialized')
yield from persistent_notification.async_setup(hass, config)
# give event decorators access to HASS
event_decorators.HASS = hass
service.HASS = hass
_LOGGER.info("Home Assistant core initialized")
# Setup the components
for domain in loader.load_order_components(components):
_setup_component(hass, domain, config)
# stage 1
for component in components:
if component not in FIRST_INIT_COMPONENT:
continue
hass.async_add_job(async_setup_component(hass, component, config))
yield from hass.async_block_till_done()
# stage 2
for component in components:
if component in FIRST_INIT_COMPONENT:
continue
hass.async_add_job(async_setup_component(hass, component, config))
yield from hass.async_block_till_done()
stop = time()
_LOGGER.info("Home Assistant initialized in %.2fs", stop-start)
async_register_signal_handling(hass)
return hass
def from_config_file(config_path, hass=None, verbose=False, daemon=False,
skip_pip=True, log_rotate_days=None):
"""
Reads the configuration file and tries to start all the required
functionality. Will add functionality to 'hass' parameter if given,
def from_config_file(config_path: str,
hass: Optional[core.HomeAssistant]=None,
verbose: bool=False,
skip_pip: bool=True,
log_rotate_days: Any=None):
"""Read the configuration file and try to start all the functionality.
Will add functionality to 'hass' parameter if given,
instantiates a new Home Assistant object if 'hass' is not given.
"""
if hass is None:
hass = core.HomeAssistant()
# run task
hass = hass.loop.run_until_complete(
async_from_config_file(
config_path, hass, verbose, skip_pip, log_rotate_days)
)
return hass
@asyncio.coroutine
def async_from_config_file(config_path: str,
hass: core.HomeAssistant,
verbose: bool=False,
skip_pip: bool=True,
log_rotate_days: Any=None):
"""Read the configuration file and try to start all the functionality.
Will add functionality to 'hass' parameter.
This method is a coroutine.
"""
# Set config dir to directory holding config file
config_dir = os.path.abspath(os.path.dirname(config_path))
hass.config.config_dir = config_dir
mount_local_lib_path(config_dir)
yield from async_mount_local_lib_path(config_dir, hass.loop)
enable_logging(hass, verbose, daemon, log_rotate_days)
async_enable_logging(hass, verbose, log_rotate_days)
config_dict = config_util.load_yaml_config_file(config_path)
try:
config_dict = yield from hass.async_add_job(
conf_util.load_yaml_config_file, config_path)
except HomeAssistantError as err:
_LOGGER.error("Error loading %s: %s", config_path, err)
return None
finally:
clear_secret_cache()
return from_config_dict(config_dict, hass, enable_log=False,
skip_pip=skip_pip)
hass = yield from async_from_config_dict(
config_dict, hass, enable_log=False, skip_pip=skip_pip)
return hass
def enable_logging(hass, verbose=False, daemon=False, log_rotate_days=None):
""" Setup the logging for home assistant. """
if not daemon:
logging.basicConfig(level=logging.INFO)
fmt = ("%(log_color)s%(asctime)s %(levelname)s (%(threadName)s) "
"[%(name)s] %(message)s%(reset)s")
try:
from colorlog import ColoredFormatter
logging.getLogger().handlers[0].setFormatter(ColoredFormatter(
fmt,
datefmt='%y-%m-%d %H:%M:%S',
reset=True,
log_colors={
'DEBUG': 'cyan',
'INFO': 'green',
'WARNING': 'yellow',
'ERROR': 'red',
'CRITICAL': 'red',
}
))
except ImportError:
_LOGGER.warning(
"Colorlog package not found, console coloring disabled")
@core.callback
def async_enable_logging(hass: core.HomeAssistant, verbose: bool=False,
log_rotate_days=None) -> None:
"""Set up the logging.
This method must be run in the event loop.
"""
logging.basicConfig(level=logging.INFO)
fmt = ("%(asctime)s %(levelname)s (%(threadName)s) "
"[%(name)s] %(message)s")
colorfmt = "%(log_color)s{}%(reset)s".format(fmt)
datefmt = '%Y-%m-%d %H:%M:%S'
# Suppress overly verbose logs from libraries that aren't helpful
logging.getLogger('requests').setLevel(logging.WARNING)
logging.getLogger('urllib3').setLevel(logging.WARNING)
logging.getLogger('aiohttp.access').setLevel(logging.WARNING)
try:
from colorlog import ColoredFormatter
logging.getLogger().handlers[0].setFormatter(ColoredFormatter(
colorfmt,
datefmt=datefmt,
reset=True,
log_colors={
'DEBUG': 'cyan',
'INFO': 'green',
'WARNING': 'yellow',
'ERROR': 'red',
'CRITICAL': 'red',
}
))
except ImportError:
pass
# Log errors to a file if we have write access to file or config dir
err_log_path = hass.config.path(ERROR_LOG_FILENAME)
@@ -284,119 +255,46 @@ def enable_logging(hass, verbose=False, daemon=False, log_rotate_days=None):
err_log_path, mode='w', delay=True)
err_handler.setLevel(logging.INFO if verbose else logging.WARNING)
err_handler.setFormatter(
logging.Formatter('%(asctime)s %(name)s: %(message)s',
datefmt='%y-%m-%d %H:%M:%S'))
err_handler.setFormatter(logging.Formatter(fmt, datefmt=datefmt))
async_handler = AsyncHandler(hass.loop, err_handler)
@asyncio.coroutine
def async_stop_async_handler(event):
"""Cleanup async handler."""
logging.getLogger('').removeHandler(async_handler)
yield from async_handler.async_close(blocking=True)
hass.bus.async_listen_once(
EVENT_HOMEASSISTANT_CLOSE, async_stop_async_handler)
logger = logging.getLogger('')
logger.addHandler(err_handler)
logger.addHandler(async_handler)
logger.setLevel(logging.INFO)
else:
_LOGGER.error(
'Unable to setup error log %s (access denied)', err_log_path)
"Unable to setup error log %s (access denied)", err_log_path)
def process_ha_config_upgrade(hass):
""" Upgrade config if necessary. """
version_path = hass.config.path('.HA_VERSION')
try:
with open(version_path, 'rt') as inp:
conf_version = inp.readline().strip()
except FileNotFoundError:
# Last version to not have this file
conf_version = '0.7.7'
if conf_version == __version__:
return
_LOGGER.info('Upgrading config directory from %s to %s', conf_version,
__version__)
lib_path = hass.config.path('lib')
if os.path.isdir(lib_path):
shutil.rmtree(lib_path)
with open(version_path, 'wt') as outp:
outp.write(__version__)
def mount_local_lib_path(config_dir: str) -> str:
"""Add local library to Python Path."""
deps_dir = os.path.join(config_dir, 'deps')
lib_dir = get_user_site(deps_dir)
if lib_dir not in sys.path:
sys.path.insert(0, lib_dir)
return deps_dir
def process_ha_core_config(hass, config):
""" Processes the [homeassistant] section from the config. """
hac = hass.config
@asyncio.coroutine
def async_mount_local_lib_path(config_dir: str,
loop: asyncio.AbstractEventLoop) -> str:
"""Add local library to Python Path.
def set_time_zone(time_zone_str):
""" Helper method to set time zone in HA. """
if time_zone_str is None:
return
time_zone = date_util.get_time_zone(time_zone_str)
if time_zone:
hac.time_zone = time_zone
date_util.set_default_time_zone(time_zone)
else:
_LOGGER.error('Received invalid time zone %s', time_zone_str)
for key, attr, typ in ((CONF_LATITUDE, 'latitude', float),
(CONF_LONGITUDE, 'longitude', float),
(CONF_NAME, 'location_name', str)):
if key in config:
try:
setattr(hac, attr, typ(config[key]))
except ValueError:
_LOGGER.error('Received invalid %s value for %s: %s',
typ.__name__, key, attr)
set_time_zone(config.get(CONF_TIME_ZONE))
customize = config.get(CONF_CUSTOMIZE)
if isinstance(customize, dict):
for entity_id, attrs in config.get(CONF_CUSTOMIZE, {}).items():
if not isinstance(attrs, dict):
continue
Entity.overwrite_attribute(entity_id, attrs.keys(), attrs.values())
if CONF_TEMPERATURE_UNIT in config:
unit = config[CONF_TEMPERATURE_UNIT]
if unit == 'C':
hac.temperature_unit = TEMP_CELCIUS
elif unit == 'F':
hac.temperature_unit = TEMP_FAHRENHEIT
# If we miss some of the needed values, auto detect them
if None not in (
hac.latitude, hac.longitude, hac.temperature_unit, hac.time_zone):
return
_LOGGER.info('Auto detecting location and temperature unit')
info = loc_util.detect_location_info()
if info is None:
_LOGGER.error('Could not detect location information')
return
if hac.latitude is None and hac.longitude is None:
hac.latitude = info.latitude
hac.longitude = info.longitude
if hac.temperature_unit is None:
if info.use_fahrenheit:
hac.temperature_unit = TEMP_FAHRENHEIT
else:
hac.temperature_unit = TEMP_CELCIUS
if hac.location_name is None:
hac.location_name = info.city
if hac.time_zone is None:
set_time_zone(info.time_zone)
def _ensure_loader_prepared(hass):
""" Ensure Home Assistant loader is prepared. """
if not loader.PREPARED:
loader.prepare(hass)
This function is a coroutine.
"""
deps_dir = os.path.join(config_dir, 'deps')
lib_dir = yield from async_get_user_site(deps_dir, loop=loop)
if lib_dir not in sys.path:
sys.path.insert(0, lib_dir)
return deps_dir

View File

@@ -1,59 +1,64 @@
"""
homeassistant.components
~~~~~~~~~~~~~~~~~~~~~~~~
This package contains components that can be plugged into Home Assistant.
Component design guidelines:
Each component defines a constant DOMAIN that is equal to its filename.
Each component that tracks states should create state entity names in the
format "<DOMAIN>.<OBJECT_ID>".
Each component should publish services only under its own domain.
- Each component defines a constant DOMAIN that is equal to its filename.
- Each component that tracks states should create state entity names in the
format "<DOMAIN>.<OBJECT_ID>".
- Each component should publish services only under its own domain.
"""
import asyncio
import itertools as it
import logging
import homeassistant.core as ha
from homeassistant.helpers.entity import split_entity_id
import homeassistant.config as conf_util
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.service import extract_entity_ids
from homeassistant.loader import get_component
from homeassistant.const import (
ATTR_ENTITY_ID, SERVICE_TURN_ON, SERVICE_TURN_OFF, SERVICE_TOGGLE)
ATTR_ENTITY_ID, SERVICE_TURN_ON, SERVICE_TURN_OFF, SERVICE_TOGGLE,
SERVICE_HOMEASSISTANT_STOP, SERVICE_HOMEASSISTANT_RESTART,
RESTART_EXIT_CODE)
_LOGGER = logging.getLogger(__name__)
SERVICE_RELOAD_CORE_CONFIG = 'reload_core_config'
SERVICE_CHECK_CONFIG = 'check_config'
def is_on(hass, entity_id=None):
""" Loads up the module to call the is_on method.
If there is no entity id given we will check all. """
if entity_id:
group = get_component('group')
"""Load up the module to call the is_on method.
entity_ids = group.expand_entity_ids(hass, [entity_id])
If there is no entity id given we will check all.
"""
if entity_id:
entity_ids = hass.components.group.expand_entity_ids([entity_id])
else:
entity_ids = hass.states.entity_ids()
for entity_id in entity_ids:
domain = split_entity_id(entity_id)[0]
module = get_component(domain)
for ent_id in entity_ids:
domain = ha.split_entity_id(ent_id)[0]
try:
if module.is_on(hass, entity_id):
return True
component = getattr(hass.components, domain)
except AttributeError:
# module is None or method is_on does not exist
_LOGGER.exception("Failed to call %s.is_on for %s",
module, entity_id)
except ImportError:
_LOGGER.error('Failed to call %s.is_on: component not found',
domain)
continue
if not hasattr(component, 'is_on'):
_LOGGER.warning("Component %s has no is_on method.", domain)
continue
if component.is_on(ent_id):
return True
return False
def turn_on(hass, entity_id=None, **service_data):
""" Turns specified entity on if possible. """
"""Turn specified entity on if possible."""
if entity_id is not None:
service_data[ATTR_ENTITY_ID] = entity_id
@@ -61,7 +66,7 @@ def turn_on(hass, entity_id=None, **service_data):
def turn_off(hass, entity_id=None, **service_data):
""" Turns specified entity off. """
"""Turn specified entity off."""
if entity_id is not None:
service_data[ATTR_ENTITY_ID] = entity_id
@@ -69,18 +74,39 @@ def turn_off(hass, entity_id=None, **service_data):
def toggle(hass, entity_id=None, **service_data):
""" Toggles specified entity. """
"""Toggle specified entity."""
if entity_id is not None:
service_data[ATTR_ENTITY_ID] = entity_id
hass.services.call(ha.DOMAIN, SERVICE_TOGGLE, service_data)
def setup(hass, config):
""" Setup general services related to homeassistant. """
def stop(hass):
"""Stop Home Assistant."""
hass.services.call(ha.DOMAIN, SERVICE_HOMEASSISTANT_STOP)
def handle_turn_service(service):
""" Method to handle calls to homeassistant.turn_on/off. """
def restart(hass):
"""Stop Home Assistant."""
hass.services.call(ha.DOMAIN, SERVICE_HOMEASSISTANT_RESTART)
def check_config(hass):
"""Check the config files."""
hass.services.call(ha.DOMAIN, SERVICE_CHECK_CONFIG)
def reload_core_config(hass):
"""Reload the core config."""
hass.services.call(ha.DOMAIN, SERVICE_RELOAD_CORE_CONFIG)
@asyncio.coroutine
def async_setup(hass, config):
"""Set up general services related to Home Assistant."""
@asyncio.coroutine
def async_handle_turn_service(service):
"""Handle calls to homeassistant.turn_on/off."""
entity_ids = extract_entity_ids(hass, service)
# Generic turn on/off method requires entity id
@@ -92,7 +118,9 @@ def setup(hass, config):
# Group entity_ids by domain. groupby requires sorted data.
by_domain = it.groupby(sorted(entity_ids),
lambda item: split_entity_id(item)[0])
lambda item: ha.split_entity_id(item)[0])
tasks = []
for domain, ent_ids in by_domain:
# We want to block for all calls and only return when all calls
@@ -109,10 +137,60 @@ def setup(hass, config):
# ent_ids is a generator, convert it to a list.
data[ATTR_ENTITY_ID] = list(ent_ids)
hass.services.call(domain, service.service, data, blocking)
tasks.append(hass.services.async_call(
domain, service.service, data, blocking))
hass.services.register(ha.DOMAIN, SERVICE_TURN_OFF, handle_turn_service)
hass.services.register(ha.DOMAIN, SERVICE_TURN_ON, handle_turn_service)
hass.services.register(ha.DOMAIN, SERVICE_TOGGLE, handle_turn_service)
yield from asyncio.wait(tasks, loop=hass.loop)
hass.services.async_register(
ha.DOMAIN, SERVICE_TURN_OFF, async_handle_turn_service)
hass.services.async_register(
ha.DOMAIN, SERVICE_TURN_ON, async_handle_turn_service)
hass.services.async_register(
ha.DOMAIN, SERVICE_TOGGLE, async_handle_turn_service)
@asyncio.coroutine
def async_handle_core_service(call):
"""Service handler for handling core services."""
if call.service == SERVICE_HOMEASSISTANT_STOP:
hass.async_add_job(hass.async_stop())
return
try:
errors = yield from conf_util.async_check_ha_config_file(hass)
except HomeAssistantError:
return
if errors:
_LOGGER.error(errors)
hass.components.persistent_notification.async_create(
"Config error. See dev-info panel for details.",
"Config validating", "{0}.check_config".format(ha.DOMAIN))
return
if call.service == SERVICE_HOMEASSISTANT_RESTART:
hass.async_add_job(hass.async_stop(RESTART_EXIT_CODE))
hass.services.async_register(
ha.DOMAIN, SERVICE_HOMEASSISTANT_STOP, async_handle_core_service)
hass.services.async_register(
ha.DOMAIN, SERVICE_HOMEASSISTANT_RESTART, async_handle_core_service)
hass.services.async_register(
ha.DOMAIN, SERVICE_CHECK_CONFIG, async_handle_core_service)
@asyncio.coroutine
def async_handle_reload_config(call):
"""Service handler for reloading core config."""
try:
conf = yield from conf_util.async_hass_config_yaml(hass)
except HomeAssistantError as err:
_LOGGER.error(err)
return
yield from conf_util.async_process_ha_core_config(
hass, conf.get(ha.DOMAIN) or {})
hass.services.async_register(
ha.DOMAIN, SERVICE_RELOAD_CORE_CONFIG, async_handle_reload_config)
return True

View File

@@ -1,29 +1,32 @@
"""
homeassistant.components.alarm_control_panel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Component to interface with a alarm control panel.
Component to interface with an alarm control panel.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel/
"""
import asyncio
from datetime import timedelta
import logging
import os
from homeassistant.components import verisure
import voluptuous as vol
from homeassistant.const import (
ATTR_ENTITY_ID, SERVICE_ALARM_TRIGGER,
ATTR_CODE, ATTR_CODE_FORMAT, ATTR_ENTITY_ID, SERVICE_ALARM_TRIGGER,
SERVICE_ALARM_DISARM, SERVICE_ALARM_ARM_HOME, SERVICE_ALARM_ARM_AWAY)
from homeassistant.config import load_yaml_config_file
from homeassistant.loader import bind_hass
from homeassistant.helpers.config_validation import PLATFORM_SCHEMA # noqa
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.entity_component import EntityComponent
DOMAIN = 'alarm_control_panel'
SCAN_INTERVAL = 30
SCAN_INTERVAL = timedelta(seconds=30)
ATTR_CHANGED_BY = 'changed_by'
ENTITY_ID_FORMAT = DOMAIN + '.{}'
# Maps discovered services to their platforms
DISCOVERY_PLATFORMS = {
verisure.DISCOVER_ALARMS: 'verisure'
}
SERVICE_TO_METHOD = {
SERVICE_ALARM_DISARM: 'alarm_disarm',
SERVICE_ALARM_ARM_HOME: 'alarm_arm_home',
@@ -31,51 +34,20 @@ SERVICE_TO_METHOD = {
SERVICE_ALARM_TRIGGER: 'alarm_trigger'
}
ATTR_CODE = 'code'
ATTR_CODE_FORMAT = 'code_format'
ATTR_TO_PROPERTY = [
ATTR_CODE,
ATTR_CODE_FORMAT
]
def setup(hass, config):
""" Track states and offer events for sensors. """
component = EntityComponent(
logging.getLogger(__name__), DOMAIN, hass, SCAN_INTERVAL,
DISCOVERY_PLATFORMS)
component.setup(config)
def alarm_service_handler(service):
""" Maps services to methods on Alarm. """
target_alarms = component.extract_from_service(service)
if ATTR_CODE not in service.data:
code = None
else:
code = service.data[ATTR_CODE]
method = SERVICE_TO_METHOD[service.service]
for alarm in target_alarms:
getattr(alarm, method)(code)
if alarm.should_poll:
alarm.update_ha_state(True)
descriptions = load_yaml_config_file(
os.path.join(os.path.dirname(__file__), 'services.yaml'))
for service in SERVICE_TO_METHOD:
hass.services.register(DOMAIN, service, alarm_service_handler,
descriptions.get(service))
return True
ALARM_SERVICE_SCHEMA = vol.Schema({
vol.Optional(ATTR_ENTITY_ID): cv.entity_ids,
vol.Optional(ATTR_CODE): cv.string,
})
@bind_hass
def alarm_disarm(hass, code=None, entity_id=None):
""" Send the alarm the command for disarm. """
"""Send the alarm the command for disarm."""
data = {}
if code:
data[ATTR_CODE] = code
@@ -85,8 +57,9 @@ def alarm_disarm(hass, code=None, entity_id=None):
hass.services.call(DOMAIN, SERVICE_ALARM_DISARM, data)
@bind_hass
def alarm_arm_home(hass, code=None, entity_id=None):
""" Send the alarm the command for arm home. """
"""Send the alarm the command for arm home."""
data = {}
if code:
data[ATTR_CODE] = code
@@ -96,8 +69,9 @@ def alarm_arm_home(hass, code=None, entity_id=None):
hass.services.call(DOMAIN, SERVICE_ALARM_ARM_HOME, data)
@bind_hass
def alarm_arm_away(hass, code=None, entity_id=None):
""" Send the alarm the command for arm away. """
"""Send the alarm the command for arm away."""
data = {}
if code:
data[ATTR_CODE] = code
@@ -107,8 +81,9 @@ def alarm_arm_away(hass, code=None, entity_id=None):
hass.services.call(DOMAIN, SERVICE_ALARM_ARM_AWAY, data)
@bind_hass
def alarm_trigger(hass, code=None, entity_id=None):
""" Send the alarm the command for trigger. """
"""Send the alarm the command for trigger."""
data = {}
if code:
data[ATTR_CODE] = code
@@ -118,35 +93,116 @@ def alarm_trigger(hass, code=None, entity_id=None):
hass.services.call(DOMAIN, SERVICE_ALARM_TRIGGER, data)
@asyncio.coroutine
def async_setup(hass, config):
"""Track states and offer events for sensors."""
component = EntityComponent(
logging.getLogger(__name__), DOMAIN, hass, SCAN_INTERVAL)
yield from component.async_setup(config)
@asyncio.coroutine
def async_alarm_service_handler(service):
"""Map services to methods on Alarm."""
target_alarms = component.async_extract_from_service(service)
code = service.data.get(ATTR_CODE)
method = "async_{}".format(SERVICE_TO_METHOD[service.service])
for alarm in target_alarms:
yield from getattr(alarm, method)(code)
update_tasks = []
for alarm in target_alarms:
if not alarm.should_poll:
continue
update_coro = hass.async_add_job(
alarm.async_update_ha_state(True))
if hasattr(alarm, 'async_update'):
update_tasks.append(update_coro)
else:
yield from update_coro
if update_tasks:
yield from asyncio.wait(update_tasks, loop=hass.loop)
descriptions = yield from hass.async_add_job(
load_yaml_config_file, os.path.join(
os.path.dirname(__file__), 'services.yaml'))
for service in SERVICE_TO_METHOD:
hass.services.async_register(
DOMAIN, service, async_alarm_service_handler,
descriptions.get(service), schema=ALARM_SERVICE_SCHEMA)
return True
# pylint: disable=no-self-use
class AlarmControlPanel(Entity):
""" ABC for alarm control devices. """
"""An abstract class for alarm control devices."""
@property
def code_format(self):
""" regex for code format or None if no code is required. """
"""Regex for code format or None if no code is required."""
return None
@property
def changed_by(self):
"""Last change triggered by."""
return None
def alarm_disarm(self, code=None):
""" Send disarm command. """
"""Send disarm command."""
raise NotImplementedError()
def async_alarm_disarm(self, code=None):
"""Send disarm command.
This method must be run in the event loop and returns a coroutine.
"""
return self.hass.async_add_job(self.alarm_disarm, code)
def alarm_arm_home(self, code=None):
""" Send arm home command. """
"""Send arm home command."""
raise NotImplementedError()
def async_alarm_arm_home(self, code=None):
"""Send arm home command.
This method must be run in the event loop and returns a coroutine.
"""
return self.hass.async_add_job(self.alarm_arm_home, code)
def alarm_arm_away(self, code=None):
""" Send arm away command. """
"""Send arm away command."""
raise NotImplementedError()
def async_alarm_arm_away(self, code=None):
"""Send arm away command.
This method must be run in the event loop and returns a coroutine.
"""
return self.hass.async_add_job(self.alarm_arm_away, code)
def alarm_trigger(self, code=None):
""" Send alarm trigger command. """
"""Send alarm trigger command."""
raise NotImplementedError()
def async_alarm_trigger(self, code=None):
"""Send alarm trigger command.
This method must be run in the event loop and returns a coroutine.
"""
return self.hass.async_add_job(self.alarm_trigger, code)
@property
def state_attributes(self):
""" Return the state attributes. """
"""Return the state attributes."""
state_attr = {
ATTR_CODE_FORMAT: self.code_format,
}
ATTR_CHANGED_BY: self.changed_by
}
return state_attr

View File

@@ -0,0 +1,116 @@
"""
Support for AlarmDecoder-based alarm control panels (Honeywell/DSC).
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.alarmdecoder/
"""
import asyncio
import logging
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarmdecoder import (DATA_AD,
SIGNAL_PANEL_MESSAGE)
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED,
STATE_UNKNOWN, STATE_ALARM_TRIGGERED)
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['alarmdecoder']
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Set up for AlarmDecoder alarm panels."""
_LOGGER.debug("AlarmDecoderAlarmPanel: setup")
device = AlarmDecoderAlarmPanel("Alarm Panel", hass)
async_add_devices([device])
return True
class AlarmDecoderAlarmPanel(alarm.AlarmControlPanel):
"""Representation of an AlarmDecoder-based alarm panel."""
def __init__(self, name, hass):
"""Initialize the alarm panel."""
self._display = ""
self._name = name
self._state = STATE_UNKNOWN
_LOGGER.debug("Setting up panel")
@asyncio.coroutine
def async_added_to_hass(self):
"""Register callbacks."""
async_dispatcher_connect(
self.hass, SIGNAL_PANEL_MESSAGE, self._message_callback)
@callback
def _message_callback(self, message):
if message.alarm_sounding or message.fire_alarm:
if self._state != STATE_ALARM_TRIGGERED:
self._state = STATE_ALARM_TRIGGERED
self.hass.async_add_job(self.async_update_ha_state())
elif message.armed_away:
if self._state != STATE_ALARM_ARMED_AWAY:
self._state = STATE_ALARM_ARMED_AWAY
self.hass.async_add_job(self.async_update_ha_state())
elif message.armed_home:
if self._state != STATE_ALARM_ARMED_HOME:
self._state = STATE_ALARM_ARMED_HOME
self.hass.async_add_job(self.async_update_ha_state())
else:
if self._state != STATE_ALARM_DISARMED:
self._state = STATE_ALARM_DISARMED
self.hass.async_add_job(self.async_update_ha_state())
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def should_poll(self):
"""Return the polling state."""
return False
@property
def code_format(self):
"""Return the regex for code format or None if no code is required."""
return '^\\d{4,6}$'
@property
def state(self):
"""Return the state of the device."""
return self._state
@asyncio.coroutine
def async_alarm_disarm(self, code=None):
"""Send disarm command."""
_LOGGER.debug("alarm_disarm: %s", code)
if code:
_LOGGER.debug("alarm_disarm: sending %s1", str(code))
self.hass.data[DATA_AD].send("{!s}1".format(code))
@asyncio.coroutine
def async_alarm_arm_away(self, code=None):
"""Send arm away command."""
_LOGGER.debug("alarm_arm_away: %s", code)
if code:
_LOGGER.debug("alarm_arm_away: sending %s2", str(code))
self.hass.data[DATA_AD].send("{!s}2".format(code))
@asyncio.coroutine
def async_alarm_arm_home(self, code=None):
"""Send arm home command."""
_LOGGER.debug("alarm_arm_home: %s", code)
if code:
_LOGGER.debug("alarm_arm_home: sending %s3", str(code))
self.hass.data[DATA_AD].send("{!s}3".format(code))

View File

@@ -1,115 +1,120 @@
"""
homeassistant.components.alarm_control_panel.alarmdotcom
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Interfaces with Verisure alarm control panel.
Interfaces with Alarm.com alarm control panels.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.alarmdotcom/
"""
import logging
import asyncio
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_PASSWORD, CONF_USERNAME, STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED, STATE_UNKNOWN)
STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED, STATE_UNKNOWN, CONF_CODE,
CONF_NAME)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.aiohttp_client import async_get_clientsession
REQUIREMENTS = ['pyalarmdotcom==0.3.0']
_LOGGER = logging.getLogger(__name__)
REQUIREMENTS = ['https://github.com/Xorso/pyalarmdotcom'
'/archive/0.1.1.zip'
'#pyalarmdotcom==0.1.1']
DEFAULT_NAME = 'Alarm.com'
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_PASSWORD): cv.string,
vol.Required(CONF_USERNAME): cv.string,
vol.Optional(CONF_CODE): cv.positive_int,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
})
def setup_platform(hass, config, add_devices, discovery_info=None):
""" Setup an Alarm.com control panel. """
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Set up a Alarm.com control panel."""
name = config.get(CONF_NAME)
code = config.get(CONF_CODE)
username = config.get(CONF_USERNAME)
password = config.get(CONF_PASSWORD)
if username is None or password is None:
_LOGGER.error('Must specify username and password!')
return False
add_devices([AlarmDotCom(hass,
config.get('name', DEFAULT_NAME),
config.get('code'),
username,
password)])
alarmdotcom = AlarmDotCom(hass, name, code, username, password)
yield from alarmdotcom.async_login()
async_add_devices([alarmdotcom])
# pylint: disable=too-many-arguments, too-many-instance-attributes
# pylint: disable=abstract-method
class AlarmDotCom(alarm.AlarmControlPanel):
""" Represents a Alarm.com status. """
"""Represent an Alarm.com status."""
def __init__(self, hass, name, code, username, password):
from pyalarmdotcom.pyalarmdotcom import Alarmdotcom
self._alarm = Alarmdotcom(username, password, timeout=10)
"""Initialize the Alarm.com status."""
from pyalarmdotcom import Alarmdotcom
_LOGGER.debug('Setting up Alarm.com...')
self._hass = hass
self._name = name
self._code = str(code) if code else None
self._username = username
self._password = password
self._websession = async_get_clientsession(self._hass)
self._state = STATE_UNKNOWN
self._alarm = Alarmdotcom(username,
password,
self._websession,
hass.loop)
@property
def should_poll(self):
""" No polling needed. """
return True
@asyncio.coroutine
def async_login(self):
"""Login to Alarm.com."""
yield from self._alarm.async_login()
@asyncio.coroutine
def async_update(self):
"""Fetch the latest state."""
yield from self._alarm.async_update()
return self._alarm.state
@property
def name(self):
""" Returns the name of the device. """
"""Return the name of the alarm."""
return self._name
@property
def code_format(self):
""" One or more characters if code is defined. """
"""One or more characters if code is defined."""
return None if self._code is None else '.+'
@property
def state(self):
""" Returns the state of the device. """
if self._alarm.state == 'Disarmed':
"""Return the state of the device."""
if self._alarm.state.lower() == 'disarmed':
return STATE_ALARM_DISARMED
elif self._alarm.state == 'Armed Stay':
elif self._alarm.state.lower() == 'armed stay':
return STATE_ALARM_ARMED_HOME
elif self._alarm.state == 'Armed Away':
elif self._alarm.state.lower() == 'armed away':
return STATE_ALARM_ARMED_AWAY
else:
return STATE_UNKNOWN
return STATE_UNKNOWN
def alarm_disarm(self, code=None):
""" Send disarm command. """
if not self._validate_code(code, 'arming home'):
return
from pyalarmdotcom.pyalarmdotcom import Alarmdotcom
# Open another session to alarm.com to fire off the command
_alarm = Alarmdotcom(self._username, self._password, timeout=10)
_alarm.disarm()
@asyncio.coroutine
def async_alarm_disarm(self, code=None):
"""Send disarm command."""
if self._validate_code(code):
yield from self._alarm.async_alarm_disarm()
def alarm_arm_home(self, code=None):
""" Send arm home command. """
if not self._validate_code(code, 'arming home'):
return
from pyalarmdotcom.pyalarmdotcom import Alarmdotcom
# Open another session to alarm.com to fire off the command
_alarm = Alarmdotcom(self._username, self._password, timeout=10)
_alarm.arm_stay()
@asyncio.coroutine
def async_alarm_arm_home(self, code=None):
"""Send arm hom command."""
if self._validate_code(code):
yield from self._alarm.async_alarm_arm_home()
def alarm_arm_away(self, code=None):
""" Send arm away command. """
if not self._validate_code(code, 'arming home'):
return
from pyalarmdotcom.pyalarmdotcom import Alarmdotcom
# Open another session to alarm.com to fire off the command
_alarm = Alarmdotcom(self._username, self._password, timeout=10)
_alarm.arm_away()
@asyncio.coroutine
def async_alarm_arm_away(self, code=None):
"""Send arm away command."""
if self._validate_code(code):
yield from self._alarm.async_alarm_arm_away()
def _validate_code(self, code, state):
""" Validate given code. """
def _validate_code(self, code):
"""Validate given code."""
check = self._code is None or code == self._code
if not check:
_LOGGER.warning('Wrong code entered for %s', state)
_LOGGER.warning('Wrong code entered.')
return check

View File

@@ -0,0 +1,124 @@
"""
Support for Concord232 alarm control panels.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.concord232/
"""
import datetime
from datetime import timedelta
import logging
import requests
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_HOST, CONF_NAME, CONF_PORT, STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED, STATE_UNKNOWN)
import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['concord232==0.14']
_LOGGER = logging.getLogger(__name__)
DEFAULT_HOST = 'localhost'
DEFAULT_NAME = 'CONCORD232'
DEFAULT_PORT = 5007
SCAN_INTERVAL = timedelta(seconds=1)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_HOST, default=DEFAULT_HOST): cv.string,
})
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up the Concord232 alarm control panel platform."""
name = config.get(CONF_NAME)
host = config.get(CONF_HOST)
port = config.get(CONF_PORT)
url = 'http://{}:{}'.format(host, port)
try:
add_devices([Concord232Alarm(hass, url, name)])
except requests.exceptions.ConnectionError as ex:
_LOGGER.error("Unable to connect to Concord232: %s", str(ex))
return False
class Concord232Alarm(alarm.AlarmControlPanel):
"""Representation of the Concord232-based alarm panel."""
def __init__(self, hass, url, name):
"""Initialize the Concord232 alarm panel."""
from concord232 import client as concord232_client
self._state = STATE_UNKNOWN
self._hass = hass
self._name = name
self._url = url
try:
client = concord232_client.Client(self._url)
except requests.exceptions.ConnectionError as ex:
_LOGGER.error("Unable to connect to Concord232: %s", str(ex))
self._alarm = client
self._alarm.partitions = self._alarm.list_partitions()
self._alarm.last_partition_update = datetime.datetime.now()
self.update()
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def code_format(self):
"""Return the characters if code is defined."""
return '[0-9]{4}([0-9]{2})?'
@property
def state(self):
"""Return the state of the device."""
return self._state
def update(self):
"""Update values from API."""
try:
part = self._alarm.list_partitions()[0]
except requests.exceptions.ConnectionError as ex:
_LOGGER.error("Unable to connect to %(host)s: %(reason)s",
dict(host=self._url, reason=ex))
newstate = STATE_UNKNOWN
except IndexError:
_LOGGER.error("Concord232 reports no partitions")
newstate = STATE_UNKNOWN
if part['arming_level'] == 'Off':
newstate = STATE_ALARM_DISARMED
elif 'Home' in part['arming_level']:
newstate = STATE_ALARM_ARMED_HOME
else:
newstate = STATE_ALARM_ARMED_AWAY
if not newstate == self._state:
_LOGGER.info("State Chnage from %s to %s", self._state, newstate)
self._state = newstate
return self._state
def alarm_disarm(self, code=None):
"""Send disarm command."""
self._alarm.disarm(code)
def alarm_arm_home(self, code=None):
"""Send arm home command."""
self._alarm.arm('stay')
def alarm_arm_away(self, code=None):
"""Send arm away command."""
self._alarm.arm('auto')

View File

@@ -8,7 +8,7 @@ import homeassistant.components.alarm_control_panel.manual as manual
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the Demo alarm control panel platform."""
"""Set up the Demo alarm control panel platform."""
add_devices([
manual.ManualAlarm(hass, 'Alarm', '1234', 5, 10),
manual.ManualAlarm(hass, 'Alarm', '1234', 5, 10, False),
])

View File

@@ -0,0 +1,182 @@
"""
Interfaces with Egardia/Woonveilig alarm control panel.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.egardia/
"""
import logging
import requests
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
import homeassistant.exceptions as exc
import homeassistant.helpers.config_validation as cv
from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_PORT, CONF_HOST, CONF_PASSWORD, CONF_USERNAME, STATE_UNKNOWN,
CONF_NAME, STATE_ALARM_DISARMED, STATE_ALARM_ARMED_HOME,
STATE_ALARM_ARMED_AWAY, STATE_ALARM_TRIGGERED)
REQUIREMENTS = ['pythonegardia==1.0.17']
_LOGGER = logging.getLogger(__name__)
CONF_REPORT_SERVER_CODES = 'report_server_codes'
CONF_REPORT_SERVER_ENABLED = 'report_server_enabled'
CONF_REPORT_SERVER_PORT = 'report_server_port'
DEFAULT_NAME = 'Egardia'
DEFAULT_PORT = 80
DEFAULT_REPORT_SERVER_ENABLED = False
DEFAULT_REPORT_SERVER_PORT = 85
DOMAIN = 'egardia'
NOTIFICATION_ID = 'egardia_notification'
NOTIFICATION_TITLE = 'Egardia'
STATES = {
'ARM': STATE_ALARM_ARMED_AWAY,
'DAY HOME': STATE_ALARM_ARMED_HOME,
'DISARM': STATE_ALARM_DISARMED,
'HOME': STATE_ALARM_ARMED_HOME,
'TRIGGERED': STATE_ALARM_TRIGGERED,
'UNKNOWN': STATE_UNKNOWN,
}
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_HOST): cv.string,
vol.Required(CONF_PASSWORD): cv.string,
vol.Required(CONF_USERNAME): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
vol.Optional(CONF_REPORT_SERVER_CODES): vol.All(cv.ensure_list),
vol.Optional(CONF_REPORT_SERVER_ENABLED,
default=DEFAULT_REPORT_SERVER_ENABLED): cv.boolean,
vol.Optional(CONF_REPORT_SERVER_PORT, default=DEFAULT_REPORT_SERVER_PORT):
cv.port,
})
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up the Egardia platform."""
from pythonegardia import egardiadevice
name = config.get(CONF_NAME)
username = config.get(CONF_USERNAME)
password = config.get(CONF_PASSWORD)
host = config.get(CONF_HOST)
port = config.get(CONF_PORT)
rs_enabled = config.get(CONF_REPORT_SERVER_ENABLED)
rs_port = config.get(CONF_REPORT_SERVER_PORT)
rs_codes = config.get(CONF_REPORT_SERVER_CODES)
try:
egardiasystem = egardiadevice.EgardiaDevice(
host, port, username, password, '')
except requests.exceptions.RequestException:
raise exc.PlatformNotReady()
except egardiadevice.UnauthorizedError:
_LOGGER.error("Unable to authorize. Wrong password or username")
return False
add_devices([EgardiaAlarm(
name, egardiasystem, hass, rs_enabled, rs_port, rs_codes)], True)
class EgardiaAlarm(alarm.AlarmControlPanel):
"""Representation of a Egardia alarm."""
def __init__(self, name, egardiasystem, hass, rs_enabled=False,
rs_port=None, rs_codes=None):
"""Initialize object."""
self._name = name
self._egardiasystem = egardiasystem
self._status = STATE_UNKNOWN
self._rs_enabled = rs_enabled
self._rs_port = rs_port
self._hass = hass
if rs_codes is not None:
self._rs_codes = rs_codes[0]
else:
self._rs_codes = rs_codes
if self._rs_enabled:
self.listen_to_system_status()
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def state(self):
"""Return the state of the device."""
return self._status
def handle_system_status_event(self, event):
"""Handle egardia_system_status_event."""
if event.data.get('status') is not None:
statuscode = event.data.get('status')
status = self.lookupstatusfromcode(statuscode)
self.parsestatus(status)
def listen_to_system_status(self):
"""Subscribe to egardia_system_status event."""
self._hass.bus.listen(
'egardia_system_status', self.handle_system_status_event)
def lookupstatusfromcode(self, statuscode):
"""Look at the rs_codes and returns the status from the code."""
status = 'UNKNOWN'
if self._rs_codes is not None:
statuscode = str(statuscode).strip()
for i in self._rs_codes:
val = str(self._rs_codes[i]).strip()
if ',' in val:
splitted = val.split(',')
for code in splitted:
code = str(code).strip()
if statuscode == code:
status = i.upper()
break
elif statuscode == val:
status = i.upper()
break
return status
def parsestatus(self, status):
"""Parse the status."""
newstatus = ([v for k, v in STATES.items()
if status.upper() == k][0])
self._status = newstatus
def update(self):
"""Update the alarm status."""
status = self._egardiasystem.getstate()
self.parsestatus(status)
def alarm_disarm(self, code=None):
"""Send disarm command."""
try:
self._egardiasystem.alarm_disarm()
except requests.exceptions.RequestException as err:
_LOGGER.error("Egardia device exception occurred when "
"sending disarm command: %s", err)
def alarm_arm_home(self, code=None):
"""Send arm home command."""
try:
self._egardiasystem.alarm_arm_home()
except requests.exceptions.RequestException as err:
_LOGGER.error("Egardia device exception occurred when "
"sending arm home command: %s", err)
def alarm_arm_away(self, code=None):
"""Send arm away command."""
try:
self._egardiasystem.alarm_arm_away()
except requests.exceptions.RequestException as err:
_LOGGER.error("Egardia device exception occurred when "
"sending arm away command: %s", err)

View File

@@ -0,0 +1,177 @@
"""
Support for Envisalink-based alarm control panels (Honeywell/DSC).
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.envisalink/
"""
import asyncio
import logging
import os
import voluptuous as vol
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
import homeassistant.components.alarm_control_panel as alarm
import homeassistant.helpers.config_validation as cv
from homeassistant.config import load_yaml_config_file
from homeassistant.components.envisalink import (
DATA_EVL, EnvisalinkDevice, PARTITION_SCHEMA, CONF_CODE, CONF_PANIC,
CONF_PARTITIONNAME, SIGNAL_KEYPAD_UPDATE, SIGNAL_PARTITION_UPDATE)
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED,
STATE_UNKNOWN, STATE_ALARM_TRIGGERED, STATE_ALARM_PENDING, ATTR_ENTITY_ID)
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['envisalink']
SERVICE_ALARM_KEYPRESS = 'envisalink_alarm_keypress'
ATTR_KEYPRESS = 'keypress'
ALARM_KEYPRESS_SCHEMA = vol.Schema({
vol.Required(ATTR_ENTITY_ID): cv.entity_ids,
vol.Required(ATTR_KEYPRESS): cv.string
})
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Perform the setup for Envisalink alarm panels."""
configured_partitions = discovery_info['partitions']
code = discovery_info[CONF_CODE]
panic_type = discovery_info[CONF_PANIC]
devices = []
for part_num in configured_partitions:
device_config_data = PARTITION_SCHEMA(configured_partitions[part_num])
device = EnvisalinkAlarm(
hass,
part_num,
device_config_data[CONF_PARTITIONNAME],
code,
panic_type,
hass.data[DATA_EVL].alarm_state['partition'][part_num],
hass.data[DATA_EVL]
)
devices.append(device)
async_add_devices(devices)
@callback
def alarm_keypress_handler(service):
"""Map services to methods on Alarm."""
entity_ids = service.data.get(ATTR_ENTITY_ID)
keypress = service.data.get(ATTR_KEYPRESS)
target_devices = [device for device in devices
if device.entity_id in entity_ids]
for device in target_devices:
device.async_alarm_keypress(keypress)
# Register Envisalink specific services
descriptions = yield from hass.async_add_job(
load_yaml_config_file, os.path.join(
os.path.dirname(__file__), 'services.yaml'))
hass.services.async_register(
alarm.DOMAIN, SERVICE_ALARM_KEYPRESS, alarm_keypress_handler,
descriptions.get(SERVICE_ALARM_KEYPRESS), schema=ALARM_KEYPRESS_SCHEMA)
return True
class EnvisalinkAlarm(EnvisalinkDevice, alarm.AlarmControlPanel):
"""Representation of an Envisalink-based alarm panel."""
def __init__(self, hass, partition_number, alarm_name, code, panic_type,
info, controller):
"""Initialize the alarm panel."""
self._partition_number = partition_number
self._code = code
self._panic_type = panic_type
_LOGGER.debug("Setting up alarm: %s", alarm_name)
super().__init__(alarm_name, info, controller)
@asyncio.coroutine
def async_added_to_hass(self):
"""Register callbacks."""
async_dispatcher_connect(
self.hass, SIGNAL_KEYPAD_UPDATE, self._update_callback)
async_dispatcher_connect(
self.hass, SIGNAL_PARTITION_UPDATE, self._update_callback)
@callback
def _update_callback(self, partition):
"""Update Home Assistant state, if needed."""
if partition is None or int(partition) == self._partition_number:
self.hass.async_add_job(self.async_update_ha_state())
@property
def code_format(self):
"""Regex for code format or None if no code is required."""
if self._code:
return None
return '^\\d{4,6}$'
@property
def state(self):
"""Return the state of the device."""
state = STATE_UNKNOWN
if self._info['status']['alarm']:
state = STATE_ALARM_TRIGGERED
elif self._info['status']['armed_away']:
state = STATE_ALARM_ARMED_AWAY
elif self._info['status']['armed_stay']:
state = STATE_ALARM_ARMED_HOME
elif self._info['status']['exit_delay']:
state = STATE_ALARM_PENDING
elif self._info['status']['entry_delay']:
state = STATE_ALARM_PENDING
elif self._info['status']['alpha']:
state = STATE_ALARM_DISARMED
return state
@asyncio.coroutine
def async_alarm_disarm(self, code=None):
"""Send disarm command."""
if code:
self.hass.data[DATA_EVL].disarm_partition(
str(code), self._partition_number)
else:
self.hass.data[DATA_EVL].disarm_partition(
str(self._code), self._partition_number)
@asyncio.coroutine
def async_alarm_arm_home(self, code=None):
"""Send arm home command."""
if code:
self.hass.data[DATA_EVL].arm_stay_partition(
str(code), self._partition_number)
else:
self.hass.data[DATA_EVL].arm_stay_partition(
str(self._code), self._partition_number)
@asyncio.coroutine
def async_alarm_arm_away(self, code=None):
"""Send arm away command."""
if code:
self.hass.data[DATA_EVL].arm_away_partition(
str(code), self._partition_number)
else:
self.hass.data[DATA_EVL].arm_away_partition(
str(self._code), self._partition_number)
@asyncio.coroutine
def async_alarm_trigger(self, code=None):
"""Alarm trigger command. Will be used to trigger a panic alarm."""
self.hass.data[DATA_EVL].panic_alarm(self._panic_type)
@callback
def async_alarm_keypress(self, keypress=None):
"""Send custom keypress."""
if keypress:
self.hass.data[DATA_EVL].keypresses_to_partition(
self._partition_number, keypress)

View File

@@ -1,6 +1,4 @@
"""
homeassistant.components.alarm_control_panel.manual
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Support for manual alarms.
For more details about this platform, please refer to the documentation at
@@ -9,65 +7,85 @@ https://home-assistant.io/components/alarm_control_panel.manual/
import datetime
import logging
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
import homeassistant.util.dt as dt_util
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED,
STATE_ALARM_PENDING, STATE_ALARM_TRIGGERED)
STATE_ALARM_PENDING, STATE_ALARM_TRIGGERED, CONF_PLATFORM, CONF_NAME,
CONF_CODE, CONF_PENDING_TIME, CONF_TRIGGER_TIME, CONF_DISARM_AFTER_TRIGGER)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.event import track_point_in_time
_LOGGER = logging.getLogger(__name__)
DEFAULT_ALARM_NAME = 'HA Alarm'
DEFAULT_PENDING_TIME = 60
DEFAULT_TRIGGER_TIME = 120
DEFAULT_DISARM_AFTER_TRIGGER = False
PLATFORM_SCHEMA = vol.Schema({
vol.Required(CONF_PLATFORM): 'manual',
vol.Optional(CONF_NAME, default=DEFAULT_ALARM_NAME): cv.string,
vol.Optional(CONF_CODE): cv.string,
vol.Optional(CONF_PENDING_TIME, default=DEFAULT_PENDING_TIME):
vol.All(vol.Coerce(int), vol.Range(min=0)),
vol.Optional(CONF_TRIGGER_TIME, default=DEFAULT_TRIGGER_TIME):
vol.All(vol.Coerce(int), vol.Range(min=1)),
vol.Optional(CONF_DISARM_AFTER_TRIGGER,
default=DEFAULT_DISARM_AFTER_TRIGGER): cv.boolean,
})
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_devices, discovery_info=None):
""" Sets up the manual alarm platform. """
"""Set up the manual alarm platform."""
add_devices([ManualAlarm(
hass,
config.get('name', DEFAULT_ALARM_NAME),
config.get('code'),
config.get('pending_time', DEFAULT_PENDING_TIME),
config.get('trigger_time', DEFAULT_TRIGGER_TIME),
config[CONF_NAME],
config.get(CONF_CODE),
config.get(CONF_PENDING_TIME, DEFAULT_PENDING_TIME),
config.get(CONF_TRIGGER_TIME, DEFAULT_TRIGGER_TIME),
config.get(CONF_DISARM_AFTER_TRIGGER, DEFAULT_DISARM_AFTER_TRIGGER)
)])
# pylint: disable=too-many-arguments, too-many-instance-attributes
# pylint: disable=abstract-method
class ManualAlarm(alarm.AlarmControlPanel):
"""
Represents an alarm status.
Representation of an alarm status.
When armed, will be pending for 'pending_time', after that armed.
When triggered, will be pending for 'trigger_time'. After that will be
triggered for 'trigger_time', after that we return to disarmed.
triggered for 'trigger_time', after that we return to the previous state
or disarm if `disarm_after_trigger` is true.
"""
def __init__(self, hass, name, code, pending_time, trigger_time):
def __init__(self, hass, name, code, pending_time,
trigger_time, disarm_after_trigger):
"""Init the manual alarm panel."""
self._state = STATE_ALARM_DISARMED
self._hass = hass
self._name = name
self._code = str(code) if code else None
self._pending_time = datetime.timedelta(seconds=pending_time)
self._trigger_time = datetime.timedelta(seconds=trigger_time)
self._disarm_after_trigger = disarm_after_trigger
self._pre_trigger_state = self._state
self._state_ts = None
@property
def should_poll(self):
""" No polling needed. """
"""Return the plling state."""
return False
@property
def name(self):
""" Returns the name of the device. """
"""Return the name of the device."""
return self._name
@property
def state(self):
""" Returns the state of the device. """
"""Return the state of the device."""
if self._state in (STATE_ALARM_ARMED_HOME,
STATE_ALARM_ARMED_AWAY) and \
self._pending_time and self._state_ts + self._pending_time > \
@@ -79,70 +97,73 @@ class ManualAlarm(alarm.AlarmControlPanel):
return STATE_ALARM_PENDING
elif (self._state_ts + self._pending_time +
self._trigger_time) < dt_util.utcnow():
return STATE_ALARM_DISARMED
if self._disarm_after_trigger:
return STATE_ALARM_DISARMED
return self._pre_trigger_state
return self._state
@property
def code_format(self):
""" One or more characters. """
"""One or more characters."""
return None if self._code is None else '.+'
def alarm_disarm(self, code=None):
""" Send disarm command. """
"""Send disarm command."""
if not self._validate_code(code, STATE_ALARM_DISARMED):
return
self._state = STATE_ALARM_DISARMED
self._state_ts = dt_util.utcnow()
self.update_ha_state()
self.schedule_update_ha_state()
def alarm_arm_home(self, code=None):
""" Send arm home command. """
"""Send arm home command."""
if not self._validate_code(code, STATE_ALARM_ARMED_HOME):
return
self._state = STATE_ALARM_ARMED_HOME
self._state_ts = dt_util.utcnow()
self.update_ha_state()
self.schedule_update_ha_state()
if self._pending_time:
track_point_in_time(
self._hass, self.update_ha_state,
self._hass, self.async_update_ha_state,
self._state_ts + self._pending_time)
def alarm_arm_away(self, code=None):
""" Send arm away command. """
"""Send arm away command."""
if not self._validate_code(code, STATE_ALARM_ARMED_AWAY):
return
self._state = STATE_ALARM_ARMED_AWAY
self._state_ts = dt_util.utcnow()
self.update_ha_state()
self.schedule_update_ha_state()
if self._pending_time:
track_point_in_time(
self._hass, self.update_ha_state,
self._hass, self.async_update_ha_state,
self._state_ts + self._pending_time)
def alarm_trigger(self, code=None):
""" Send alarm trigger command. No code needed. """
"""Send alarm trigger command. No code needed."""
self._pre_trigger_state = self._state
self._state = STATE_ALARM_TRIGGERED
self._state_ts = dt_util.utcnow()
self.update_ha_state()
self.schedule_update_ha_state()
if self._trigger_time:
track_point_in_time(
self._hass, self.update_ha_state,
self._hass, self.async_update_ha_state,
self._state_ts + self._pending_time)
track_point_in_time(
self._hass, self.update_ha_state,
self._hass, self.async_update_ha_state,
self._state_ts + self._pending_time + self._trigger_time)
def _validate_code(self, code, state):
""" Validate given code. """
"""Validate given code."""
check = self._code is None or code == self._code
if not check:
_LOGGER.warning('Invalid code given for %s', state)
_LOGGER.warning("Invalid code given for %s", state)
return check

View File

@@ -0,0 +1,235 @@
"""
Support for manual alarms controllable via MQTT.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.manual_mqtt/
"""
import asyncio
import datetime
import logging
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
import homeassistant.util.dt as dt_util
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED,
STATE_ALARM_PENDING, STATE_ALARM_TRIGGERED, CONF_PLATFORM,
CONF_NAME, CONF_CODE, CONF_PENDING_TIME, CONF_TRIGGER_TIME,
CONF_DISARM_AFTER_TRIGGER)
import homeassistant.components.mqtt as mqtt
from homeassistant.helpers.event import async_track_state_change
from homeassistant.core import callback
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.event import track_point_in_time
CONF_PAYLOAD_DISARM = 'payload_disarm'
CONF_PAYLOAD_ARM_HOME = 'payload_arm_home'
CONF_PAYLOAD_ARM_AWAY = 'payload_arm_away'
DEFAULT_ALARM_NAME = 'HA Alarm'
DEFAULT_PENDING_TIME = 60
DEFAULT_TRIGGER_TIME = 120
DEFAULT_DISARM_AFTER_TRIGGER = False
DEFAULT_ARM_AWAY = 'ARM_AWAY'
DEFAULT_ARM_HOME = 'ARM_HOME'
DEFAULT_DISARM = 'DISARM'
DEPENDENCIES = ['mqtt']
PLATFORM_SCHEMA = mqtt.MQTT_BASE_PLATFORM_SCHEMA.extend({
vol.Required(CONF_PLATFORM): 'manual_mqtt',
vol.Optional(CONF_NAME, default=DEFAULT_ALARM_NAME): cv.string,
vol.Optional(CONF_CODE): cv.string,
vol.Optional(CONF_PENDING_TIME, default=DEFAULT_PENDING_TIME):
vol.All(vol.Coerce(int), vol.Range(min=0)),
vol.Optional(CONF_TRIGGER_TIME, default=DEFAULT_TRIGGER_TIME):
vol.All(vol.Coerce(int), vol.Range(min=1)),
vol.Optional(CONF_DISARM_AFTER_TRIGGER,
default=DEFAULT_DISARM_AFTER_TRIGGER): cv.boolean,
vol.Required(mqtt.CONF_COMMAND_TOPIC): mqtt.valid_publish_topic,
vol.Required(mqtt.CONF_STATE_TOPIC): mqtt.valid_subscribe_topic,
vol.Optional(CONF_PAYLOAD_ARM_AWAY, default=DEFAULT_ARM_AWAY): cv.string,
vol.Optional(CONF_PAYLOAD_ARM_HOME, default=DEFAULT_ARM_HOME): cv.string,
vol.Optional(CONF_PAYLOAD_DISARM, default=DEFAULT_DISARM): cv.string,
})
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up the manual MQTT alarm platform."""
add_devices([ManualMQTTAlarm(
hass,
config[CONF_NAME],
config.get(CONF_CODE),
config.get(CONF_PENDING_TIME, DEFAULT_PENDING_TIME),
config.get(CONF_TRIGGER_TIME, DEFAULT_TRIGGER_TIME),
config.get(CONF_DISARM_AFTER_TRIGGER, DEFAULT_DISARM_AFTER_TRIGGER),
config.get(mqtt.CONF_STATE_TOPIC),
config.get(mqtt.CONF_COMMAND_TOPIC),
config.get(mqtt.CONF_QOS),
config.get(CONF_PAYLOAD_DISARM),
config.get(CONF_PAYLOAD_ARM_HOME),
config.get(CONF_PAYLOAD_ARM_AWAY))])
class ManualMQTTAlarm(alarm.AlarmControlPanel):
"""
Representation of an alarm status.
When armed, will be pending for 'pending_time', after that armed.
When triggered, will be pending for 'trigger_time'. After that will be
triggered for 'trigger_time', after that we return to the previous state
or disarm if `disarm_after_trigger` is true.
"""
def __init__(self, hass, name, code, pending_time,
trigger_time, disarm_after_trigger,
state_topic, command_topic, qos,
payload_disarm, payload_arm_home, payload_arm_away):
"""Init the manual MQTT alarm panel."""
self._state = STATE_ALARM_DISARMED
self._hass = hass
self._name = name
self._code = str(code) if code else None
self._pending_time = datetime.timedelta(seconds=pending_time)
self._trigger_time = datetime.timedelta(seconds=trigger_time)
self._disarm_after_trigger = disarm_after_trigger
self._pre_trigger_state = self._state
self._state_ts = None
self._state_topic = state_topic
self._command_topic = command_topic
self._qos = qos
self._payload_disarm = payload_disarm
self._payload_arm_home = payload_arm_home
self._payload_arm_away = payload_arm_away
@property
def should_poll(self):
"""Return the polling state."""
return False
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def state(self):
"""Return the state of the device."""
if self._state in (STATE_ALARM_ARMED_HOME,
STATE_ALARM_ARMED_AWAY) and \
self._pending_time and self._state_ts + self._pending_time > \
dt_util.utcnow():
return STATE_ALARM_PENDING
if self._state == STATE_ALARM_TRIGGERED and self._trigger_time:
if self._state_ts + self._pending_time > dt_util.utcnow():
return STATE_ALARM_PENDING
elif (self._state_ts + self._pending_time +
self._trigger_time) < dt_util.utcnow():
if self._disarm_after_trigger:
return STATE_ALARM_DISARMED
return self._pre_trigger_state
return self._state
@property
def code_format(self):
"""One or more characters."""
return None if self._code is None else '.+'
def alarm_disarm(self, code=None):
"""Send disarm command."""
if not self._validate_code(code, STATE_ALARM_DISARMED):
return
self._state = STATE_ALARM_DISARMED
self._state_ts = dt_util.utcnow()
self.schedule_update_ha_state()
def alarm_arm_home(self, code=None):
"""Send arm home command."""
if not self._validate_code(code, STATE_ALARM_ARMED_HOME):
return
self._state = STATE_ALARM_ARMED_HOME
self._state_ts = dt_util.utcnow()
self.schedule_update_ha_state()
if self._pending_time:
track_point_in_time(
self._hass, self.async_update_ha_state,
self._state_ts + self._pending_time)
def alarm_arm_away(self, code=None):
"""Send arm away command."""
if not self._validate_code(code, STATE_ALARM_ARMED_AWAY):
return
self._state = STATE_ALARM_ARMED_AWAY
self._state_ts = dt_util.utcnow()
self.schedule_update_ha_state()
if self._pending_time:
track_point_in_time(
self._hass, self.async_update_ha_state,
self._state_ts + self._pending_time)
def alarm_trigger(self, code=None):
"""Send alarm trigger command. No code needed."""
self._pre_trigger_state = self._state
self._state = STATE_ALARM_TRIGGERED
self._state_ts = dt_util.utcnow()
self.schedule_update_ha_state()
if self._trigger_time:
track_point_in_time(
self._hass, self.async_update_ha_state,
self._state_ts + self._pending_time)
track_point_in_time(
self._hass, self.async_update_ha_state,
self._state_ts + self._pending_time + self._trigger_time)
def _validate_code(self, code, state):
"""Validate given code."""
check = self._code is None or code == self._code
if not check:
_LOGGER.warning("Invalid code given for %s", state)
return check
def async_added_to_hass(self):
"""Subscribe mqtt events.
This method must be run in the event loop and returns a coroutine.
"""
async_track_state_change(
self.hass, self.entity_id, self._async_state_changed_listener
)
@callback
def message_received(topic, payload, qos):
"""Run when new MQTT message has been received."""
if payload == self._payload_disarm:
self.async_alarm_disarm(self._code)
elif payload == self._payload_arm_home:
self.async_alarm_arm_home(self._code)
elif payload == self._payload_arm_away:
self.async_alarm_arm_away(self._code)
else:
_LOGGER.warning("Received unexpected payload: %s", payload)
return
return mqtt.async_subscribe(
self.hass, self._command_topic, message_received, self._qos)
@asyncio.coroutine
def _async_state_changed_listener(self, entity_id, old_state, new_state):
"""Publish state change to MQTT."""
mqtt.async_publish(self.hass, self._state_topic, new_state.state,
self._qos, True)

View File

@@ -1,62 +1,69 @@
"""
homeassistant.components.alarm_control_panel.mqtt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This platform enables the possibility to control a MQTT alarm.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.mqtt/
"""
import asyncio
import logging
import voluptuous as vol
from homeassistant.core import callback
import homeassistant.components.alarm_control_panel as alarm
import homeassistant.components.mqtt as mqtt
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED,
STATE_ALARM_PENDING, STATE_ALARM_TRIGGERED, STATE_UNKNOWN)
STATE_ALARM_PENDING, STATE_ALARM_TRIGGERED, STATE_UNKNOWN,
CONF_NAME, CONF_CODE)
from homeassistant.components.mqtt import (
CONF_STATE_TOPIC, CONF_COMMAND_TOPIC, CONF_QOS)
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = "MQTT Alarm"
DEFAULT_QOS = 0
DEFAULT_PAYLOAD_DISARM = "DISARM"
DEFAULT_PAYLOAD_ARM_HOME = "ARM_HOME"
DEFAULT_PAYLOAD_ARM_AWAY = "ARM_AWAY"
CONF_PAYLOAD_DISARM = 'payload_disarm'
CONF_PAYLOAD_ARM_HOME = 'payload_arm_home'
CONF_PAYLOAD_ARM_AWAY = 'payload_arm_away'
DEFAULT_ARM_AWAY = 'ARM_AWAY'
DEFAULT_ARM_HOME = 'ARM_HOME'
DEFAULT_DISARM = 'DISARM'
DEFAULT_NAME = 'MQTT Alarm'
DEPENDENCIES = ['mqtt']
def setup_platform(hass, config, add_devices, discovery_info=None):
""" Sets up the MQTT platform. """
if config.get('state_topic') is None:
_LOGGER.error("Missing required variable: state_topic")
return False
if config.get('command_topic') is None:
_LOGGER.error("Missing required variable: command_topic")
return False
add_devices([MqttAlarm(
hass,
config.get('name', DEFAULT_NAME),
config.get('state_topic'),
config.get('command_topic'),
config.get('qos', DEFAULT_QOS),
config.get('payload_disarm', DEFAULT_PAYLOAD_DISARM),
config.get('payload_arm_home', DEFAULT_PAYLOAD_ARM_HOME),
config.get('payload_arm_away', DEFAULT_PAYLOAD_ARM_AWAY),
config.get('code'))])
PLATFORM_SCHEMA = mqtt.MQTT_BASE_PLATFORM_SCHEMA.extend({
vol.Required(CONF_COMMAND_TOPIC): mqtt.valid_publish_topic,
vol.Required(CONF_STATE_TOPIC): mqtt.valid_subscribe_topic,
vol.Optional(CONF_CODE): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_PAYLOAD_ARM_AWAY, default=DEFAULT_ARM_AWAY): cv.string,
vol.Optional(CONF_PAYLOAD_ARM_HOME, default=DEFAULT_ARM_HOME): cv.string,
vol.Optional(CONF_PAYLOAD_DISARM, default=DEFAULT_DISARM): cv.string,
})
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Set up the MQTT Alarm Control Panel platform."""
async_add_devices([MqttAlarm(
config.get(CONF_NAME),
config.get(CONF_STATE_TOPIC),
config.get(CONF_COMMAND_TOPIC),
config.get(CONF_QOS),
config.get(CONF_PAYLOAD_DISARM),
config.get(CONF_PAYLOAD_ARM_HOME),
config.get(CONF_PAYLOAD_ARM_AWAY),
config.get(CONF_CODE))])
# pylint: disable=too-many-arguments, too-many-instance-attributes
# pylint: disable=abstract-method
class MqttAlarm(alarm.AlarmControlPanel):
""" represents a MQTT alarm status within home assistant. """
"""Representation of a MQTT alarm status."""
def __init__(self, hass, name, state_topic, command_topic, qos,
payload_disarm, payload_arm_home, payload_arm_away, code):
def __init__(self, name, state_topic, command_topic, qos, payload_disarm,
payload_arm_home, payload_arm_away, code):
"""Init the MQTT Alarm Control Panel."""
self._state = STATE_UNKNOWN
self._hass = hass
self._name = name
self._state_topic = state_topic
self._command_topic = command_topic
@@ -64,63 +71,82 @@ class MqttAlarm(alarm.AlarmControlPanel):
self._payload_disarm = payload_disarm
self._payload_arm_home = payload_arm_home
self._payload_arm_away = payload_arm_away
self._code = str(code) if code else None
self._code = code
def async_added_to_hass(self):
"""Subscribe mqtt events.
This method must be run in the event loop and returns a coroutine.
"""
@callback
def message_received(topic, payload, qos):
""" A new MQTT message has been received. """
"""Run when new MQTT message has been received."""
if payload not in (STATE_ALARM_DISARMED, STATE_ALARM_ARMED_HOME,
STATE_ALARM_ARMED_AWAY, STATE_ALARM_PENDING,
STATE_ALARM_TRIGGERED):
_LOGGER.warning('Received unexpected payload: %s', payload)
_LOGGER.warning("Received unexpected payload: %s", payload)
return
self._state = payload
self.update_ha_state()
self.hass.async_add_job(self.async_update_ha_state())
mqtt.subscribe(hass, self._state_topic, message_received, self._qos)
return mqtt.async_subscribe(
self.hass, self._state_topic, message_received, self._qos)
@property
def should_poll(self):
""" No polling needed """
"""No polling needed."""
return False
@property
def name(self):
""" Returns the name of the device. """
"""Return the name of the device."""
return self._name
@property
def state(self):
""" Returns the state of the device. """
"""Return the state of the device."""
return self._state
@property
def code_format(self):
""" One or more characters if code is defined """
"""One or more characters if code is defined."""
return None if self._code is None else '.+'
def alarm_disarm(self, code=None):
""" Send disarm command. """
@asyncio.coroutine
def async_alarm_disarm(self, code=None):
"""Send disarm command.
This method is a coroutine.
"""
if not self._validate_code(code, 'disarming'):
return
mqtt.publish(self.hass, self._command_topic,
self._payload_disarm, self._qos)
mqtt.async_publish(
self.hass, self._command_topic, self._payload_disarm, self._qos)
def alarm_arm_home(self, code=None):
""" Send arm home command. """
@asyncio.coroutine
def async_alarm_arm_home(self, code=None):
"""Send arm home command.
This method is a coroutine.
"""
if not self._validate_code(code, 'arming home'):
return
mqtt.publish(self.hass, self._command_topic,
self._payload_arm_home, self._qos)
mqtt.async_publish(
self.hass, self._command_topic, self._payload_arm_home, self._qos)
def alarm_arm_away(self, code=None):
""" Send arm away command. """
@asyncio.coroutine
def async_alarm_arm_away(self, code=None):
"""Send arm away command.
This method is a coroutine.
"""
if not self._validate_code(code, 'arming away'):
return
mqtt.publish(self.hass, self._command_topic,
self._payload_arm_away, self._qos)
mqtt.async_publish(
self.hass, self._command_topic, self._payload_arm_away, self._qos)
def _validate_code(self, code, state):
""" Validate given code. """
"""Validate given code."""
check = self._code is None or code == self._code
if not check:
_LOGGER.warning('Wrong code entered for %s', state)

View File

@@ -1,6 +1,4 @@
"""
homeassistant.components.alarm_control_panel.nx584
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Support for NX584 alarm control panels.
For more details about this platform, please refer to the documentation at
@@ -9,98 +7,114 @@ https://home-assistant.io/components/alarm_control_panel.nx584/
import logging
import requests
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED,
STATE_UNKNOWN)
STATE_UNKNOWN, CONF_NAME, CONF_HOST, CONF_PORT)
import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['pynx584==0.2']
REQUIREMENTS = ['pynx584==0.4']
_LOGGER = logging.getLogger(__name__)
DEFAULT_HOST = 'localhost'
DEFAULT_NAME = 'NX584'
DEFAULT_PORT = 5007
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_HOST, default=DEFAULT_HOST): cv.string,
})
def setup_platform(hass, config, add_devices, discovery_info=None):
""" Setup nx584. """
host = config.get('host', 'localhost:5007')
"""Set up the nx584 platform."""
name = config.get(CONF_NAME)
host = config.get(CONF_HOST)
port = config.get(CONF_PORT)
url = 'http://{}:{}'.format(host, port)
try:
add_devices([NX584Alarm(hass, host, config.get('name', 'NX584'))])
add_devices([NX584Alarm(hass, url, name)])
except requests.exceptions.ConnectionError as ex:
_LOGGER.error('Unable to connect to NX584: %s', str(ex))
_LOGGER.error("Unable to connect to NX584: %s", str(ex))
return False
class NX584Alarm(alarm.AlarmControlPanel):
""" NX584-based alarm panel. """
def __init__(self, hass, host, name):
"""Representation of a NX584-based alarm panel."""
def __init__(self, hass, url, name):
"""Init the nx584 alarm panel."""
from nx584 import client
self._hass = hass
self._host = host
self._name = name
self._alarm = client.Client('http://%s' % host)
self._url = url
self._alarm = client.Client(self._url)
# Do an initial list operation so that we will try to actually
# talk to the API and trigger a requests exception for setup_platform()
# to catch
self._alarm.list_zones()
@property
def should_poll(self):
""" Polling needed. """
return True
self._state = STATE_UNKNOWN
@property
def name(self):
""" Returns the name of the device. """
"""Return the name of the device."""
return self._name
@property
def code_format(self):
""" Characters if code is defined. """
"""Return che characters if code is defined."""
return '[0-9]{4}([0-9]{2})?'
@property
def state(self):
""" Returns the state of the device. """
"""Return the state of the device."""
return self._state
def update(self):
"""Process new events from panel."""
try:
part = self._alarm.list_partitions()[0]
zones = self._alarm.list_zones()
except requests.exceptions.ConnectionError as ex:
_LOGGER.error('Unable to connect to %(host)s: %(reason)s',
dict(host=self._host, reason=ex))
return STATE_UNKNOWN
_LOGGER.error("Unable to connect to %(host)s: %(reason)s",
dict(host=self._url, reason=ex))
self._state = STATE_UNKNOWN
zones = []
except IndexError:
_LOGGER.error('nx584 reports no partitions')
return STATE_UNKNOWN
_LOGGER.error("nx584 reports no partitions")
self._state = STATE_UNKNOWN
zones = []
bypassed = False
for zone in zones:
if zone['bypassed']:
_LOGGER.debug('Zone %(zone)s is bypassed, '
'assuming HOME',
_LOGGER.debug("Zone %(zone)s is bypassed, assuming HOME",
dict(zone=zone['number']))
bypassed = True
break
if not part['armed']:
return STATE_ALARM_DISARMED
self._state = STATE_ALARM_DISARMED
elif bypassed:
return STATE_ALARM_ARMED_HOME
self._state = STATE_ALARM_ARMED_HOME
else:
return STATE_ALARM_ARMED_AWAY
self._state = STATE_ALARM_ARMED_AWAY
def alarm_disarm(self, code=None):
""" Send disarm command. """
"""Send disarm command."""
self._alarm.disarm(code)
def alarm_arm_home(self, code=None):
""" Send arm home command. """
self._alarm.arm('home')
"""Send arm home command."""
self._alarm.arm('stay')
def alarm_arm_away(self, code=None):
""" Send arm away command. """
self._alarm.arm('auto')
def alarm_trigger(self, code=None):
""" Alarm trigger command. """
raise NotImplementedError()
"""Send arm away command."""
self._alarm.arm('exit')

View File

@@ -0,0 +1,54 @@
alarm_disarm:
description: Send the alarm the command for disarm
fields:
entity_id:
description: Name of alarm control panel to disarm
example: 'alarm_control_panel.downstairs'
code:
description: An optional code to disarm the alarm control panel with
example: 1234
alarm_arm_home:
description: Send the alarm the command for arm home
fields:
entity_id:
description: Name of alarm control panel to arm home
example: 'alarm_control_panel.downstairs'
code:
description: An optional code to arm home the alarm control panel with
example: 1234
alarm_arm_away:
description: Send the alarm the command for arm away
fields:
entity_id:
description: Name of alarm control panel to arm away
example: 'alarm_control_panel.downstairs'
code:
description: An optional code to arm away the alarm control panel with
example: 1234
alarm_trigger:
description: Send the alarm the command for trigger
fields:
entity_id:
description: Name of alarm control panel to trigger
example: 'alarm_control_panel.downstairs'
code:
description: An optional code to trigger the alarm control panel with
example: 1234
envisalink_alarm_keypress:
description: Send custom keypresses to the alarm
fields:
entity_id:
description: Name of the alarm control panel to trigger
example: 'alarm_control_panel.downstairs'
keypress:
description: 'String to send to the alarm panel (1-6 characters)'
example: '*71'

View File

@@ -0,0 +1,144 @@
"""
Interfaces with SimpliSafe alarm control panel.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.simplisafe/
"""
import logging
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_PASSWORD, CONF_USERNAME, STATE_UNKNOWN, CONF_CODE, CONF_NAME,
STATE_ALARM_DISARMED, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_AWAY,
EVENT_HOMEASSISTANT_STOP)
import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['simplisafe-python==1.0.4']
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = 'SimpliSafe'
DOMAIN = 'simplisafe'
NOTIFICATION_ID = 'simplisafe_notification'
NOTIFICATION_TITLE = 'SimpliSafe Setup'
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_PASSWORD): cv.string,
vol.Required(CONF_USERNAME): cv.string,
vol.Optional(CONF_CODE): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
})
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up the SimpliSafe platform."""
from simplipy.api import SimpliSafeApiInterface, get_systems
name = config.get(CONF_NAME)
code = config.get(CONF_CODE)
username = config.get(CONF_USERNAME)
password = config.get(CONF_PASSWORD)
simplisafe = SimpliSafeApiInterface()
status = simplisafe.set_credentials(username, password)
if status:
hass.data[DOMAIN] = simplisafe
locations = get_systems(simplisafe)
for location in locations:
add_devices([SimpliSafeAlarm(location, name, code)])
else:
message = 'Failed to log into SimpliSafe. Check credentials.'
_LOGGER.error(message)
hass.components.persistent_notification.create(
message,
title=NOTIFICATION_TITLE,
notification_id=NOTIFICATION_ID)
return False
def logout(event):
"""Logout of the SimpliSafe API."""
hass.data[DOMAIN].logout()
hass.bus.listen(EVENT_HOMEASSISTANT_STOP, logout)
class SimpliSafeAlarm(alarm.AlarmControlPanel):
"""Representation a SimpliSafe alarm."""
def __init__(self, simplisafe, name, code):
"""Initialize the SimpliSafe alarm."""
self.simplisafe = simplisafe
self._name = name
self._code = str(code) if code else None
@property
def name(self):
"""Return the name of the device."""
if self._name is not None:
return self._name
return 'Alarm {}'.format(self.simplisafe.location_id())
@property
def code_format(self):
"""One or more characters if code is defined."""
return None if self._code is None else '.+'
@property
def state(self):
"""Return the state of the device."""
status = self.simplisafe.state()
if status == 'Off':
state = STATE_ALARM_DISARMED
elif status == 'Home':
state = STATE_ALARM_ARMED_HOME
elif status == 'Away':
state = STATE_ALARM_ARMED_AWAY
else:
state = STATE_UNKNOWN
return state
@property
def device_state_attributes(self):
"""Return the state attributes."""
return {
'temperature': self.simplisafe.temperature(),
'co': self.simplisafe.carbon_monoxide(),
'fire': self.simplisafe.fire(),
'alarm': self.simplisafe.alarm(),
'last_event': self.simplisafe.last_event(),
'flood': self.simplisafe.flood()
}
def update(self):
"""Update alarm status."""
self.simplisafe.update()
def alarm_disarm(self, code=None):
"""Send disarm command."""
if not self._validate_code(code, 'disarming'):
return
self.simplisafe.set_state('off')
_LOGGER.info("SimpliSafe alarm disarming")
def alarm_arm_home(self, code=None):
"""Send arm home command."""
if not self._validate_code(code, 'arming home'):
return
self.simplisafe.set_state('home')
_LOGGER.info("SimpliSafe alarm arming home")
def alarm_arm_away(self, code=None):
"""Send arm away command."""
if not self._validate_code(code, 'arming away'):
return
self.simplisafe.set_state('away')
_LOGGER.info("SimpliSafe alarm arming away")
def _validate_code(self, code, state):
"""Validate given code."""
check = self._code is None or code == self._code
if not check:
_LOGGER.warning("Wrong code entered for %s", state)
return check

View File

@@ -0,0 +1,96 @@
"""
Support for Vanderbilt (formerly Siemens) SPC alarm systems.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.spc/
"""
import asyncio
import logging
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.spc import (
SpcWebGateway, ATTR_DISCOVER_AREAS, DATA_API, DATA_REGISTRY)
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED,
STATE_UNKNOWN)
_LOGGER = logging.getLogger(__name__)
SPC_AREA_MODE_TO_STATE = {'0': STATE_ALARM_DISARMED,
'1': STATE_ALARM_ARMED_HOME,
'3': STATE_ALARM_ARMED_AWAY}
def _get_alarm_state(spc_mode):
return SPC_AREA_MODE_TO_STATE.get(spc_mode, STATE_UNKNOWN)
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
"""Set up the SPC alarm control panel platform."""
if (discovery_info is None or
discovery_info[ATTR_DISCOVER_AREAS] is None):
return
entities = [SpcAlarm(hass=hass,
area_id=area['id'],
name=area['name'],
state=_get_alarm_state(area['mode']))
for area in discovery_info[ATTR_DISCOVER_AREAS]]
async_add_entities(entities)
class SpcAlarm(alarm.AlarmControlPanel):
"""Represents the SPC alarm panel."""
def __init__(self, hass, area_id, name, state):
"""Initialize the SPC alarm panel."""
self._hass = hass
self._area_id = area_id
self._name = name
self._state = state
self._api = hass.data[DATA_API]
hass.data[DATA_REGISTRY].register_alarm_device(area_id, self)
@asyncio.coroutine
def async_update_from_spc(self, state):
"""Update the alarm panel with a new state."""
self._state = state
yield from self.async_update_ha_state()
@property
def should_poll(self):
"""No polling needed."""
return False
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def state(self):
"""Return the state of the device."""
return self._state
@asyncio.coroutine
def async_alarm_disarm(self, code=None):
"""Send disarm command."""
yield from self._api.send_area_command(
self._area_id, SpcWebGateway.AREA_COMMAND_UNSET)
@asyncio.coroutine
def async_alarm_arm_home(self, code=None):
"""Send arm home command."""
yield from self._api.send_area_command(
self._area_id, SpcWebGateway.AREA_COMMAND_PART_SET)
@asyncio.coroutine
def async_alarm_arm_away(self, code=None):
"""Send arm away command."""
yield from self._api.send_area_command(
self._area_id, SpcWebGateway.AREA_COMMAND_SET)

View File

@@ -0,0 +1,92 @@
"""
Interfaces with TotalConnect alarm control panels.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.totalconnect/
"""
import logging
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_PASSWORD, CONF_USERNAME, STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED, STATE_UNKNOWN,
CONF_NAME)
REQUIREMENTS = ['total_connect_client==0.11']
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = 'Total Connect'
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_PASSWORD): cv.string,
vol.Required(CONF_USERNAME): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
})
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up a TotalConnect control panel."""
name = config.get(CONF_NAME)
username = config.get(CONF_USERNAME)
password = config.get(CONF_PASSWORD)
total_connect = TotalConnect(name, username, password)
add_devices([total_connect], True)
class TotalConnect(alarm.AlarmControlPanel):
"""Represent an TotalConnect status."""
def __init__(self, name, username, password):
"""Initialize the TotalConnect status."""
from total_connect_client import TotalConnectClient
_LOGGER.debug("Setting up TotalConnect...")
self._name = name
self._username = username
self._password = password
self._state = STATE_UNKNOWN
self._client = TotalConnectClient.TotalConnectClient(
username, password)
@property
def name(self):
"""Return the name of the device."""
return self._name
@property
def state(self):
"""Return the state of the device."""
return self._state
def update(self):
"""Return the state of the device."""
status = self._client.get_armed_status()
if status == self._client.DISARMED:
state = STATE_ALARM_DISARMED
elif status == self._client.ARMED_STAY:
state = STATE_ALARM_ARMED_HOME
elif status == self._client.ARMED_AWAY:
state = STATE_ALARM_ARMED_AWAY
else:
state = STATE_UNKNOWN
self._state = state
def alarm_disarm(self, code=None):
"""Send disarm command."""
self._client.disarm()
def alarm_arm_home(self, code=None):
"""Send arm home command."""
self._client.arm_stay()
def alarm_arm_away(self, code=None):
"""Send arm away command."""
self._client.arm_away()

View File

@@ -1,16 +1,15 @@
"""
homeassistant.components.alarm_control_panel.verisure
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Interfaces with Verisure alarm control panel.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/verisure/
https://home-assistant.io/components/alarm_control_panel.verisure/
"""
import logging
from time import sleep
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.verisure import HUB as hub
from homeassistant.components.verisure import (CONF_ALARM, CONF_CODE_DIGITS)
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED,
STATE_UNKNOWN)
@@ -19,74 +18,78 @@ _LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_devices, discovery_info=None):
""" Sets up the Verisure platform. """
"""Set up the Verisure platform."""
alarms = []
if int(hub.config.get('alarm', '1')):
hub.update_alarms()
alarms.extend([
VerisureAlarm(value.id)
for value in hub.alarm_status.values()
])
if int(hub.config.get(CONF_ALARM, 1)):
hub.update_overview()
alarms.append(VerisureAlarm())
add_devices(alarms)
# pylint: disable=abstract-method
class VerisureAlarm(alarm.AlarmControlPanel):
""" Represents a Verisure alarm status. """
def set_arm_state(state, code=None):
"""Send set arm state command."""
transaction_id = hub.session.set_arm_state(code, state)[
'armStateChangeTransactionId']
_LOGGER.info('verisure set arm state %s', state)
transaction = {}
while 'result' not in transaction:
sleep(0.5)
transaction = hub.session.get_arm_state_transaction(transaction_id)
# pylint: disable=unexpected-keyword-arg
hub.update_overview(no_throttle=True)
def __init__(self, device_id):
self._id = device_id
class VerisureAlarm(alarm.AlarmControlPanel):
"""Representation of a Verisure alarm status."""
def __init__(self):
"""Initalize the Verisure alarm panel."""
self._state = STATE_UNKNOWN
self._digits = int(hub.config.get('code_digits', '4'))
self._digits = hub.config.get(CONF_CODE_DIGITS)
self._changed_by = None
@property
def name(self):
""" Returns the name of the device. """
return 'Alarm {}'.format(self._id)
"""Return the name of the device."""
return '{} alarm'.format(hub.session.installations[0]['alias'])
@property
def state(self):
""" Returns the state of the device. """
"""Return the state of the device."""
return self._state
@property
def code_format(self):
""" code format as regex """
"""Return the code format as regex."""
return '^\\d{%s}$' % self._digits
def update(self):
""" Update alarm status """
hub.update_alarms()
@property
def changed_by(self):
"""Return the last change triggered by."""
return self._changed_by
if hub.alarm_status[self._id].status == 'unarmed':
def update(self):
"""Update alarm status."""
hub.update_overview()
status = hub.get_first("$.armState.statusType")
if status == 'DISARMED':
self._state = STATE_ALARM_DISARMED
elif hub.alarm_status[self._id].status == 'armedhome':
elif status == 'ARMED_HOME':
self._state = STATE_ALARM_ARMED_HOME
elif hub.alarm_status[self._id].status == 'armed':
elif status == 'ARMED_AWAY':
self._state = STATE_ALARM_ARMED_AWAY
elif hub.alarm_status[self._id].status != 'pending':
_LOGGER.error(
'Unknown alarm state %s',
hub.alarm_status[self._id].status)
elif status != 'PENDING':
_LOGGER.error('Unknown alarm state %s', status)
self._changed_by = hub.get_first("$.armState.name")
def alarm_disarm(self, code=None):
""" Send disarm command. """
hub.my_pages.alarm.set(code, 'DISARMED')
_LOGGER.info('verisure alarm disarming')
hub.my_pages.alarm.wait_while_pending()
self.update()
"""Send disarm command."""
set_arm_state('DISARMED', code)
def alarm_arm_home(self, code=None):
""" Send arm home command. """
hub.my_pages.alarm.set(code, 'ARMED_HOME')
_LOGGER.info('verisure alarm arming home')
hub.my_pages.alarm.wait_while_pending()
self.update()
"""Send arm home command."""
set_arm_state('ARMED_HOME', code)
def alarm_arm_away(self, code=None):
""" Send arm away command. """
hub.my_pages.alarm.set(code, 'ARMED_AWAY')
_LOGGER.info('verisure alarm arming away')
hub.my_pages.alarm.wait_while_pending()
self.update()
"""Send arm away command."""
set_arm_state('ARMED_AWAY', code)

View File

@@ -0,0 +1,78 @@
"""
Interfaces with Wink Cameras.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/alarm_control_panel.wink/
"""
import asyncio
import logging
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.const import (STATE_UNKNOWN,
STATE_ALARM_DISARMED,
STATE_ALARM_ARMED_HOME,
STATE_ALARM_ARMED_AWAY)
from homeassistant.components.wink import WinkDevice, DOMAIN
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['wink']
STATE_ALARM_PRIVACY = 'Private'
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up the Wink platform."""
import pywink
for camera in pywink.get_cameras():
# get_cameras returns multiple device types.
# Only add those that aren't sensors.
try:
camera.capability()
except AttributeError:
_id = camera.object_id() + camera.name()
if _id not in hass.data[DOMAIN]['unique_ids']:
add_devices([WinkCameraDevice(camera, hass)])
class WinkCameraDevice(WinkDevice, alarm.AlarmControlPanel):
"""Representation a Wink camera alarm."""
@asyncio.coroutine
def async_added_to_hass(self):
"""Callback when entity is added to hass."""
self.hass.data[DOMAIN]['entities']['alarm_control_panel'].append(self)
@property
def state(self):
"""Return the state of the device."""
wink_state = self.wink.state()
if wink_state == "away":
state = STATE_ALARM_ARMED_AWAY
elif wink_state == "home":
state = STATE_ALARM_DISARMED
elif wink_state == "night":
state = STATE_ALARM_ARMED_HOME
else:
state = STATE_UNKNOWN
return state
def alarm_disarm(self, code=None):
"""Send disarm command."""
self.wink.set_mode("home")
def alarm_arm_home(self, code=None):
"""Send arm home command."""
self.wink.set_mode("night")
def alarm_arm_away(self, code=None):
"""Send arm away command."""
self.wink.set_mode("away")
@property
def device_state_attributes(self):
"""Return the state attributes."""
return {
'private': self.wink.private()
}

View File

@@ -0,0 +1,168 @@
"""
Support for AlarmDecoder devices.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/alarmdecoder/
"""
import asyncio
import logging
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.core import callback
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
from homeassistant.helpers.discovery import async_load_platform
from homeassistant.helpers.dispatcher import async_dispatcher_send
REQUIREMENTS = ['alarmdecoder==0.12.3']
_LOGGER = logging.getLogger(__name__)
DOMAIN = 'alarmdecoder'
DATA_AD = 'alarmdecoder'
CONF_DEVICE = 'device'
CONF_DEVICE_BAUD = 'baudrate'
CONF_DEVICE_HOST = 'host'
CONF_DEVICE_PATH = 'path'
CONF_DEVICE_PORT = 'port'
CONF_DEVICE_TYPE = 'type'
CONF_PANEL_DISPLAY = 'panel_display'
CONF_ZONE_NAME = 'name'
CONF_ZONE_TYPE = 'type'
CONF_ZONES = 'zones'
DEFAULT_DEVICE_TYPE = 'socket'
DEFAULT_DEVICE_HOST = 'localhost'
DEFAULT_DEVICE_PORT = 10000
DEFAULT_DEVICE_PATH = '/dev/ttyUSB0'
DEFAULT_DEVICE_BAUD = 115200
DEFAULT_PANEL_DISPLAY = False
DEFAULT_ZONE_TYPE = 'opening'
SIGNAL_PANEL_MESSAGE = 'alarmdecoder.panel_message'
SIGNAL_PANEL_ARM_AWAY = 'alarmdecoder.panel_arm_away'
SIGNAL_PANEL_ARM_HOME = 'alarmdecoder.panel_arm_home'
SIGNAL_PANEL_DISARM = 'alarmdecoder.panel_disarm'
SIGNAL_ZONE_FAULT = 'alarmdecoder.zone_fault'
SIGNAL_ZONE_RESTORE = 'alarmdecoder.zone_restore'
DEVICE_SOCKET_SCHEMA = vol.Schema({
vol.Required(CONF_DEVICE_TYPE): 'socket',
vol.Optional(CONF_DEVICE_HOST, default=DEFAULT_DEVICE_HOST): cv.string,
vol.Optional(CONF_DEVICE_PORT, default=DEFAULT_DEVICE_PORT): cv.port})
DEVICE_SERIAL_SCHEMA = vol.Schema({
vol.Required(CONF_DEVICE_TYPE): 'serial',
vol.Optional(CONF_DEVICE_PATH, default=DEFAULT_DEVICE_PATH): cv.string,
vol.Optional(CONF_DEVICE_BAUD, default=DEFAULT_DEVICE_BAUD): cv.string})
DEVICE_USB_SCHEMA = vol.Schema({
vol.Required(CONF_DEVICE_TYPE): 'usb'})
ZONE_SCHEMA = vol.Schema({
vol.Required(CONF_ZONE_NAME): cv.string,
vol.Optional(CONF_ZONE_TYPE, default=DEFAULT_ZONE_TYPE): cv.string})
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
vol.Required(CONF_DEVICE): vol.Any(DEVICE_SOCKET_SCHEMA,
DEVICE_SERIAL_SCHEMA,
DEVICE_USB_SCHEMA),
vol.Optional(CONF_PANEL_DISPLAY,
default=DEFAULT_PANEL_DISPLAY): cv.boolean,
vol.Optional(CONF_ZONES): {vol.Coerce(int): ZONE_SCHEMA},
}),
}, extra=vol.ALLOW_EXTRA)
@asyncio.coroutine
def async_setup(hass, config):
"""Set up for the AlarmDecoder devices."""
from alarmdecoder import AlarmDecoder
from alarmdecoder.devices import (SocketDevice, SerialDevice, USBDevice)
conf = config.get(DOMAIN)
device = conf.get(CONF_DEVICE)
display = conf.get(CONF_PANEL_DISPLAY)
zones = conf.get(CONF_ZONES)
device_type = device.get(CONF_DEVICE_TYPE)
host = DEFAULT_DEVICE_HOST
port = DEFAULT_DEVICE_PORT
path = DEFAULT_DEVICE_PATH
baud = DEFAULT_DEVICE_BAUD
sync_connect = asyncio.Future(loop=hass.loop)
def handle_open(device):
"""Handle the successful connection."""
_LOGGER.info("Established a connection with the alarmdecoder")
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, stop_alarmdecoder)
sync_connect.set_result(True)
@callback
def stop_alarmdecoder(event):
"""Handle the shutdown of AlarmDecoder."""
_LOGGER.debug("Shutting down alarmdecoder")
controller.close()
@callback
def handle_message(sender, message):
"""Handle message from AlarmDecoder."""
async_dispatcher_send(hass, SIGNAL_PANEL_MESSAGE, message)
def zone_fault_callback(sender, zone):
"""Handle zone fault from AlarmDecoder."""
async_dispatcher_send(hass, SIGNAL_ZONE_FAULT, zone)
def zone_restore_callback(sender, zone):
"""Handle zone restore from AlarmDecoder."""
async_dispatcher_send(hass, SIGNAL_ZONE_RESTORE, zone)
controller = False
if device_type == 'socket':
host = device.get(CONF_DEVICE_HOST)
port = device.get(CONF_DEVICE_PORT)
controller = AlarmDecoder(SocketDevice(interface=(host, port)))
elif device_type == 'serial':
path = device.get(CONF_DEVICE_PATH)
baud = device.get(CONF_DEVICE_BAUD)
controller = AlarmDecoder(SerialDevice(interface=path))
elif device_type == 'usb':
AlarmDecoder(USBDevice.find())
return False
controller.on_open += handle_open
controller.on_message += handle_message
controller.on_zone_fault += zone_fault_callback
controller.on_zone_restore += zone_restore_callback
hass.data[DATA_AD] = controller
controller.open(baud)
result = yield from sync_connect
if not result:
return False
hass.async_add_job(
async_load_platform(hass, 'alarm_control_panel', DOMAIN, conf,
config))
if zones:
hass.async_add_job(async_load_platform(
hass, 'binary_sensor', DOMAIN, {CONF_ZONES: zones}, config))
if display:
hass.async_add_job(async_load_platform(
hass, 'sensor', DOMAIN, conf, config))
return True

View File

@@ -0,0 +1,292 @@
"""
Support for repeating alerts when conditions are met.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/alert/
"""
import asyncio
from datetime import datetime, timedelta
import logging
import os
import voluptuous as vol
from homeassistant.core import callback
from homeassistant.config import load_yaml_config_file
from homeassistant.const import (
CONF_ENTITY_ID, STATE_IDLE, CONF_NAME, CONF_STATE, STATE_ON, STATE_OFF,
SERVICE_TURN_ON, SERVICE_TURN_OFF, SERVICE_TOGGLE, ATTR_ENTITY_ID)
from homeassistant.helpers.entity import ToggleEntity
from homeassistant.helpers import service, event
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
DOMAIN = 'alert'
ENTITY_ID_FORMAT = DOMAIN + '.{}'
CONF_DONE_MESSAGE = 'done_message'
CONF_CAN_ACK = 'can_acknowledge'
CONF_NOTIFIERS = 'notifiers'
CONF_REPEAT = 'repeat'
CONF_SKIP_FIRST = 'skip_first'
DEFAULT_CAN_ACK = True
DEFAULT_SKIP_FIRST = False
ALERT_SCHEMA = vol.Schema({
vol.Required(CONF_NAME): cv.string,
vol.Optional(CONF_DONE_MESSAGE, default=None): cv.string,
vol.Required(CONF_ENTITY_ID): cv.entity_id,
vol.Required(CONF_STATE, default=STATE_ON): cv.string,
vol.Required(CONF_REPEAT): vol.All(cv.ensure_list, [vol.Coerce(float)]),
vol.Required(CONF_CAN_ACK, default=DEFAULT_CAN_ACK): cv.boolean,
vol.Required(CONF_SKIP_FIRST, default=DEFAULT_SKIP_FIRST): cv.boolean,
vol.Required(CONF_NOTIFIERS): cv.ensure_list})
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
cv.slug: ALERT_SCHEMA,
}),
}, extra=vol.ALLOW_EXTRA)
ALERT_SERVICE_SCHEMA = vol.Schema({
vol.Required(ATTR_ENTITY_ID): cv.entity_ids,
})
def is_on(hass, entity_id):
"""Return if the alert is firing and not acknowledged."""
return hass.states.is_state(entity_id, STATE_ON)
def turn_on(hass, entity_id):
"""Reset the alert."""
hass.add_job(async_turn_on, hass, entity_id)
@callback
def async_turn_on(hass, entity_id):
"""Async reset the alert."""
data = {ATTR_ENTITY_ID: entity_id}
hass.async_add_job(
hass.services.async_call(DOMAIN, SERVICE_TURN_ON, data))
def turn_off(hass, entity_id):
"""Acknowledge alert."""
hass.add_job(async_turn_off, hass, entity_id)
@callback
def async_turn_off(hass, entity_id):
"""Async acknowledge the alert."""
data = {ATTR_ENTITY_ID: entity_id}
hass.async_add_job(
hass.services.async_call(DOMAIN, SERVICE_TURN_OFF, data))
def toggle(hass, entity_id):
"""Toggle acknowledgement of alert."""
hass.add_job(async_toggle, hass, entity_id)
@callback
def async_toggle(hass, entity_id):
"""Async toggle acknowledgement of alert."""
data = {ATTR_ENTITY_ID: entity_id}
hass.async_add_job(
hass.services.async_call(DOMAIN, SERVICE_TOGGLE, data))
@asyncio.coroutine
def async_setup(hass, config):
"""Set up the Alert component."""
alerts = config.get(DOMAIN)
all_alerts = {}
@asyncio.coroutine
def async_handle_alert_service(service_call):
"""Handle calls to alert services."""
alert_ids = service.extract_entity_ids(hass, service_call)
for alert_id in alert_ids:
alert = all_alerts[alert_id]
if service_call.service == SERVICE_TURN_ON:
yield from alert.async_turn_on()
elif service_call.service == SERVICE_TOGGLE:
yield from alert.async_toggle()
else:
yield from alert.async_turn_off()
# Setup alerts
for entity_id, alert in alerts.items():
entity = Alert(hass, entity_id,
alert[CONF_NAME], alert[CONF_DONE_MESSAGE],
alert[CONF_ENTITY_ID], alert[CONF_STATE],
alert[CONF_REPEAT], alert[CONF_SKIP_FIRST],
alert[CONF_NOTIFIERS], alert[CONF_CAN_ACK])
all_alerts[entity.entity_id] = entity
# Read descriptions
descriptions = yield from hass.async_add_job(
load_yaml_config_file, os.path.join(
os.path.dirname(__file__), 'services.yaml'))
descriptions = descriptions.get(DOMAIN, {})
# Setup service calls
hass.services.async_register(
DOMAIN, SERVICE_TURN_OFF, async_handle_alert_service,
descriptions.get(SERVICE_TURN_OFF), schema=ALERT_SERVICE_SCHEMA)
hass.services.async_register(
DOMAIN, SERVICE_TURN_ON, async_handle_alert_service,
descriptions.get(SERVICE_TURN_ON), schema=ALERT_SERVICE_SCHEMA)
hass.services.async_register(
DOMAIN, SERVICE_TOGGLE, async_handle_alert_service,
descriptions.get(SERVICE_TOGGLE), schema=ALERT_SERVICE_SCHEMA)
tasks = [alert.async_update_ha_state() for alert in all_alerts.values()]
if tasks:
yield from asyncio.wait(tasks, loop=hass.loop)
return True
class Alert(ToggleEntity):
"""Representation of an alert."""
def __init__(self, hass, entity_id, name, done_message, watched_entity_id,
state, repeat, skip_first, notifiers, can_ack):
"""Initialize the alert."""
self.hass = hass
self._name = name
self._alert_state = state
self._skip_first = skip_first
self._notifiers = notifiers
self._can_ack = can_ack
self._done_message = done_message
self._delay = [timedelta(minutes=val) for val in repeat]
self._next_delay = 0
self._firing = False
self._ack = False
self._cancel = None
self._send_done_message = False
self.entity_id = ENTITY_ID_FORMAT.format(entity_id)
event.async_track_state_change(
hass, watched_entity_id, self.watched_entity_change)
@property
def name(self):
"""Return the name of the alert."""
return self._name
@property
def should_poll(self):
"""HASS need not poll these entities."""
return False
@property
def state(self):
"""Return the alert status."""
if self._firing:
if self._ack:
return STATE_OFF
return STATE_ON
return STATE_IDLE
@property
def hidden(self):
"""Hide the alert when it is not firing."""
return not self._can_ack or not self._firing
@asyncio.coroutine
def watched_entity_change(self, entity, from_state, to_state):
"""Determine if the alert should start or stop."""
_LOGGER.debug("Watched entity (%s) has changed", entity)
if to_state.state == self._alert_state and not self._firing:
yield from self.begin_alerting()
if to_state.state != self._alert_state and self._firing:
yield from self.end_alerting()
@asyncio.coroutine
def begin_alerting(self):
"""Begin the alert procedures."""
_LOGGER.debug("Beginning Alert: %s", self._name)
self._ack = False
self._firing = True
self._next_delay = 0
if not self._skip_first:
yield from self._notify()
else:
yield from self._schedule_notify()
self.hass.async_add_job(self.async_update_ha_state)
@asyncio.coroutine
def end_alerting(self):
"""End the alert procedures."""
_LOGGER.debug("Ending Alert: %s", self._name)
self._cancel()
self._ack = False
self._firing = False
if self._done_message and self._send_done_message:
yield from self._notify_done_message()
self.hass.async_add_job(self.async_update_ha_state)
@asyncio.coroutine
def _schedule_notify(self):
"""Schedule a notification."""
delay = self._delay[self._next_delay]
next_msg = datetime.now() + delay
self._cancel = \
event.async_track_point_in_time(self.hass, self._notify, next_msg)
self._next_delay = min(self._next_delay + 1, len(self._delay) - 1)
@asyncio.coroutine
def _notify(self, *args):
"""Send the alert notification."""
if not self._firing:
return
if not self._ack:
_LOGGER.info("Alerting: %s", self._name)
self._send_done_message = True
for target in self._notifiers:
yield from self.hass.services.async_call(
'notify', target, {'message': self._name})
yield from self._schedule_notify()
@asyncio.coroutine
def _notify_done_message(self, *args):
"""Send notification of complete alert."""
_LOGGER.info("Alerting: %s", self._done_message)
self._send_done_message = False
for target in self._notifiers:
yield from self.hass.services.async_call(
'notify', target, {'message': self._done_message})
@asyncio.coroutine
def async_turn_on(self, **kwargs):
"""Async Unacknowledge alert."""
_LOGGER.debug("Reset Alert: %s", self._name)
self._ack = False
yield from self.async_update_ha_state()
@asyncio.coroutine
def async_turn_off(self, **kwargs):
"""Async Acknowledge alert."""
_LOGGER.debug("Acknowledged Alert: %s", self._name)
self._ack = True
yield from self.async_update_ha_state()
@asyncio.coroutine
def async_toggle(self):
"""Async toggle alert."""
if self._ack:
return self.async_turn_on()
return self.async_turn_off()

View File

@@ -4,128 +4,199 @@ Support for Alexa skill service end point.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/alexa/
"""
import asyncio
import copy
import enum
import logging
import uuid
from datetime import datetime
from homeassistant.const import HTTP_OK, HTTP_UNPROCESSABLE_ENTITY
from homeassistant.helpers.service import call_from_config
from homeassistant.helpers import template
import voluptuous as vol
from homeassistant.core import callback
from homeassistant.const import HTTP_BAD_REQUEST
from homeassistant.helpers import intent, template, config_validation as cv
from homeassistant.components import http
_LOGGER = logging.getLogger(__name__)
INTENTS_API_ENDPOINT = '/api/alexa'
FLASH_BRIEFINGS_API_ENDPOINT = '/api/alexa/flash_briefings/{briefing_id}'
CONF_ACTION = 'action'
CONF_CARD = 'card'
CONF_INTENTS = 'intents'
CONF_SPEECH = 'speech'
CONF_TYPE = 'type'
CONF_TITLE = 'title'
CONF_CONTENT = 'content'
CONF_TEXT = 'text'
CONF_FLASH_BRIEFINGS = 'flash_briefings'
CONF_UID = 'uid'
CONF_TITLE = 'title'
CONF_AUDIO = 'audio'
CONF_TEXT = 'text'
CONF_DISPLAY_URL = 'display_url'
ATTR_UID = 'uid'
ATTR_UPDATE_DATE = 'updateDate'
ATTR_TITLE_TEXT = 'titleText'
ATTR_STREAM_URL = 'streamUrl'
ATTR_MAIN_TEXT = 'mainText'
ATTR_REDIRECTION_URL = 'redirectionURL'
DATE_FORMAT = '%Y-%m-%dT%H:%M:%S.0Z'
DOMAIN = 'alexa'
DEPENDENCIES = ['http']
_LOGGER = logging.getLogger(__name__)
_CONFIG = {}
API_ENDPOINT = '/api/alexa'
CONF_INTENTS = 'intents'
CONF_CARD = 'card'
CONF_SPEECH = 'speech'
CONF_ACTION = 'action'
def setup(hass, config):
"""Activate Alexa component."""
_CONFIG.update(config[DOMAIN].get(CONF_INTENTS, {}))
hass.http.register_path('POST', API_ENDPOINT, _handle_alexa, True)
return True
def _handle_alexa(handler, path_match, data):
"""Handle Alexa."""
_LOGGER.debug('Received Alexa request: %s', data)
req = data.get('request')
if req is None:
_LOGGER.error('Received invalid data from Alexa: %s', data)
handler.write_json_message(
"Invalid value received for port", HTTP_UNPROCESSABLE_ENTITY)
return
req_type = req['type']
if req_type == 'SessionEndedRequest':
handler.send_response(HTTP_OK)
handler.end_headers()
return
intent = req.get('intent')
response = AlexaResponse(handler.server.hass, intent)
if req_type == 'LaunchRequest':
response.add_speech(
SpeechType.plaintext,
"Hello, and welcome to the future. How may I help?")
handler.write_json(response.as_dict())
return
if req_type != 'IntentRequest':
_LOGGER.warning('Received unsupported request: %s', req_type)
return
intent_name = intent['name']
config = _CONFIG.get(intent_name)
if config is None:
_LOGGER.warning('Received unknown intent %s', intent_name)
response.add_speech(
SpeechType.plaintext,
"This intent is not yet configured within Home Assistant.")
handler.write_json(response.as_dict())
return
speech = config.get(CONF_SPEECH)
card = config.get(CONF_CARD)
action = config.get(CONF_ACTION)
# pylint: disable=unsubscriptable-object
if speech is not None:
response.add_speech(SpeechType[speech['type']], speech['text'])
if card is not None:
response.add_card(CardType[card['type']], card['title'],
card['content'])
if action is not None:
call_from_config(handler.server.hass, action, True)
handler.write_json(response.as_dict())
class SpeechType(enum.Enum):
"""Alexa speech types."""
"""The Alexa speech types."""
plaintext = "PlainText"
ssml = "SSML"
SPEECH_MAPPINGS = {
'plain': SpeechType.plaintext,
'ssml': SpeechType.ssml,
}
class CardType(enum.Enum):
"""Alexa card types."""
"""The Alexa card types."""
simple = "Simple"
link_account = "LinkAccount"
class AlexaResponse(object):
"""Helps generating the response for Alexa."""
CONFIG_SCHEMA = vol.Schema({
DOMAIN: {
CONF_FLASH_BRIEFINGS: {
cv.string: vol.All(cv.ensure_list, [{
vol.Required(CONF_UID, default=str(uuid.uuid4())): cv.string,
vol.Required(CONF_TITLE): cv.template,
vol.Optional(CONF_AUDIO): cv.template,
vol.Required(CONF_TEXT, default=""): cv.template,
vol.Optional(CONF_DISPLAY_URL): cv.template,
}]),
}
}
}, extra=vol.ALLOW_EXTRA)
def __init__(self, hass, intent=None):
@asyncio.coroutine
def async_setup(hass, config):
"""Activate Alexa component."""
flash_briefings = config[DOMAIN].get(CONF_FLASH_BRIEFINGS, {})
hass.http.register_view(AlexaIntentsView)
hass.http.register_view(AlexaFlashBriefingView(hass, flash_briefings))
return True
class AlexaIntentsView(http.HomeAssistantView):
"""Handle Alexa requests."""
url = INTENTS_API_ENDPOINT
name = 'api:alexa'
@asyncio.coroutine
def post(self, request):
"""Handle Alexa."""
hass = request.app['hass']
data = yield from request.json()
_LOGGER.debug('Received Alexa request: %s', data)
req = data.get('request')
if req is None:
_LOGGER.error('Received invalid data from Alexa: %s', data)
return self.json_message('Expected request value not received',
HTTP_BAD_REQUEST)
req_type = req['type']
if req_type == 'SessionEndedRequest':
return None
alexa_intent_info = req.get('intent')
alexa_response = AlexaResponse(hass, alexa_intent_info)
if req_type != 'IntentRequest' and req_type != 'LaunchRequest':
_LOGGER.warning('Received unsupported request: %s', req_type)
return self.json_message(
'Received unsupported request: {}'.format(req_type),
HTTP_BAD_REQUEST)
if req_type == 'LaunchRequest':
intent_name = data.get('session', {}) \
.get('application', {}) \
.get('applicationId')
else:
intent_name = alexa_intent_info['name']
try:
intent_response = yield from intent.async_handle(
hass, DOMAIN, intent_name,
{key: {'value': value} for key, value
in alexa_response.variables.items()})
except intent.UnknownIntent as err:
_LOGGER.warning('Received unknown intent %s', intent_name)
alexa_response.add_speech(
SpeechType.plaintext,
"This intent is not yet configured within Home Assistant.")
return self.json(alexa_response)
except intent.InvalidSlotInfo as err:
_LOGGER.error('Received invalid slot data from Alexa: %s', err)
return self.json_message('Invalid slot data received',
HTTP_BAD_REQUEST)
except intent.IntentError:
_LOGGER.exception('Error handling request for %s', intent_name)
return self.json_message('Error handling intent', HTTP_BAD_REQUEST)
for intent_speech, alexa_speech in SPEECH_MAPPINGS.items():
if intent_speech in intent_response.speech:
alexa_response.add_speech(
alexa_speech,
intent_response.speech[intent_speech]['speech'])
break
if 'simple' in intent_response.card:
alexa_response.add_card(
CardType.simple, intent_response.card['simple']['title'],
intent_response.card['simple']['content'])
return self.json(alexa_response)
class AlexaResponse(object):
"""Help generating the response for Alexa."""
def __init__(self, hass, intent_info):
"""Initialize the response."""
self.hass = hass
self.speech = None
self.card = None
self.reprompt = None
self.session_attributes = {}
self.should_end_session = True
if intent is not None and 'slots' in intent:
self.variables = {key: value['value'] for key, value
in intent['slots'].items() if 'value' in value}
else:
self.variables = {}
self.variables = {}
# Intent is None if request was a LaunchRequest or SessionEndedRequest
if intent_info is not None:
for key, value in intent_info.get('slots', {}).items():
if 'value' in value:
underscored_key = key.replace('.', '_')
self.variables[underscored_key] = value['value']
def add_card(self, card_type, title, content):
""" Add a card to the response. """
"""Add a card to the response."""
assert self.card is None
card = {
@@ -136,19 +207,19 @@ class AlexaResponse(object):
self.card = card
return
card["title"] = self._render(title),
card["content"] = self._render(content)
card["title"] = title
card["content"] = content
self.card = card
def add_speech(self, speech_type, text):
""" Add speech to the response. """
"""Add speech to the response."""
assert self.speech is None
key = 'ssml' if speech_type == SpeechType.ssml else 'text'
self.speech = {
'type': speech_type.value,
key: self._render(text)
key: text
}
def add_reprompt(self, speech_type, text):
@@ -159,11 +230,11 @@ class AlexaResponse(object):
self.reprompt = {
'type': speech_type.value,
key: self._render(text)
key: text.async_render(self.variables)
}
def as_dict(self):
"""Returns response in an Alexa valid dict."""
"""Return response in an Alexa valid dict."""
response = {
'shouldEndSession': self.should_end_session
}
@@ -185,6 +256,65 @@ class AlexaResponse(object):
'response': response,
}
def _render(self, template_string):
"""Render a response, adding data from intent if available."""
return template.render(self.hass, template_string, self.variables)
class AlexaFlashBriefingView(http.HomeAssistantView):
"""Handle Alexa Flash Briefing skill requests."""
url = FLASH_BRIEFINGS_API_ENDPOINT
name = 'api:alexa:flash_briefings'
def __init__(self, hass, flash_briefings):
"""Initialize Alexa view."""
super().__init__()
self.flash_briefings = copy.deepcopy(flash_briefings)
template.attach(hass, self.flash_briefings)
@callback
def get(self, request, briefing_id):
"""Handle Alexa Flash Briefing request."""
_LOGGER.debug('Received Alexa flash briefing request for: %s',
briefing_id)
if self.flash_briefings.get(briefing_id) is None:
err = 'No configured Alexa flash briefing was found for: %s'
_LOGGER.error(err, briefing_id)
return b'', 404
briefing = []
for item in self.flash_briefings.get(briefing_id, []):
output = {}
if item.get(CONF_TITLE) is not None:
if isinstance(item.get(CONF_TITLE), template.Template):
output[ATTR_TITLE_TEXT] = item[CONF_TITLE].async_render()
else:
output[ATTR_TITLE_TEXT] = item.get(CONF_TITLE)
if item.get(CONF_TEXT) is not None:
if isinstance(item.get(CONF_TEXT), template.Template):
output[ATTR_MAIN_TEXT] = item[CONF_TEXT].async_render()
else:
output[ATTR_MAIN_TEXT] = item.get(CONF_TEXT)
if item.get(CONF_UID) is not None:
output[ATTR_UID] = item.get(CONF_UID)
if item.get(CONF_AUDIO) is not None:
if isinstance(item.get(CONF_AUDIO), template.Template):
output[ATTR_STREAM_URL] = item[CONF_AUDIO].async_render()
else:
output[ATTR_STREAM_URL] = item.get(CONF_AUDIO)
if item.get(CONF_DISPLAY_URL) is not None:
if isinstance(item.get(CONF_DISPLAY_URL),
template.Template):
output[ATTR_REDIRECTION_URL] = \
item[CONF_DISPLAY_URL].async_render()
else:
output[ATTR_REDIRECTION_URL] = item.get(CONF_DISPLAY_URL)
output[ATTR_UPDATE_DATE] = datetime.now().strftime(DATE_FORMAT)
briefing.append(output)
return self.json(briefing)

View File

@@ -0,0 +1,147 @@
"""
This component provides basic support for Amcrest IP cameras.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/amcrest/
"""
import logging
from datetime import timedelta
import aiohttp
import voluptuous as vol
from requests.exceptions import HTTPError, ConnectTimeout
from homeassistant.const import (
CONF_NAME, CONF_HOST, CONF_PORT, CONF_USERNAME, CONF_PASSWORD,
CONF_SENSORS, CONF_SCAN_INTERVAL, HTTP_BASIC_AUTHENTICATION)
from homeassistant.helpers import discovery
import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['amcrest==1.2.1']
DEPENDENCIES = ['ffmpeg']
_LOGGER = logging.getLogger(__name__)
CONF_AUTHENTICATION = 'authentication'
CONF_RESOLUTION = 'resolution'
CONF_STREAM_SOURCE = 'stream_source'
CONF_FFMPEG_ARGUMENTS = 'ffmpeg_arguments'
DEFAULT_NAME = 'Amcrest Camera'
DEFAULT_PORT = 80
DEFAULT_RESOLUTION = 'high'
DEFAULT_STREAM_SOURCE = 'snapshot'
TIMEOUT = 10
DATA_AMCREST = 'amcrest'
DOMAIN = 'amcrest'
NOTIFICATION_ID = 'amcrest_notification'
NOTIFICATION_TITLE = 'Amcrest Camera Setup'
RESOLUTION_LIST = {
'high': 0,
'low': 1,
}
SCAN_INTERVAL = timedelta(seconds=10)
AUTHENTICATION_LIST = {
'basic': 'basic'
}
STREAM_SOURCE_LIST = {
'mjpeg': 0,
'snapshot': 1,
'rtsp': 2,
}
# Sensor types are defined like: Name, units, icon
SENSORS = {
'motion_detector': ['Motion Detected', None, 'mdi:run'],
'sdcard': ['SD Used', '%', 'mdi:sd'],
'ptz_preset': ['PTZ Preset', None, 'mdi:camera-iris'],
}
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.All(cv.ensure_list, [vol.Schema({
vol.Required(CONF_HOST): cv.string,
vol.Required(CONF_USERNAME): cv.string,
vol.Required(CONF_PASSWORD): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
vol.Optional(CONF_AUTHENTICATION, default=HTTP_BASIC_AUTHENTICATION):
vol.All(vol.In(AUTHENTICATION_LIST)),
vol.Optional(CONF_RESOLUTION, default=DEFAULT_RESOLUTION):
vol.All(vol.In(RESOLUTION_LIST)),
vol.Optional(CONF_STREAM_SOURCE, default=DEFAULT_STREAM_SOURCE):
vol.All(vol.In(STREAM_SOURCE_LIST)),
vol.Optional(CONF_FFMPEG_ARGUMENTS): cv.string,
vol.Optional(CONF_SCAN_INTERVAL, default=SCAN_INTERVAL):
cv.time_period,
vol.Optional(CONF_SENSORS, default=None):
vol.All(cv.ensure_list, [vol.In(SENSORS)]),
})])
}, extra=vol.ALLOW_EXTRA)
def setup(hass, config):
"""Set up the Amcrest IP Camera component."""
from amcrest import AmcrestCamera
amcrest_cams = config[DOMAIN]
for device in amcrest_cams:
camera = AmcrestCamera(device.get(CONF_HOST),
device.get(CONF_PORT),
device.get(CONF_USERNAME),
device.get(CONF_PASSWORD)).camera
try:
camera.current_time
except (ConnectTimeout, HTTPError) as ex:
_LOGGER.error("Unable to connect to Amcrest camera: %s", str(ex))
hass.components.persistent_notification.create(
'Error: {}<br />'
'You will need to restart hass after fixing.'
''.format(ex),
title=NOTIFICATION_TITLE,
notification_id=NOTIFICATION_ID)
return False
ffmpeg_arguments = device.get(CONF_FFMPEG_ARGUMENTS)
name = device.get(CONF_NAME)
resolution = RESOLUTION_LIST[device.get(CONF_RESOLUTION)]
sensors = device.get(CONF_SENSORS)
stream_source = STREAM_SOURCE_LIST[device.get(CONF_STREAM_SOURCE)]
username = device.get(CONF_USERNAME)
password = device.get(CONF_PASSWORD)
# currently aiohttp only works with basic authentication
# only valid for mjpeg streaming
if username is not None and password is not None:
if device.get(CONF_AUTHENTICATION) == HTTP_BASIC_AUTHENTICATION:
authentication = aiohttp.BasicAuth(username, password)
else:
authentication = None
discovery.load_platform(
hass, 'camera', DOMAIN, {
'device': camera,
CONF_AUTHENTICATION: authentication,
CONF_FFMPEG_ARGUMENTS: ffmpeg_arguments,
CONF_NAME: name,
CONF_RESOLUTION: resolution,
CONF_STREAM_SOURCE: stream_source,
}, config)
if sensors:
discovery.load_platform(
hass, 'sensor', DOMAIN, {
'device': camera,
CONF_NAME: name,
CONF_SENSORS: sensors,
}, config)
return True

View File

@@ -0,0 +1,293 @@
"""
Support for IP Webcam, an Android app that acts as a full-featured webcam.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/android_ip_webcam/
"""
import asyncio
import logging
from datetime import timedelta
import voluptuous as vol
from homeassistant.core import callback
from homeassistant.const import (
CONF_NAME, CONF_HOST, CONF_PORT, CONF_USERNAME, CONF_PASSWORD,
CONF_SENSORS, CONF_SWITCHES, CONF_TIMEOUT, CONF_SCAN_INTERVAL,
CONF_PLATFORM)
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers import discovery
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.dispatcher import (
async_dispatcher_send, async_dispatcher_connect)
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.event import async_track_point_in_utc_time
from homeassistant.util.dt import utcnow
from homeassistant.components.camera.mjpeg import (
CONF_MJPEG_URL, CONF_STILL_IMAGE_URL)
REQUIREMENTS = ['pydroid-ipcam==0.8']
_LOGGER = logging.getLogger(__name__)
ATTR_AUD_CONNS = 'Audio Connections'
ATTR_HOST = 'host'
ATTR_VID_CONNS = 'Video Connections'
CONF_MOTION_SENSOR = 'motion_sensor'
DATA_IP_WEBCAM = 'android_ip_webcam'
DEFAULT_NAME = 'IP Webcam'
DEFAULT_PORT = 8080
DEFAULT_TIMEOUT = 10
DOMAIN = 'android_ip_webcam'
SCAN_INTERVAL = timedelta(seconds=10)
SIGNAL_UPDATE_DATA = 'android_ip_webcam_update'
KEY_MAP = {
'audio_connections': 'Audio Connections',
'adet_limit': 'Audio Trigger Limit',
'antibanding': 'Anti-banding',
'audio_only': 'Audio Only',
'battery_level': 'Battery Level',
'battery_temp': 'Battery Temperature',
'battery_voltage': 'Battery Voltage',
'coloreffect': 'Color Effect',
'exposure': 'Exposure Level',
'exposure_lock': 'Exposure Lock',
'ffc': 'Front-facing Camera',
'flashmode': 'Flash Mode',
'focus': 'Focus',
'focus_homing': 'Focus Homing',
'focus_region': 'Focus Region',
'focusmode': 'Focus Mode',
'gps_active': 'GPS Active',
'idle': 'Idle',
'ip_address': 'IPv4 Address',
'ipv6_address': 'IPv6 Address',
'ivideon_streaming': 'Ivideon Streaming',
'light': 'Light Level',
'mirror_flip': 'Mirror Flip',
'motion': 'Motion',
'motion_active': 'Motion Active',
'motion_detect': 'Motion Detection',
'motion_event': 'Motion Event',
'motion_limit': 'Motion Limit',
'night_vision': 'Night Vision',
'night_vision_average': 'Night Vision Average',
'night_vision_gain': 'Night Vision Gain',
'orientation': 'Orientation',
'overlay': 'Overlay',
'photo_size': 'Photo Size',
'pressure': 'Pressure',
'proximity': 'Proximity',
'quality': 'Quality',
'scenemode': 'Scene Mode',
'sound': 'Sound',
'sound_event': 'Sound Event',
'sound_timeout': 'Sound Timeout',
'torch': 'Torch',
'video_connections': 'Video Connections',
'video_chunk_len': 'Video Chunk Length',
'video_recording': 'Video Recording',
'video_size': 'Video Size',
'whitebalance': 'White Balance',
'whitebalance_lock': 'White Balance Lock',
'zoom': 'Zoom'
}
ICON_MAP = {
'audio_connections': 'mdi:speaker',
'battery_level': 'mdi:battery',
'battery_temp': 'mdi:thermometer',
'battery_voltage': 'mdi:battery-charging-100',
'exposure_lock': 'mdi:camera',
'ffc': 'mdi:camera-front-variant',
'focus': 'mdi:image-filter-center-focus',
'gps_active': 'mdi:crosshairs-gps',
'light': 'mdi:flashlight',
'motion': 'mdi:run',
'night_vision': 'mdi:weather-night',
'overlay': 'mdi:monitor',
'pressure': 'mdi:gauge',
'proximity': 'mdi:map-marker-radius',
'quality': 'mdi:quality-high',
'sound': 'mdi:speaker',
'sound_event': 'mdi:speaker',
'sound_timeout': 'mdi:speaker',
'torch': 'mdi:white-balance-sunny',
'video_chunk_len': 'mdi:video',
'video_connections': 'mdi:eye',
'video_recording': 'mdi:record-rec',
'whitebalance_lock': 'mdi:white-balance-auto'
}
SWITCHES = ['exposure_lock', 'ffc', 'focus', 'gps_active', 'night_vision',
'overlay', 'torch', 'whitebalance_lock', 'video_recording']
SENSORS = ['audio_connections', 'battery_level', 'battery_temp',
'battery_voltage', 'light', 'motion', 'pressure', 'proximity',
'sound', 'video_connections']
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.All(cv.ensure_list, [vol.Schema({
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Required(CONF_HOST): cv.string,
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
vol.Optional(CONF_TIMEOUT, default=DEFAULT_TIMEOUT): cv.positive_int,
vol.Optional(CONF_SCAN_INTERVAL, default=SCAN_INTERVAL):
cv.time_period,
vol.Inclusive(CONF_USERNAME, 'authentication'): cv.string,
vol.Inclusive(CONF_PASSWORD, 'authentication'): cv.string,
vol.Optional(CONF_SWITCHES, default=None):
vol.All(cv.ensure_list, [vol.In(SWITCHES)]),
vol.Optional(CONF_SENSORS, default=None):
vol.All(cv.ensure_list, [vol.In(SENSORS)]),
vol.Optional(CONF_MOTION_SENSOR, default=None): cv.boolean,
})])
}, extra=vol.ALLOW_EXTRA)
@asyncio.coroutine
def async_setup(hass, config):
"""Set up the IP Webcam component."""
from pydroid_ipcam import PyDroidIPCam
webcams = hass.data[DATA_IP_WEBCAM] = {}
websession = async_get_clientsession(hass)
@asyncio.coroutine
def async_setup_ipcamera(cam_config):
"""Set up an IP camera."""
host = cam_config[CONF_HOST]
username = cam_config.get(CONF_USERNAME)
password = cam_config.get(CONF_PASSWORD)
name = cam_config[CONF_NAME]
interval = cam_config[CONF_SCAN_INTERVAL]
switches = cam_config[CONF_SWITCHES]
sensors = cam_config[CONF_SENSORS]
motion = cam_config[CONF_MOTION_SENSOR]
# Init ip webcam
cam = PyDroidIPCam(
hass.loop, websession, host, cam_config[CONF_PORT],
username=username, password=password,
timeout=cam_config[CONF_TIMEOUT]
)
if switches is None:
switches = [setting for setting in cam.enabled_settings
if setting in SWITCHES]
if sensors is None:
sensors = [sensor for sensor in cam.enabled_sensors
if sensor in SENSORS]
sensors.extend(['audio_connections', 'video_connections'])
if motion is None:
motion = 'motion_active' in cam.enabled_sensors
@asyncio.coroutine
def async_update_data(now):
"""Update data from IP camera in SCAN_INTERVAL."""
yield from cam.update()
async_dispatcher_send(hass, SIGNAL_UPDATE_DATA, host)
async_track_point_in_utc_time(
hass, async_update_data, utcnow() + interval)
yield from async_update_data(None)
# Load platforms
webcams[host] = cam
mjpeg_camera = {
CONF_PLATFORM: 'mjpeg',
CONF_MJPEG_URL: cam.mjpeg_url,
CONF_STILL_IMAGE_URL: cam.image_url,
CONF_NAME: name,
}
if username and password:
mjpeg_camera.update({
CONF_USERNAME: username,
CONF_PASSWORD: password
})
hass.async_add_job(discovery.async_load_platform(
hass, 'camera', 'mjpeg', mjpeg_camera, config))
if sensors:
hass.async_add_job(discovery.async_load_platform(
hass, 'sensor', DOMAIN, {
CONF_NAME: name,
CONF_HOST: host,
CONF_SENSORS: sensors,
}, config))
if switches:
hass.async_add_job(discovery.async_load_platform(
hass, 'switch', DOMAIN, {
CONF_NAME: name,
CONF_HOST: host,
CONF_SWITCHES: switches,
}, config))
if motion:
hass.async_add_job(discovery.async_load_platform(
hass, 'binary_sensor', DOMAIN, {
CONF_HOST: host,
CONF_NAME: name,
}, config))
tasks = [async_setup_ipcamera(conf) for conf in config[DOMAIN]]
if tasks:
yield from asyncio.wait(tasks, loop=hass.loop)
return True
class AndroidIPCamEntity(Entity):
"""The Android device running IP Webcam."""
def __init__(self, host, ipcam):
"""Initialize the data oject."""
self._host = host
self._ipcam = ipcam
@asyncio.coroutine
def async_added_to_hass(self):
"""Register update dispatcher."""
@callback
def async_ipcam_update(host):
"""Update callback."""
if self._host != host:
return
self.hass.async_add_job(self.async_update_ha_state(True))
async_dispatcher_connect(
self.hass, SIGNAL_UPDATE_DATA, async_ipcam_update)
@property
def should_poll(self):
"""Return True if entity has to be polled for state."""
return False
@property
def available(self):
"""Return True if entity is available."""
return self._ipcam.available
@property
def device_state_attributes(self):
"""Return the state attributes."""
state_attr = {ATTR_HOST: self._host}
if self._ipcam.status_data is None:
return state_attr
state_attr[ATTR_VID_CONNS] = \
self._ipcam.status_data.get('video_connections')
state_attr[ATTR_AUD_CONNS] = \
self._ipcam.status_data.get('audio_connections')
return state_attr

View File

@@ -1,8 +1,5 @@
"""
homeassistant.components.apcupsd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sets up and provides access to the status output of APCUPSd via its Network
Information Server (NIS).
Support for status output of APCUPSd via its Network Information Server (NIS).
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/apcupsd/
@@ -10,35 +7,43 @@ https://home-assistant.io/components/apcupsd/
import logging
from datetime import timedelta
import voluptuous as vol
from homeassistant.const import (CONF_HOST, CONF_PORT)
import homeassistant.helpers.config_validation as cv
from homeassistant.util import Throttle
DOMAIN = "apcupsd"
REQUIREMENTS = ("apcaccess==0.0.4",)
CONF_HOST = "host"
CONF_PORT = "port"
CONF_TYPE = "type"
DEFAULT_HOST = "localhost"
DEFAULT_PORT = 3551
KEY_STATUS = "STATUS"
VALUE_ONLINE = "ONLINE"
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=60)
DATA = None
REQUIREMENTS = ['apcaccess==0.0.13']
_LOGGER = logging.getLogger(__name__)
CONF_TYPE = 'type'
DATA = None
DEFAULT_HOST = 'localhost'
DEFAULT_PORT = 3551
DOMAIN = 'apcupsd'
KEY_STATUS = 'STATUS'
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=60)
VALUE_ONLINE = 'ONLINE'
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
vol.Optional(CONF_HOST, default=DEFAULT_HOST): cv.string,
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
}),
}, extra=vol.ALLOW_EXTRA)
def setup(hass, config):
""" Use config values to set up a function enabling status retrieval. """
"""Use config values to set up a function enabling status retrieval."""
global DATA
host = config[DOMAIN].get(CONF_HOST, DEFAULT_HOST)
port = config[DOMAIN].get(CONF_PORT, DEFAULT_PORT)
conf = config[DOMAIN]
host = conf.get(CONF_HOST)
port = conf.get(CONF_PORT)
DATA = APCUPSdData(host, port)
@@ -54,11 +59,14 @@ def setup(hass, config):
class APCUPSdData(object):
"""Stores the data retrieved from APCUPSd.
For each entity to use, acts as the single point responsible for fetching
updates from the server.
"""
Stores the data retrieved from APCUPSd for each entity to use, acts as the
single point responsible for fetching updates from the server.
"""
def __init__(self, host, port):
"""Initialize the data oject."""
from apcaccess import status
self._host = host
self._port = port
@@ -68,17 +76,15 @@ class APCUPSdData(object):
@property
def status(self):
""" Get latest update if throttle allows. Return status. """
"""Get latest update if throttle allows. Return status."""
self.update()
return self._status
def _get_status(self):
""" Get the status from APCUPSd and parse it into a dict. """
"""Get the status from APCUPSd and parse it into a dict."""
return self._parse(self._get(host=self._host, port=self._port))
@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self, **kwargs):
"""
Fetch the latest status from APCUPSd and store it in self._status.
"""
"""Fetch the latest status from APCUPSd."""
self._status = self._get_status()

View File

@@ -4,24 +4,28 @@ Rest API for Home Assistant.
For more details about the RESTful API, please refer to the documentation at
https://home-assistant.io/developers/api/
"""
import asyncio
import json
import logging
import re
import threading
from aiohttp import web
import async_timeout
import homeassistant.core as ha
import homeassistant.remote as rem
from homeassistant.bootstrap import ERROR_LOG_FILENAME
from homeassistant.const import (
CONTENT_TYPE_TEXT_PLAIN, EVENT_HOMEASSISTANT_STOP, EVENT_TIME_CHANGED,
HTTP_BAD_REQUEST, HTTP_CREATED, HTTP_HEADER_CONTENT_TYPE, HTTP_NOT_FOUND,
HTTP_OK, HTTP_UNPROCESSABLE_ENTITY, MATCH_ALL, URL_API, URL_API_COMPONENTS,
URL_API_CONFIG, URL_API_ERROR_LOG, URL_API_EVENT_FORWARD, URL_API_EVENTS,
URL_API_LOG_OUT, URL_API_SERVICES, URL_API_STATES, URL_API_STATES_ENTITY,
URL_API_STREAM, URL_API_TEMPLATE)
EVENT_HOMEASSISTANT_STOP, EVENT_TIME_CHANGED,
HTTP_BAD_REQUEST, HTTP_CREATED, HTTP_NOT_FOUND,
MATCH_ALL, URL_API, URL_API_COMPONENTS,
URL_API_CONFIG, URL_API_DISCOVERY_INFO, URL_API_ERROR_LOG,
URL_API_EVENTS, URL_API_SERVICES,
URL_API_STATES, URL_API_STATES_ENTITY, URL_API_STREAM, URL_API_TEMPLATE,
__version__)
from homeassistant.exceptions import TemplateError
from homeassistant.helpers.state import TrackStates
from homeassistant.helpers.state import AsyncTrackStates
from homeassistant.helpers import template
from homeassistant.components.http import HomeAssistantView
DOMAIN = 'api'
DEPENDENCIES = ['http']
@@ -34,366 +38,321 @@ _LOGGER = logging.getLogger(__name__)
def setup(hass, config):
"""Register the API with the HTTP interface."""
hass.http.register_view(APIStatusView)
hass.http.register_view(APIEventStream)
hass.http.register_view(APIConfigView)
hass.http.register_view(APIDiscoveryView)
hass.http.register_view(APIStatesView)
hass.http.register_view(APIEntityStateView)
hass.http.register_view(APIEventListenersView)
hass.http.register_view(APIEventView)
hass.http.register_view(APIServicesView)
hass.http.register_view(APIDomainServicesView)
hass.http.register_view(APIComponentsView)
hass.http.register_view(APITemplateView)
# /api - for validation purposes
hass.http.register_path('GET', URL_API, _handle_get_api)
# /api/stream
hass.http.register_path('GET', URL_API_STREAM, _handle_get_api_stream)
# /api/config
hass.http.register_path('GET', URL_API_CONFIG, _handle_get_api_config)
# /states
hass.http.register_path('GET', URL_API_STATES, _handle_get_api_states)
hass.http.register_path(
'GET', re.compile(r'/api/states/(?P<entity_id>[a-zA-Z\._0-9]+)'),
_handle_get_api_states_entity)
hass.http.register_path(
'POST', re.compile(r'/api/states/(?P<entity_id>[a-zA-Z\._0-9]+)'),
_handle_post_state_entity)
hass.http.register_path(
'PUT', re.compile(r'/api/states/(?P<entity_id>[a-zA-Z\._0-9]+)'),
_handle_post_state_entity)
hass.http.register_path(
'DELETE', re.compile(r'/api/states/(?P<entity_id>[a-zA-Z\._0-9]+)'),
_handle_delete_state_entity)
# /events
hass.http.register_path('GET', URL_API_EVENTS, _handle_get_api_events)
hass.http.register_path(
'POST', re.compile(r'/api/events/(?P<event_type>[a-zA-Z\._0-9]+)'),
_handle_api_post_events_event)
# /services
hass.http.register_path('GET', URL_API_SERVICES, _handle_get_api_services)
hass.http.register_path(
'POST',
re.compile((r'/api/services/'
r'(?P<domain>[a-zA-Z\._0-9]+)/'
r'(?P<service>[a-zA-Z\._0-9]+)')),
_handle_post_api_services_domain_service)
# /event_forwarding
hass.http.register_path(
'POST', URL_API_EVENT_FORWARD, _handle_post_api_event_forward)
hass.http.register_path(
'DELETE', URL_API_EVENT_FORWARD, _handle_delete_api_event_forward)
# /components
hass.http.register_path(
'GET', URL_API_COMPONENTS, _handle_get_api_components)
hass.http.register_path('GET', URL_API_ERROR_LOG,
_handle_get_api_error_log)
hass.http.register_path('POST', URL_API_LOG_OUT, _handle_post_api_log_out)
hass.http.register_path('POST', URL_API_TEMPLATE,
_handle_post_api_template)
hass.http.register_static_path(
URL_API_ERROR_LOG, hass.config.path(ERROR_LOG_FILENAME), False)
return True
def _handle_get_api(handler, path_match, data):
"""Renders the debug interface."""
handler.write_json_message("API running.")
class APIStatusView(HomeAssistantView):
"""View to handle Status requests."""
url = URL_API
name = "api:status"
def _handle_get_api_stream(handler, path_match, data):
"""Provide a streaming interface for the event bus."""
gracefully_closed = False
hass = handler.server.hass
wfile = handler.wfile
write_lock = threading.Lock()
block = threading.Event()
session_id = None
@ha.callback
def get(self, request):
"""Retrieve if API is running."""
return self.json_message('API running.')
restrict = data.get('restrict')
if restrict:
restrict = restrict.split(',')
def write_message(payload):
"""Writes a message to the output."""
with write_lock:
msg = "data: {}\n\n".format(payload)
class APIEventStream(HomeAssistantView):
"""View to handle EventStream requests."""
try:
wfile.write(msg.encode("UTF-8"))
wfile.flush()
except (IOError, ValueError):
# IOError: socket errors
# ValueError: raised when 'I/O operation on closed file'
block.set()
url = URL_API_STREAM
name = "api:stream"
def forward_events(event):
"""Forwards events to the open request."""
nonlocal gracefully_closed
@asyncio.coroutine
def get(self, request):
"""Provide a streaming interface for the event bus."""
# pylint: disable=no-self-use
hass = request.app['hass']
stop_obj = object()
to_write = asyncio.Queue(loop=hass.loop)
if block.is_set() or event.event_type == EVENT_TIME_CHANGED:
return
elif event.event_type == EVENT_HOMEASSISTANT_STOP:
gracefully_closed = True
block.set()
return
restrict = request.query.get('restrict')
if restrict:
restrict = restrict.split(',') + [EVENT_HOMEASSISTANT_STOP]
handler.server.sessions.extend_validation(session_id)
write_message(json.dumps(event, cls=rem.JSONEncoder))
@asyncio.coroutine
def forward_events(event):
"""Forward events to the open request."""
if event.event_type == EVENT_TIME_CHANGED:
return
handler.send_response(HTTP_OK)
handler.send_header('Content-type', 'text/event-stream')
session_id = handler.set_session_cookie_header()
handler.end_headers()
if restrict and event.event_type not in restrict:
return
if restrict:
for event in restrict:
hass.bus.listen(event, forward_events)
else:
hass.bus.listen(MATCH_ALL, forward_events)
_LOGGER.debug('STREAM %s FORWARDING %s', id(stop_obj), event)
while True:
write_message(STREAM_PING_PAYLOAD)
if event.event_type == EVENT_HOMEASSISTANT_STOP:
data = stop_obj
else:
data = json.dumps(event, cls=rem.JSONEncoder)
block.wait(STREAM_PING_INTERVAL)
yield from to_write.put(data)
if block.is_set():
break
response = web.StreamResponse()
response.content_type = 'text/event-stream'
yield from response.prepare(request)
if not gracefully_closed:
_LOGGER.info("Found broken event stream to %s, cleaning up",
handler.client_address[0])
unsub_stream = hass.bus.async_listen(MATCH_ALL, forward_events)
if restrict:
for event in restrict:
hass.bus.remove_listener(event, forward_events)
else:
hass.bus.remove_listener(MATCH_ALL, forward_events)
try:
_LOGGER.debug('STREAM %s ATTACHED', id(stop_obj))
# Fire off one message so browsers fire open event right away
yield from to_write.put(STREAM_PING_PAYLOAD)
def _handle_get_api_config(handler, path_match, data):
"""Returns the Home Assistant configuration."""
handler.write_json(handler.server.hass.config.as_dict())
while True:
try:
with async_timeout.timeout(STREAM_PING_INTERVAL,
loop=hass.loop):
payload = yield from to_write.get()
if payload is stop_obj:
break
def _handle_get_api_states(handler, path_match, data):
"""Returns a dict containing all entity ids and their state."""
handler.write_json(handler.server.hass.states.all())
msg = "data: {}\n\n".format(payload)
_LOGGER.debug('STREAM %s WRITING %s', id(stop_obj),
msg.strip())
response.write(msg.encode("UTF-8"))
yield from response.drain()
except asyncio.TimeoutError:
yield from to_write.put(STREAM_PING_PAYLOAD)
except asyncio.CancelledError:
_LOGGER.debug('STREAM %s ABORT', id(stop_obj))
def _handle_get_api_states_entity(handler, path_match, data):
"""Returns the state of a specific entity."""
entity_id = path_match.group('entity_id')
finally:
_LOGGER.debug('STREAM %s RESPONSE CLOSED', id(stop_obj))
unsub_stream()
state = handler.server.hass.states.get(entity_id)
if state:
handler.write_json(state)
else:
handler.write_json_message("State does not exist.", HTTP_NOT_FOUND)
class APIConfigView(HomeAssistantView):
"""View to handle Config requests."""
url = URL_API_CONFIG
name = "api:config"
def _handle_post_state_entity(handler, path_match, data):
"""Handles updating the state of an entity.
@ha.callback
def get(self, request):
"""Get current configuration."""
return self.json(request.app['hass'].config.as_dict())
This handles the following paths:
/api/states/<entity_id>
"""
entity_id = path_match.group('entity_id')
try:
new_state = data['state']
except KeyError:
handler.write_json_message("state not specified", HTTP_BAD_REQUEST)
return
class APIDiscoveryView(HomeAssistantView):
"""View to provide discovery info."""
attributes = data['attributes'] if 'attributes' in data else None
requires_auth = False
url = URL_API_DISCOVERY_INFO
name = "api:discovery"
is_new_state = handler.server.hass.states.get(entity_id) is None
@ha.callback
def get(self, request):
"""Get discovery info."""
hass = request.app['hass']
needs_auth = hass.config.api.api_password is not None
return self.json({
'base_url': hass.config.api.base_url,
'location_name': hass.config.location_name,
'requires_api_password': needs_auth,
'version': __version__
})
# Write state
handler.server.hass.states.set(entity_id, new_state, attributes)
state = handler.server.hass.states.get(entity_id)
class APIStatesView(HomeAssistantView):
"""View to handle States requests."""
status_code = HTTP_CREATED if is_new_state else HTTP_OK
url = URL_API_STATES
name = "api:states"
handler.write_json(
state.as_dict(),
status_code=status_code,
location=URL_API_STATES_ENTITY.format(entity_id))
@ha.callback
def get(self, request):
"""Get current states."""
return self.json(request.app['hass'].states.async_all())
def _handle_delete_state_entity(handler, path_match, data):
"""Handle request to delete an entity from state machine.
class APIEntityStateView(HomeAssistantView):
"""View to handle EntityState requests."""
This handles the following paths:
/api/states/<entity_id>
"""
entity_id = path_match.group('entity_id')
url = "/api/states/{entity_id}"
name = "api:entity-state"
if handler.server.hass.states.remove(entity_id):
handler.write_json_message(
"Entity not found", HTTP_NOT_FOUND)
else:
handler.write_json_message(
"Entity removed", HTTP_OK)
@ha.callback
def get(self, request, entity_id):
"""Retrieve state of entity."""
state = request.app['hass'].states.get(entity_id)
if state:
return self.json(state)
return self.json_message('Entity not found', HTTP_NOT_FOUND)
@asyncio.coroutine
def post(self, request, entity_id):
"""Update state of entity."""
hass = request.app['hass']
try:
data = yield from request.json()
except ValueError:
return self.json_message('Invalid JSON specified',
HTTP_BAD_REQUEST)
def _handle_get_api_events(handler, path_match, data):
"""Handles getting overview of event listeners."""
handler.write_json(events_json(handler.server.hass))
new_state = data.get('state')
if new_state is None:
return self.json_message('No state specified', HTTP_BAD_REQUEST)
def _handle_api_post_events_event(handler, path_match, event_data):
"""Handles firing of an event.
attributes = data.get('attributes')
force_update = data.get('force_update', False)
This handles the following paths:
/api/events/<event_type>
is_new_state = hass.states.get(entity_id) is None
Events from /api are threated as remote events.
"""
event_type = path_match.group('event_type')
# Write state
hass.states.async_set(entity_id, new_state, attributes, force_update)
if event_data is not None and not isinstance(event_data, dict):
handler.write_json_message(
"event_data should be an object", HTTP_UNPROCESSABLE_ENTITY)
return
# Read the state back for our response
status_code = HTTP_CREATED if is_new_state else 200
resp = self.json(hass.states.get(entity_id), status_code)
event_origin = ha.EventOrigin.remote
resp.headers.add('Location', URL_API_STATES_ENTITY.format(entity_id))
# Special case handling for event STATE_CHANGED
# We will try to convert state dicts back to State objects
if event_type == ha.EVENT_STATE_CHANGED and event_data:
for key in ('old_state', 'new_state'):
state = ha.State.from_dict(event_data.get(key))
return resp
if state:
event_data[key] = state
@ha.callback
def delete(self, request, entity_id):
"""Remove entity."""
if request.app['hass'].states.async_remove(entity_id):
return self.json_message('Entity removed')
return self.json_message('Entity not found', HTTP_NOT_FOUND)
handler.server.hass.bus.fire(event_type, event_data, event_origin)
handler.write_json_message("Event {} fired.".format(event_type))
class APIEventListenersView(HomeAssistantView):
"""View to handle EventListeners requests."""
url = URL_API_EVENTS
name = "api:event-listeners"
def _handle_get_api_services(handler, path_match, data):
"""Handles getting overview of services."""
handler.write_json(services_json(handler.server.hass))
@ha.callback
def get(self, request):
"""Get event listeners."""
return self.json(async_events_json(request.app['hass']))
# pylint: disable=invalid-name
def _handle_post_api_services_domain_service(handler, path_match, data):
"""Handles calling a service.
class APIEventView(HomeAssistantView):
"""View to handle Event requests."""
This handles the following paths:
/api/services/<domain>/<service>
"""
domain = path_match.group('domain')
service = path_match.group('service')
url = '/api/events/{event_type}'
name = "api:event"
with TrackStates(handler.server.hass) as changed_states:
handler.server.hass.services.call(domain, service, data, True)
@asyncio.coroutine
def post(self, request, event_type):
"""Fire events."""
body = yield from request.text()
event_data = json.loads(body) if body else None
handler.write_json(changed_states)
if event_data is not None and not isinstance(event_data, dict):
return self.json_message('Event data should be a JSON object',
HTTP_BAD_REQUEST)
# Special case handling for event STATE_CHANGED
# We will try to convert state dicts back to State objects
if event_type == ha.EVENT_STATE_CHANGED and event_data:
for key in ('old_state', 'new_state'):
state = ha.State.from_dict(event_data.get(key))
# pylint: disable=invalid-name
def _handle_post_api_event_forward(handler, path_match, data):
"""Handles adding an event forwarding target."""
try:
host = data['host']
api_password = data['api_password']
except KeyError:
handler.write_json_message(
"No host or api_password received.", HTTP_BAD_REQUEST)
return
if state:
event_data[key] = state
try:
port = int(data['port']) if 'port' in data else None
except ValueError:
handler.write_json_message(
"Invalid value received for port", HTTP_UNPROCESSABLE_ENTITY)
return
request.app['hass'].bus.async_fire(event_type, event_data,
ha.EventOrigin.remote)
api = rem.API(host, api_password, port)
return self.json_message("Event {} fired.".format(event_type))
if not api.validate_api():
handler.write_json_message(
"Unable to validate API", HTTP_UNPROCESSABLE_ENTITY)
return
if handler.server.event_forwarder is None:
handler.server.event_forwarder = \
rem.EventForwarder(handler.server.hass)
class APIServicesView(HomeAssistantView):
"""View to handle Services requests."""
handler.server.event_forwarder.connect(api)
url = URL_API_SERVICES
name = "api:services"
handler.write_json_message("Event forwarding setup.")
@ha.callback
def get(self, request):
"""Get registered services."""
return self.json(async_services_json(request.app['hass']))
def _handle_delete_api_event_forward(handler, path_match, data):
"""Handles deleting an event forwarding target."""
try:
host = data['host']
except KeyError:
handler.write_json_message("No host received.", HTTP_BAD_REQUEST)
return
class APIDomainServicesView(HomeAssistantView):
"""View to handle DomainServices requests."""
try:
port = int(data['port']) if 'port' in data else None
except ValueError:
handler.write_json_message(
"Invalid value received for port", HTTP_UNPROCESSABLE_ENTITY)
return
url = "/api/services/{domain}/{service}"
name = "api:domain-services"
if handler.server.event_forwarder is not None:
api = rem.API(host, None, port)
@asyncio.coroutine
def post(self, request, domain, service):
"""Call a service.
handler.server.event_forwarder.disconnect(api)
Returns a list of changed states.
"""
hass = request.app['hass']
body = yield from request.text()
data = json.loads(body) if body else None
handler.write_json_message("Event forwarding cancelled.")
with AsyncTrackStates(hass) as changed_states:
yield from hass.services.async_call(domain, service, data, True)
return self.json(changed_states)
def _handle_get_api_components(handler, path_match, data):
"""Returns all the loaded components."""
handler.write_json(handler.server.hass.config.components)
class APIComponentsView(HomeAssistantView):
"""View to handle Components requests."""
def _handle_get_api_error_log(handler, path_match, data):
"""Returns the logged errors for this session."""
handler.write_file(handler.server.hass.config.path(ERROR_LOG_FILENAME),
False)
url = URL_API_COMPONENTS
name = "api:components"
@ha.callback
def get(self, request):
"""Get current loaded components."""
return self.json(request.app['hass'].config.components)
def _handle_post_api_log_out(handler, path_match, data):
"""Log user out."""
handler.send_response(HTTP_OK)
handler.destroy_session()
handler.end_headers()
class APITemplateView(HomeAssistantView):
"""View to handle requests."""
def _handle_post_api_template(handler, path_match, data):
"""Log user out."""
template_string = data.get('template', '')
url = URL_API_TEMPLATE
name = "api:template"
try:
rendered = template.render(handler.server.hass, template_string)
@asyncio.coroutine
def post(self, request):
"""Render a template."""
try:
data = yield from request.json()
tpl = template.Template(data['template'], request.app['hass'])
return tpl.async_render(data.get('variables'))
except (ValueError, TemplateError) as ex:
return self.json_message('Error rendering template: {}'.format(ex),
HTTP_BAD_REQUEST)
handler.send_response(HTTP_OK)
handler.send_header(HTTP_HEADER_CONTENT_TYPE, CONTENT_TYPE_TEXT_PLAIN)
handler.end_headers()
handler.wfile.write(rendered.encode('utf-8'))
except TemplateError as e:
handler.write_json_message(str(e), HTTP_UNPROCESSABLE_ENTITY)
return
def services_json(hass):
def async_services_json(hass):
"""Generate services data to JSONify."""
return [{"domain": key, "services": value}
for key, value in hass.services.services.items()]
for key, value in hass.services.async_services().items()]
def events_json(hass):
def async_events_json(hass):
"""Generate event data to JSONify."""
return [{"event": key, "listener_count": value}
for key, value in hass.bus.listeners.items()]
for key, value in hass.bus.async_listeners().items()]

View File

@@ -0,0 +1,133 @@
"""
Support for API.AI webhook.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/apiai/
"""
import asyncio
import logging
import voluptuous as vol
from homeassistant.const import PROJECT_NAME, HTTP_BAD_REQUEST
from homeassistant.helpers import intent, template
from homeassistant.components.http import HomeAssistantView
_LOGGER = logging.getLogger(__name__)
INTENTS_API_ENDPOINT = '/api/apiai'
CONF_INTENTS = 'intents'
CONF_SPEECH = 'speech'
CONF_ACTION = 'action'
CONF_ASYNC_ACTION = 'async_action'
DEFAULT_CONF_ASYNC_ACTION = False
DOMAIN = 'apiai'
DEPENDENCIES = ['http']
CONFIG_SCHEMA = vol.Schema({
DOMAIN: {}
}, extra=vol.ALLOW_EXTRA)
@asyncio.coroutine
def async_setup(hass, config):
"""Activate API.AI component."""
hass.http.register_view(ApiaiIntentsView)
return True
class ApiaiIntentsView(HomeAssistantView):
"""Handle API.AI requests."""
url = INTENTS_API_ENDPOINT
name = 'api:apiai'
@asyncio.coroutine
def post(self, request):
"""Handle API.AI."""
hass = request.app['hass']
data = yield from request.json()
_LOGGER.debug("Received api.ai request: %s", data)
req = data.get('result')
if req is None:
_LOGGER.error("Received invalid data from api.ai: %s", data)
return self.json_message(
"Expected result value not received", HTTP_BAD_REQUEST)
action_incomplete = req['actionIncomplete']
if action_incomplete:
return None
action = req.get('action')
parameters = req.get('parameters')
apiai_response = ApiaiResponse(parameters)
if action == "":
_LOGGER.warning("Received intent with empty action")
apiai_response.add_speech(
"You have not defined an action in your api.ai intent.")
return self.json(apiai_response)
try:
intent_response = yield from intent.async_handle(
hass, DOMAIN, action,
{key: {'value': value} for key, value
in parameters.items()})
except intent.UnknownIntent as err:
_LOGGER.warning('Received unknown intent %s', action)
apiai_response.add_speech(
"This intent is not yet configured within Home Assistant.")
return self.json(apiai_response)
except intent.InvalidSlotInfo as err:
_LOGGER.error('Received invalid slot data: %s', err)
return self.json_message('Invalid slot data received',
HTTP_BAD_REQUEST)
except intent.IntentError:
_LOGGER.exception('Error handling request for %s', action)
return self.json_message('Error handling intent', HTTP_BAD_REQUEST)
if 'plain' in intent_response.speech:
apiai_response.add_speech(
intent_response.speech['plain']['speech'])
return self.json(apiai_response)
class ApiaiResponse(object):
"""Help generating the response for API.AI."""
def __init__(self, parameters):
"""Initialize the response."""
self.speech = None
self.parameters = {}
# Parameter names replace '.' and '-' for '_'
for key, value in parameters.items():
underscored_key = key.replace('.', '_').replace('-', '_')
self.parameters[underscored_key] = value
def add_speech(self, text):
"""Add speech to the response."""
assert self.speech is None
if isinstance(text, template.Template):
text = text.async_render(self.parameters)
self.speech = text
def as_dict(self):
"""Return response in an API.AI valid dict."""
return {
'speech': self.speech,
'displayText': self.speech,
'source': PROJECT_NAME,
}

View File

@@ -0,0 +1,253 @@
"""
Support for Apple TV.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/apple_tv/
"""
import os
import asyncio
import logging
import voluptuous as vol
from homeassistant.const import (CONF_HOST, CONF_NAME, ATTR_ENTITY_ID)
from homeassistant.config import load_yaml_config_file
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers import discovery
from homeassistant.components.discovery import SERVICE_APPLE_TV
import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['pyatv==0.3.4']
_LOGGER = logging.getLogger(__name__)
DOMAIN = 'apple_tv'
SERVICE_SCAN = 'apple_tv_scan'
SERVICE_AUTHENTICATE = 'apple_tv_authenticate'
ATTR_ATV = 'atv'
ATTR_POWER = 'power'
CONF_LOGIN_ID = 'login_id'
CONF_START_OFF = 'start_off'
CONF_CREDENTIALS = 'credentials'
DEFAULT_NAME = 'Apple TV'
DATA_APPLE_TV = 'data_apple_tv'
DATA_ENTITIES = 'data_apple_tv_entities'
KEY_CONFIG = 'apple_tv_configuring'
NOTIFICATION_AUTH_ID = 'apple_tv_auth_notification'
NOTIFICATION_AUTH_TITLE = 'Apple TV Authentication'
NOTIFICATION_SCAN_ID = 'apple_tv_scan_notification'
NOTIFICATION_SCAN_TITLE = 'Apple TV Scan'
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.All(cv.ensure_list, [vol.Schema({
vol.Required(CONF_HOST): cv.string,
vol.Required(CONF_LOGIN_ID): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_CREDENTIALS, default=None): cv.string,
vol.Optional(CONF_START_OFF, default=False): cv.boolean
})])
}, extra=vol.ALLOW_EXTRA)
# Currently no attributes but it might change later
APPLE_TV_SCAN_SCHEMA = vol.Schema({})
APPLE_TV_AUTHENTICATE_SCHEMA = vol.Schema({
ATTR_ENTITY_ID: cv.entity_ids,
})
def request_configuration(hass, config, atv, credentials):
"""Request configuration steps from the user."""
configurator = hass.components.configurator
@asyncio.coroutine
def configuration_callback(callback_data):
"""Handle the submitted configuration."""
from pyatv import exceptions
pin = callback_data.get('pin')
try:
yield from atv.airplay.finish_authentication(pin)
hass.components.persistent_notification.async_create(
'Authentication succeeded!<br /><br />Add the following '
'to credentials: in your apple_tv configuration:<br /><br />'
'{0}'.format(credentials),
title=NOTIFICATION_AUTH_TITLE,
notification_id=NOTIFICATION_AUTH_ID)
except exceptions.DeviceAuthenticationError as ex:
hass.components.persistent_notification.async_create(
'Authentication failed! Did you enter correct PIN?<br /><br />'
'Details: {0}'.format(ex),
title=NOTIFICATION_AUTH_TITLE,
notification_id=NOTIFICATION_AUTH_ID)
hass.async_add_job(configurator.request_done, instance)
instance = configurator.request_config(
hass, 'Apple TV Authentication', configuration_callback,
description='Please enter PIN code shown on screen.',
submit_caption='Confirm',
fields=[{'id': 'pin', 'name': 'PIN Code', 'type': 'password'}]
)
@asyncio.coroutine
def scan_for_apple_tvs(hass):
"""Scan for devices and present a notification of the ones found."""
import pyatv
atvs = yield from pyatv.scan_for_apple_tvs(hass.loop, timeout=3)
devices = []
for atv in atvs:
login_id = atv.login_id
if login_id is None:
login_id = 'Home Sharing disabled'
devices.append('Name: {0}<br />Host: {1}<br />Login ID: {2}'.format(
atv.name, atv.address, login_id))
if not devices:
devices = ['No device(s) found']
hass.components.persistent_notification.async_create(
'The following devices were found:<br /><br />' +
'<br /><br />'.join(devices),
title=NOTIFICATION_SCAN_TITLE,
notification_id=NOTIFICATION_SCAN_ID)
@asyncio.coroutine
def async_setup(hass, config):
"""Set up the Apple TV component."""
if DATA_APPLE_TV not in hass.data:
hass.data[DATA_APPLE_TV] = {}
@asyncio.coroutine
def async_service_handler(service):
"""Handler for service calls."""
entity_ids = service.data.get(ATTR_ENTITY_ID)
if entity_ids:
devices = [device for device in hass.data[DATA_ENTITIES]
if device.entity_id in entity_ids]
else:
devices = hass.data[DATA_ENTITIES]
for device in devices:
atv = device.atv
if service.service == SERVICE_AUTHENTICATE:
credentials = yield from atv.airplay.generate_credentials()
yield from atv.airplay.load_credentials(credentials)
_LOGGER.debug('Generated new credentials: %s', credentials)
yield from atv.airplay.start_authentication()
hass.async_add_job(request_configuration,
hass, config, atv, credentials)
elif service.service == SERVICE_SCAN:
hass.async_add_job(scan_for_apple_tvs, hass)
@asyncio.coroutine
def atv_discovered(service, info):
"""Setup an Apple TV that was auto discovered."""
yield from _setup_atv(hass, {
CONF_NAME: info['name'],
CONF_HOST: info['host'],
CONF_LOGIN_ID: info['properties']['hG'],
CONF_START_OFF: False
})
discovery.async_listen(hass, SERVICE_APPLE_TV, atv_discovered)
tasks = [_setup_atv(hass, conf) for conf in config.get(DOMAIN, [])]
if tasks:
yield from asyncio.wait(tasks, loop=hass.loop)
descriptions = yield from hass.async_add_job(
load_yaml_config_file, os.path.join(
os.path.dirname(__file__), 'services.yaml'))
hass.services.async_register(
DOMAIN, SERVICE_SCAN, async_service_handler,
descriptions.get(SERVICE_SCAN),
schema=APPLE_TV_SCAN_SCHEMA)
hass.services.async_register(
DOMAIN, SERVICE_AUTHENTICATE, async_service_handler,
descriptions.get(SERVICE_AUTHENTICATE),
schema=APPLE_TV_AUTHENTICATE_SCHEMA)
return True
@asyncio.coroutine
def _setup_atv(hass, atv_config):
"""Setup an Apple TV."""
import pyatv
name = atv_config.get(CONF_NAME)
host = atv_config.get(CONF_HOST)
login_id = atv_config.get(CONF_LOGIN_ID)
start_off = atv_config.get(CONF_START_OFF)
credentials = atv_config.get(CONF_CREDENTIALS)
if host in hass.data[DATA_APPLE_TV]:
return
details = pyatv.AppleTVDevice(name, host, login_id)
session = async_get_clientsession(hass)
atv = pyatv.connect_to_apple_tv(details, hass.loop, session=session)
if credentials:
yield from atv.airplay.load_credentials(credentials)
power = AppleTVPowerManager(hass, atv, start_off)
hass.data[DATA_APPLE_TV][host] = {
ATTR_ATV: atv,
ATTR_POWER: power
}
hass.async_add_job(discovery.async_load_platform(
hass, 'media_player', DOMAIN, atv_config))
hass.async_add_job(discovery.async_load_platform(
hass, 'remote', DOMAIN, atv_config))
class AppleTVPowerManager:
"""Manager for global power management of an Apple TV.
An instance is used per device to share the same power state between
several platforms.
"""
def __init__(self, hass, atv, is_off):
"""Initialize power manager."""
self.hass = hass
self.atv = atv
self.listeners = []
self._is_on = not is_off
def init(self):
"""Initialize power management."""
if self._is_on:
self.atv.push_updater.start()
@property
def turned_on(self):
"""If device is on or off."""
return self._is_on
def set_power_on(self, value):
"""Change if a device is on or off."""
if value != self._is_on:
self._is_on = value
if not self._is_on:
self.atv.push_updater.stop()
else:
self.atv.push_updater.start()
for listener in self.listeners:
self.hass.async_add_job(listener.async_update_ha_state())

View File

@@ -1,50 +1,60 @@
"""
components.arduino
~~~~~~~~~~~~~~~~~~
Arduino component that connects to a directly attached Arduino board which
runs with the Firmata firmware.
Support for Arduino boards running with the Firmata firmware.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/arduino/
"""
import logging
import voluptuous as vol
from homeassistant.const import (
EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP)
from homeassistant.helpers import validate_config
from homeassistant.const import CONF_PORT
import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['PyMata==2.14']
DOMAIN = "arduino"
REQUIREMENTS = ['PyMata==2.07a']
BOARD = None
_LOGGER = logging.getLogger(__name__)
BOARD = None
DOMAIN = 'arduino'
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
vol.Required(CONF_PORT): cv.string,
}),
}, extra=vol.ALLOW_EXTRA)
def setup(hass, config):
""" Setup the Arduino component. """
if not validate_config(config,
{DOMAIN: ['port']},
_LOGGER):
return False
"""Set up the Arduino component."""
import serial
port = config[DOMAIN][CONF_PORT]
global BOARD
try:
BOARD = ArduinoBoard(config[DOMAIN]['port'])
BOARD = ArduinoBoard(port)
except (serial.serialutil.SerialException, FileNotFoundError):
_LOGGER.exception("Your port is not accessible.")
_LOGGER.error("Your port %s is not accessible", port)
return False
if BOARD.get_firmata()[1] <= 2:
_LOGGER.error("The StandardFirmata sketch should be 2.2 or newer.")
return False
try:
if BOARD.get_firmata()[1] <= 2:
_LOGGER.error("The StandardFirmata sketch should be 2.2 or newer")
return False
except IndexError:
_LOGGER.warning("The version of the StandardFirmata sketch was not"
"detected. This may lead to side effects")
def stop_arduino(event):
""" Stop the Arduino service. """
"""Stop the Arduino service."""
BOARD.disconnect()
def start_arduino(event):
""" Start the Arduino service. """
"""Start the Arduino service."""
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, stop_arduino)
hass.bus.listen_once(EVENT_HOMEASSISTANT_START, start_arduino)
@@ -53,62 +63,58 @@ def setup(hass, config):
class ArduinoBoard(object):
""" Represents an Arduino board. """
"""Representation of an Arduino board."""
def __init__(self, port):
"""Initialize the board."""
from PyMata.pymata import PyMata
self._port = port
self._board = PyMata(self._port, verbose=False)
def set_mode(self, pin, direction, mode):
""" Sets the mode and the direction of a given pin. """
"""Set the mode and the direction of a given pin."""
if mode == 'analog' and direction == 'in':
self._board.set_pin_mode(pin,
self._board.INPUT,
self._board.ANALOG)
self._board.set_pin_mode(
pin, self._board.INPUT, self._board.ANALOG)
elif mode == 'analog' and direction == 'out':
self._board.set_pin_mode(pin,
self._board.OUTPUT,
self._board.ANALOG)
self._board.set_pin_mode(
pin, self._board.OUTPUT, self._board.ANALOG)
elif mode == 'digital' and direction == 'in':
self._board.set_pin_mode(pin,
self._board.OUTPUT,
self._board.DIGITAL)
self._board.set_pin_mode(
pin, self._board.INPUT, self._board.DIGITAL)
elif mode == 'digital' and direction == 'out':
self._board.set_pin_mode(pin,
self._board.OUTPUT,
self._board.DIGITAL)
self._board.set_pin_mode(
pin, self._board.OUTPUT, self._board.DIGITAL)
elif mode == 'pwm':
self._board.set_pin_mode(pin,
self._board.OUTPUT,
self._board.PWM)
self._board.set_pin_mode(
pin, self._board.OUTPUT, self._board.PWM)
def get_analog_inputs(self):
""" Get the values from the pins. """
"""Get the values from the pins."""
self._board.capability_query()
return self._board.get_analog_response_table()
def set_digital_out_high(self, pin):
""" Sets a given digital pin to high. """
"""Set a given digital pin to high."""
self._board.digital_write(pin, 1)
def set_digital_out_low(self, pin):
""" Sets a given digital pin to low. """
"""Set a given digital pin to low."""
self._board.digital_write(pin, 0)
def get_digital_in(self, pin):
""" Gets the value from a given digital pin. """
"""Get the value from a given digital pin."""
self._board.digital_read(pin)
def get_analog_in(self, pin):
""" Gets the value from a given analog pin. """
"""Get the value from a given analog pin."""
self._board.analog_read(pin)
def get_firmata(self):
""" Return the version of the Firmata firmware. """
"""Return the version of the Firmata firmware."""
return self._board.get_firmata_version()
def disconnect(self):
""" Disconnects the board and closes the serial connection. """
"""Disconnect the board and close the serial connection."""
self._board.reset()
self._board.close()

View File

@@ -0,0 +1,58 @@
"""
This component provides basic support for Netgear Arlo IP cameras.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/arlo/
"""
import logging
import voluptuous as vol
from requests.exceptions import HTTPError, ConnectTimeout
from homeassistant.helpers import config_validation as cv
from homeassistant.const import CONF_USERNAME, CONF_PASSWORD
REQUIREMENTS = ['pyarlo==0.0.4']
_LOGGER = logging.getLogger(__name__)
CONF_ATTRIBUTION = "Data provided by arlo.netgear.com"
DATA_ARLO = 'data_arlo'
DEFAULT_BRAND = 'Netgear Arlo'
DOMAIN = 'arlo'
NOTIFICATION_ID = 'arlo_notification'
NOTIFICATION_TITLE = 'Arlo Camera Setup'
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
vol.Required(CONF_USERNAME): cv.string,
vol.Required(CONF_PASSWORD): cv.string,
}),
}, extra=vol.ALLOW_EXTRA)
def setup(hass, config):
"""Set up an Arlo component."""
conf = config[DOMAIN]
username = conf.get(CONF_USERNAME)
password = conf.get(CONF_PASSWORD)
try:
from pyarlo import PyArlo
arlo = PyArlo(username, password, preload=False)
if not arlo.is_connected:
return False
hass.data[DATA_ARLO] = arlo
except (ConnectTimeout, HTTPError) as ex:
_LOGGER.error("Unable to connect to Netgar Arlo: %s", str(ex))
hass.components.persistent_notification.create(
'Error: {}<br />'
'You will need to restart hass after fixing.'
''.format(ex),
title=NOTIFICATION_TITLE,
notification_id=NOTIFICATION_ID)
return False
return True

View File

@@ -0,0 +1,82 @@
"""Support for Asterisk Voicemail interface."""
import logging
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers import discovery
from homeassistant.const import (CONF_HOST,
CONF_PORT, CONF_PASSWORD)
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import (async_dispatcher_connect,
async_dispatcher_send)
REQUIREMENTS = ['asterisk_mbox==0.4.0']
SIGNAL_MESSAGE_UPDATE = 'asterisk_mbox.message_updated'
SIGNAL_MESSAGE_REQUEST = 'asterisk_mbox.message_request'
DOMAIN = 'asterisk_mbox'
_LOGGER = logging.getLogger(__name__)
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
vol.Required(CONF_HOST): cv.string,
vol.Required(CONF_PORT): int,
vol.Required(CONF_PASSWORD): cv.string,
}),
}, extra=vol.ALLOW_EXTRA)
def setup(hass, config):
"""Set up for the Asterisk Voicemail box."""
conf = config.get(DOMAIN)
host = conf.get(CONF_HOST)
port = conf.get(CONF_PORT)
password = conf.get(CONF_PASSWORD)
hass.data[DOMAIN] = AsteriskData(hass, host, port, password)
discovery.load_platform(hass, "mailbox", DOMAIN, {}, config)
return True
class AsteriskData(object):
"""Store Asterisk mailbox data."""
def __init__(self, hass, host, port, password):
"""Init the Asterisk data object."""
from asterisk_mbox import Client as asteriskClient
self.hass = hass
self.client = asteriskClient(host, port, password, self.handle_data)
self.messages = []
async_dispatcher_connect(
self.hass, SIGNAL_MESSAGE_REQUEST, self._request_messages)
@callback
def handle_data(self, command, msg):
"""Handle changes to the mailbox."""
from asterisk_mbox.commands import CMD_MESSAGE_LIST
if command == CMD_MESSAGE_LIST:
_LOGGER.info("AsteriskVM sent updated message list")
self.messages = sorted(msg,
key=lambda item: item['info']['origtime'],
reverse=True)
async_dispatcher_send(self.hass, SIGNAL_MESSAGE_UPDATE,
self.messages)
@callback
def _request_messages(self):
"""Handle changes to the mailbox."""
_LOGGER.info("Requesting message list")
self.client.messages()

View File

@@ -1,208 +1,489 @@
"""
homeassistant.components.automation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Allows to setup simple automation rules via the config file.
Allow to setup simple automation rules via the config file.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/automation/
"""
import asyncio
from functools import partial
import logging
import os
from homeassistant.bootstrap import prepare_setup_platform
from homeassistant.const import CONF_PLATFORM
import voluptuous as vol
from homeassistant.setup import async_prepare_setup_platform
from homeassistant.core import CoreState
from homeassistant.loader import bind_hass
from homeassistant import config as conf_util
from homeassistant.const import (
ATTR_ENTITY_ID, CONF_PLATFORM, STATE_ON, SERVICE_TURN_ON, SERVICE_TURN_OFF,
SERVICE_TOGGLE, SERVICE_RELOAD, EVENT_HOMEASSISTANT_START, CONF_ID)
from homeassistant.components import logbook
from homeassistant.helpers.service import call_from_config
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import extract_domain_configs, script, condition
from homeassistant.helpers.entity import ToggleEntity
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.restore_state import async_get_last_state
from homeassistant.loader import get_platform
from homeassistant.util.dt import utcnow
import homeassistant.helpers.config_validation as cv
DOMAIN = 'automation'
DEPENDENCIES = ['group']
ENTITY_ID_FORMAT = DOMAIN + '.{}'
GROUP_NAME_ALL_AUTOMATIONS = 'all automations'
CONF_ALIAS = 'alias'
CONF_SERVICE = 'service'
CONF_HIDE_ENTITY = 'hide_entity'
CONF_CONDITION = 'condition'
CONF_ACTION = 'action'
CONF_TRIGGER = 'trigger'
CONF_CONDITION_TYPE = 'condition_type'
CONF_INITIAL_STATE = 'initial_state'
CONDITION_USE_TRIGGER_VALUES = 'use_trigger_values'
CONDITION_TYPE_AND = 'and'
CONDITION_TYPE_OR = 'or'
DEFAULT_CONDITION_TYPE = CONDITION_TYPE_AND
DEFAULT_HIDE_ENTITY = False
DEFAULT_INITIAL_STATE = True
ATTR_LAST_TRIGGERED = 'last_triggered'
ATTR_VARIABLES = 'variables'
SERVICE_TRIGGER = 'trigger'
_LOGGER = logging.getLogger(__name__)
def setup(hass, config):
""" Sets up automation. """
config_key = DOMAIN
found = 1
def _platform_validator(config):
"""Validate it is a valid platform."""
platform = get_platform(DOMAIN, config[CONF_PLATFORM])
while config_key in config:
# check for one block syntax
if isinstance(config[config_key], dict):
config_block = _migrate_old_config(config[config_key])
name = config_block.get(CONF_ALIAS, config_key)
_setup_automation(hass, config_block, name, config)
if not hasattr(platform, 'TRIGGER_SCHEMA'):
return config
# check for multiple block syntax
elif isinstance(config[config_key], list):
for list_no, config_block in enumerate(config[config_key]):
name = config_block.get(CONF_ALIAS,
"{}, {}".format(config_key, list_no))
_setup_automation(hass, config_block, name, config)
return getattr(platform, 'TRIGGER_SCHEMA')(config)
# any scalar value is incorrect
else:
_LOGGER.error('Error in config in section %s.', config_key)
found += 1
config_key = "{} {}".format(DOMAIN, found)
_TRIGGER_SCHEMA = vol.All(
cv.ensure_list,
[
vol.All(
vol.Schema({
vol.Required(CONF_PLATFORM): cv.platform_validator(DOMAIN)
}, extra=vol.ALLOW_EXTRA),
_platform_validator
),
]
)
_CONDITION_SCHEMA = vol.All(cv.ensure_list, [cv.CONDITION_SCHEMA])
PLATFORM_SCHEMA = vol.Schema({
# str on purpose
CONF_ID: str,
CONF_ALIAS: cv.string,
vol.Optional(CONF_INITIAL_STATE): cv.boolean,
vol.Optional(CONF_HIDE_ENTITY, default=DEFAULT_HIDE_ENTITY): cv.boolean,
vol.Required(CONF_TRIGGER): _TRIGGER_SCHEMA,
vol.Optional(CONF_CONDITION): _CONDITION_SCHEMA,
vol.Required(CONF_ACTION): cv.SCRIPT_SCHEMA,
})
SERVICE_SCHEMA = vol.Schema({
vol.Optional(ATTR_ENTITY_ID): cv.entity_ids,
})
TRIGGER_SERVICE_SCHEMA = vol.Schema({
vol.Optional(ATTR_ENTITY_ID): cv.entity_ids,
vol.Optional(ATTR_VARIABLES, default={}): dict,
})
RELOAD_SERVICE_SCHEMA = vol.Schema({})
@bind_hass
def is_on(hass, entity_id):
"""
Return true if specified automation entity_id is on.
Async friendly.
"""
return hass.states.is_state(entity_id, STATE_ON)
@bind_hass
def turn_on(hass, entity_id=None):
"""Turn on specified automation or all."""
data = {ATTR_ENTITY_ID: entity_id} if entity_id else {}
hass.services.call(DOMAIN, SERVICE_TURN_ON, data)
@bind_hass
def turn_off(hass, entity_id=None):
"""Turn off specified automation or all."""
data = {ATTR_ENTITY_ID: entity_id} if entity_id else {}
hass.services.call(DOMAIN, SERVICE_TURN_OFF, data)
@bind_hass
def toggle(hass, entity_id=None):
"""Toggle specified automation or all."""
data = {ATTR_ENTITY_ID: entity_id} if entity_id else {}
hass.services.call(DOMAIN, SERVICE_TOGGLE, data)
@bind_hass
def trigger(hass, entity_id=None):
"""Trigger specified automation or all."""
data = {ATTR_ENTITY_ID: entity_id} if entity_id else {}
hass.services.call(DOMAIN, SERVICE_TRIGGER, data)
@bind_hass
def reload(hass):
"""Reload the automation from config."""
hass.services.call(DOMAIN, SERVICE_RELOAD)
@bind_hass
def async_reload(hass):
"""Reload the automation from config.
Returns a coroutine object.
"""
return hass.services.async_call(DOMAIN, SERVICE_RELOAD)
@asyncio.coroutine
def async_setup(hass, config):
"""Set up the automation."""
component = EntityComponent(_LOGGER, DOMAIN, hass,
group_name=GROUP_NAME_ALL_AUTOMATIONS)
yield from _async_process_config(hass, config, component)
descriptions = yield from hass.async_add_job(
conf_util.load_yaml_config_file, os.path.join(
os.path.dirname(__file__), 'services.yaml')
)
@asyncio.coroutine
def trigger_service_handler(service_call):
"""Handle automation triggers."""
tasks = []
for entity in component.async_extract_from_service(service_call):
tasks.append(entity.async_trigger(
service_call.data.get(ATTR_VARIABLES), True))
if tasks:
yield from asyncio.wait(tasks, loop=hass.loop)
@asyncio.coroutine
def turn_onoff_service_handler(service_call):
"""Handle automation turn on/off service calls."""
tasks = []
method = 'async_{}'.format(service_call.service)
for entity in component.async_extract_from_service(service_call):
tasks.append(getattr(entity, method)())
if tasks:
yield from asyncio.wait(tasks, loop=hass.loop)
@asyncio.coroutine
def toggle_service_handler(service_call):
"""Handle automation toggle service calls."""
tasks = []
for entity in component.async_extract_from_service(service_call):
if entity.is_on:
tasks.append(entity.async_turn_off())
else:
tasks.append(entity.async_turn_on())
if tasks:
yield from asyncio.wait(tasks, loop=hass.loop)
@asyncio.coroutine
def reload_service_handler(service_call):
"""Remove all automations and load new ones from config."""
conf = yield from component.async_prepare_reload()
if conf is None:
return
yield from _async_process_config(hass, conf, component)
hass.services.async_register(
DOMAIN, SERVICE_TRIGGER, trigger_service_handler,
descriptions.get(SERVICE_TRIGGER), schema=TRIGGER_SERVICE_SCHEMA)
hass.services.async_register(
DOMAIN, SERVICE_RELOAD, reload_service_handler,
descriptions.get(SERVICE_RELOAD), schema=RELOAD_SERVICE_SCHEMA)
hass.services.async_register(
DOMAIN, SERVICE_TOGGLE, toggle_service_handler,
descriptions.get(SERVICE_TOGGLE), schema=SERVICE_SCHEMA)
for service in (SERVICE_TURN_ON, SERVICE_TURN_OFF):
hass.services.async_register(
DOMAIN, service, turn_onoff_service_handler,
descriptions.get(service), schema=SERVICE_SCHEMA)
return True
def _setup_automation(hass, config_block, name, config):
""" Setup one instance of automation """
class AutomationEntity(ToggleEntity):
"""Entity to show status of entity."""
action = _get_action(hass, config_block.get(CONF_ACTION, {}), name)
def __init__(self, automation_id, name, async_attach_triggers, cond_func,
async_action, hidden, initial_state):
"""Initialize an automation entity."""
self._id = automation_id
self._name = name
self._async_attach_triggers = async_attach_triggers
self._async_detach_triggers = None
self._cond_func = cond_func
self._async_action = async_action
self._last_triggered = None
self._hidden = hidden
self._initial_state = initial_state
if action is None:
@property
def name(self):
"""Name of the automation."""
return self._name
@property
def should_poll(self):
"""No polling needed for automation entities."""
return False
if CONF_CONDITION in config_block or CONF_CONDITION_TYPE in config_block:
action = _process_if(hass, config, config_block, action)
@property
def state_attributes(self):
"""Return the entity state attributes."""
return {
ATTR_LAST_TRIGGERED: self._last_triggered
}
if action is None:
return False
@property
def hidden(self) -> bool:
"""Return True if the automation entity should be hidden from UIs."""
return self._hidden
_process_trigger(hass, config, config_block.get(CONF_TRIGGER, []), name,
action)
return True
@property
def is_on(self) -> bool:
"""Return True if entity is on."""
return self._async_detach_triggers is not None
@asyncio.coroutine
def async_added_to_hass(self) -> None:
"""Startup with initial state or previous state."""
if self._initial_state is not None:
enable_automation = self._initial_state
_LOGGER.debug("Automation %s initial state %s from config "
"initial_state", self.entity_id, enable_automation)
else:
state = yield from async_get_last_state(self.hass, self.entity_id)
if state:
enable_automation = state.state == STATE_ON
self._last_triggered = state.attributes.get('last_triggered')
_LOGGER.debug("Automation %s initial state %s from recorder "
"last state %s", self.entity_id,
enable_automation, state)
else:
enable_automation = DEFAULT_INITIAL_STATE
_LOGGER.debug("Automation %s initial state %s from default "
"initial state", self.entity_id,
enable_automation)
if not enable_automation:
return
# HomeAssistant is starting up
elif self.hass.state == CoreState.not_running:
@asyncio.coroutine
def async_enable_automation(event):
"""Start automation on startup."""
yield from self.async_enable()
self.hass.bus.async_listen_once(
EVENT_HOMEASSISTANT_START, async_enable_automation)
# HomeAssistant is running
else:
yield from self.async_enable()
@asyncio.coroutine
def async_turn_on(self, **kwargs) -> None:
"""Turn the entity on and update the state."""
if self.is_on:
return
yield from self.async_enable()
@asyncio.coroutine
def async_turn_off(self, **kwargs) -> None:
"""Turn the entity off."""
if not self.is_on:
return
self._async_detach_triggers()
self._async_detach_triggers = None
yield from self.async_update_ha_state()
@asyncio.coroutine
def async_trigger(self, variables, skip_condition=False):
"""Trigger automation.
This method is a coroutine.
"""
if skip_condition or self._cond_func(variables):
yield from self._async_action(self.entity_id, variables)
self._last_triggered = utcnow()
yield from self.async_update_ha_state()
@asyncio.coroutine
def async_remove(self):
"""Remove automation from HASS."""
yield from self.async_turn_off()
yield from super().async_remove()
@asyncio.coroutine
def async_enable(self):
"""Enable this automation entity.
This method is a coroutine.
"""
if self.is_on:
return
self._async_detach_triggers = yield from self._async_attach_triggers(
self.async_trigger)
yield from self.async_update_ha_state()
@property
def device_state_attributes(self):
"""Return automation attributes."""
if self._id is None:
return None
return {
CONF_ID: self._id
}
def _get_action(hass, config, name):
""" Return an action based on a config. """
@asyncio.coroutine
def _async_process_config(hass, config, component):
"""Process config and add automations.
if CONF_SERVICE not in config:
_LOGGER.error('Error setting up %s, no action specified.', name)
return None
This method is a coroutine.
"""
entities = []
def action():
""" Action to be executed. """
for config_key in extract_domain_configs(config, DOMAIN):
conf = config[config_key]
for list_no, config_block in enumerate(conf):
automation_id = config_block.get(CONF_ID)
name = config_block.get(CONF_ALIAS) or "{} {}".format(config_key,
list_no)
hidden = config_block[CONF_HIDE_ENTITY]
initial_state = config_block.get(CONF_INITIAL_STATE)
action = _async_get_action(hass, config_block.get(CONF_ACTION, {}),
name)
if CONF_CONDITION in config_block:
cond_func = _async_process_if(hass, config, config_block)
if cond_func is None:
continue
else:
def cond_func(variables):
"""Condition will always pass."""
return True
async_attach_triggers = partial(
_async_process_trigger, hass, config,
config_block.get(CONF_TRIGGER, []), name
)
entity = AutomationEntity(
automation_id, name, async_attach_triggers, cond_func, action,
hidden, initial_state)
entities.append(entity)
if entities:
yield from component.async_add_entities(entities)
def _async_get_action(hass, config, name):
"""Return an action based on a configuration."""
script_obj = script.Script(hass, config, name)
@asyncio.coroutine
def action(entity_id, variables):
"""Execute an action."""
_LOGGER.info('Executing %s', name)
logbook.log_entry(hass, name, 'has been triggered', DOMAIN)
call_from_config(hass, config)
logbook.async_log_entry(
hass, name, 'has been triggered', DOMAIN, entity_id)
yield from script_obj.async_run(variables)
return action
def _migrate_old_config(config):
""" Migrate old config to new. """
if CONF_PLATFORM not in config:
return config
_LOGGER.warning(
'You are using an old configuration format. Please upgrade: '
'https://home-assistant.io/components/automation/')
new_conf = {
CONF_TRIGGER: dict(config),
CONF_CONDITION: config.get('if', []),
CONF_ACTION: dict(config),
}
for cat, key, new_key in (('trigger', 'mqtt_topic', 'topic'),
('trigger', 'mqtt_payload', 'payload'),
('trigger', 'state_entity_id', 'entity_id'),
('trigger', 'state_before', 'before'),
('trigger', 'state_after', 'after'),
('trigger', 'state_to', 'to'),
('trigger', 'state_from', 'from'),
('trigger', 'state_hours', 'hours'),
('trigger', 'state_minutes', 'minutes'),
('trigger', 'state_seconds', 'seconds'),
('action', 'execute_service', 'service'),
('action', 'service_entity_id', 'entity_id'),
('action', 'service_data', 'data')):
if key in new_conf[cat]:
new_conf[cat][new_key] = new_conf[cat].pop(key)
return new_conf
def _process_if(hass, config, p_config, action):
""" Processes if checks. """
cond_type = p_config.get(CONF_CONDITION_TYPE,
DEFAULT_CONDITION_TYPE).lower()
def _async_process_if(hass, config, p_config):
"""Process if checks."""
if_configs = p_config.get(CONF_CONDITION)
use_trigger = if_configs == CONDITION_USE_TRIGGER_VALUES
if use_trigger:
if_configs = p_config[CONF_TRIGGER]
if isinstance(if_configs, dict):
if_configs = [if_configs]
checks = []
for if_config in if_configs:
platform = _resolve_platform('if_action', hass, config,
if_config.get(CONF_PLATFORM))
if platform is None:
continue
check = platform.if_action(hass, if_config)
# Invalid conditions are allowed if we base it on trigger
if check is None and not use_trigger:
try:
checks.append(condition.async_from_config(if_config, False))
except HomeAssistantError as ex:
_LOGGER.warning('Invalid condition: %s', ex)
return None
checks.append(check)
if cond_type == CONDITION_TYPE_AND:
def if_action():
""" AND all conditions. """
if all(check() for check in checks):
action()
else:
def if_action():
""" OR all conditions. """
if any(check() for check in checks):
action()
def if_action(variables=None):
"""AND all conditions."""
return all(check(hass, variables) for check in checks)
return if_action
def _process_trigger(hass, config, trigger_configs, name, action):
""" Setup triggers. """
if isinstance(trigger_configs, dict):
trigger_configs = [trigger_configs]
@asyncio.coroutine
def _async_process_trigger(hass, config, trigger_configs, name, action):
"""Set up the triggers.
This method is a coroutine.
"""
removes = []
for conf in trigger_configs:
platform = _resolve_platform('trigger', hass, config,
conf.get(CONF_PLATFORM))
platform = yield from async_prepare_setup_platform(
hass, config, DOMAIN, conf.get(CONF_PLATFORM))
if platform is None:
return None
remove = yield from platform.async_trigger(hass, conf, action)
if not remove:
_LOGGER.error("Error setting up trigger %s", name)
continue
if platform.trigger(hass, conf, action):
_LOGGER.info("Initialized rule %s", name)
else:
_LOGGER.error("Error setting up rule %s", name)
_LOGGER.info("Initialized trigger %s", name)
removes.append(remove)
def _resolve_platform(method, hass, config, platform):
""" Find automation platform. """
if platform is None:
return None
platform = prepare_setup_platform(hass, config, DOMAIN, platform)
if platform is None or not hasattr(platform, method):
_LOGGER.error("Unknown automation platform specified for %s: %s",
method, platform)
if not removes:
return None
return platform
def remove_triggers():
"""Remove attached triggers."""
for remove in removes:
remove()
return remove_triggers

View File

@@ -1,34 +1,46 @@
"""
homeassistant.components.automation.event
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Offers event listening automation rules.
Offer event listening automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/components/automation/#event-trigger
at https://home-assistant.io/docs/automation/trigger/#event-trigger
"""
import asyncio
import logging
CONF_EVENT_TYPE = "event_type"
CONF_EVENT_DATA = "event_data"
import voluptuous as vol
from homeassistant.core import callback
from homeassistant.const import CONF_PLATFORM
from homeassistant.helpers import config_validation as cv
CONF_EVENT_TYPE = 'event_type'
CONF_EVENT_DATA = 'event_data'
_LOGGER = logging.getLogger(__name__)
TRIGGER_SCHEMA = vol.Schema({
vol.Required(CONF_PLATFORM): 'event',
vol.Required(CONF_EVENT_TYPE): cv.string,
vol.Optional(CONF_EVENT_DATA): dict,
})
def trigger(hass, config, action):
""" Listen for events based on config. """
@asyncio.coroutine
def async_trigger(hass, config, action):
"""Listen for events based on configuration."""
event_type = config.get(CONF_EVENT_TYPE)
if event_type is None:
_LOGGER.error("Missing configuration key %s", CONF_EVENT_TYPE)
return False
event_data = config.get(CONF_EVENT_DATA)
@callback
def handle_event(event):
""" Listens for events and calls the action when data matches. """
"""Listen for events and calls the action when data matches."""
if not event_data or all(val == event.data.get(key) for key, val
in event_data.items()):
action()
hass.async_run_job(action, {
'trigger': {
'platform': 'event',
'event': event,
},
})
hass.bus.listen(event_type, handle_event)
return True
return hass.bus.async_listen(event_type, handle_event)

View File

@@ -0,0 +1,55 @@
"""
Offer Home Assistant core automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/components/automation/#homeassistant-trigger
"""
import asyncio
import logging
import voluptuous as vol
from homeassistant.core import callback, CoreState
from homeassistant.const import (
CONF_PLATFORM, CONF_EVENT, EVENT_HOMEASSISTANT_STOP)
EVENT_START = 'start'
EVENT_SHUTDOWN = 'shutdown'
_LOGGER = logging.getLogger(__name__)
TRIGGER_SCHEMA = vol.Schema({
vol.Required(CONF_PLATFORM): 'homeassistant',
vol.Required(CONF_EVENT): vol.Any(EVENT_START, EVENT_SHUTDOWN),
})
@asyncio.coroutine
def async_trigger(hass, config, action):
"""Listen for events based on configuration."""
event = config.get(CONF_EVENT)
if event == EVENT_SHUTDOWN:
@callback
def hass_shutdown(event):
"""Execute when Home Assistant is shutting down."""
hass.async_run_job(action, {
'trigger': {
'platform': 'homeassistant',
'event': event,
},
})
return hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP,
hass_shutdown)
# Automation are enabled while hass is starting up, fire right away
# Check state because a config reload shouldn't trigger it.
elif hass.state == CoreState.starting:
hass.async_run_job(action, {
'trigger': {
'platform': 'homeassistant',
'event': event,
},
})
return lambda: None

View File

@@ -0,0 +1,100 @@
"""
Trigger an automation when a LiteJet switch is released.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/automation.litejet/
"""
import asyncio
import logging
import voluptuous as vol
from homeassistant.core import callback
from homeassistant.const import CONF_PLATFORM
import homeassistant.helpers.config_validation as cv
import homeassistant.util.dt as dt_util
from homeassistant.helpers.event import track_point_in_utc_time
DEPENDENCIES = ['litejet']
_LOGGER = logging.getLogger(__name__)
CONF_NUMBER = 'number'
CONF_HELD_MORE_THAN = 'held_more_than'
CONF_HELD_LESS_THAN = 'held_less_than'
TRIGGER_SCHEMA = vol.Schema({
vol.Required(CONF_PLATFORM): 'litejet',
vol.Required(CONF_NUMBER): cv.positive_int,
vol.Optional(CONF_HELD_MORE_THAN):
vol.All(cv.time_period, cv.positive_timedelta),
vol.Optional(CONF_HELD_LESS_THAN):
vol.All(cv.time_period, cv.positive_timedelta)
})
@asyncio.coroutine
def async_trigger(hass, config, action):
"""Listen for events based on configuration."""
number = config.get(CONF_NUMBER)
held_more_than = config.get(CONF_HELD_MORE_THAN)
held_less_than = config.get(CONF_HELD_LESS_THAN)
pressed_time = None
cancel_pressed_more_than = None
@callback
def call_action():
"""Call action with right context."""
hass.async_run_job(action, {
'trigger': {
CONF_PLATFORM: 'litejet',
CONF_NUMBER: number,
CONF_HELD_MORE_THAN: held_more_than,
CONF_HELD_LESS_THAN: held_less_than
},
})
# held_more_than and held_less_than: trigger on released (if in time range)
# held_more_than: trigger after pressed with calculation
# held_less_than: trigger on released with calculation
# neither: trigger on pressed
@callback
def pressed_more_than_satisfied(now):
"""Handle the LiteJet's switch's button pressed >= held_more_than."""
call_action()
def pressed():
"""Handle the press of the LiteJet switch's button."""
nonlocal cancel_pressed_more_than, pressed_time
nonlocal held_less_than, held_more_than
pressed_time = dt_util.utcnow()
if held_more_than is None and held_less_than is None:
hass.add_job(call_action)
if held_more_than is not None and held_less_than is None:
cancel_pressed_more_than = track_point_in_utc_time(
hass,
pressed_more_than_satisfied,
dt_util.utcnow() + held_more_than)
def released():
"""Handle the release of the LiteJet switch's button."""
nonlocal cancel_pressed_more_than, pressed_time
nonlocal held_less_than, held_more_than
# pylint: disable=not-callable
if cancel_pressed_more_than is not None:
cancel_pressed_more_than()
cancel_pressed_more_than = None
held_time = dt_util.utcnow() - pressed_time
if held_less_than is not None and held_time < held_less_than:
if held_more_than is None or held_time > held_more_than:
hass.add_job(call_action)
hass.data['litejet_system'].on_switch_pressed(number, pressed)
hass.data['litejet_system'].on_switch_released(number, released)
def async_remove():
"""Remove all subscriptions used for this trigger."""
return
return async_remove

View File

@@ -1,36 +1,56 @@
"""
homeassistant.components.automation.mqtt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Offers MQTT listening automation rules.
Offer MQTT listening automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/components/automation/#mqtt-trigger
at https://home-assistant.io/docs/automation/trigger/#mqtt-trigger
"""
import logging
import asyncio
import json
import voluptuous as vol
from homeassistant.core import callback
import homeassistant.components.mqtt as mqtt
from homeassistant.const import (CONF_PLATFORM, CONF_PAYLOAD)
import homeassistant.helpers.config_validation as cv
DEPENDENCIES = ['mqtt']
CONF_TOPIC = 'topic'
CONF_PAYLOAD = 'payload'
TRIGGER_SCHEMA = vol.Schema({
vol.Required(CONF_PLATFORM): mqtt.DOMAIN,
vol.Required(CONF_TOPIC): mqtt.valid_subscribe_topic,
vol.Optional(CONF_PAYLOAD): cv.string,
})
def trigger(hass, config, action):
""" Listen for state changes based on `config`. """
@asyncio.coroutine
def async_trigger(hass, config, action):
"""Listen for state changes based on configuration."""
topic = config.get(CONF_TOPIC)
payload = config.get(CONF_PAYLOAD)
if topic is None:
logging.getLogger(__name__).error(
"Missing configuration key %s", CONF_TOPIC)
return False
@callback
def mqtt_automation_listener(msg_topic, msg_payload, qos):
""" Listens for MQTT messages. """
"""Listen for MQTT messages."""
if payload is None or payload == msg_payload:
action()
data = {
'platform': 'mqtt',
'topic': msg_topic,
'payload': msg_payload,
'qos': qos,
}
mqtt.subscribe(hass, topic, mqtt_automation_listener)
try:
data['payload_json'] = json.loads(msg_payload)
except ValueError:
pass
return True
hass.async_run_job(action, {
'trigger': data
})
remove = yield from mqtt.async_subscribe(
hass, topic, mqtt_automation_listener)
return remove

View File

@@ -1,109 +1,71 @@
"""
homeassistant.components.automation.numeric_state
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Offers numeric state listening automation rules.
Offer numeric state listening automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/components/automation/#numeric-state-trigger
at https://home-assistant.io/docs/automation/trigger/#numeric-state-trigger
"""
import asyncio
import logging
from functools import partial
from homeassistant.const import CONF_VALUE_TEMPLATE
from homeassistant.helpers.event import track_state_change
from homeassistant.helpers import template
import voluptuous as vol
CONF_ENTITY_ID = "entity_id"
CONF_BELOW = "below"
CONF_ABOVE = "above"
from homeassistant.core import callback
from homeassistant.const import (
CONF_VALUE_TEMPLATE, CONF_PLATFORM, CONF_ENTITY_ID,
CONF_BELOW, CONF_ABOVE)
from homeassistant.helpers.event import async_track_state_change
from homeassistant.helpers import condition, config_validation as cv
TRIGGER_SCHEMA = vol.All(vol.Schema({
vol.Required(CONF_PLATFORM): 'numeric_state',
vol.Required(CONF_ENTITY_ID): cv.entity_ids,
CONF_BELOW: vol.Coerce(float),
CONF_ABOVE: vol.Coerce(float),
vol.Optional(CONF_VALUE_TEMPLATE): cv.template,
}), cv.has_at_least_one_key(CONF_BELOW, CONF_ABOVE))
_LOGGER = logging.getLogger(__name__)
def _renderer(hass, value_template, state):
"""Render state value."""
if value_template is None:
return state.state
return template.render(hass, value_template, {'state': state})
def trigger(hass, config, action):
""" Listen for state changes based on `config`. """
@asyncio.coroutine
def async_trigger(hass, config, action):
"""Listen for state changes based on configuration."""
entity_id = config.get(CONF_ENTITY_ID)
if entity_id is None:
_LOGGER.error("Missing configuration key %s", CONF_ENTITY_ID)
return False
below = config.get(CONF_BELOW)
above = config.get(CONF_ABOVE)
value_template = config.get(CONF_VALUE_TEMPLATE)
if value_template is not None:
value_template.hass = hass
if below is None and above is None:
_LOGGER.error("Missing configuration key."
" One of %s or %s is required",
CONF_BELOW, CONF_ABOVE)
return False
renderer = partial(_renderer, hass, value_template)
# pylint: disable=unused-argument
@callback
def state_automation_listener(entity, from_s, to_s):
""" Listens for state changes and calls action. """
"""Listen for state changes and calls action."""
if to_s is None:
return
# Fire action if we go from outside range into range
if _in_range(above, below, renderer(to_s)) and \
(from_s is None or not _in_range(above, below, renderer(from_s))):
action()
variables = {
'trigger': {
'platform': 'numeric_state',
'entity_id': entity,
'below': below,
'above': above,
}
}
track_state_change(
hass, entity_id, state_automation_listener)
# If new one doesn't match, nothing to do
if not condition.async_numeric_state(
hass, to_s, below, above, value_template, variables):
return
return True
# Only match if old didn't exist or existed but didn't match
# Written as: skip if old one did exist and matched
if from_s is not None and condition.async_numeric_state(
hass, from_s, below, above, value_template, variables):
return
variables['trigger']['from_state'] = from_s
variables['trigger']['to_state'] = to_s
def if_action(hass, config):
""" Wraps action method with state based condition. """
hass.async_run_job(action, variables)
entity_id = config.get(CONF_ENTITY_ID)
if entity_id is None:
_LOGGER.error("Missing configuration key %s", CONF_ENTITY_ID)
return None
below = config.get(CONF_BELOW)
above = config.get(CONF_ABOVE)
value_template = config.get(CONF_VALUE_TEMPLATE)
if below is None and above is None:
_LOGGER.error("Missing configuration key."
" One of %s or %s is required",
CONF_BELOW, CONF_ABOVE)
return None
renderer = partial(_renderer, hass, value_template)
def if_numeric_state():
""" Test numeric state condition. """
state = hass.states.get(entity_id)
return state is not None and _in_range(above, below, renderer(state))
return if_numeric_state
def _in_range(range_start, range_end, value):
""" Checks if value is inside the range """
try:
value = float(value)
except ValueError:
_LOGGER.warning("Value returned from template is not a number: %s",
value)
return False
if range_start is not None and range_end is not None:
return float(range_start) <= value < float(range_end)
elif range_end is not None:
return value < float(range_end)
else:
return float(range_start) <= value
return async_track_state_change(hass, entity_id, state_automation_listener)

View File

@@ -0,0 +1,34 @@
turn_on:
description: Enable an automation.
fields:
entity_id:
description: Name of the automation to turn on.
example: 'automation.notify_home'
turn_off:
description: Disable an automation.
fields:
entity_id:
description: Name of the automation to turn off.
example: 'automation.notify_home'
toggle:
description: Toggle an automation.
fields:
entity_id:
description: Name of the automation to toggle on/off.
example: 'automation.notify_home'
trigger:
description: Trigger the action of an automation.
fields:
entity_id:
description: Name of the automation to trigger.
example: 'automation.notify_home'
reload:
description: Reload the automation configuration.

View File

@@ -1,133 +1,118 @@
"""
homeassistant.components.automation.state
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Offers state listening automation rules.
Offer state listening automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/components/automation/#state-trigger
at https://home-assistant.io/docs/automation/trigger/#state-trigger
"""
import logging
from datetime import timedelta
import asyncio
import voluptuous as vol
from homeassistant.core import callback
import homeassistant.util.dt as dt_util
from homeassistant.const import MATCH_ALL, CONF_PLATFORM
from homeassistant.helpers.event import (
async_track_state_change, async_track_point_in_utc_time)
import homeassistant.helpers.config_validation as cv
from homeassistant.const import (
EVENT_STATE_CHANGED, EVENT_TIME_CHANGED, MATCH_ALL)
from homeassistant.components.automation.time import (
CONF_HOURS, CONF_MINUTES, CONF_SECONDS)
from homeassistant.helpers.event import track_state_change, track_point_in_time
CONF_ENTITY_ID = 'entity_id'
CONF_FROM = 'from'
CONF_TO = 'to'
CONF_FOR = 'for'
CONF_ENTITY_ID = "entity_id"
CONF_FROM = "from"
CONF_TO = "to"
CONF_STATE = "state"
CONF_FOR = "for"
TRIGGER_SCHEMA = vol.All(
vol.Schema({
vol.Required(CONF_PLATFORM): 'state',
vol.Required(CONF_ENTITY_ID): cv.entity_ids,
# These are str on purpose. Want to catch YAML conversions
CONF_FROM: str,
CONF_TO: str,
CONF_FOR: vol.All(cv.time_period, cv.positive_timedelta),
}),
cv.key_dependency(CONF_FOR, CONF_TO),
)
def get_time_config(config):
""" Helper function to extract the time specified in the config """
if CONF_FOR not in config:
return None
hours = config[CONF_FOR].get(CONF_HOURS)
minutes = config[CONF_FOR].get(CONF_MINUTES)
seconds = config[CONF_FOR].get(CONF_SECONDS)
if hours is None and minutes is None and seconds is None:
logging.getLogger(__name__).error(
"Received invalid value for '%s': %s",
config[CONF_FOR], CONF_FOR)
return None
if config.get(CONF_TO) is None and config.get(CONF_STATE) is None:
logging.getLogger(__name__).error(
"For: requires a to: value'%s': %s",
config[CONF_FOR], CONF_FOR)
return None
return timedelta(hours=(hours or 0.0),
minutes=(minutes or 0.0),
seconds=(seconds or 0.0))
def trigger(hass, config, action):
""" Listen for state changes based on `config`. """
@asyncio.coroutine
def async_trigger(hass, config, action):
"""Listen for state changes based on configuration."""
entity_id = config.get(CONF_ENTITY_ID)
if entity_id is None:
logging.getLogger(__name__).error(
"Missing trigger configuration key %s", CONF_ENTITY_ID)
return None
from_state = config.get(CONF_FROM, MATCH_ALL)
to_state = config.get(CONF_TO) or config.get(CONF_STATE) or MATCH_ALL
time_delta = get_time_config(config)
to_state = config.get(CONF_TO, MATCH_ALL)
time_delta = config.get(CONF_FOR)
async_remove_state_for_cancel = None
async_remove_state_for_listener = None
match_all = (from_state == MATCH_ALL and to_state == MATCH_ALL)
if isinstance(from_state, bool) or isinstance(to_state, bool):
logging.getLogger(__name__).error(
'Config error. Surround to/from values with quotes.')
return None
@callback
def clear_listener():
"""Clear all unsub listener."""
nonlocal async_remove_state_for_cancel, async_remove_state_for_listener
if CONF_FOR in config and time_delta is None:
return None
# pylint: disable=not-callable
if async_remove_state_for_listener is not None:
async_remove_state_for_listener()
async_remove_state_for_listener = None
if async_remove_state_for_cancel is not None:
async_remove_state_for_cancel()
async_remove_state_for_cancel = None
@callback
def state_automation_listener(entity, from_s, to_s):
""" Listens for state changes and calls action. """
"""Listen for state changes and calls action."""
nonlocal async_remove_state_for_cancel, async_remove_state_for_listener
def call_action():
"""Call action with right context."""
hass.async_run_job(action, {
'trigger': {
'platform': 'state',
'entity_id': entity,
'from_state': from_s,
'to_state': to_s,
'for': time_delta,
}
})
# Ignore changes to state attributes if from/to is in use
if (not match_all and from_s is not None and to_s is not None and
from_s.last_changed == to_s.last_changed):
return
if time_delta is None:
call_action()
return
@callback
def state_for_listener(now):
""" Fires on state changes after a delay and calls action. """
hass.bus.remove_listener(
EVENT_STATE_CHANGED, for_state_listener)
action()
"""Fire on state changes after a delay and calls action."""
nonlocal async_remove_state_for_listener
async_remove_state_for_listener = None
clear_listener()
call_action()
@callback
def state_for_cancel_listener(entity, inner_from_s, inner_to_s):
""" Fires on state changes and cancels
for listener if state changed. """
if inner_to_s == to_s:
"""Fire on changes and cancel for listener if changed."""
if inner_to_s.state == to_s.state:
return
hass.bus.remove_listener(EVENT_TIME_CHANGED, for_time_listener)
hass.bus.remove_listener(
EVENT_STATE_CHANGED, for_state_listener)
clear_listener()
if time_delta is not None:
target_tm = dt_util.utcnow() + time_delta
for_time_listener = track_point_in_time(
hass, state_for_listener, target_tm)
for_state_listener = track_state_change(
hass, entity_id, state_for_cancel_listener,
MATCH_ALL, MATCH_ALL)
else:
action()
# cleanup previous listener
clear_listener()
track_state_change(
async_remove_state_for_listener = async_track_point_in_utc_time(
hass, state_for_listener, dt_util.utcnow() + time_delta)
async_remove_state_for_cancel = async_track_state_change(
hass, entity, state_for_cancel_listener)
unsub = async_track_state_change(
hass, entity_id, state_automation_listener, from_state, to_state)
return True
@callback
def async_remove():
"""Remove state listeners async."""
unsub()
clear_listener()
def if_action(hass, config):
""" Wraps action method with state based condition. """
entity_id = config.get(CONF_ENTITY_ID)
state = config.get(CONF_STATE)
if entity_id is None or state is None:
logging.getLogger(__name__).error(
"Missing if-condition configuration key %s or %s", CONF_ENTITY_ID,
CONF_STATE)
return None
time_delta = get_time_config(config)
if CONF_FOR in config and time_delta is None:
return None
state = str(state)
def if_state():
""" Test if condition. """
is_state = hass.states.is_state(entity_id, state)
return (time_delta is None and is_state or
time_delta is not None and
dt_util.utcnow() - time_delta >
hass.states.get(entity_id).last_changed)
return if_state
return async_remove

View File

@@ -1,148 +1,47 @@
"""
homeassistant.components.automation.sun
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Offers sun based automation rules.
Offer sun based automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/components/automation/#sun-trigger
at https://home-assistant.io/docs/automation/trigger/#sun-trigger
"""
import logging
import asyncio
from datetime import timedelta
import logging
import homeassistant.util.dt as dt_util
from homeassistant.components import sun
from homeassistant.helpers.event import track_sunrise, track_sunset
import voluptuous as vol
DEPENDENCIES = ['sun']
CONF_OFFSET = 'offset'
CONF_EVENT = 'event'
CONF_BEFORE = "before"
CONF_BEFORE_OFFSET = "before_offset"
CONF_AFTER = "after"
CONF_AFTER_OFFSET = "after_offset"
EVENT_SUNSET = 'sunset'
EVENT_SUNRISE = 'sunrise'
from homeassistant.core import callback
from homeassistant.const import (
CONF_EVENT, CONF_OFFSET, CONF_PLATFORM, SUN_EVENT_SUNRISE)
from homeassistant.helpers.event import async_track_sunrise, async_track_sunset
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
TRIGGER_SCHEMA = vol.Schema({
vol.Required(CONF_PLATFORM): 'sun',
vol.Required(CONF_EVENT): cv.sun_event,
vol.Required(CONF_OFFSET, default=timedelta(0)): cv.time_period,
})
def trigger(hass, config, action):
""" Listen for events based on config. """
@asyncio.coroutine
def async_trigger(hass, config, action):
"""Listen for events based on configuration."""
event = config.get(CONF_EVENT)
offset = config.get(CONF_OFFSET)
if event is None:
_LOGGER.error("Missing configuration key %s", CONF_EVENT)
return False
@callback
def call_action():
"""Call action with right context."""
hass.async_run_job(action, {
'trigger': {
'platform': 'sun',
'event': event,
'offset': offset,
},
})
event = event.lower()
if event not in (EVENT_SUNRISE, EVENT_SUNSET):
_LOGGER.error("Invalid value for %s: %s", CONF_EVENT, event)
return False
offset = _parse_offset(config.get(CONF_OFFSET))
if offset is False:
return False
# Do something to call action
if event == EVENT_SUNRISE:
track_sunrise(hass, action, offset)
else:
track_sunset(hass, action, offset)
return True
def if_action(hass, config):
""" Wraps action method with sun based condition. """
before = config.get(CONF_BEFORE)
after = config.get(CONF_AFTER)
# Make sure required configuration keys are present
if before is None and after is None:
logging.getLogger(__name__).error(
"Missing if-condition configuration key %s or %s",
CONF_BEFORE, CONF_AFTER)
return None
# Make sure configuration keys have the right value
if before not in (None, EVENT_SUNRISE, EVENT_SUNSET) or \
after not in (None, EVENT_SUNRISE, EVENT_SUNSET):
logging.getLogger(__name__).error(
"%s and %s can only be set to %s or %s",
CONF_BEFORE, CONF_AFTER, EVENT_SUNRISE, EVENT_SUNSET)
return None
before_offset = _parse_offset(config.get(CONF_BEFORE_OFFSET))
after_offset = _parse_offset(config.get(CONF_AFTER_OFFSET))
if before_offset is False or after_offset is False:
return None
if before is None:
def before_func():
"""Return no point in time."""
return None
elif before == EVENT_SUNRISE:
def before_func():
"""Return time before sunrise."""
return sun.next_rising(hass) + before_offset
else:
def before_func():
"""Return time before sunset."""
return sun.next_setting(hass) + before_offset
if after is None:
def after_func():
"""Return no point in time."""
return None
elif after == EVENT_SUNRISE:
def after_func():
"""Return time after sunrise."""
return sun.next_rising(hass) + after_offset
else:
def after_func():
"""Return time after sunset."""
return sun.next_setting(hass) + after_offset
def time_if():
""" Validate time based if-condition """
now = dt_util.now()
before = before_func()
after = after_func()
if before is not None and now > now.replace(hour=before.hour,
minute=before.minute):
return False
if after is not None and now < now.replace(hour=after.hour,
minute=after.minute):
return False
return True
return time_if
def _parse_offset(raw_offset):
if raw_offset is None:
return timedelta(0)
negative_offset = False
if raw_offset.startswith('-'):
negative_offset = True
raw_offset = raw_offset[1:]
try:
(hour, minute, second) = [int(x) for x in raw_offset.split(':')]
except ValueError:
_LOGGER.error('Could not parse offset %s', raw_offset)
return False
offset = timedelta(hours=hour, minutes=minute, seconds=second)
if negative_offset:
offset *= -1
return offset
if event == SUN_EVENT_SUNRISE:
return async_track_sunrise(hass, call_action, offset)
return async_track_sunset(hass, call_action, offset)

View File

@@ -1,65 +1,44 @@
"""
homeassistant.components.automation.template
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Offers template automation rules.
Offer template automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/components/automation/#template-trigger
at https://home-assistant.io/docs/automation/trigger/#template-trigger
"""
import asyncio
import logging
from homeassistant.const import CONF_VALUE_TEMPLATE, EVENT_STATE_CHANGED
from homeassistant.exceptions import TemplateError
from homeassistant.helpers import template
import voluptuous as vol
from homeassistant.core import callback
from homeassistant.const import CONF_VALUE_TEMPLATE, CONF_PLATFORM
from homeassistant.helpers.event import async_track_template
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
TRIGGER_SCHEMA = IF_ACTION_SCHEMA = vol.Schema({
vol.Required(CONF_PLATFORM): 'template',
vol.Required(CONF_VALUE_TEMPLATE): cv.template,
})
def trigger(hass, config, action):
""" Listen for state changes based on `config`. """
@asyncio.coroutine
def async_trigger(hass, config, action):
"""Listen for state changes based on configuration."""
value_template = config.get(CONF_VALUE_TEMPLATE)
value_template.hass = hass
if value_template is None:
_LOGGER.error("Missing configuration key %s", CONF_VALUE_TEMPLATE)
return False
@callback
def template_listener(entity_id, from_s, to_s):
"""Listen for state changes and calls action."""
hass.async_run_job(action, {
'trigger': {
'platform': 'template',
'entity_id': entity_id,
'from_state': from_s,
'to_state': to_s,
},
})
# Local variable to keep track of if the action has already been triggered
already_triggered = False
def event_listener(event):
""" Listens for state changes and calls action. """
nonlocal already_triggered
template_result = _check_template(hass, value_template)
# Check to see if template returns true
if template_result and not already_triggered:
already_triggered = True
action()
elif not template_result:
already_triggered = False
hass.bus.listen(EVENT_STATE_CHANGED, event_listener)
return True
def if_action(hass, config):
""" Wraps action method with state based condition. """
value_template = config.get(CONF_VALUE_TEMPLATE)
if value_template is None:
_LOGGER.error("Missing configuration key %s", CONF_VALUE_TEMPLATE)
return False
return lambda: _check_template(hass, value_template)
def _check_template(hass, value_template):
""" Checks if result of template is true """
try:
value = template.render(hass, value_template, {})
except TemplateError:
_LOGGER.exception('Error parsing template')
return False
return value.lower() == 'true'
return async_track_template(hass, value_template, template_listener)

View File

@@ -1,106 +1,54 @@
"""
homeassistant.components.automation.time
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Offers time listening automation rules.
Offer time listening automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/components/automation/#time-trigger
at https://home-assistant.io/docs/automation/trigger/#time-trigger
"""
import asyncio
import logging
import homeassistant.util.dt as dt_util
from homeassistant.helpers.event import track_time_change
import voluptuous as vol
CONF_HOURS = "hours"
CONF_MINUTES = "minutes"
CONF_SECONDS = "seconds"
CONF_BEFORE = "before"
CONF_AFTER = "after"
CONF_WEEKDAY = "weekday"
from homeassistant.core import callback
from homeassistant.const import CONF_AT, CONF_PLATFORM
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.event import async_track_time_change
WEEKDAYS = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun']
CONF_HOURS = 'hours'
CONF_MINUTES = 'minutes'
CONF_SECONDS = 'seconds'
_LOGGER = logging.getLogger(__name__)
TRIGGER_SCHEMA = vol.All(vol.Schema({
vol.Required(CONF_PLATFORM): 'time',
CONF_AT: cv.time,
CONF_HOURS: vol.Any(vol.Coerce(int), vol.Coerce(str)),
CONF_MINUTES: vol.Any(vol.Coerce(int), vol.Coerce(str)),
CONF_SECONDS: vol.Any(vol.Coerce(int), vol.Coerce(str)),
}), cv.has_at_least_one_key(CONF_HOURS, CONF_MINUTES, CONF_SECONDS, CONF_AT))
def trigger(hass, config, action):
""" Listen for state changes based on `config`. """
if CONF_AFTER in config:
after = dt_util.parse_time_str(config[CONF_AFTER])
if after is None:
_error_time(config[CONF_AFTER], CONF_AFTER)
return False
hours, minutes, seconds = after.hour, after.minute, after.second
elif (CONF_HOURS in config or CONF_MINUTES in config or
CONF_SECONDS in config):
@asyncio.coroutine
def async_trigger(hass, config, action):
"""Listen for state changes based on configuration."""
if CONF_AT in config:
at_time = config.get(CONF_AT)
hours, minutes, seconds = at_time.hour, at_time.minute, at_time.second
else:
hours = config.get(CONF_HOURS)
minutes = config.get(CONF_MINUTES)
seconds = config.get(CONF_SECONDS)
else:
_LOGGER.error('One of %s, %s, %s OR %s needs to be specified',
CONF_HOURS, CONF_MINUTES, CONF_SECONDS, CONF_AFTER)
return False
@callback
def time_automation_listener(now):
""" Listens for time changes and calls action. """
action()
"""Listen for time changes and calls action."""
hass.async_run_job(action, {
'trigger': {
'platform': 'time',
'now': now,
},
})
track_time_change(hass, time_automation_listener,
hour=hours, minute=minutes, second=seconds)
return True
def if_action(hass, config):
""" Wraps action method with time based condition. """
before = config.get(CONF_BEFORE)
after = config.get(CONF_AFTER)
weekday = config.get(CONF_WEEKDAY)
if before is None and after is None and weekday is None:
_LOGGER.error(
"Missing if-condition configuration key %s, %s or %s",
CONF_BEFORE, CONF_AFTER, CONF_WEEKDAY)
return None
if before is not None:
before = dt_util.parse_time_str(before)
if before is None:
_error_time(before, CONF_BEFORE)
return None
if after is not None:
after = dt_util.parse_time_str(after)
if after is None:
_error_time(after, CONF_AFTER)
return None
def time_if():
""" Validate time based if-condition """
now = dt_util.now()
if before is not None and now > now.replace(hour=before.hour,
minute=before.minute):
return False
if after is not None and now < now.replace(hour=after.hour,
minute=after.minute):
return False
if weekday is not None:
now_weekday = WEEKDAYS[now.weekday()]
if isinstance(weekday, str) and weekday != now_weekday or \
now_weekday not in weekday:
return False
return True
return time_if
def _error_time(value, key):
""" Helper method to print error. """
_LOGGER.error(
"Received invalid value for '%s': %s", key, value)
if isinstance(value, int):
_LOGGER.error('Make sure you wrap time values in quotes')
return async_track_time_change(hass, time_automation_listener,
hour=hours, minute=minutes, second=seconds)

View File

@@ -1,87 +1,66 @@
"""
homeassistant.components.automation.zone
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Offers zone automation rules.
Offer zone automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/components/automation/#zone-trigger
at https://home-assistant.io/docs/automation/trigger/#zone-trigger
"""
import logging
import asyncio
import voluptuous as vol
from homeassistant.components import zone
from homeassistant.core import callback
from homeassistant.const import (
ATTR_GPS_ACCURACY, ATTR_LATITUDE, ATTR_LONGITUDE, MATCH_ALL)
from homeassistant.helpers.event import track_state_change
CONF_EVENT, CONF_ENTITY_ID, CONF_ZONE, MATCH_ALL, CONF_PLATFORM)
from homeassistant.helpers.event import async_track_state_change
from homeassistant.helpers import (
condition, config_validation as cv, location)
CONF_ENTITY_ID = "entity_id"
CONF_ZONE = "zone"
CONF_EVENT = "event"
EVENT_ENTER = "enter"
EVENT_LEAVE = "leave"
EVENT_ENTER = 'enter'
EVENT_LEAVE = 'leave'
DEFAULT_EVENT = EVENT_ENTER
TRIGGER_SCHEMA = vol.Schema({
vol.Required(CONF_PLATFORM): 'zone',
vol.Required(CONF_ENTITY_ID): cv.entity_ids,
vol.Required(CONF_ZONE): cv.entity_id,
vol.Required(CONF_EVENT, default=DEFAULT_EVENT):
vol.Any(EVENT_ENTER, EVENT_LEAVE),
})
def trigger(hass, config, action):
""" Listen for state changes based on `config`. """
@asyncio.coroutine
def async_trigger(hass, config, action):
"""Listen for state changes based on configuration."""
entity_id = config.get(CONF_ENTITY_ID)
zone_entity_id = config.get(CONF_ZONE)
event = config.get(CONF_EVENT)
if entity_id is None or zone_entity_id is None:
logging.getLogger(__name__).error(
"Missing trigger configuration key %s or %s", CONF_ENTITY_ID,
CONF_ZONE)
return False
event = config.get(CONF_EVENT, DEFAULT_EVENT)
@callback
def zone_automation_listener(entity, from_s, to_s):
""" Listens for state changes and calls action. """
if from_s and None in (from_s.attributes.get(ATTR_LATITUDE),
from_s.attributes.get(ATTR_LONGITUDE)) or \
None in (to_s.attributes.get(ATTR_LATITUDE),
to_s.attributes.get(ATTR_LONGITUDE)):
"""Listen for state changes and calls action."""
if from_s and not location.has_location(from_s) or \
not location.has_location(to_s):
return
from_match = _in_zone(hass, zone_entity_id, from_s) if from_s else None
to_match = _in_zone(hass, zone_entity_id, to_s)
zone_state = hass.states.get(zone_entity_id)
if from_s:
from_match = condition.zone(hass, zone_state, from_s)
else:
from_match = False
to_match = condition.zone(hass, zone_state, to_s)
# pylint: disable=too-many-boolean-expressions
if event == EVENT_ENTER and not from_match and to_match or \
event == EVENT_LEAVE and from_match and not to_match:
action()
hass.async_run_job(action, {
'trigger': {
'platform': 'zone',
'entity_id': entity,
'from_state': from_s,
'to_state': to_s,
'zone': zone_state,
'event': event,
},
})
track_state_change(
hass, entity_id, zone_automation_listener, MATCH_ALL, MATCH_ALL)
return True
def if_action(hass, config):
""" Wraps action method with zone based condition. """
entity_id = config.get(CONF_ENTITY_ID)
zone_entity_id = config.get(CONF_ZONE)
if entity_id is None or zone_entity_id is None:
logging.getLogger(__name__).error(
"Missing condition configuration key %s or %s", CONF_ENTITY_ID,
CONF_ZONE)
return False
def if_in_zone():
""" Test if condition. """
return _in_zone(hass, zone_entity_id, hass.states.get(entity_id))
return if_in_zone
def _in_zone(hass, zone_entity_id, state):
""" Check if state is in zone. """
if not state or None in (state.attributes.get(ATTR_LATITUDE),
state.attributes.get(ATTR_LONGITUDE)):
return False
zone_state = hass.states.get(zone_entity_id)
return zone_state and zone.in_zone(
zone_state, state.attributes.get(ATTR_LATITUDE),
state.attributes.get(ATTR_LONGITUDE),
state.attributes.get(ATTR_GPS_ACCURACY, 0))
return async_track_state_change(hass, entity_id, zone_automation_listener,
MATCH_ALL, MATCH_ALL)

View File

@@ -0,0 +1,371 @@
"""
Support for Axis devices.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/axis/
"""
import json
import logging
import os
import voluptuous as vol
from homeassistant.config import load_yaml_config_file
from homeassistant.const import (ATTR_LOCATION, ATTR_TRIPPED,
CONF_HOST, CONF_INCLUDE, CONF_NAME,
CONF_PASSWORD, CONF_TRIGGER_TIME,
CONF_USERNAME, EVENT_HOMEASSISTANT_STOP)
from homeassistant.components.discovery import SERVICE_AXIS
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers import discovery
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.entity import Entity
REQUIREMENTS = ['axis==8']
_LOGGER = logging.getLogger(__name__)
DOMAIN = 'axis'
CONFIG_FILE = 'axis.conf'
AXIS_DEVICES = {}
EVENT_TYPES = ['motion', 'vmd3', 'pir', 'sound',
'daynight', 'tampering', 'input']
PLATFORMS = ['camera']
AXIS_INCLUDE = EVENT_TYPES + PLATFORMS
AXIS_DEFAULT_HOST = '192.168.0.90'
AXIS_DEFAULT_USERNAME = 'root'
AXIS_DEFAULT_PASSWORD = 'pass'
DEVICE_SCHEMA = vol.Schema({
vol.Required(CONF_INCLUDE):
vol.All(cv.ensure_list, [vol.In(AXIS_INCLUDE)]),
vol.Optional(CONF_NAME): cv.string,
vol.Optional(CONF_HOST, default=AXIS_DEFAULT_HOST): cv.string,
vol.Optional(CONF_USERNAME, default=AXIS_DEFAULT_USERNAME): cv.string,
vol.Optional(CONF_PASSWORD, default=AXIS_DEFAULT_PASSWORD): cv.string,
vol.Optional(CONF_TRIGGER_TIME, default=0): cv.positive_int,
vol.Optional(ATTR_LOCATION, default=''): cv.string,
})
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
cv.slug: DEVICE_SCHEMA,
}),
}, extra=vol.ALLOW_EXTRA)
SERVICE_VAPIX_CALL = 'vapix_call'
SERVICE_VAPIX_CALL_RESPONSE = 'vapix_call_response'
SERVICE_CGI = 'cgi'
SERVICE_ACTION = 'action'
SERVICE_PARAM = 'param'
SERVICE_DEFAULT_CGI = 'param.cgi'
SERVICE_DEFAULT_ACTION = 'update'
SERVICE_SCHEMA = vol.Schema({
vol.Required(CONF_NAME): cv.string,
vol.Required(SERVICE_PARAM): cv.string,
vol.Optional(SERVICE_CGI, default=SERVICE_DEFAULT_CGI): cv.string,
vol.Optional(SERVICE_ACTION, default=SERVICE_DEFAULT_ACTION): cv.string,
})
def request_configuration(hass, name, host, serialnumber):
"""Request configuration steps from the user."""
configurator = hass.components.configurator
def configuration_callback(callback_data):
"""Called when config is submitted."""
if CONF_INCLUDE not in callback_data:
configurator.notify_errors(request_id,
"Functionality mandatory.")
return False
callback_data[CONF_INCLUDE] = callback_data[CONF_INCLUDE].split()
callback_data[CONF_HOST] = host
if CONF_NAME not in callback_data:
callback_data[CONF_NAME] = name
try:
config = DEVICE_SCHEMA(callback_data)
except vol.Invalid:
configurator.notify_errors(request_id,
"Bad input, please check spelling.")
return False
if setup_device(hass, config):
config_file = _read_config(hass)
config_file[serialnumber] = dict(config)
del config_file[serialnumber]['hass']
_write_config(hass, config_file)
configurator.request_done(request_id)
else:
configurator.notify_errors(request_id,
"Failed to register, please try again.")
return False
title = '{} ({})'.format(name, host)
request_id = configurator.request_config(
hass, title, configuration_callback,
description='Functionality: ' + str(AXIS_INCLUDE),
entity_picture="/static/images/logo_axis.png",
link_name='Axis platform documentation',
link_url='https://home-assistant.io/components/axis/',
submit_caption="Confirm",
fields=[
{'id': CONF_NAME,
'name': "Device name",
'type': 'text'},
{'id': CONF_USERNAME,
'name': "User name",
'type': 'text'},
{'id': CONF_PASSWORD,
'name': 'Password',
'type': 'password'},
{'id': CONF_INCLUDE,
'name': "Device functionality (space separated list)",
'type': 'text'},
{'id': ATTR_LOCATION,
'name': "Physical location of device (optional)",
'type': 'text'},
{'id': CONF_TRIGGER_TIME,
'name': "Sensor update interval (optional)",
'type': 'number'},
]
)
def setup(hass, base_config):
"""Common setup for Axis devices."""
def _shutdown(call): # pylint: disable=unused-argument
"""Stop the metadatastream on shutdown."""
for serialnumber, device in AXIS_DEVICES.items():
_LOGGER.info("Stopping metadatastream for %s.", serialnumber)
device.stop_metadatastream()
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, _shutdown)
def axis_device_discovered(service, discovery_info):
"""Called when axis devices has been found."""
host = discovery_info[CONF_HOST]
name = discovery_info['hostname']
serialnumber = discovery_info['properties']['macaddress']
if serialnumber not in AXIS_DEVICES:
config_file = _read_config(hass)
if serialnumber in config_file:
# Device config saved to file
try:
config = DEVICE_SCHEMA(config_file[serialnumber])
config[CONF_HOST] = host
except vol.Invalid as err:
_LOGGER.error("Bad data from %s. %s", CONFIG_FILE, err)
return False
if not setup_device(hass, config):
_LOGGER.error("Couldn\'t set up %s", config[CONF_NAME])
else:
# New device, create configuration request for UI
request_configuration(hass, name, host, serialnumber)
else:
# Device already registered, but on a different IP
device = AXIS_DEVICES[serialnumber]
device.url = host
async_dispatcher_send(hass,
DOMAIN + '_' + device.name + '_new_ip',
host)
# Register discovery service
discovery.listen(hass, SERVICE_AXIS, axis_device_discovered)
if DOMAIN in base_config:
for device in base_config[DOMAIN]:
config = base_config[DOMAIN][device]
if CONF_NAME not in config:
config[CONF_NAME] = device
if not setup_device(hass, config):
_LOGGER.error("Couldn\'t set up %s", config[CONF_NAME])
# Services to communicate with device.
descriptions = load_yaml_config_file(
os.path.join(os.path.dirname(__file__), 'services.yaml'))
def vapix_service(call):
"""Service to send a message."""
for _, device in AXIS_DEVICES.items():
if device.name == call.data[CONF_NAME]:
response = device.do_request(call.data[SERVICE_CGI],
call.data[SERVICE_ACTION],
call.data[SERVICE_PARAM])
hass.bus.async_fire(SERVICE_VAPIX_CALL_RESPONSE, response)
return True
_LOGGER.info("Couldn\'t find device %s", call.data[CONF_NAME])
return False
# Register service with Home Assistant.
hass.services.register(DOMAIN,
SERVICE_VAPIX_CALL,
vapix_service,
descriptions[DOMAIN][SERVICE_VAPIX_CALL],
schema=SERVICE_SCHEMA)
return True
def setup_device(hass, config):
"""Set up device."""
from axis import AxisDevice
config['hass'] = hass
device = AxisDevice(config) # Initialize device
enable_metadatastream = False
if device.serial_number is None:
# If there is no serial number a connection could not be made
_LOGGER.error("Couldn\'t connect to %s", config[CONF_HOST])
return False
for component in config[CONF_INCLUDE]:
if component in EVENT_TYPES:
# Sensors are created by device calling event_initialized
# when receiving initialize messages on metadatastream
device.add_event_topic(convert(component, 'type', 'subscribe'))
if not enable_metadatastream:
enable_metadatastream = True
else:
discovery.load_platform(hass, component, DOMAIN, config)
if enable_metadatastream:
device.initialize_new_event = event_initialized
if not device.initiate_metadatastream():
hass.components.persistent_notification.create(
'Dependency missing for sensors, '
'please check documentation',
title=DOMAIN,
notification_id='axis_notification')
AXIS_DEVICES[device.serial_number] = device
return True
def _read_config(hass):
"""Read Axis config."""
path = hass.config.path(CONFIG_FILE)
if not os.path.isfile(path):
return {}
with open(path) as f_handle:
# Guard against empty file
return json.loads(f_handle.read() or '{}')
def _write_config(hass, config):
"""Write Axis config."""
data = json.dumps(config)
with open(hass.config.path(CONFIG_FILE), 'w', encoding='utf-8') as outfile:
outfile.write(data)
def event_initialized(event):
"""Register event initialized on metadatastream here."""
hass = event.device_config('hass')
discovery.load_platform(hass,
convert(event.topic, 'topic', 'platform'),
DOMAIN, {'axis_event': event})
class AxisDeviceEvent(Entity):
"""Representation of a Axis device event."""
def __init__(self, axis_event):
"""Initialize the event."""
self.axis_event = axis_event
self._event_class = convert(self.axis_event.topic, 'topic', 'class')
self._name = '{}_{}_{}'.format(self.axis_event.device_name,
convert(self.axis_event.topic,
'topic', 'type'),
self.axis_event.id)
self.axis_event.callback = self._update_callback
def _update_callback(self):
"""Update the sensor's state, if needed."""
self.update()
self.schedule_update_ha_state()
@property
def name(self):
"""Return the name of the event."""
return self._name
@property
def device_class(self):
"""Return the class of the event."""
return self._event_class
@property
def should_poll(self):
"""No polling needed."""
return False
@property
def device_state_attributes(self):
"""Return the state attributes of the event."""
attr = {}
tripped = self.axis_event.is_tripped
attr[ATTR_TRIPPED] = 'True' if tripped else 'False'
location = self.axis_event.device_config(ATTR_LOCATION)
if location:
attr[ATTR_LOCATION] = location
return attr
def convert(item, from_key, to_key):
"""Translate between Axis and HASS syntax."""
for entry in REMAP:
if entry[from_key] == item:
return entry[to_key]
REMAP = [{'type': 'motion',
'class': 'motion',
'topic': 'tns1:VideoAnalytics/tnsaxis:MotionDetection',
'subscribe': 'onvif:VideoAnalytics/axis:MotionDetection',
'platform': 'binary_sensor'},
{'type': 'vmd3',
'class': 'motion',
'topic': 'tns1:RuleEngine/tnsaxis:VMD3/vmd3_video_1',
'subscribe': 'onvif:RuleEngine/axis:VMD3/vmd3_video_1',
'platform': 'binary_sensor'},
{'type': 'pir',
'class': 'motion',
'topic': 'tns1:Device/tnsaxis:Sensor/PIR',
'subscribe': 'onvif:Device/axis:Sensor/axis:PIR',
'platform': 'binary_sensor'},
{'type': 'sound',
'class': 'sound',
'topic': 'tns1:AudioSource/tnsaxis:TriggerLevel',
'subscribe': 'onvif:AudioSource/axis:TriggerLevel',
'platform': 'binary_sensor'},
{'type': 'daynight',
'class': 'light',
'topic': 'tns1:VideoSource/tnsaxis:DayNightVision',
'subscribe': 'onvif:VideoSource/axis:DayNightVision',
'platform': 'binary_sensor'},
{'type': 'tampering',
'class': 'safety',
'topic': 'tns1:VideoSource/tnsaxis:Tampering',
'subscribe': 'onvif:VideoSource/axis:Tampering',
'platform': 'binary_sensor'},
{'type': 'input',
'class': 'input',
'topic': 'tns1:Device/tnsaxis:IO/Port',
'subscribe': 'onvif:Device/axis:IO/Port',
'platform': 'binary_sensor'}, ]

View File

@@ -0,0 +1,74 @@
"""
Support for controlling GPIO pins of a Beaglebone Black.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/bbb_gpio/
"""
import logging
from homeassistant.const import (
EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP)
REQUIREMENTS = ['Adafruit_BBIO==1.0.0']
_LOGGER = logging.getLogger(__name__)
DOMAIN = 'bbb_gpio'
# pylint: disable=no-member
def setup(hass, config):
"""Set up the BeagleBone Black GPIO component."""
# pylint: disable=import-error
import Adafruit_BBIO.GPIO as GPIO
def cleanup_gpio(event):
"""Stuff to do before stopping."""
GPIO.cleanup()
def prepare_gpio(event):
"""Stuff to do when home assistant starts."""
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, cleanup_gpio)
hass.bus.listen_once(EVENT_HOMEASSISTANT_START, prepare_gpio)
return True
# noqa: F821
def setup_output(pin):
"""Set up a GPIO as output."""
# pylint: disable=import-error,undefined-variable
import Adafruit_BBIO.GPIO as GPIO
GPIO.setup(pin, GPIO.OUT)
def setup_input(pin, pull_mode):
"""Set up a GPIO as input."""
# pylint: disable=import-error,undefined-variable
import Adafruit_BBIO.GPIO as GPIO
GPIO.setup(pin, GPIO.IN, # noqa: F821
GPIO.PUD_DOWN if pull_mode == 'DOWN' # noqa: F821
else GPIO.PUD_UP) # noqa: F821
def write_output(pin, value):
"""Write a value to a GPIO."""
# pylint: disable=import-error,undefined-variable
import Adafruit_BBIO.GPIO as GPIO
GPIO.output(pin, value)
def read_input(pin):
"""Read a value from a GPIO."""
# pylint: disable=import-error,undefined-variable
import Adafruit_BBIO.GPIO as GPIO
return GPIO.input(pin) is GPIO.HIGH
def edge_detect(pin, event_callback, bounce):
"""Add detection for RISING and FALLING events."""
# pylint: disable=import-error,undefined-variable
import Adafruit_BBIO.GPIO as GPIO
GPIO.add_event_detect(
pin, GPIO.BOTH, callback=event_callback, bouncetime=bounce)

View File

@@ -1,55 +1,52 @@
"""
Component to interface with binary sensors (sensors which only know two states)
that can be monitored.
Component to interface with binary sensors.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/binary_sensor/
"""
import asyncio
from datetime import timedelta
import logging
import voluptuous as vol
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.entity import Entity
from homeassistant.const import (STATE_ON, STATE_OFF)
from homeassistant.components import (bloomsky, mysensors, zwave, wink)
from homeassistant.helpers.config_validation import PLATFORM_SCHEMA # noqa
DOMAIN = 'binary_sensor'
SCAN_INTERVAL = 30
SCAN_INTERVAL = timedelta(seconds=30)
ENTITY_ID_FORMAT = DOMAIN + '.{}'
SENSOR_CLASSES = [
None, # Generic on/off
'opening', # Door, window, etc
'motion', # Motion sensor
'gas', # CO, CO2, etc
'smoke', # Smoke detector
'moisture', # Specifically a wetness sensor
'light', # Lightness threshold
'power', # Power, over-current, etc
'safety', # Generic on=unsafe, off=safe
'heat', # On means hot (or too hot)
'cold', # On means cold (or too cold)
'moving', # On means moving, Off means stopped
'sound', # On means sound detected, Off means no sound
'vibration', # On means vibration detected, Off means no vibration
DEVICE_CLASSES = [
'cold', # On means cold (or too cold)
'connectivity', # On means connection present, Off = no connection
'gas', # CO, CO2, etc.
'heat', # On means hot (or too hot)
'light', # Lightness threshold
'moisture', # Specifically a wetness sensor
'motion', # Motion sensor
'moving', # On means moving, Off means stopped
'occupancy', # On means occupied, Off means not occupied
'opening', # Door, window, etc.
'power', # Power, over-current, etc
'safety', # Generic on=unsafe, off=safe
'smoke', # Smoke detector
'sound', # On means sound detected, Off means no sound
'vibration', # On means vibration detected, Off means no vibration
]
# Maps discovered services to their platforms
DISCOVERY_PLATFORMS = {
bloomsky.DISCOVER_BINARY_SENSORS: 'bloomsky',
mysensors.DISCOVER_BINARY_SENSORS: 'mysensors',
zwave.DISCOVER_BINARY_SENSORS: 'zwave',
wink.DISCOVER_BINARY_SENSORS: 'wink'
}
DEVICE_CLASSES_SCHEMA = vol.All(vol.Lower, vol.In(DEVICE_CLASSES))
def setup(hass, config):
@asyncio.coroutine
def async_setup(hass, config):
"""Track states and offer events for binary sensors."""
component = EntityComponent(
logging.getLogger(__name__), DOMAIN, hass, SCAN_INTERVAL,
DISCOVERY_PLATFORMS)
component.setup(config)
logging.getLogger(__name__), DOMAIN, hass, SCAN_INTERVAL)
yield from component.async_setup(config)
return True
@@ -59,7 +56,7 @@ class BinarySensorDevice(Entity):
@property
def is_on(self):
"""Return True if the binary sensor is on."""
"""Return true if the binary sensor is on."""
return None
@property
@@ -68,16 +65,6 @@ class BinarySensorDevice(Entity):
return STATE_ON if self.is_on else STATE_OFF
@property
def sensor_class(self):
"""Return the class of this sensor, from SENSOR_CLASSES."""
def device_class(self):
"""Return the class of this device, from component DEVICE_CLASSES."""
return None
@property
def state_attributes(self):
"""Return device specific state attributes."""
attr = {}
if self.sensor_class is not None:
attr['sensor_class'] = self.sensor_class
return attr

View File

@@ -0,0 +1,112 @@
"""
Support for AlarmDecoder zone states- represented as binary sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.alarmdecoder/
"""
import asyncio
import logging
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.components.alarmdecoder import (ZONE_SCHEMA,
CONF_ZONES,
CONF_ZONE_NAME,
CONF_ZONE_TYPE,
SIGNAL_ZONE_FAULT,
SIGNAL_ZONE_RESTORE)
DEPENDENCIES = ['alarmdecoder']
_LOGGER = logging.getLogger(__name__)
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Set up the AlarmDecoder binary sensor devices."""
configured_zones = discovery_info[CONF_ZONES]
devices = []
for zone_num in configured_zones:
device_config_data = ZONE_SCHEMA(configured_zones[zone_num])
zone_type = device_config_data[CONF_ZONE_TYPE]
zone_name = device_config_data[CONF_ZONE_NAME]
device = AlarmDecoderBinarySensor(
hass, zone_num, zone_name, zone_type)
devices.append(device)
async_add_devices(devices)
return True
class AlarmDecoderBinarySensor(BinarySensorDevice):
"""Representation of an AlarmDecoder binary sensor."""
def __init__(self, hass, zone_number, zone_name, zone_type):
"""Initialize the binary_sensor."""
self._zone_number = zone_number
self._zone_type = zone_type
self._state = 0
self._name = zone_name
self._type = zone_type
_LOGGER.debug("Setup up zone: %s", self._name)
@asyncio.coroutine
def async_added_to_hass(self):
"""Register callbacks."""
async_dispatcher_connect(
self.hass, SIGNAL_ZONE_FAULT, self._fault_callback)
async_dispatcher_connect(
self.hass, SIGNAL_ZONE_RESTORE, self._restore_callback)
@property
def name(self):
"""Return the name of the entity."""
return self._name
@property
def icon(self):
"""Icon for device by its type."""
if "window" in self._name.lower():
return "mdi:window-open" if self.is_on else "mdi:window-closed"
if self._type == 'smoke':
return "mdi:fire"
return None
@property
def should_poll(self):
"""No polling needed."""
return False
@property
def is_on(self):
"""Return true if sensor is on."""
return self._state == 1
@property
def device_class(self):
"""Return the class of this sensor, from DEVICE_CLASSES."""
return self._zone_type
@callback
def _fault_callback(self, zone):
"""Update the zone's state, if needed."""
if zone is None or int(zone) == self._zone_number:
self._state = 1
self.hass.async_add_job(self.async_update_ha_state())
@callback
def _restore_callback(self, zone):
"""Update the zone's state, if needed."""
if zone is None or int(zone) == self._zone_number:
self._state = 0
self.hass.async_add_job(self.async_update_ha_state())

View File

@@ -0,0 +1,62 @@
"""
Support for IP Webcam binary sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.android_ip_webcam/
"""
import asyncio
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.components.android_ip_webcam import (
KEY_MAP, DATA_IP_WEBCAM, AndroidIPCamEntity, CONF_HOST, CONF_NAME)
DEPENDENCIES = ['android_ip_webcam']
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Set up the IP Webcam binary sensors."""
if discovery_info is None:
return
host = discovery_info[CONF_HOST]
name = discovery_info[CONF_NAME]
ipcam = hass.data[DATA_IP_WEBCAM][host]
async_add_devices(
[IPWebcamBinarySensor(name, host, ipcam, 'motion_active')], True)
class IPWebcamBinarySensor(AndroidIPCamEntity, BinarySensorDevice):
"""Representation of an IP Webcam binary sensor."""
def __init__(self, name, host, ipcam, sensor):
"""Initialize the binary sensor."""
super().__init__(host, ipcam)
self._sensor = sensor
self._mapped_name = KEY_MAP.get(self._sensor, self._sensor)
self._name = '{} {}'.format(name, self._mapped_name)
self._state = None
self._unit = None
@property
def name(self):
"""Return the name of the binary sensor, if any."""
return self._name
@property
def is_on(self):
"""Return true if the binary sensor is on."""
return self._state
@asyncio.coroutine
def async_update(self):
"""Retrieve latest state."""
state, _ = self._ipcam.export_sensor(self._sensor)
self._state = state == 1.0
@property
def device_class(self):
"""Return the class of this device, from component DEVICE_CLASSES."""
return 'motion'

View File

@@ -1,42 +1,49 @@
"""
Provides a binary sensor to track online status of a UPS.
Support for tracking the online status of a UPS.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.apcupsd/
"""
import voluptuous as vol
from homeassistant.components.binary_sensor import (
BinarySensorDevice, PLATFORM_SCHEMA)
from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv
from homeassistant.components import apcupsd
from homeassistant.components.binary_sensor import BinarySensorDevice
DEFAULT_NAME = 'UPS Online Status'
DEPENDENCIES = [apcupsd.DOMAIN]
DEFAULT_NAME = "UPS Online Status"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
})
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Instantiate an OnlineStatus binary sensor entity."""
add_entities((OnlineStatus(config, apcupsd.DATA),))
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up an APCUPSd Online Status binary sensor."""
add_devices([OnlineStatus(config, apcupsd.DATA)], True)
class OnlineStatus(BinarySensorDevice):
"""Binary sensor to represent UPS online status."""
"""Representation of an UPS online status."""
def __init__(self, config, data):
"""Initialize the APCUPSd binary device."""
self._config = config
self._data = data
self._state = None
self.update()
@property
def name(self):
""" The name of the UPS online status sensor. """
return self._config.get("name", DEFAULT_NAME)
"""Return the name of the UPS online status sensor."""
return self._config.get(CONF_NAME)
@property
def is_on(self):
"""True if the UPS is online, else False."""
"""Return true if the UPS is online, else false."""
return self._state == apcupsd.VALUE_ONLINE
def update(self):
"""
Get the status report from APCUPSd (or cache) and set this entity's
state.
"""
"""Get the status report from APCUPSd and set this entity's state."""
self._state = self._data.status[apcupsd.KEY_STATUS]

View File

@@ -1,5 +1,5 @@
"""
The arest sensor will consume an exposed aREST API of a device.
Support for an exposed aREST RESTful API of a device.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.arest/
@@ -8,96 +8,102 @@ import logging
from datetime import timedelta
import requests
import voluptuous as vol
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.components.binary_sensor import (
BinarySensorDevice, PLATFORM_SCHEMA, DEVICE_CLASSES_SCHEMA)
from homeassistant.const import (
CONF_RESOURCE, CONF_PIN, CONF_NAME, CONF_DEVICE_CLASS)
from homeassistant.util import Throttle
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
# Return cached results if last scan was less then this time ago
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30)
CONF_RESOURCE = 'resource'
CONF_PIN = 'pin'
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_RESOURCE): cv.url,
vol.Optional(CONF_NAME): cv.string,
vol.Required(CONF_PIN): cv.string,
vol.Optional(CONF_DEVICE_CLASS): DEVICE_CLASSES_SCHEMA,
})
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Get the aREST binary sensor."""
"""Set up the aREST binary sensor."""
resource = config.get(CONF_RESOURCE)
pin = config.get(CONF_PIN)
if None in (resource, pin):
_LOGGER.error('Not all required config keys present: %s',
', '.join((CONF_RESOURCE, CONF_PIN)))
return False
device_class = config.get(CONF_DEVICE_CLASS)
try:
response = requests.get(resource, timeout=10).json()
except requests.exceptions.MissingSchema:
_LOGGER.error('Missing resource or schema in configuration. '
'Add http:// to your URL.')
_LOGGER.error("Missing resource or schema in configuration. "
"Add http:// to your URL")
return False
except requests.exceptions.ConnectionError:
_LOGGER.error('No route to device at %s. '
'Please check the IP address in the configuration file.',
resource)
_LOGGER.error("No route to device at %s", resource)
return False
arest = ArestData(resource, pin)
add_devices([ArestBinarySensor(arest,
resource,
config.get('name', response['name']),
pin)])
add_devices([ArestBinarySensor(
arest, resource, config.get(CONF_NAME, response[CONF_NAME]),
device_class, pin)], True)
# pylint: disable=too-many-instance-attributes, too-many-arguments
class ArestBinarySensor(BinarySensorDevice):
"""Implements an aREST binary sensor for a pin."""
"""Implement an aREST binary sensor for a pin."""
def __init__(self, arest, resource, name, pin):
def __init__(self, arest, resource, name, device_class, pin):
"""Initialize the aREST device."""
self.arest = arest
self._resource = resource
self._name = name
self._device_class = device_class
self._pin = pin
self.update()
if self._pin is not None:
request = requests.get('{}/mode/{}/i'.format
(self._resource, self._pin), timeout=10)
if request.status_code is not 200:
_LOGGER.error("Can't set mode. Is device offline?")
request = requests.get(
'{}/mode/{}/i'.format(self._resource, self._pin), timeout=10)
if request.status_code != 200:
_LOGGER.error("Can't set mode of %s", self._resource)
@property
def name(self):
"""The name of the binary sensor."""
"""Return the name of the binary sensor."""
return self._name
@property
def is_on(self):
"""True if the binary sensor is on."""
"""Return true if the binary sensor is on."""
return bool(self.arest.data.get('state'))
@property
def device_class(self):
"""Return the class of this sensor."""
return self._device_class
def update(self):
"""Gets the latest data from aREST API."""
"""Get the latest data from aREST API."""
self.arest.update()
# pylint: disable=too-few-public-methods
class ArestData(object):
"""Class for handling the data retrieval for pins."""
def __init__(self, resource, pin):
"""Initialize the aREST data object."""
self._resource = resource
self._pin = pin
self.data = {}
@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self):
"""Gets the latest data from aREST device."""
"""Get the latest data from aREST device."""
try:
response = requests.get('{}/digital/{}'.format(
self._resource, self._pin), timeout=10)
self.data = {'state': response.json()['return_value']}
except requests.exceptions.ConnectionError:
_LOGGER.error("No route to device '%s'. Is device offline?",
self._resource)
_LOGGER.error("No route to device '%s'", self._resource)

View File

@@ -0,0 +1,148 @@
"""
Support for aurora forecast data sensor.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.aurora/
"""
from datetime import timedelta
import logging
import requests
import voluptuous as vol
from homeassistant.components.binary_sensor \
import (BinarySensorDevice, PLATFORM_SCHEMA)
from homeassistant.const import (CONF_NAME)
import homeassistant.helpers.config_validation as cv
from homeassistant.util import Throttle
CONF_THRESHOLD = "forecast_threshold"
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = 'Aurora Visibility'
DEFAULT_DEVICE_CLASS = "visible"
DEFAULT_THRESHOLD = 75
MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=5)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_THRESHOLD, default=DEFAULT_THRESHOLD): cv.positive_int,
})
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up the aurora sensor."""
if None in (hass.config.latitude, hass.config.longitude):
_LOGGER.error("Lat. or long. not set in Home Assistant config")
return False
name = config.get(CONF_NAME)
threshold = config.get(CONF_THRESHOLD)
try:
aurora_data = AuroraData(
hass.config.latitude,
hass.config.longitude,
threshold
)
aurora_data.update()
except requests.exceptions.HTTPError as error:
_LOGGER.error(
"Connection to aurora forecast service failed: %s", error)
return False
add_devices([AuroraSensor(aurora_data, name)], True)
class AuroraSensor(BinarySensorDevice):
"""Implementation of an aurora sensor."""
def __init__(self, aurora_data, name):
"""Initialize the sensor."""
self.aurora_data = aurora_data
self._name = name
@property
def name(self):
"""Return the name of the sensor."""
return '{}'.format(self._name)
@property
def is_on(self):
"""Return true if aurora is visible."""
return self.aurora_data.is_visible if self.aurora_data else False
@property
def device_class(self):
"""Return the class of this device."""
return DEFAULT_DEVICE_CLASS
@property
def device_state_attributes(self):
"""Return the state attributes."""
attrs = {}
if self.aurora_data:
attrs["visibility_level"] = self.aurora_data.visibility_level
attrs["message"] = self.aurora_data.is_visible_text
return attrs
def update(self):
"""Get the latest data from Aurora API and updates the states."""
self.aurora_data.update()
class AuroraData(object):
"""Get aurora forecast."""
def __init__(self, latitude, longitude, threshold):
"""Initialize the data object."""
self.latitude = latitude
self.longitude = longitude
self.number_of_latitude_intervals = 513
self.number_of_longitude_intervals = 1024
self.api_url = \
"http://services.swpc.noaa.gov/text/aurora-nowcast-map.txt"
self.headers = {"User-Agent": "Home Assistant Aurora Tracker v.0.1.0"}
self.threshold = int(threshold)
self.is_visible = None
self.is_visible_text = None
self.visibility_level = None
@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self):
"""Get the latest data from the Aurora service."""
try:
self.visibility_level = self.get_aurora_forecast()
if int(self.visibility_level) > self.threshold:
self.is_visible = True
self.is_visible_text = "visible!"
else:
self.is_visible = False
self.is_visible_text = "nothing's out"
except requests.exceptions.HTTPError as error:
_LOGGER.error(
"Connection to aurora forecast service failed: %s", error)
return False
def get_aurora_forecast(self):
"""Get forecast data and parse for given long/lat."""
raw_data = requests.get(self.api_url, headers=self.headers).text
forecast_table = [
row.strip(" ").split(" ")
for row in raw_data.split("\n")
if not row.startswith("#")
]
# convert lat and long for data points in table
converted_latitude = round((self.latitude / 180)
* self.number_of_latitude_intervals)
converted_longitude = round((self.longitude / 360)
* self.number_of_longitude_intervals)
return forecast_table[converted_latitude][converted_longitude]

View File

@@ -0,0 +1,68 @@
"""
Support for Axis binary sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.axis/
"""
import logging
from datetime import timedelta
from homeassistant.components.binary_sensor import (BinarySensorDevice)
from homeassistant.components.axis import (AxisDeviceEvent)
from homeassistant.const import (CONF_TRIGGER_TIME)
from homeassistant.helpers.event import track_point_in_utc_time
from homeassistant.util.dt import utcnow
DEPENDENCIES = ['axis']
_LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup Axis device event."""
add_devices([AxisBinarySensor(discovery_info['axis_event'], hass)], True)
class AxisBinarySensor(AxisDeviceEvent, BinarySensorDevice):
"""Representation of a binary Axis event."""
def __init__(self, axis_event, hass):
"""Initialize the binary sensor."""
self.hass = hass
self._state = False
self._delay = axis_event.device_config(CONF_TRIGGER_TIME)
self._timer = None
AxisDeviceEvent.__init__(self, axis_event)
@property
def is_on(self):
"""Return true if event is active."""
return self._state
def update(self):
"""Get the latest data and update the state."""
self._state = self.axis_event.is_tripped
def _update_callback(self):
"""Update the sensor's state, if needed."""
self.update()
if self._timer is not None:
self._timer()
self._timer = None
if self._delay > 0 and not self.is_on:
# Set timer to wait until updating the state
def _delay_update(now):
"""Timer callback for sensor update."""
_LOGGER.debug("%s Called delayed (%s sec) update.",
self._name, self._delay)
self.schedule_update_ha_state()
self._timer = None
self._timer = track_point_in_utc_time(
self.hass, _delay_update,
utcnow() + timedelta(seconds=self._delay))
else:
self.schedule_update_ha_state()

View File

@@ -0,0 +1,89 @@
"""
Support for binary sensor using Beaglebone Black GPIO.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.bbb_gpio/
"""
import logging
import voluptuous as vol
import homeassistant.components.bbb_gpio as bbb_gpio
from homeassistant.components.binary_sensor import (
BinarySensorDevice, PLATFORM_SCHEMA)
from homeassistant.const import (DEVICE_DEFAULT_NAME, CONF_NAME)
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['bbb_gpio']
CONF_PINS = 'pins'
CONF_BOUNCETIME = 'bouncetime'
CONF_INVERT_LOGIC = 'invert_logic'
CONF_PULL_MODE = 'pull_mode'
DEFAULT_BOUNCETIME = 50
DEFAULT_INVERT_LOGIC = False
DEFAULT_PULL_MODE = 'UP'
PIN_SCHEMA = vol.Schema({
vol.Required(CONF_NAME): cv.string,
vol.Optional(CONF_BOUNCETIME, default=DEFAULT_BOUNCETIME): cv.positive_int,
vol.Optional(CONF_INVERT_LOGIC, default=DEFAULT_INVERT_LOGIC): cv.boolean,
vol.Optional(CONF_PULL_MODE, default=DEFAULT_PULL_MODE):
vol.In(['UP', 'DOWN'])
})
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_PINS, default={}):
vol.Schema({cv.string: PIN_SCHEMA}),
})
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up the Beaglebone Black GPIO devices."""
pins = config.get(CONF_PINS)
binary_sensors = []
for pin, params in pins.items():
binary_sensors.append(BBBGPIOBinarySensor(pin, params))
add_devices(binary_sensors)
class BBBGPIOBinarySensor(BinarySensorDevice):
"""Representation of a binary sensor that uses Beaglebone Black GPIO."""
def __init__(self, pin, params):
"""Initialize the Beaglebone Black binary sensor."""
self._pin = pin
self._name = params.get(CONF_NAME) or DEVICE_DEFAULT_NAME
self._bouncetime = params.get(CONF_BOUNCETIME)
self._pull_mode = params.get(CONF_PULL_MODE)
self._invert_logic = params.get(CONF_INVERT_LOGIC)
bbb_gpio.setup_input(self._pin, self._pull_mode)
self._state = bbb_gpio.read_input(self._pin)
def read_gpio(pin):
"""Read state from GPIO."""
self._state = bbb_gpio.read_input(self._pin)
self.schedule_update_ha_state()
bbb_gpio.edge_detect(self._pin, read_gpio, self._bouncetime)
@property
def should_poll(self):
"""No polling needed."""
return False
@property
def name(self):
"""Return the name of the sensor."""
return self._name
@property
def is_on(self):
"""Return the state of the entity."""
return self._state != self._invert_logic

View File

@@ -0,0 +1,74 @@
"""
Support for Blink system camera control.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.blink/
"""
from homeassistant.components.blink import DOMAIN
from homeassistant.components.binary_sensor import BinarySensorDevice
DEPENDENCIES = ['blink']
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up the blink binary sensors."""
if discovery_info is None:
return
data = hass.data[DOMAIN].blink
devs = list()
for name in data.cameras:
devs.append(BlinkCameraMotionSensor(name, data))
devs.append(BlinkSystemSensor(data))
add_devices(devs, True)
class BlinkCameraMotionSensor(BinarySensorDevice):
"""Representation of a Blink binary sensor."""
def __init__(self, name, data):
"""Initialize the sensor."""
self._name = 'blink_' + name + '_motion_enabled'
self._camera_name = name
self.data = data
self._state = self.data.cameras[self._camera_name].armed
@property
def name(self):
"""Return the name of the blink sensor."""
return self._name
@property
def is_on(self):
"""Return the status of the sensor."""
return self._state
def update(self):
"""Update sensor state."""
self.data.refresh()
self._state = self.data.cameras[self._camera_name].armed
class BlinkSystemSensor(BinarySensorDevice):
"""A representation of a Blink system sensor."""
def __init__(self, data):
"""Initialize the sensor."""
self._name = 'blink armed status'
self.data = data
self._state = self.data.arm
@property
def name(self):
"""Return the name of the blink sensor."""
return self._name.replace(" ", "_")
@property
def is_on(self):
"""Return the status of the sensor."""
return self._state
def update(self):
"""Update sensor state."""
self.data.refresh()
self._state = self.data.arm

Some files were not shown because too many files have changed in this diff Show More