26866 Commits

Author SHA1 Message Date
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
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
Pascal Vizeli
32f8622bba Bugfix sonos group coordinator (#5691)
* Bugfix sonos group coordinator

* Fix tests
2017-02-01 16:53:02 +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
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
Daniel Høyer Iversen
3a1607500e Add set_options_service for input select (#5630) 2017-01-30 09:17:57 -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
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
andrey-git
1fb372ffdb Apply new customize format to Zwave (#5603) 2017-01-28 22:29:51 +02: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
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
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 4b43537801a5c088329f6b12c99c95fdb2eb0e9c.

Revert "Version bump for kodi dependency (#5307)"

This reverts commit 6abad6b76e610b1bfb13f3f9342a2a0a53971fcf.

Revert "Add HMWIOSwitch to sensor, binary (#5304)"

This reverts commit 2c3f55acc4cc8890e54bf6a94f5a960eee28c486.

Revert "Remove GTFS default name & string change"

This reverts commit 6000c59bb559b8e37553b3f0def79c2bd84f2af2.

Revert "Update pyhomematic 1.19 & small cleanups (#5299)"

This reverts commit a30711f1a0e2d4a286799d714fe59ff147883fab.

Revert "[sensor] Add Dublin bus RTPI sensor (#5257)"

This reverts commit 1219ca3c3bc083c8f919c4db7eb3670686e52861.

Revert "Bugfix group reload (#5292)"

This reverts commit baa8e53e66167a1fb0f9d090f28325454ad3d4ef.

Revert "Support for TrackR device trackers (#5010)"

This reverts commit f7a1d63d52dc7687a07cd2c52ef4e8e6894e45d9.

Revert "Bump pywemo version."

This reverts commit dc937cc8cffbb9ec2b4342d801f8d7332a8dd9cf.

Revert "Upgrade to voluptuous to 0.9.3 (#5288)"

This reverts commit d12decc4714cb61af58ab08581712b8be5367960.

Revert "Upgrade distro to 1.0.2 (#5291)"

This reverts commit 64800fd48c02520b1f44be960dc8c539f82d1692.

Revert "Don't build Adafruit_BBIO - doesn't work on all platforms. (#5281)"

This reverts commit 9a3c0c8cd3a06d118cfcf58d1078912e41f12f31.

Revert "Convert flic to synchronous platform. (#5276)"

This reverts commit eb9b95c2922181b097258856af9bd2bc4d7a814e.

Revert "Upgrade to aiohttp 1.2 (#4964)"

This reverts commit e68e29e03ebd43175761d1ae2b4e598d382d2cf4.

Revert "Fix TCP sensor to correctly use value_template (#5211)"

This reverts commit 1cf9ae5a01d663bb9e3d3e38741b2ae818b36f93.

Revert "Cleanup language support on TTS (#5255)"

This reverts commit 3f3a3bcc8ac7eec2e5e9eba9981c74db3842f22d.

Revert "Add last triggered to script (#5261)"

This reverts commit 467cb18625da9323f743ed62a342e446a79fb05b.

Revert "Bump flux_led version and make use of PyPi package (#5267)"

This reverts commit 34a9fb01ac1fb9568f18677be5faf3d23ab7dc2a.

Revert "Add support for NAD receivers (#5191)"

This reverts commit 3b59e169f1bc11b3887bc98b2f8425f6c70a0df2.

Revert "Bugfix async device_tracker see callback (#5259)"

This reverts commit 71fddd26eb9c9ffe6cbd809298f07e17aad152a4.

Revert "Use SHA hash to make token harder to guess (#5258)"

This reverts commit 922308bc1f7a2a0a769a8c29d663c90a97a0583b.

* Revert "Revert "Bugfix camera streams (#5306)""

This reverts commit 2ee8c44021cf9c3a91d20f9ee26752aa8369d2e6.

* 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
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
Pascal Vizeli
c3a55e7d82 Fix upc lint error (#5554) 2017-01-25 18:46:37 +01: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
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
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
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
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
andrey-git
addc2c4340 Allow easier customization of whole domain, entity lists, globs. (#5215) 2017-01-22 21:19:50 +02:00
Adam Mills
df361dc1e1
Fix network tests to use get_test_instance_port 2017-01-21 22:15:05 -05: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
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
Paulus Schoutsen
887a33c7d1 Persist emulated hue IDs (#5435) 2017-01-19 21:27:10 -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
Adam Mills
216ac14b3d Fix test for async media player volume helpers (#5432) 2017-01-18 19:15:51 -08: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
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
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
Paulus Schoutsen
7511a5842d Fix load_yaml default value (#5383) 2017-01-16 22:08:47 -08: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
Pascal Vizeli
f08e2648ae Bugfix upc with aiohttp 1.2 (cookies) (#5362) 2017-01-16 11:06:23 +01: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
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
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
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
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