Commit Graph

1321 Commits (e970177eebed9adf444310338d630dda6ca935e0)

Author SHA1 Message Date
Fredrik Erlandsson d6a4e106a9 Tellduslive refactoring (#18780)
* move component to a package

* move TelldusLiveEntry to separate file

* refactor

* move entities from a shared container
* using the dispatch helper instead for communication between component and platforms

* updated covereagerc and codeowners

* suggestions from MartinHjelmare

* don't make update async

* "Strip is good!"
2018-12-04 10:08:40 +01:00
GeoffAtHome eb584a26e2 Add lightwave components for switches and lights (#18026)
* Added lightwave components for switches and lights.

* Address warnings raised by Hound

* Correcting lint messages and major typo. This time tested before commit.

* Trying to fix author

* Minor lint changes

* Attempt to correct other lint error.

* Another lint attempt.

* More lint issues.

* Last two lint errors! Hurrah.

* Changes after review from fabaff.

* Moved device dependent code to PyPi.

* Replaced DEPENDENCIES with REQUIREMENTS

* Updated following code review from Martin Hjelmare.

* Added lightwave to requirements_all.txt

* Omit lightwave from tests.

* Updated requirements_all.txt

* Refactored how lightwave lights and switches load.

* Removed imports that were no longer required.

* Add guard for no discovery_info.

* Make it a guard clause and save indentation. Rename LRFxxx to LWRFxxx.

* Sorted imports to match style guidelines.

* Correct return value.

* Update requirements_all.txt

* Catch case where we have no lights or switches configured.

* Improve configuration validation.
2018-12-02 20:58:31 +01:00
emontnemery afa99915e3 Reconfigure MQTT light component if discovery info is changed (#18176) 2018-12-02 16:16:36 +01:00
pbalogh77 8f50180598 Hotfix for Fibaro wall plug (#18845)
Fibaro wall plug with a lamp plugged in was misrecognized as a color light, generating crashes in the update function.
2018-11-30 17:23:25 +01:00
Adam Mills 5c3a4e3d10 Restore states through a JSON store instead of recorder (#17270)
* Restore states through a JSON store

* Accept entity_id directly in restore state helper

* Keep states stored between runs for a limited time

* Remove warning
2018-11-28 13:16:43 +01:00
damarco 052d305243 Add config entry for ZHA (#18352)
* Add support for zha config entries

* Add support for zha config entries

* Fix node_config retrieval

* Dynamically load discovered entities

* Restore device config support

* Refactor loading of entities

* Remove device registry support

* Send discovery_info directly

* Clean up discovery_info in hass.data

* Update tests

* Clean up rebase

* Simplify config flow

* Address comments

* Fix config path and zigpy check timeout

* Remove device entities when unloading config entry
2018-11-27 21:21:25 +01:00
Austin 2f07e92cc2 Fix decora_wifi residences (#17228)
* Fix decora multiple residences

* Fix typo

* Update decora_wifi.py
2018-11-27 16:53:28 +01:00
emontnemery 16e3ff2fec Mqtt light refactor (#18227)
* Rename mqtt light files

* Refactor mqtt light

* Remove outdated testcase

* Add backwards compatibility for MQTT discovered MQTT lights.
Refactor according to review comments.
2018-11-27 14:00:05 +01:00
Fabian Affolter 1cbe080df9 Fix remaining issues (#18416) 2018-11-27 13:21:42 +01:00
pbalogh77 4a661e351f Use asyncio Lock for fibaro light (#18622)
* Use asyncio Lock for fibaro light

* line length and empty line at end

* async turn_off

Turned the turn_off into async as well

* bless you, blank lines...

My local flake8 lies to me. Not cool.
2018-11-26 13:17:56 +01:00
Kacper Krupa 8771f9f7dd converted majority of effects from ifs to dict map, which makes it easier to extend in the future. Also, added LSD effect! (#18656) 2018-11-23 23:53:33 +01:00
cdheiser 98f159a039 [Breaking Change] Cleanup Lutron light component (#18650)
Remove the return value from setup_platform
Convert LutronLight.__init__ to use super() when referencing the parent class.
Change device_state_attributes() to use lowercase snakecase (Rename 'Lutron Integration ID' to 'lutron_integration_id')
2018-11-23 08:54:28 +01:00
David F. Mulcahey 67aa76d295 Refactor ZHA (#18629)
* refactor ZHA

* lint

* review request

* Exclude more zha modules from coverage
2018-11-22 19:00:46 +01:00
mopolus 01ee03a9a1 Add support for multiple IHC controllers (#18058)
* Added support for secondary IHC controller

Most IHC systems only have one controller but the system can be setup with a linked secondary controller.
I have updated the code to have it support both primary and secondary controller. Existing configuration is not impacted and secondary controller can be setup the same way, with similar settings nested under 'secondary' in the configuration

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update __init__.py

* Update const.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update const.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update ihc.py

* Update __init__.py

* Update __init__.py

* Update ihc.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

indentation was incorrect for "load_platform" in "get_manual_configuration". Load_platform was not called with the correct component name
2018-11-22 09:45:40 +01:00
pbalogh77 3b53003795 Fibaro components (#18487)
* Added Fibaro omcponents

Added cover, light, sensor and switch components

* Improvements based on code review

Improvements based on code review

* Fixes based on code review

Fixes based on code review

* Changes to light behavior based on code review

Changes to light behavior based on code review

* Internal changes

Changed how brightness is represented internally.
It should have no impact on functionality.
2018-11-21 06:15:54 +01:00
Franck Nijhof 80cd8b180c Adds light switch platform (#18562)
* Adds light switch platform

* Addresses HoundCI warnings

* Addresses Flake8 reported issues

* Removes async_update call as per review
2018-11-20 11:51:34 +01:00
Daniel Perna fc4dd4e51f Update pyhomematic to 0.1.52 and add features for lights (#18499)
* Update pyhomematic and add features for lights

* Lint

* Lint

* Update homematic.py

* Update homematic.py
2018-11-19 14:26:08 +01:00
Anders Melchiorsen b066877453 Allow unloading of LIFX config entry (#18535) 2018-11-18 19:51:17 +01:00
Sebastian Muszynski d2907b8e53 Add Philips Zhirui Downlight support (#18455) 2018-11-14 12:33:27 +01:00
Levi Govaerts 15c77fe548 Add niko-home-control support (#18019)
* Add niko-home-control support

* Remove the sensor platform

* Minor changes

* Fix docstring
2018-11-12 15:59:52 +01:00
Matthew Garrett fa127188df Bump python-avion dependency
The current version of python-avion doesn't work correctly with Python 3.5.
Update it to one that does.
2018-11-10 18:03:55 -08:00
Sebastian Muszynski df3d82e0e3
Use async_add_executor_job at the xiaomi_miio platforms (#18294) 2018-11-07 09:03:35 +01:00
Robert Svensson dcdae325ea deCONZ - reflect hub status on entities (#18106)
* Support for controlling entity available attribute based on gateways availability

* Fix string not being in imperative mood
2018-11-05 16:21:44 +01:00
Sebastian Muszynski c75c00d568 Bump python-miio version (#18095) 2018-11-01 17:53:48 +01:00
Robert Svensson a9140dc8f5
deCONZ - retry if setup fails (#17772)
* Make component retry if setup fails
* Improve overall test coverage
2018-10-31 22:38:04 +01:00
Anton Sarukhanov 32cb666dac Update Avi-On to work with latest API (#17780)
* Update Avi-On to work with the API.

* Use voluptuous defaults instead of .get()

* Bump library version.

* Remove unnecessary voluptuous defaults. Fix manually-configured devices.

API-discovered devices are already Avion objects, but manually-configured devices need to be instantiated as Avion objects first.

* Use .get() where appropriate.

* Remove default
2018-10-29 23:29:27 +01:00
Rohan Kapoor 851d7e22e7 Make light.yeelight stop doing IO when accessing properties (#17917) 2018-10-29 08:07:57 +01:00
Ville Skyttä 43048962f2
Upgrade flake8 to 3.6.0 (#17770)
* Upgrade flake8 to 3.6.0

* flake8/pylint comment tweaks

* flake8 F841 fixes

* flake8 W605 fix

* Ignore pyflakes bug #373 false positives

https://github.com/PyCQA/pyflakes/issues/373

* pycodestyle bug #811 workaround

https://github.com/PyCQA/pycodestyle/issues/811
2018-10-25 23:15:20 +03:00
Anders Melchiorsen 3014930371 Update limitlessled to 1.1.3 (#17703) 2018-10-23 07:11:55 +02:00
Matt Snyder 0524c51c1a Update flux library version (#17677) 2018-10-22 07:04:47 +02:00
emontnemery 9982867d66 Very minor cleanup of RFLink components (#17649) 2018-10-21 13:05:02 +02:00
Bob Clough 2e973c7572 Fix mqtt light brightness slider (#17075)
* Enable brightness slider for RGB

If we are using RGB with no brightness topic, the brighness slider
should still be visible, as we can scale the RGB amount to give us the
brightness.

* Output RGB scaled by brightness

If we are outputting to an RGB device, but do not have a dedicated
brightness topic set, when the brightness slider is changed, we should
output the current colour's HS, with the V coming from the brightness
slider.

* Brightness from RGB when we're not using a brightness topic

When we aren't using a brightness topic, set the brightness slider based
on the received value from an RGB -> HSV conversion.

* Test for new brightness state scaled by RGB

This adds a test to make sure the brightness stored in the state is
being computed correctly from the RGB value when a dedicated brightness
topic is not set.

* Changes from review

Fixes formatting of supported features flags, and checks HS colour
hasn't been set when operating in RGB-only mode

* Set optimistic brightness correctly in rgb mode

When we're using rgb mode to set the brightness, we want to set
optimistic brightness if:

we are running in optimistic mode
OR
the brightness state topic isn't set and we have a brightness command topic
OR
the rgb state topic isn't set and we don't have a brightness command topic

* Add test for turn_on in RGB brightness mode
2018-10-20 12:37:25 -04:00
Thomas Lovén 90183bd682 Tuya light icon fix (#17605)
* Fix for tuya light icons going too bright

* Make sure other values aren't strings either
2018-10-19 09:17:19 +02:00
Anders Melchiorsen 1e4463957d Scan all network interfaces for LIFX bulbs (#17530) 2018-10-17 10:50:13 +02:00
Charles Garwood 9c52a3ce22 Z-Wave Device Registry Support (#17291)
* Add device_registry support for sensor and switch domains

* Add device_registry support for light

* Add device registry to binary_sensor, climate, cover

* Add device registry to zwave fan

* Fix test for config entry loading

* lint

* revert erroneous modification

* Revert device_registry.py change
2018-10-16 14:58:25 +02:00
Anders Melchiorsen 1a5048baaf Add device info for LIFX (#17330)
* Add device info for LIFX

* Address review comments
2018-10-15 20:46:33 +02:00
emontnemery 2ceb4d2d1e Refactor RFLink component (#17402)
* Start refactor of RFLink component

* alias _id not added correctly

Aliases for sensor not added correctly
And some debug traces.

* Update rflink.py

* Cleanup, fix review comments

* Call event handlers directly when processing initial event

* Use hass.async_create_task when adding discovered device

* Review comments

* Review comments
2018-10-15 15:35:33 +02:00
Paulus Schoutsen ac79ff9e24
Add context to scripts run by template entities (#17329) 2018-10-15 11:38:49 +02:00
Julius Mittenzwei a71cc67efb Fix NoEntitySpecifiedError during knx startup (#17366)
* Potential fix for #13699

* removed uneccessary initialization of hass

* removed hass from signature
2018-10-15 03:29:36 +02:00
Daniel Shokouhi 3cf6c76f8b Add unique_id for Lightify (#17377) 2018-10-13 00:32:35 +02:00
Jedmeng 7b28963a88 Fix setting opple light color temperature (#17359) 2018-10-12 14:50:20 +02:00
Sebastian Muszynski 5a00cc5afc Provide an individual color temperature range per Yeelight model (#17305)
* Provide an individual color temperature range per Yeelight model

* Fix lint

* Bump yeelight version

* Remove unused const

* Enable SUPPORT_COLOR_TEMP for BulbType.WhiteTemp
2018-10-12 11:35:33 +02:00
shred86 7bb60068d7 Color control for Abode RGB lights (#17347)
* Color control support for Abode lights

* Updated add_devices to add_entities

* Update line length

* Changed elif to if for pylint warning
2018-10-12 08:47:14 +02:00
Fabian Affolter 8d9da4e7b9
Upgrade construct to 2.9.45 (#16362) 2018-10-10 23:52:45 +02:00
Glenn Waters 93e3596e5a Add Elk-M1 switch and scene platforms (#17256)
* Add Elk-M1 switch platform.

* Fix travis error.

* Fix very annoying lint error.

* Fix PR comments.

* Fix comment.

* Fix lint errors.

* Fix PR comments.

* Fix PR

Apologize. Going too fast. You should not have to find those.
2018-10-10 19:05:19 +02:00
Ville Skyttä 707b7c202d Narrow scope of various pylint inline disables (#15364)
* Narrow scope of various pylint inline disables

* Whitespace tweaks
2018-10-10 12:17:11 +02:00
Sebastian Muszynski 757ba3b60e Add basic support of the Philips Zhirui desk lamp (philips.light.mono1) (#17258) 2018-10-09 10:11:34 +02:00
Sebastian Muszynski 882c4b73ae Fix ambient light state of the Philips Eyecare Lamp (Closes: #16269) (#17259) 2018-10-09 10:11:14 +02:00
Teemu R 56a43436d7 Bump python-miio requirement (#17260) 2018-10-08 22:33:06 +02:00
Glenn Waters 9380fca97e Add Elk light platform (#17222)
* Add Elk light platform.

* Add ElkM1 light code. Doh.

* Fix PR comments.

* Fix hound errors.

* Fix PR comment.

* Move state from base to class(s) where used
2018-10-08 17:30:27 +02:00
emontnemery 42fb886d71 Add support for HS color to mqtt light (#16958)
* Add support for HS color to mqtt light

* Warn if hs state update is invalid
2018-10-08 15:36:57 +02:00
Anders Melchiorsen 086c71525e Add config entry for LIFX (#17201)
* Add config entry for LIFX

* Use list for dependencies

* Obsolete the platform config

* Use DOMAIN

* Use async_create_task
2018-10-07 23:14:53 +02:00
Anders Melchiorsen 8683eeb908 Upgrade aiolifx_effects to 0.2.1 (#17188) 2018-10-06 14:32:54 +02:00
Paulus Schoutsen a6f8c3f662 Add logging to light updates (#17069) 2018-10-02 13:33:16 +02:00
cdce8p 7f0a50ce31 async_create_task (#17059)
* async_create_task

* Update google.py
2018-10-02 11:03:09 +02:00
cdce8p 3b5e5cbcd6 Async syntax 5, light & lock & remote & scene & telegram & helpers (#17019) 2018-10-01 08:56:50 +02:00
Greg Laabs 7f47d601f1 Fix ISY blocking bug (#16978)
This fix results in `is_on` returning False if the state is unknown (which was a bug in 0.79).
2018-09-30 09:21:27 +02:00
Otto Winter af89e7c50f Move more MQTT platforms to config entries (#16918)
* Move more MQTT platforms to config entries

* Address comments
2018-09-28 16:57:17 +02:00
Otto Winter c9b6567265 Remove discovered mqtt_json light entity when discovery is cleared (#16906)
* Remove discovered mqtt_json entity device when discovery topic is cleared

* Keep imports ordered
2018-09-28 00:25:51 +02:00
cdce8p 70b901017f Remove service helper (5) (#16917)
* Update switch

* Update script

* Update light

* Fix tests

* Fix config/script hook

* Async_create_task

* Fix flux switch
2018-09-27 23:13:11 +02:00
emontnemery ad79dc673d MQTT Light - Do not throw if property is missing from templated MQTT message (#16720)
* Do not throw if property is missing

* Render template once, add debug prints
2018-09-27 11:48:52 +02:00
Anders Melchiorsen 81d4338b93
Upgrade aiolifx_effects to 0.2.0 (#16900) 2018-09-27 01:08:20 +02:00
Jedmeng 8e311686d0 Add support for Opple light (#16765)
* Add support for Opple light

* Update docstring

* review fix

* review fix

* review fix
2018-09-25 20:49:37 +02:00
emontnemery 90197b6ec9 Remove discovered MQTT light device when discovery topic is cleared (#16824) 2018-09-25 09:19:04 +02:00
Greg Laabs dc1534c6d1 Fix some unhandled exceptions due to missing null checks (#16812)
Fixed a couple cases that would produce errors when the ISY node status was None or `-inf`.
2018-09-24 11:43:00 +02:00
Robert Svensson 7fe0d8b2f4
deCONZ cover support (#16759)
deCONZ cover platform for Keen vents
2018-09-21 19:59:20 +02:00
Paulus Schoutsen 3e59ffb33a Add tradfri device info (#16768) 2018-09-21 14:47:52 +02:00
Robert Svensson 90c18d1c15 deCONZ add via_hub attribute for device registry (#16760)
* deCONZ add via_hub attribute for device registry

* A shorter way to get bridgeid
2018-09-21 09:21:44 +02:00
Zoé Bőle 03de658d4d Changed save_on_change to default to False (#16744) 2018-09-20 20:24:01 +02:00
Alexei Chetroi 3ea8c25e1f light.zha: Catch exceptions for all commands. (#16752)
Catch exceptions for all operations which may fail because of device
reachibility
More verbose debug logging on operations
2018-09-20 20:23:09 +02:00
Nikolay Kasyanov 27eede724c Add unique_id to mqtt_json light (#16721)
Applies changes from #16303 to mqtt_json component.
Fixes #16600.
2018-09-20 08:15:17 +02:00
Paulus Schoutsen a1c524d372
Config flow tradfri (#16665)
* Fix comments

* Add config flow tests

* Fix Tradfri light tests

* Lint

* Remove import group from config flow

* fix stale comments
2018-09-19 21:21:43 +02:00
Paulus Schoutsen b8257866f5
Clean up device update, add via-hub (#16659)
* Clean up device update, add via-hub

* Test loading/saving data

* Lint

* Add to Hue"

* Lint + tests
2018-09-17 13:39:30 +02:00
Sören Oldag 00918af94d Upgrade pwmled to 1.3.0 (#16624) 2018-09-15 10:08:52 +02:00
Harvtronix d076251b18 Changing z-wave brightness calculation to respect 0x01 and 0x02 byte values (#16420)
* Changing z-wave brightness calculation to respect 0x01 and 0x02 byte
values

* adding additional line breaks to satisfy houndci

* - Update comment style for linter
- Add additional unit test to increase code coverage

* Update zwave.py
2018-09-13 10:38:07 -04:00
Alexei Chetroi 7a52bbdf24 Allow only_cache parameter in zha.safe_read() (#16553)
* Allow only_cache parameter in zha.safe_read()

* Use cache_only for binary_sensor.zha initial update.

* Use cache_only for fan.zha initial update.

* Use cache_only for sensor.zha initial update.

* Use cache_only for switch.zha initial update.

* Use cache_only for light.zha initial update.

* Refactor cached only read in zha platform.
2018-09-13 09:22:50 +02:00
Anders Melchiorsen 7d590a6b93
Update pyHS100 to 0.3.3 (#16502) 2018-09-09 00:34:22 +02:00
Maciej Bieniek e75a1690d1 Add unique_id to MQTT Light (#16303)
* Add unique_id

* Delete whitespaces
2018-09-01 23:37:03 +02:00
Anders Melchiorsen b43c47cb17 Fix LIFX effects (#16309) 2018-08-31 10:17:11 +02:00
Robert Svensson 645c3a67d8 Fix so that entities are properly unloaded with config entry (#16281) 2018-08-29 23:18:20 +02:00
Paulus Schoutsen 867d17b03d
Add Hue device info (#16267)
* Add Hue device info

* Set with tuples

* Fix tests
2018-08-29 17:04:04 +02:00
Robert Svensson 5341785aae Revert changes to platforms using self.device (#16209)
* Revert tank_utility

* Fix Soundtouch

* Fix Plex

* Fix Emby

* Fix Radiotherm

* Fix Juicenet

* Fix Qwikswitch

* Fix Xiaomi miio

* Fix Nest

* Fix Tellduslive

* Fix KNX
2018-08-26 21:25:39 +02:00
Robert Svensson 97173f495c Device registry store config entry (#16152)
* Allow device registry to optionally store config entries

* Connections and identifiers are now sets with tupels

* Make config entries mandatory

* Fix duplicate keys in test

* Rename device to device_info

* Entity platform should only create device entries if config_entry_id exists

* Fix Soundtouch tests

* Revert soundtouch to use self.device

* Fix baloobs comments

* Correct type in test
2018-08-25 10:59:28 +02:00
Robert Svensson e91a1529e4
deCONZ - Support device registry (#16115)
Add support for device registry in deCONZ component
2018-08-24 19:37:22 +02:00
Paulus Schoutsen 994b829cb4
add_devices -> add_entities (#16171)
* add_devices -> add_entities

* Lint

* PyLint

* Revert external method in scsgate
2018-08-24 16:37:30 +02:00
Robert Svensson 37fd438717 deCONZ - Allow sub second light transitions (#16170)
Solves https://github.com/home-assistant/home-assistant/issues/16075
2018-08-24 16:15:28 +02:00
Ville Skyttä dd9d53c83e Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0 (#14557)
* Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0

* Pydocstyle D401 fixes
2018-08-24 10:28:43 +02:00
Robert Svensson 0009be595c Device Registry (#15980)
* First draft

* Generate device id

* No obscure registry

* Dont store config_entry_id in device

* Storage

* Small mistake on rebase

* Do storage more like entity registry

* Improve device identification

* Add tests

* Remove deconz device support from PR

* Fix hound comments, voff!

* Fix comments and clean up

* Fix proper indentation

* Fix pydoc issues

* Fix mochad component to not use self.device

* Fix mochad light platform to not use self.device

* Fix TankUtilitySensor to not use self.device

* Fix Soundtouch to not use self.device

* Fix Plex to not use self.device

* Fix Emby to not use self.device

* Fix Heatmiser to not use self.device

* Fix Wemo lights to not use self.device

* Fix Lifx to not use self.device

* Fix Radiotherm to not use self.device

* Fix Juicenet to not use self.device

* Fix Qwikswitch to not use self.device

* Fix Xiaomi miio to not use self.device

* Fix Nest to not use self.device

* Fix Tellduslive to not use self.device

* Fix Knx to not use self.device

* Clean up a small mistake in soundtouch

* Fix comment from Ballob

* Fix bad indentation

* Fix indentatin

* Lint

* Remove unused variable

* Lint
2018-08-22 10:46:37 +02:00
Tom Harris a31501d99e Merge insteon_plm and insteon_local to insteon component (#16102)
* Implement X10

* Add X10 after add_device_callback

* Ref device by id not hex and add x10OnOffSwitch name

* X10 services and add sensor device

* Correctly reference X10_HOUSECODE_SCHEMA

* Log adding of X10 devices

* Add X10 All Units Off, All Lights On and All Lights Off devices

* Correct ref to X10 states vs devices

* Add X10 All Units Off, All Lights On and All Lights Off devices

* Correct X10 config

* Debug x10 device additions

* Config x10 from bool to housecode char

* Pass PLM to X10 device create

* Remove PLM to call to add_x10_device

* Unconfuse x10 config and method names

* Correct spelling of x10_all_lights_off_housecode

* Bump insteonplm to 0.10.0 to support X10

* Add host to config options

* Add username and password to config for hub connectivity

* Add username and password to config for hub

* Convert port to int if host is defined

* Add KeypadLinc

* Update config schema to require either port or host

* Solidify Hub and PLM configuration to ensure proper settings

* Update hub schema

* Bump insteonplm version

* Fix pylint and flake issues

* Bump insteonplm to 0.12.1

* Merge insteon_plm and insteon_local to insteon

* Rename insteon_plm to insteon

* Bump insteonplm to 0.12.2

* Flake8 cleanup

* Update .coveragerc for insteon_plm, insteon_local and insteon changes

* Add persistent notification

* Fix reference to insteon_plm

* Fix indentation

* Shorten message and fix grammer

* Add comment to remove in release 0.90

* Hound fix
2018-08-22 09:09:04 +02:00
Sebastian Muszynski 7ed8ed83e3 Bump python-miio version (#16110) 2018-08-21 21:25:48 +02:00
Fabian Affolter 0e1fb74e1b
Minor updates (#16106) 2018-08-21 21:25:16 +02:00
Paulus Schoutsen 1be61df9c0
Add recent context (#15989)
* Add recent context

* Add async_set_context to components not using new services
2018-08-20 17:39:53 +02:00
Ville Skyttä dbd0763f83 Grammar and spelling fixes (#16065) 2018-08-19 22:29:08 +02:00
Max Prokhorov 2a210607d3 Wemo custom ports and network errors handling (#14516)
* Update wemo component

* Support custom ports in static addresses
* Handle device_from_description exceptions
* Process static addresses before doing discovery
* Fail on inaccessable static address
* str.format instead of old formatting

* Validate static host[:port] earlier

* Fix comment formatting

* slice looks ambiguous in the log, keep voluptuous exception path intact
2018-08-16 08:14:54 -06:00
Paulus Schoutsen 1ff1639cef
More entity service (#15998)
* Camera use entity service

* Convert climate services

* Convert light

* Convert media player

* Migrate fan
2018-08-16 14:28:59 +02:00
Thomas Delaet 8a81ee3b4f Velbus auto-discovery (#13742)
* remove velbus fan and light platforms

these platforms should not be there since they can be created with template components based on switch platform

* use latest version of python-velbus which supports auto-discovery of modules

* fix linting errors

* fix linting errors

* fix linting errors

* address review comments from @MartinHjelmare

* update based on automatic feedback

* fix linting errors

* update dependency

* syntax corrections

* fix lint warning

* split out common functionality in VelbusEntity
use sync methods for loading platforms
support unique_ids so that entities are registred in entity registry

* fix linting errors

* fix linting errors

* fix linting errors

* integrate review comments (common functionality in VelbusEntity class)

* rename DOMAIN import to VELBUS_DOMAIN

* revert change created by requirements script

* regen
2018-08-05 10:47:17 +02:00
Ville Skyttä 3246b49a45 Upgrade pylint to 2.1.0 (#15811)
* Upgrade pylint to 2.1.0

* Remove no longer needed pylint disables
2018-08-04 15:22:22 +02:00
Robert Svensson 91e8680fc5 Only report color temp when in the correct color mode (#15791) 2018-08-03 13:56:54 +02:00
Robert Svensson f8a478946e deCONZ - support for power plugs (#15752)
* Initial commit for deCONZ switch support

* Fix hound comment

* Fix martins comment; platforms shouldn't depend on another platform

* Fix existing tests

* New tests

* Clean up unnecessary methods

* Bump requirement to v43

* Added device state attributes to light
2018-08-01 11:03:08 +02:00
Juha Niemi 3959f82030 Make FutureNow light remember last brightness when turning on (#15733)
* Remember last brightness value and use it on turn_on()

* Pyfnip-0.2 now returns state reliably, no manual changes needed.

* Split too long line of code

* Updated pyfnip library version
2018-07-30 07:09:59 +02:00
Jonathan Keljo a2b793c61b Add a component for Sisyphus Kinetic Art Tables (#14472)
* Add a component for Sisyphus Kinetic Art Tables

The [Sisyphus Kinetic Art Table](https://sisyphus-industries.com/) uses a
steel ball to draw intricate patterns in sand, thrown into sharp relief by a
ring of LED lights around the outside.

This component enables basic control of these tables through Home Assistant.

* Fix lints

* Docstrings, other lints

* More lints

* Yet more.

* Feedback

* Lint

* Missed one piece of feedback

* - Use async_added_to_hass in media player
- async_schedule_update_ha_state in listeners
- constants for supported features
- subscripting for required keys
- asyncio.wait
- update to sisyphus-control with passed-in session

* Update requirements

* lint
2018-07-29 07:34:43 +02:00
Paulus Schoutsen c7f4bdafc0 Context (#15674)
* Add context

* Add context to switch/light services

* Test set_state API

* Lint

* Fix tests

* Do not include context yet in comparison

* Do not pass in loop

* Fix Z-Wave tests

* Add websocket test without user
2018-07-28 17:53:37 -07:00
Jens Østergaard Nielsen 867f80715e Remove IHC XML Element from discovery data (#15719) 2018-07-28 19:37:12 +02:00
Juha Niemi a99b4472a8 Add support for P5 FutureNow light platform (#15662)
* Added support for FutureNow light platform and relay/dimmer units

* Pinned specific version for requirement

* Added support for FutureNow light platform and relay/dimmer units

* Added futurenow.py to .coveragerc.

* Minor fixes and enhancements as requested in the code review.

* Minor fixes and enhancements as requested in the code review.

* Use device_config's value directly as it's validated as boolean.

* Simplify state check.

* Fixed brightness update that was broken in previous commit.
2018-07-27 11:11:32 +02:00
Ville Skyttä eee9b50b70 Upgrade pylint to 2.0.1 (#15683)
* Upgrade pylint to 2.0.1

* Pylint 2 bad-whitespace fix

* Pylint 2 possibly-unused-variable fixes

* Pylint 2 try-except-raise fixes

* Disable pylint fixme for todoist for now

https://github.com/PyCQA/pylint/pull/2320

* Disable pylint 2 useless-return for now

https://github.com/PyCQA/pylint/issues/2300

* Disable pylint 2 invalid-name for type variables for now

https://github.com/PyCQA/pylint/issues/1290

* Disable pylint 2 not-an-iterable for now

https://github.com/PyCQA/pylint/issues/2311

* Pylint 2 unsubscriptable-object workarounds

* Disable intentional pylint 2 assignment-from-nones

* Disable pylint 2 unsupported-membership-test apparent false positives

* Disable pylint 2 assignment-from-no-return apparent false positives

* Disable pylint 2 comparison-with-callable false positives

https://github.com/PyCQA/pylint/issues/2306
2018-07-26 08:55:42 +02:00
Daniel Kalmar 0cc9798c8f Allow defining default turn-on values for lights in the profiles file. (#15493)
* Allow defining default turn-on values for lights in the profiles file.

* Mock out file operations in unit test.

* Fix unit test flakiness.

* Avoid unnecessary copy
2018-07-24 20:29:59 +02:00
Ville Skyttä b7c336a687 Pylint cleanups (#15626)
* Pylint 2 no-else-return fixes

* Remove unneeded abstract-class-not-used pylint disable
2018-07-23 10:16:05 +02:00
Anders Melchiorsen ef3a83048c
Throttle unavailability warnings for tplink light/switch (#15591) 2018-07-22 00:51:45 +02:00
Teemu R 5cf9cd686c light.tplink: initialize min & max mireds only once, avoid i/o outside update (#15571)
* light.tplink: initialize min & max mireds only once, avoid i/o outside update

* revert the index change

* fix indent, sorry for overwriting your fix, balloob
2018-07-20 14:40:10 +02:00
Ville Skyttä 2f7b79764a More pylint 2 fixes (#15565)
## Description:

More fixes flagged by pylint 2 that don't hurt to have before the actual pylint 2 upgrade (which I'll submit soon).

## Checklist:
  - [ ] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
2018-07-20 11:45:20 +03:00
Anders Melchiorsen e427f9ee38 RFC: Only use supported light properties (#15484)
* Only use supported light properties

* Fix tests
2018-07-18 12:18:22 +02:00
Ville Skyttä bf17ed0917 More pylint 2 fixes (#15516)
* Pylint 2 useless-import-alias fixes

* Pylint 2 chained-comparison fixes

* Pylint 2 consider-using-get fixes

* Pylint 2 len-as-condition fixes
2018-07-18 11:54:27 +02:00
Ville Skyttä e31dd4404e Pylint 2 fixes (#15487)
* pylint 2 inline disable syntax fixes

* pylint 2 logging-not-lazy fixes

* pylint 2 consider-using-in fixes

* Revert pylint 2 inline disable syntax fixes addressing unused-imports

Will have a go at removing more unused imports altogether first.
2018-07-17 19:34:29 +02:00
Anders Melchiorsen 60f780cc37
Update limitlessled to 1.1.2 (#15481) 2018-07-15 23:24:35 +02:00
Anders Melchiorsen 7d0cc7e26c Fix flux_led turning on with color or effect (#15472) 2018-07-15 23:18:52 +02:00
Mattias Welponer 6db069881b Update homematicip_cloud with enum states (#15460)
* Update to next version with enum states

* Change to generic dimmer class

* Update of requirement files

* Update to hmip lib to v0.9.7

* Missing update of requirements files

* Cleanup of icon properties
2018-07-15 02:59:19 +02:00
huangyupeng ca4f69f557 Add Tuya light platform (#15444)
* add tuya light platform

* fix as review required
2018-07-15 02:48:32 +02:00
Jason Antman 6e22a0e4d9 Fix ZWave RGBW lights not producing color without explicit white_value (#15412)
* Fix ZWave RGBW lights not producing color without explicit white_value (#13930)

* simplify conditional in previous commit (#13930)

* ZwaveColorLight - only zero _white if white_value not specified in call (#13930)
2018-07-14 00:54:15 +02:00
Mattias Welponer ce5b4cd51e Add HomematicIP Cloud dimmer light device (#15456)
* Add dimmable light device

* Add imports

* Fix float and int conversion
2018-07-13 23:25:11 +02:00
Fabian Affolter 79955a5785
Catch the ValueError if the bulb was in the wrong mode (#15434) 2018-07-13 20:01:57 +02:00
Anders Melchiorsen b557c17f76
Make LimitlessLED color/temperature attributes mutually exclusive (#15298) 2018-07-12 17:17:00 +02:00
Anders Melchiorsen f32098abe4 Fix confused brightness of xiaomi_aqara gateway light (#15314) 2018-07-10 13:26:42 +02:00
Ville Skyttä 14a34f8c4b Remove some unneeded pylint import-error disables (#15386) 2018-07-09 21:34:27 +02:00
Mattias Welponer 1ff329d9d6 Add HomematicIP Cloud light power consumption and energie attributes (#15343)
* Add power consumption and energie attributes

* Fix lint

* Change attribute name and include kwh
2018-07-09 05:37:59 +02:00
Mattias Welponer 9970965718 Add HomematicIP Cloud Config Flow and Entries loading (#14861)
* Add HomematicIP Cloud to config flow

* Inititial trial for config_flow

* Integrations text files

* Load and write config_flow and init homematicip_cloud

* Split into dedicated files

* Ceanup of text messages

* Working config_flow

* Move imports inside a function

* Enable laoding even no accesspoints are defined

* Revert unnecassary changes in CONFIG_SCHEMA

* Better error handling

* fix flask8

* Migration to async for token generation

* A few fixes

* Simplify config_flow

* Bump version to 9.6 with renamed package

* Requirements file

* First fixes after review

* Implement async_step_import

* Cleanup for Config Flow

* First tests for homematicip_cloud setup

* Remove config_flow tests

* Really remove all things

* Fix comment

* Update picture

* Add support for async_setup_entry to switch and climate platform

* Update path of the config_flow picture

* Refactoring for better tesability

* Further tests implemented

* Move 3th party lib inside function

* Fix lint

* Update requirments_test_all.txt file

* UPdate of requirments_test_all.txt did not work

* Furder cleanup in websocket connection

* Remove a test for the hap

* Revert "Remove a test for the hap"

This reverts commit 968d58cba1.

* First tests implemented for config_flow

* Fix lint

* Rework of client registration process

* Implemented tests for config_flow 100% coverage

* Cleanup

* Cleanup comments and code

* Try to fix import problem

* Add homematicip to the test env requirements
2018-07-06 17:05:34 -04:00
cdce8p 42775142f8 Fix yeelight light brightness integer (#15290) 2018-07-03 20:50:13 -06:00
Anders Melchiorsen dffe36761d Make LIFX color/temperature attributes mutually exclusive (#15234) 2018-07-01 13:06:30 -04:00
Leonardo Brondani Schenkel 3c04b0756f deconz: proper fix light.turn_off with transition (#15227)
Previous commit d4f7dfa successfully fixed the bug in which lights
would not turn off if a transition was specified, however if 'bri' is not
present in the payload of the PUT request set to deCONZ, then any
'transitiontime' ends up being ignored. This commit addresses the
unintended side effect by reintroducing 'bri', resulting in the following
payload:

{ "on": false, "bri": 0, "transitiontime": ... }
2018-07-01 12:32:48 +02:00
Leonardo Brondani Schenkel 10d1e81f10 deconz: fix light.turn_off with transition (#15222)
When light.turn_off is invoked with a transition, the following payload was
sent to deCONZ via PUT to /light/N/state:

{ "bri": 0, "transitiontime": transition }

However, on recent versions of deCONZ (latest is 2.05.31 at the time of
writing) this does not turn off the light, just sets it to minimum brightness
level (brightness is clamped to minimum level the light supports without
turning it off).

This commit makes the code send this payload instead:

{ "on": false, "transitiontime": transition }

This works as intended and the light does transition to the 'off' state.
This change was tested with Philips Hue colored lights, IKEA colored lights
and IKEA white spectrum lights: they were all able to be turned off
successfully with the new payload, and none of them could be turned off with
the old payload.
2018-06-30 00:59:10 +02:00
Matt Snyder 15af6b1ad9 Address inconsistent behavior on flux_led component (#14713)
* Address inconsistent behavior between different controllers.
Correct issue with comparison that was preventing white value slider from being shown.

* Add white mode for Flux LED

* Call _bulb.turnOn() after bulb properties have been set to prevent immediate on action

* Only use existing brightness if rgb is None to prevent unexpected recalculation of passed rgb values.

* Remove blank line

* Undo change so current brightness is used in all cases.
2018-06-26 21:23:57 +02:00
Ville Skyttä b92350fb55 Lint cleanup (#15103)
* Remove unneeded inline pylint disables

* Remove unneeded noqa's

* Use symbol names instead of message ids in inline pylint disables
2018-06-25 13:05:07 -04:00
Adam Mills 038168c417
Support for Homekit Controller climate devices (#15057)
* Support for Homekit Controller climate devices

* Handle stale state when operating mode off
2018-06-25 09:45:26 -04:00
Martin Hjelmare 3893d8a876 Reorganize mysensors (#15123)
* Move mysensors.py to package

* Move mysensors component to package

* Split code into multiple modules.

* Update coveragerc
2018-06-25 13:58:16 +02:00
Robert Svensson 5a71a22fb9 deCONZ small improvements (#15128)
* Make sure that bridge id is available for config entry

* Fix so deconz reports proper color values

* Bump dependency to v39
2018-06-24 15:48:59 -06:00
Bob Clough bfc55137ea Fix MQTT Light with RGB and Brightness (#15053)
* Fix MQTT Light with RGB and Brightness

When an MQTT light is given an RGB and Brightness topic, the RGB
is scaled by the brightness *as well* as the brightness being set

This causes 255,0,0 at 50% brightness to be sent as 127,0,0 at 50%
brightness, which ends up as 63,0,0 after the RGB bulb has applied
its brightness scaling.

Fixes the same issue in mqtt, mqtt-json and mqtt-template.

Related Issue: #13725

* Add comment to mqtt_json as well
2018-06-21 14:59:02 -04:00
Thibault Cohen a729742757 Fix tplink max/min kelvin for temperature adjustment (#15020) 2018-06-20 19:29:36 +02:00
gstorer d07e40c483 Expose Wemo component availability to home assistant (#14995)
* Expose Wemo component availability to home assistant

* Do not add availability feature to dimmer - it works differently

* Brain fade, deleted completely the wrong thing.

Revert "Do not add availability feature to dimmer - it works differently"

This reverts commit f64e717981.

* (2nd attempt) Do not add availability feature to dimmer - it works differently
2018-06-17 22:05:14 -06:00
Teemu R 5898307715 Bump pyhs100 version (#15001)
Fixes #13925
2018-06-16 15:52:03 -04:00
Ville Skyttä 4bd7a7eee3 Remove inline pylint disables for messages disabled in pylintrc (#14978) 2018-06-16 00:15:46 +02:00
Robert Svensson ac13a2736b Deconz make groups configurable (#14704)
* Make groups configurable

* Config flow and tests in place

* Fix too long line
2018-06-15 14:31:22 -04:00
Hate-Usernames a373793029 pytradfri 5.5.1: Improved 3rd party bulb support (#14887)
* Bump pytradfri version

* Update light component

* Add tests

* lint

* Docstring typos

* Blank line

* lint

* 5.5.1

* Fix tests on py3.5
2018-06-13 07:17:52 +02:00
Fabian Affolter 703b4354e0
Upgrade python-mystrom to 0.4.4 (#14889) 2018-06-10 11:38:23 +02:00
Paulus Schoutsen 90a51160c4
Don't run unnecessary methods in executor pool (#14853)
* Don't run unnecessary methods in executor pool

* Lint

* Lint 2
2018-06-07 15:31:21 -04:00
Anders Melchiorsen 6b2b92a732 Improvements to LIFX reliability (#14848)
* Improve fault tolerance of LIFX initialization

* Update aiolifx to 0.6.3

* Use list comprehension
2018-06-07 10:06:29 -04:00
Sebastian Muszynski e370d523ec Bump python-miio version (Closes: #13749) (#14796)
* Bump python-miio version

* Fix Xiaomi Power Strip V1 support (Closes: #13749)
2018-06-04 23:50:18 +02:00
austinlg96 cfac537f51 Added option to block Osram Lightify individual lights in the same way that groups can be (#14470) 2018-06-02 09:23:51 +02:00
Alexei Chetroi 144bb3492a zha/light: Properly parse currentX and currentY on async_update() (#14605) 2018-05-28 10:32:47 -04:00
Julian Knauer 72a1b7ae3f Lagute LW-12 Wifi LED control (#13307)
* Added platform lw12wifi for Lagute LW-12 Wifi Lights

Supported features:
* RGB colors
* Variable brightness
* 29 effects
* Changing transitions speed for animated effects

* Added lw12wifi to the list of omitted files to test

* Added lw12 module as new requirement for lw12wifi platform

* Added configuration example docstring for platform lw12wifi

* Updating code according to review in PR:

* Removed unused imports: enum, socket.
* Unused and not imported feature SUPPORT_FLASH was removed.
* Unused import lw12 in setup_platform method removed.
* Fixed indention for valuptuous.
* Changed check if effect is None.
* Removed personal debug output.
* Blocking function are not async anymore.

* Further improvements to satisfy PR.

* Unused import asyncio removed.
* Fixed: Return value and docstring no match up for `assumed_state`.

* Check if the set effect is supported, otherwise revert to normal light.

* Added describing missing docstrings to all functions.

* Adopted code to work with HS color setting.

* Syntactical change in comment.

* Removed redefinition of DOMAIN.

* Refactored lw12 controller setup: removed requirement for host and port in LW12Wifi class.

* Rewritten supported feature setup to a more static  expression.

* Removed unused rgb_color property

* Fixed typo in comment for set_light_option

* Changed RGB option validation schema

* Removed instance properties as config options

* Removed optional settings to be more inline with code style.

* Removed unused option from config example

* Removal of unused import

* Added property to disable state polling for this entity.

* Raise an exception if an unknown effect was selected.

* Fixed an issue with the check for known effects.

* As we do not need to set a default, use simple accessing by key.

* Log if an unknown effect was selected.

* Added link to future documentation.
2018-05-22 09:25:10 +02:00
Marco Orovecchia 6e941af9b2 fix nanoleaf aurora lights min and max temperature (#14571)
* fixed nanoleaf aurora lights min and max temperature

* review changes
2018-05-21 11:02:50 -04:00
Marco Orovecchia c8ad9c4daa Add auto discovery for nanoleaf aurora lights (#14301)
* auto discovery added for nanoleaf aurora lights

* changes requested by review

* visual indentation

* line too long

* hide autocreated config
2018-05-20 20:53:57 +02:00
Matt Snyder 909f2448ca Flux bug fix (#14476)
* Simplify conditionals.

* Send white_value on service call.

* Remove extra blank line

* Further simplification of conditionals

* Requested changes

* Do not call getRgb if not needed

* Update log message
2018-05-18 08:50:57 +02:00
Anders Melchiorsen 9afc2634c6 Adjust LimitlessLED properties for running effects (#14481) 2018-05-17 20:54:25 +02:00
Diogo Gomes d47006c98f Optimistic MQTT light (#14401)
* Restores light state, case the light is optimistic

* lint

* hound

* hound

* Added mqtt_json

* hound

* added mqtt_template

* lint

* cleanup

* use ATTR
2018-05-15 12:25:50 +02:00
William Scanlon 710533ae8a Minor Wink fixes (#14468)
* Updated Wink light supported feature to reflect what features a given light support.

* Fix typo in wink climate
2018-05-15 07:53:12 +02:00
damarco 01ce43ec7c Use None as initial state in zha component (#14389)
* Return None if state is unknown

* Use None as initial state
2018-05-12 14:41:44 +02:00
Martin Hjelmare be3b227a87
Make mysensors component async (#13641)
* Make mysensors component async

* Use async dispatcher and discovery.
* Run I/O in executor.
* Make mysensors actuator methods async.
* Upgrade pymysensors to 0.13.0.
* Use async serial gateway.
* Use async TCP gateway.
* Use async mqtt gateway.

* Start gateway before hass start event

* Make sure gateway is started after discovery of persistent devices
  and after corresponding platforms have been loaded.
* Don't wait to start gateway until after hass start.

* Bump pymysensors to 0.14.0
2018-05-11 09:39:18 +02:00
Mattias Welponer 230bd3929c Add more homematicip cloud components (#14084)
* Add support for shutter contact and motion detector device

* Add support for power switch devices

* Add support for light switch device

* Cleanup binary_switch and light platform

* Update comment
2018-05-08 09:57:51 +02:00
Tom Harris 64ba2c63c7 Add All-Linking capabilities (#14065)
* Setup all-linking service

* Remove extra line

* Remove linefeed and tab escape chars

* Add services delete_all_link, load_all_link_database and print_all_link_database

* Check if reload is set

* Confirm entity is InsteonPLMEntity before attempting to load or print ALDB

* Debug load and print ALDB

* Debug print aldb

* Debug print_aldb

* Get entity via platform

* Track Insteon entities in component

* Store entity list in hass.data

* Add entity to hass.data

* Add ref to hass in InsteonPLMEntity

* Pass hass correctly to InsteonPLMBinarySensor

* Fix reference to ALDBStatus.PARTIAL

* Print ALDB record as string

* Get ALDB record from memory address

* Reformat ALDB log output

* Add print_im_aldb service

* Remove reference to self in print_aldb_to_log

* Remove reference to self in print_aldb_to_log

* Fix spelling issue with load_all_link_database service

* Bump insteonplm to 0.9.1

* Changes from code review

* Code review changes

* Fix syntax error

* Correct reference to cv.boolean and update requirements

* Update requirements

* Fix flake8 errors

* Reload as boolean test

* Remove hass from entity init
2018-05-05 11:15:20 -04:00
Robert Svensson 8410b63d9c deCONZ add new device without restart (#14221)
* Add new device without restarting hass

* Remove debug prints

* Fix copy paste error

* Fix comments from balloob
Add tests to verify signalling with new added devices

* Fix hound comments
Add test to verify when new sensor is added

* Fix tests

* Unload entry should unsubscribe all deconz dispatchers

* Make sure mock setup also creates unsub in hass data

* Fix copy paste issue

* Lint
2018-05-05 10:11:00 -04:00
Anders Melchiorsen fa0ad7b317
Color fixes for Wink lights (#14263) 2018-05-04 12:28:56 +02:00
cdce8p 8cabec7ac1
Fix ZWave light brightness (#14261)
* Fix ZWave light brightness
* The brightness should always be an integer
* Changed to round
2018-05-03 23:28:03 +02:00
Anders Melchiorsen bf056b6f01 Fix Hue color state for missing xy (#14230) 2018-05-02 09:25:08 -04:00
Matt Snyder c2d00be91e Allow independent control of white level on flux_led component (#13985)
* Allow independent control of white level on flux_led component.

Also preserve brightness on color change.

* Limit white value support to RGBW mode.

* Requested changes.

* Correct liniting issues

* Formatting
2018-05-01 15:38:45 -04:00
Paulus Schoutsen 83d300fd11 Custom component loading cleanup (#14211)
* Clean up custom component loading

* Fix some tests

* Fix some stuff

* Make imports work again

* Fix tests

* Remove debug print

* Lint
2018-05-01 20:57:30 +02:00
Anders Melchiorsen 30d987f59f
Revert Hue color state to be xy-based (#14154) 2018-04-30 00:49:19 +02:00
Hate-Usernames 113bdc493a Allow transitioning to colour temp for tradfri (#14157) 2018-04-29 16:54:44 +01:00
Otto Winter a4bf421044 Convert more files to async/await syntax (#14142)
* Move more files to async/await syntax

* Attempt Work around pylint bug

Using lazytox :P
2018-04-28 19:26:20 -04:00
Otto Winter a0b14c2913 Light mqtt_json: Add HS color support (#14029)
* Light mqtt_json HS color support

* Lint

* Catch float ValueError
2018-04-29 00:33:10 +02:00
Anders Melchiorsen e6d4501ee3 Fix color setting of tplink lights (#14108) 2018-04-28 17:12:11 -04:00
Sebastian Muszynski 58ae8d91f9 Fix the optional friendly name of the Yeelight (Closes: #14088) (#14110) 2018-04-28 12:35:19 +02:00
Matthew Garrett 7e39a5c4d5 Change Eufy brightness handling (#14111)
Eufy device state isn't reported if the bulb is off, so avoid stamping on
the previous values if the bulb isn't going to give us useful information.
In addition, improve handling of bulb turn on if we aren't provided with a
brightness - this should avoid the bulb tending to end up with a brightness of
1 after power cycling.
2018-04-27 16:39:06 -04:00
Anders Melchiorsen 0b350993b5 Improve precision of Hue color state (#14113) 2018-04-27 13:18:58 +02:00
Kerwin Bryant 0a0d34d394 Support new Xiaomi Aqara device model names and LAN protocol 2.0 (#13540) 2018-04-25 07:05:00 +02:00
Kane610 8a10fcd985 deCONZ use forward entry setup (#13990)
* Use forward entry setup with light platform

* Move sensor to forward entry setup

* Use forward entry setup with binary sensors

* Use forward entry setup with scene platform

* Remove import of unused functionality

* Move deconz setup in to setup entry
Create initial negative tests for setup entry

* Fix hound comment

* Improved tests

* Add test for scene platform

* Add test for binary sensor platform

* Add test for light platform

* Add test for light platform

* Add test for sensor platform

* Fix hound comment

* More asserts on sensor types
2018-04-23 12:00:16 -04:00
Khole e0c5b44994 Hive R3 update (#13357)
* Rebase

* Update version number to 0.2.14

* Remove Blank Line

* Added period to docstring

* Update Tox Fix

* Removed Lines
2018-04-16 21:00:13 +02:00
Matthew Garrett 390086bb7e Eufy colour bulb updates (#13895)
* Fix up Eufy handling of colour lights

The Eufy colour lights have separate colour and temperature modes, and give
much less light output when in colour mode. Brightness is also handled in
a slightly confusing way, which means that state must be maintained in
order to avoid switching the light between modes by accident. Add some
additional handling for that.

* Bump the lakeside version

This version has important bugfixes for colour bulbs.

* Hound fixes
2018-04-15 09:54:02 +02:00
Matthew Garrett ac2298189e Add support for controlling homekit lights and switches (#13346)
* Add support for controlling homekit lights and switches

This adds support for controlling lights and switches that expose a HomeKit
control interface, avoiding the requirement to implement protocol-specific
components.

* Comment out the homekit requirement

This needs to build native code, so leave it commented for now

* Review updates

* Make HomeKit auto-discovery optional

Add an "enable" argument to the discovery component and add a list of
optional devices types (currently just HomeKit) to discover

* Further review comments

* Update requirements_all.txt

* Fix houndci complaints

* Further review updates

* Final review fixup

* Lint fixups

* Fix discovery tests

* Further review updates
2018-04-13 19:25:35 +02:00
Paulus Schoutsen f47572d3c0 Allow platform unloading (#13784)
* Allow platform unloading

* Add tests

* Add last test
2018-04-12 14:28:54 +02:00
Marco Orovecchia b752ca3bef Rename from aurora light to nanoleaf_aurora (#13831) 2018-04-12 09:24:07 +02:00
Matthew Garrett 8d48164f25 Add support for Eufy bulbs and switches (#13773)
* Add support for Eufy bulbs and switches

Add support for driving bulbs and switches from the Eufy range.

* Fix hound checks

* Satisfy pylint

* Handle review comments

* Review updates and test fixes

* PyLint is a bit too aggressive
2018-04-10 21:38:23 -04:00
Adam Mills cf88d8a1b9
iglo hs color fix (#13808) 2018-04-10 14:11:00 -04:00
Paulus Schoutsen 73de749411
Use config entry to setup platforms (#13752)
* Use config entry to setup platforms

* Rename to async_forward_entry

* Add tests

* Catch if platform not exists for entry
2018-04-09 10:09:08 -04:00
Sebastian Muszynski 70649dfe22 Device type mapping introduced to avoid breaking change (#13765) 2018-04-08 22:00:47 +02:00
Johann Kellerman b01dceaff2
Qwikswitch sensors (#13622) 2018-04-08 21:59:19 +02:00
Fabian Affolter 435b49fb96 Reset permission (#13743) 2018-04-07 19:11:48 +02:00
shred86 2bf17cba8e Brightness conversion for Abode dimmers (#13711)
With AbodePy 0.12.3, dimmers will now work but a conversion of the brightness is required. Additionally, when a brightness value of 100 is sent to Abode, 99 is returned causing AbodePy to throw an error so this component will send 99 instead of 100.

Keeps the brightness value sent and returned from the device response consistent. However, during initialization and when a device refresh is received, Abode can return 100 thus we'll convert that case back to 99.
2018-04-07 11:15:35 +02:00
Fabian Affolter 3394916a68
Update docstrings (#13720) 2018-04-06 18:06:47 +02:00
Marco Orovecchia 0a25d30ba6 Add support for Nanoleaf Aurora Light Panels (#13456)
* Added support for Nanoleaf Aurora Light Panels

* aurora light module - fixed lint errors

* aurora light module - use SUPPORT_COLOR instead of SUPPORT_RGB_COLOR

* nanoleaf aurora light - support_hs_color instead of rgb

* review comments from armills implemented

* nanoleaf aurora lights - put attributes into constructor (pylint)
2018-04-06 09:34:56 -04:00
Adam Mills 1a9727c75a
Send XY color for non-osram hue bulbs (#13665)
* Send XY color for Philips hue bulbs

* Review fixes

* Comment tweaks
2018-04-05 20:17:18 -04:00
Sebastian Muszynski 301077ded9 Xiaomi MiIO Light: White Philips Candle Light support (#13682) 2018-04-05 00:42:00 +02:00
Adam Mills 568c6c16fa Add missing service docs for hs_color (#13667) 2018-04-03 16:05:06 -07:00
Niklas Wagner 9fb73c1bab Hue mireds value is actually 153 not 154 (#13601) 2018-04-02 09:45:38 +02:00
Adam Mills be43c3bcfe
Fix mqtt_json color commands (#13617) 2018-04-01 14:12:55 -04:00
Lewis Juggins 4ad0152a44
Bugfix for tradfri to correctly execute Command. (#13618) 2018-04-01 18:42:47 +01:00
Martin Hjelmare c8f2810fac Make mysensors updates and platform setup async (#13603)
* Use async updates but keep methods that interact with mysensors
  gateway thread, eg turn_on and turn_off, non async.
* Use Python 3.5 async syntax.
2018-04-01 08:36:26 -07:00
Lewis Juggins 0c0e0c36af Re-add group polling as a fallback for observation (#13613) 2018-04-01 07:50:48 -07:00
dramamoose f40efe0110 Fix FLUX_LED error when no color is set (#13527)
* Handle turn_on situation when no color is set

As is, an error gets thrown when turn_on is called without an HS value. By adding an if statement, we only try to set RGB if an HS value is applied.

* Fix Whitespace Issues

* Made Requested Changes
2018-03-30 14:10:25 -07:00
Sebastian Muszynski ab9b915731 Construct version pinned (#13528)
* Construct added to the requirements

* requirements_all.txt updated
2018-03-29 17:12:11 -07:00
Martin Hjelmare 0a0b33af03 Fix mysensors light supported features (#13512)
* Different types of light should have different supported features.
2018-03-29 17:10:56 -07:00
Johann Kellerman 3fdb0002a7
Qwikswitch async refactor & sensor (#13509) 2018-03-29 23:29:46 +02:00