Skip to content
Permalink
Browse files

pull from origin (home-assistant#1)

* Add legacy PLATFORM_SCHEMA config validation

* Fix tests

* Lint

* Add persistent notification

* Update bootstrap.py

* Fix battery_level error - HomeKit (home-assistant#21120)

* Remove outdated url pattern match support for static file hosting (home-assistant#21109)

* Upgrade pytest to 4.2.1 (home-assistant#21112)

* Upgrade pytest to 4.2.0

* Upgrade pytest to 4.2.1

* Make litejet switch test work with pytest 4.2

* Make Netatmo able to discover both Weather station and Health Coach (home-assistant#20274)

* Resolve conflicts and review comments

* Corretly handle HomeCoach in manual setup

* Fix code reivew comments

* Move import back int methods

* Formatting fix

* Lint fix

* Return None if no GTFS departures found (home-assistant#20919)

* Add webhook support for Netatmo Cameras (home-assistant#20755)

Add webhook support for Netatmo Cameras

* Logging to find what deCONZ events get created (home-assistant#20551)

* Helpful logging to easily find what events get created

* Add traccar scan_interval configuration option (home-assistant#21079)

* Added scan_interval configuration option

* Fixed trailing whitespace and indentation

* Update traccar.py

* Update homeassistant/components/device_tracker/traccar.py

Co-Authored-By: lapy <lapy@users.noreply.github.com>

* Add component media player.ps4 (home-assistant#21074)

* Added PS4/ __init__.py

* Create en.json

* Create config_flow.py

* Create const.py

* Create media_player.py

* Create services.yaml

* Create strings.json

* Create __init__.py

* Add test_config_flow.py/ Finished adding PS4 files

* Rewrote for loop into short-hand

* bumped pyps4 to 0.2.8

* Pass in helper()

* Rewrite func

* Fixed test

* Added import in init

* bump to 0.2.9

* bump to 0.3.0

* Removed line

* lint

* Add ps4 to flows list

* Added pyps4-homeassistant with script

* Added pyps4

* Added pypys4 to test

* removed list def

* reformatted service call dicts

* removed config from device class

* typo

* removed line

* reformatted .. format

* redefined property

* reformat load games func

* Add __init__ and media_player.py to coveragerc

* Fix for test

* remove init

* remove blank line

* remove mock_coro

* Revert "remove init"

This reverts commit b68996a.

* Correct permissions

* fixes

* fixes

*  Add traccar monitored_conditions option (home-assistant#21149)

* Add traccar monitored_conditions option

User defined additional parameters to track from the traccar platform

* Version bump for pytraccar client

* Update traccar.py

* Remove default value

* Update homeassistant/components/device_tracker/traccar.py

Co-Authored-By: lapy <lapy@users.noreply.github.com>

* Update traccar.py

* RSSI_PEER and RSSI_DEVICE are different things (fixes home-assistant#20900) (home-assistant#20902)

* Fix home-assistant#20900: RSSI_PEER and RSSI_DEVICE are different things

This change is fixing issue home-assistant#20900.

Wireless actors are having two RSSI values. The way the component was programmed one of them was overwritten.

* Added deprecation comment

* Fixed long line

* Fix: pylint comment

* Lint

* flake8

* flake8 again

* Update __init__.py

* Fix track_change error in utility_meter (home-assistant#21134)

* split validation

* remove any()

* Upgrade voluptuous-serialize to 2.1.0 (home-assistant#21166)

* Upgrade youtube_dl to 2019.02.18 (home-assistant#21164)

* Upgrade sqlalchemy to 1.2.18 (home-assistant#21162)

* Update pyEight for Python 3.7 Compatability (home-assistant#21161)

* Upgrade psutil to 5.5.1 (home-assistant#21171)

* Fix HomematicIP Cloud fix cover position property (home-assistant#21154)

* Clean up upc_connect tests (home-assistant#21150)

* Add power source to device and clean up zha listeners (home-assistant#21174)

check available and add comments

ensure order on API test

* deCONZ thermostat support (home-assistant#20586)

* Add support for thermostats in deCONZ by adding Climate platform

* Make sure that device trackers is always a list during creation (home-assistant#21193)

* Fix for home-assistant#19072 (home-assistant#21175)

* Fix for home-assistant#19072

PR home-assistant#19072 introduced the custom_effect feature but it didnt make it optional as the documentation states.
This causes error on startup and the component does not work.
```
Error while setting up platform flux_led
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/flux_led.py", line 135, in setup_platform
    device[CONF_CUSTOM_EFFECT] = device_config[CONF_CUSTOM_EFFECT]
KeyError: 'custom_effect'
```

Changing this line to make the custom_effect optional as the original intention.

* Update flux_led.py

* Add context to service call event (home-assistant#21181)

* Updated frontend to 20190218.0

* Expose effect_list attribute for turned off lights (home-assistant#20750)

* Upgrade aioimaplib for Python 3.7 compatibility (home-assistant#21197)

* Philips Hue: Add bridge update prompt (home-assistant#21119)

* Add a prompt if bridge update is available.

* Change logger warning for light update

The self.light.swupdatestate only checks for updates of that specific light, it does not check for updates of the bridge.
Theirfore the warning message schould be updated.

* add space

* fix tests

* rename to swupdate2_bridge_state

* update aiohue to v1.9.1

* update aiohue to v1.9.1

* update aiohue to v1.9.1

* Upgrade crimereports to 1.0.1 (home-assistant#21187)

* Netatmo, address comments from home-assistant#20755 (home-assistant#21157)

Netatmo component cleanup

* Use constants from const.py (home-assistant#21068)

* Use constants from const.py

* Fix lint issues

* Bump Synology SRM dependency to version 0.0.6 (home-assistant#21212)

* Bump Synology SRM dependency to version 0.0.6

* Add @aerialls to the Synology SRM code owners

* Upgrade numpy to 1.16.1 (home-assistant#21190)

* Set aioharmony version to 0.1.8 (home-assistant#21213)

Update aioharmony version to support latest HUB firmware (4.15.250).

* ordered by last occurence (home-assistant#21200)

* Push pyads to 3.0.7 (home-assistant#21216)

* Push to pyads 3.0.7

* Correct too long line

* Fix Homematic IP Cloud configuration (home-assistant#21202)

`homematicip.aio.auth.isRequestAcknowledged` returns false if the
request failed in stead of raising an error.

See coreGreenberet/homematicip-rest-api@0b61954

Closes: home-assistant#20428

* Refactor ZHA listeners into channels (home-assistant#21196)

* refactor listeners to channels

* update coveragerc

* Add yeelight flow action support (home-assistant#21195)

* Updated frontend to 20190219.0

* Fix the build (home-assistant#21229)

* Update pyhomematic to 0.1.56 (home-assistant#21227)

* Prevent invalid context from crashing (home-assistant#21231)

* Prevent invalid context from crashing

* Lint

* Add self to integration sensor and utility_meter (home-assistant#21226)

* Fix an Ambient PWS exception when location info is missing (home-assistant#21220)

* Add zone and reps for Xiaomi vacuum (home-assistant#19777)

* xiaomi vacuum with zone and reps

* tail whitespace

* tail whitespaces

* new version

* fix params typs

* fix param type

* line length

* rytilahti tips

* houndci-bot

* fix trevis

* rytilahti tips

* service description

* syssi fix

* MartinHjelmare tips

* MartinHjelmare

* data_template schema

* line lenght

* line lenght

* line lenght

* data_template schema

* fix

* Update homeassistant/components/vacuum/xiaomi_miio.py

Co-Authored-By: marcogazzola <dev@marcogazzola.com>

* Update homeassistant/components/vacuum/xiaomi_miio.py

Co-Authored-By: marcogazzola <dev@marcogazzola.com>

* xiaomi vacuum with zone and reps

* tail whitespace

* new version

* fix param type

* rytilahti tips

* rytilahti tips

* MartinHjelmare

* data_template schema

* line lenght

* line lenght

* data_template schema

* fix

* Merge branch 'dev' of https://github.com/marcogazzola/home-assistant into dev

* Revert "Merge branch 'dev' of https://github.com/marcogazzola/home-assistant into dev"

This reverts commit e1f370b.

* log fixed

* Revert "log fixed"

This reverts commit 1f0e7b3.

* Revert "Revert "Merge branch 'dev' of https://github.com/marcogazzola/home-assistant into dev""

This reverts commit 1cf9e5a.

* Revert "Merge branch 'dev' of https://github.com/marcogazzola/home-assistant into dev"

This reverts commit 0e8d534.

* log fixed

* Don't dispatch to components when there are no channels for ZHA sensors (home-assistant#21223)

* don't dispatch when channels don't exist

* review comment

* Fix bug in ZHA and tweak non sensor channel logic (home-assistant#21234)

* fix race condition and prevent profiles from stealing channels

* fix battery voltage

* Bump zigpy (home-assistant#21203)

* Bump zigpy

* Update requirements

* Update test requirements

* Bump zigpy-deconz

* Support OpenWRT 18.06 in luci device tracker (home-assistant#21236)

* Got it right this time i hope

* updates on comments

* Updated frontend to 20190220.0

* Remove constraint from regex (home-assistant#21239)

* Upgrade opensensemap-api to 0.1.4 (home-assistant#21240)

* Alarm trigger support for Point (home-assistant#21207)

* Prevent partial custom component overlays (home-assistant#21070)

* Prevent partial custom component overlays

* Fix tests

* Fix ZHA bugs (home-assistant#21246)

* fix bugs

* add comment

* allow entities to be marked unavailable

* Correctly detect devices, which went offline during HA restart (home-assistant#20933)

* Correctly detect devices, which went offline during HA restart

* Update __init__.py

* Update rova component with suffix for house number (home-assistant#21182)

* Update rova component with release rova release 0.1.0
Add house_number_suffix to configuration

* Set default value for house_number_suffix

* Add missing configuration option to plex (home-assistant#21264)

Fixes part of: home-assistant#21254

* Add missing configation option (home-assistant#21265)

Fixes home-assistant#21254

* Add SamsungTV Mac validation (home-assistant#21268)

* Added device tracker support for Ubee Router (home-assistant#19586)

* Added Ubee Router Device Tracker.

* Updated code to meet requirements.

* Code clean-up.

* Code clean-up.

* Code clean-up.

* Minor error message update

* Ubee device tracker: Minor code clean-up

* Bump pyubee version

* Code clean-up

* account specific cookies file to enable multiple accounts (home-assistant#19811)

* Add support for automatic discovery of TP-Link switches, bulbs and dimmers (home-assistant#18091)

* {switch,light}.tplink: use deviceid as unique id, fetch name from the device during initialization

* raise PlatformNotReady when no device is available

* Use mac instead of deviceid

* remove name option as obsolete

* Add support for configuration flow / integration

Allows activating automatic discovery of supported devices from the configuration

* Fix linting, update requirements_all.txt

* start cleaning up tplink component based on feedback

* add device info, improve config handling

* Allow overriding detected devices via configuration file

* Update requirements.txt

* Remove debug logging

* make hound happy

* Avoid I/O during init and simplify the code, remove remains of leds_on

* Fix issues based on feedback, use consistent quotation marks for device info

* add async_setup_platform emiting a deprecation warning

* Avoid blocking the I/O, check for None on features

* handle some Martin's comments, schema-validation is still missing

* use async_create_task instead of async_add_job, let core validate the schema

* simplify configuration handling by storing the configuration data separately from initialized instances

* add default values to schema, make hound happy

* with defaults set by schema, simplify the checks. add async_unload_entry

* Use constant for data structure access

* REWORD add a short note about async_unload_entry

* handle feedback from Martin, config_data is checked against Noneness

* use pop to remove the domain on unload

* First steps to add tests for the new tplink component

* embed platforms under the component directory

* Fix tests by mocking the pyhs100 internals

* Fix linting

* Test against multiple instances of devices, tidy up

* (hopefully) final linting round

* Add pyHS100 to test requirements

* log always the warnings occured during an update to make them easy to see

* revert back the warning behavior (requirement for silver level in IQS)

* Unload only when an entry is being loaded and add tests for that

Thanks @MartinHjelmare for pointing this out!

* Fix linting

* Bump the upstream lib, fixes most prominently the HSV setting on bulbs

* Test unloading for all platforms, clear the data storage instead of popping it out, making it possible to reconfigure after removal without restarting hass first

* Use class variables instead of instance variables for bulb states, required for HS220

* Use new-style format string

* Fix indenting, uppercase the mock constant

* Run black on test_init, hopefully that will finally fix the weird formatting (pycharm, pylint and hound seems to have different opinions...)

* update services.yaml (home-assistant#21276)

* Fix unhandled exception in Ambient PWS config entry (home-assistant#21278)
  • Loading branch information...
SukramJ committed Feb 21, 2019
1 parent 8c57636 commit c5dc6bc48759b77472bb95bb91f4811de89eab73
Showing with 3,918 additions and 1,819 deletions.
  1. +4 −1 .coveragerc
  2. +3 −0 CODEOWNERS
  3. +17 −0 homeassistant/bootstrap.py
  4. +5 −4 homeassistant/components/ads/__init__.py
  5. +2 −7 homeassistant/components/air_quality/opensensemap.py
  6. +6 −3 homeassistant/components/ambient_station/__init__.py
  7. +2 −7 homeassistant/components/binary_sensor/trend.py
  8. +1 −4 homeassistant/components/deconz/__init__.py
  9. +3 −2 homeassistant/components/deconz/binary_sensor.py
  10. +111 −0 homeassistant/components/deconz/climate.py
  11. +15 −1 homeassistant/components/deconz/const.py
  12. +4 −3 homeassistant/components/deconz/cover.py
  13. +5 −4 homeassistant/components/deconz/gateway.py
  14. +4 −4 homeassistant/components/deconz/light.py
  15. +3 −2 homeassistant/components/deconz/scene.py
  16. +5 −3 homeassistant/components/deconz/sensor.py
  17. +2 −2 homeassistant/components/deconz/switch.py
  18. +1 −0 homeassistant/components/device_tracker/__init__.py
  19. +3 −2 homeassistant/components/device_tracker/google_maps.py
  20. +30 −126 homeassistant/components/device_tracker/luci.py
  21. +1 −1 homeassistant/components/device_tracker/synology_srm.py
  22. +20 −6 homeassistant/components/device_tracker/traccar.py
  23. +92 −0 homeassistant/components/device_tracker/ubee.py
  24. +1 −1 homeassistant/components/eight_sleep/__init__.py
  25. +1 −1 homeassistant/components/frontend/__init__.py
  26. +1 −1 homeassistant/components/harmony/remote.py
  27. +2 −0 homeassistant/components/homekit/accessories.py
  28. +3 −3 homeassistant/components/homematic/__init__.py
  29. +1 −1 homeassistant/components/homematicip_cloud/cover.py
  30. +1 −2 homeassistant/components/homematicip_cloud/hap.py
  31. +1 −13 homeassistant/components/http/__init__.py
  32. +10 −4 homeassistant/components/hue/__init__.py
  33. +2 −2 homeassistant/components/hue/light.py
  34. +1 −1 homeassistant/components/image_processing/opencv.py
  35. +2 −10 homeassistant/components/image_processing/tensorflow.py
  36. +5 −12 homeassistant/components/insteon/__init__.py
  37. +16 −20 homeassistant/components/insteon/binary_sensor.py
  38. +6 −11 homeassistant/components/insteon/cover.py
  39. +15 −21 homeassistant/components/insteon/fan.py
  40. +3 −8 homeassistant/components/insteon/light.py
  41. +3 −8 homeassistant/components/insteon/sensor.py
  42. +4 −9 homeassistant/components/insteon/switch.py
  43. +4 −9 homeassistant/components/knx/binary_sensor.py
  44. +13 −18 homeassistant/components/knx/climate.py
  45. +3 −7 homeassistant/components/knx/light.py
  46. +4 −5 homeassistant/components/knx/notify.py
  47. +1 −2 homeassistant/components/knx/scene.py
  48. +1 −4 homeassistant/components/knx/sensor.py
  49. +1 −2 homeassistant/components/knx/switch.py
  50. +3 −1 homeassistant/components/light/__init__.py
  51. +1 −1 homeassistant/components/light/flux_led.py
  52. +5 −11 homeassistant/components/light/rpi_gpio_pwm.py
  53. +3 −0 homeassistant/components/light/services.yaml
  54. +9 −1 homeassistant/components/light/yeelight.py
  55. +1 −1 homeassistant/components/media_extractor/__init__.py
  56. +1 −0 homeassistant/components/media_player/plex.py
  57. +1 −0 homeassistant/components/media_player/samsungtv.py
  58. +135 −2 homeassistant/components/netatmo/__init__.py
  59. +1 −1 homeassistant/components/netatmo/binary_sensor.py
  60. +2 −1 homeassistant/components/netatmo/camera.py
  61. +72 −22 homeassistant/components/netatmo/sensor.py
  62. +8 −0 homeassistant/components/netatmo/services.yaml
  63. +1 −1 homeassistant/components/person/__init__.py
  64. +48 −6 homeassistant/components/point/alarm_control_panel.py
  65. +32 −0 homeassistant/components/ps4/.translations/en.json
  66. +33 −0 homeassistant/components/ps4/__init__.py
  67. +123 −0 homeassistant/components/ps4/config_flow.py
  68. +5 −0 homeassistant/components/ps4/const.py
  69. +372 −0 homeassistant/components/ps4/media_player.py
  70. +9 −0 homeassistant/components/ps4/services.yaml
  71. +32 −0 homeassistant/components/ps4/strings.json
  72. +0 −1 homeassistant/components/raspihats/__init__.py
  73. +3 −3 homeassistant/components/raspihats/binary_sensor.py
  74. +3 −4 homeassistant/components/raspihats/switch.py
  75. +1 −1 homeassistant/components/recorder/__init__.py
  76. +2 −7 homeassistant/components/sensor/crimereports.py
  77. +3 −9 homeassistant/components/sensor/etherscan.py
  78. +2 −2 homeassistant/components/sensor/gtfs.py
  79. +1 −1 homeassistant/components/sensor/imap.py
  80. +1 −0 homeassistant/components/sensor/imap_email_content.py
  81. +2 −7 homeassistant/components/sensor/pollen.py
  82. +3 −9 homeassistant/components/sensor/ripple.py
  83. +5 −2 homeassistant/components/sensor/rova.py
  84. +5 −11 homeassistant/components/sensor/sochain.py
  85. +2 −7 homeassistant/components/sensor/sql.py
  86. +2 −7 homeassistant/components/sensor/systemmonitor.py
  87. +7 −3 homeassistant/components/system_log/__init__.py
  88. +15 −0 homeassistant/components/tplink/.translations/en.json
  89. +154 −0 homeassistant/components/tplink/__init__.py
  90. +60 −36 homeassistant/components/{light/tplink.py → tplink/light.py}
  91. +15 −0 homeassistant/components/tplink/strings.json
  92. +51 −37 homeassistant/components/{switch/tplink.py → tplink/switch.py}
  93. +3 −3 homeassistant/components/utility_meter/sensor.py
  94. +13 −0 homeassistant/components/vacuum/services.yaml
  95. +41 −0 homeassistant/components/xiaomi_miio/vacuum.py
  96. +6 −6 homeassistant/components/zha/__init__.py
  97. +23 −23 homeassistant/components/zha/binary_sensor.py
  98. +0 −3 homeassistant/components/zha/core/__init__.py
  99. +308 −0 homeassistant/components/zha/core/channels/__init__.py
  100. +9 −0 homeassistant/components/zha/core/channels/closures.py
  101. +204 −0 homeassistant/components/zha/core/channels/general.py
  102. +40 −0 homeassistant/components/zha/core/channels/homeautomation.py
  103. +62 −0 homeassistant/components/zha/core/channels/hvac.py
  104. +48 −0 homeassistant/components/zha/core/channels/lighting.py
  105. +9 −0 homeassistant/components/zha/core/channels/lightlink.py
  106. +9 −0 homeassistant/components/zha/core/channels/manufacturerspecific.py
  107. +9 −0 homeassistant/components/zha/core/channels/measurement.py
  108. +9 −0 homeassistant/components/zha/core/channels/protocol.py
  109. +46 −0 homeassistant/components/zha/core/channels/registry.py
  110. +82 −0 homeassistant/components/zha/core/channels/security.py
  111. +9 −0 homeassistant/components/zha/core/channels/smartenergy.py
  112. +11 −10 homeassistant/components/zha/core/const.py
  113. +59 −40 homeassistant/components/zha/core/device.py
  114. +108 −53 homeassistant/components/zha/core/gateway.py
  115. +0 −639 homeassistant/components/zha/core/listeners.py
  116. +13 −12 homeassistant/components/zha/device_entity.py
  117. +13 −13 homeassistant/components/zha/entity.py
  118. +7 −7 homeassistant/components/zha/fan.py
  119. +19 −19 homeassistant/components/zha/light.py
  120. +11 −12 homeassistant/components/zha/sensor.py
  121. +12 −6 homeassistant/components/zha/services.yaml
  122. +6 −6 homeassistant/components/zha/switch.py
  123. +3 −1 homeassistant/config_entries.py
  124. +5 −2 homeassistant/core.py
  125. +56 −2 homeassistant/helpers/config_validation.py
  126. +35 −16 homeassistant/loader.py
  127. +1 −1 homeassistant/package_constraints.txt
  128. +32 −24 requirements_all.txt
  129. +1 −1 requirements_test.txt
  130. +15 −9 requirements_test_all.txt
  131. +4 −2 script/gen_requirements_all.py
  132. +1 −1 setup.py
  133. +1 −0 tests/common.py
  134. +181 −0 tests/components/deconz/test_climate.py
  135. +8 −6 tests/components/deconz/test_gateway.py
  136. +3 −2 tests/components/deconz/test_light.py
  137. +1 −0 tests/components/deconz/test_scene.py
  138. +214 −257 tests/components/device_tracker/test_upc_connect.py
  139. +8 −1 tests/components/homekit/test_accessories.py
  140. +1 −1 tests/components/homematicip_cloud/test_hap.py
  141. +2 −4 tests/components/hue/test_init.py
  142. +1 −0 tests/components/ps4/__init__.py
  143. +149 −0 tests/components/ps4/test_config_flow.py
  144. +2 −2 tests/components/switch/test_litejet.py
  145. +5 −0 tests/components/system_log/test_init.py
  146. +1 −0 tests/components/tplink/__init__.py
  147. +181 −0 tests/components/tplink/test_init.py
  148. +12 −1 tests/components/xiaomi_miio/test_vacuum.py
  149. +3 −1 tests/components/zha/common.py
  150. +3 −3 tests/components/zha/conftest.py
  151. +10 −4 tests/components/zha/test_api.py
  152. +4 −4 tests/components/zha/test_binary_sensor.py
  153. +2 −1 tests/components/zha/test_fan.py
  154. +3 −3 tests/components/zha/test_light.py
  155. +2 −1 tests/components/zha/test_sensor.py
  156. +2 −2 tests/components/zha/test_switch.py
  157. +76 −55 tests/test_core.py
  158. +7 −0 tests/test_loader.py
  159. +15 −8 tests/test_setup.py
  160. +1 −0 tests/testing_config/custom_components/hue/comp_path_test.py
@@ -136,6 +136,7 @@ omit =
homeassistant/components/device_tracker/tplink.py
homeassistant/components/device_tracker/traccar.py
homeassistant/components/device_tracker/trackr.py
homeassistant/components/device_tracker/ubee.py
homeassistant/components/device_tracker/ubus.py
homeassistant/components/digital_ocean/*
homeassistant/components/dominos/*
@@ -381,6 +382,8 @@ omit =
homeassistant/components/plum_lightpad/*
homeassistant/components/point/*
homeassistant/components/prometheus/*
homeassistant/components/ps4/__init__.py
homeassistant/components/ps4/media_player.py
homeassistant/components/qwikswitch/*
homeassistant/components/rachio/*
homeassistant/components/rainbird/*
@@ -667,11 +670,11 @@ omit =
homeassistant/components/zha/__init__.py
homeassistant/components/zha/api.py
homeassistant/components/zha/const.py
homeassistant/components/zha/core/channels/*
homeassistant/components/zha/core/const.py
homeassistant/components/zha/core/device.py
homeassistant/components/zha/core/gateway.py
homeassistant/components/zha/core/helpers.py
homeassistant/components/zha/core/listeners.py
homeassistant/components/zha/device_entity.py
homeassistant/components/zha/entity.py
homeassistant/components/zha/light.py
@@ -68,6 +68,7 @@ homeassistant/components/device_tracker/quantum_gateway.py @cisasteelersfan
homeassistant/components/device_tracker/tile.py @bachya
homeassistant/components/device_tracker/traccar.py @ludeeus
homeassistant/components/device_tracker/bt_smarthub.py @jxwolstenholme
homeassistant/components/device_tracker/synology_srm.py @aerialls
homeassistant/components/history_graph/* @andrey-git
homeassistant/components/influx/* @fabaff
homeassistant/components/light/lifx_legacy.py @amelchio
@@ -111,6 +112,7 @@ homeassistant/components/sensor/gearbest.py @HerrHofrat
homeassistant/components/sensor/gitter.py @fabaff
homeassistant/components/sensor/glances.py @fabaff
homeassistant/components/sensor/gpsd.py @fabaff
homeassistant/components/sensor/integration.py @dgomes
homeassistant/components/sensor/irish_rail_transport.py @ttroy50
homeassistant/components/sensor/jewish_calendar.py @tsvi
homeassistant/components/sensor/launch_library.py @ludeeus
@@ -265,6 +267,7 @@ homeassistant/components/*/tradfri.py @ggravlingen
homeassistant/components/unifi/* @kane610
homeassistant/components/switch/unifi.py @kane610
homeassistant/components/upcloud/* @scop
homeassistant/components/utility_meter/* @dgomes
homeassistant/components/*/upcloud.py @scop

# V
@@ -192,6 +192,23 @@ def from_config_dict(config: Dict[str, Any],
'\n\n'.join(msg), "Config Warning", "config_warning"
)

# TEMP: warn users of invalid extra keys
# Remove after 0.92
if cv.INVALID_EXTRA_KEYS_FOUND:
msg = []
msg.append(
"Your configuration contains extra keys "
"that the platform does not support (but were silently "
"accepted before 0.88). Please find and remove the following."
"This will become a breaking change."
)
msg.append('\n'.join('- {}'.format(it)
for it in cv.INVALID_EXTRA_KEYS_FOUND))

hass.components.persistent_notification.async_create(
'\n\n'.join(msg), "Config Warning", "config_warning"
)

return hass


@@ -9,7 +9,7 @@
EVENT_HOMEASSISTANT_STOP
import homeassistant.helpers.config_validation as cv

REQUIREMENTS = ['pyads==2.2.6']
REQUIREMENTS = ['pyads==3.0.7']

_LOGGER = logging.getLogger(__name__)

@@ -73,9 +73,10 @@ def setup(hass, config):

try:
ads = AdsHub(client)
except pyads.pyads.ADSError:
except pyads.ADSError:
_LOGGER.error(
"Could not connect to ADS host (netid=%s, port=%s)", net_id, port)
"Could not connect to ADS host (netid=%s, ip=%s, port=%s)",
net_id, ip_address, port)
return False

hass.data[DATA_ADS] = ads
@@ -168,7 +169,7 @@ def add_device_notification(self, name, plc_datatype, callback):
self._notification_items[hnotify] = NotificationItem(
hnotify, huser, name, plc_datatype, callback)

def _device_notification_callback(self, addr, notification, huser):
def _device_notification_callback(self, notification, name):
"""Handle device notifications."""
contents = notification.contents

@@ -1,9 +1,4 @@
"""
Support for openSenseMap Air Quality data.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/air_quality.opensensemap/
"""
"""Support for openSenseMap Air Quality data."""
from datetime import timedelta
import logging

@@ -16,7 +11,7 @@
import homeassistant.helpers.config_validation as cv
from homeassistant.util import Throttle

REQUIREMENTS = ['opensensemap-api==0.1.3']
REQUIREMENTS = ['opensensemap-api==0.1.4']

_LOGGER = logging.getLogger(__name__)

@@ -263,7 +263,8 @@
Client(
config_entry.data[CONF_API_KEY],
config_entry.data[CONF_APP_KEY], session),
hass.data[DOMAIN][DATA_CONFIG].get(CONF_MONITORED_CONDITIONS, []))
hass.data[DOMAIN].get(DATA_CONFIG, {}).get(
CONF_MONITORED_CONDITIONS, []))
hass.loop.create_task(ambient.ws_connect())
hass.data[DOMAIN][DATA_CLIENT][config_entry.entry_id] = ambient
except WebsocketError as err:
@@ -339,8 +340,10 @@ def on_subscribed(data):

self.stations[station['macAddress']] = {
ATTR_LAST_DATA: station['lastData'],
ATTR_LOCATION: station['info']['location'],
ATTR_NAME: station['info']['name'],
ATTR_LOCATION: station.get('info', {}).get('location'),
ATTR_NAME:
station.get('info', {}).get(
'name', station['macAddress']),
}

for component in ('binary_sensor', 'sensor'):
@@ -1,9 +1,4 @@
"""
A sensor that monitors trends in other components.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.trend/
"""
"""A sensor that monitors trends in other components."""
from collections import deque
import logging
import math
@@ -22,7 +17,7 @@
from homeassistant.helpers.event import async_track_state_change
from homeassistant.util import utcnow

REQUIREMENTS = ['numpy==1.16.0']
REQUIREMENTS = ['numpy==1.16.1']

_LOGGER = logging.getLogger(__name__)

@@ -12,10 +12,7 @@
from .const import DEFAULT_PORT, DOMAIN, _LOGGER
from .gateway import DeconzGateway

REQUIREMENTS = ['pydeconz==47']

SUPPORTED_PLATFORMS = ['binary_sensor', 'cover',
'light', 'scene', 'sensor', 'switch']
REQUIREMENTS = ['pydeconz==52']

CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
@@ -5,7 +5,8 @@
from homeassistant.helpers.dispatcher import async_dispatcher_connect

from .const import (
ATTR_DARK, ATTR_ON, CONF_ALLOW_CLIP_SENSOR, DOMAIN as DECONZ_DOMAIN)
ATTR_DARK, ATTR_ON, CONF_ALLOW_CLIP_SENSOR, DOMAIN as DECONZ_DOMAIN,
NEW_SENSOR)
from .deconz_device import DeconzDevice

DEPENDENCIES = ['deconz']
@@ -34,7 +35,7 @@ def async_add_sensor(sensors):
async_add_entities(entities, True)

gateway.listeners.append(
async_dispatcher_connect(hass, 'deconz_new_sensor', async_add_sensor))
async_dispatcher_connect(hass, NEW_SENSOR, async_add_sensor))

async_add_sensor(gateway.api.sensors.values())

@@ -0,0 +1,111 @@
"""Support for deCONZ climate devices."""
from homeassistant.components.climate import ClimateDevice
from homeassistant.components.climate.const import (
SUPPORT_ON_OFF, SUPPORT_TARGET_TEMPERATURE)
from homeassistant.const import (
ATTR_BATTERY_LEVEL, ATTR_TEMPERATURE, TEMP_CELSIUS)
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect

from .const import (
ATTR_OFFSET, ATTR_VALVE, CONF_ALLOW_CLIP_SENSOR,
DOMAIN as DECONZ_DOMAIN, NEW_SENSOR)
from .deconz_device import DeconzDevice

DEPENDENCIES = ['deconz']


async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the deCONZ climate devices.
Thermostats are based on the same device class as sensors in deCONZ.
"""
gateway = hass.data[DECONZ_DOMAIN]

@callback
def async_add_climate(sensors):
"""Add climate devices from deCONZ."""
from pydeconz.sensor import THERMOSTAT
entities = []
allow_clip_sensor = config_entry.data.get(CONF_ALLOW_CLIP_SENSOR, True)
for sensor in sensors:
if sensor.type in THERMOSTAT and \
not (not allow_clip_sensor and sensor.type.startswith('CLIP')):
entities.append(DeconzThermostat(sensor, gateway))
async_add_entities(entities, True)

gateway.listeners.append(
async_dispatcher_connect(hass, NEW_SENSOR, async_add_climate))

async_add_climate(gateway.api.sensors.values())


class DeconzThermostat(DeconzDevice, ClimateDevice):
"""Representation of a deCONZ thermostat."""

def __init__(self, device, gateway):
"""Set up thermostat device."""
super().__init__(device, gateway)

self._features = SUPPORT_ON_OFF
self._features |= SUPPORT_TARGET_TEMPERATURE

@property
def supported_features(self):
"""Return the list of supported features."""
return self._features

@property
def is_on(self):
"""Return true if on."""
return self._device.on

async def async_turn_on(self):
"""Turn on switch."""
data = {'mode': 'auto'}
await self._device.async_set_config(data)

async def async_turn_off(self):
"""Turn off switch."""
data = {'mode': 'off'}
await self._device.async_set_config(data)

@property
def current_temperature(self):
"""Return the current temperature."""
return self._device.temperature

@property
def target_temperature(self):
"""Return the target temperature."""
return self._device.heatsetpoint

async def async_set_temperature(self, **kwargs):
"""Set new target temperature."""
data = {}

if ATTR_TEMPERATURE in kwargs:
data['heatsetpoint'] = kwargs[ATTR_TEMPERATURE] * 100

await self._device.async_set_config(data)

@property
def temperature_unit(self):
"""Return the unit of measurement."""
return TEMP_CELSIUS

@property
def device_state_attributes(self):
"""Return the state attributes of the thermostat."""
attr = {}

if self._device.battery:
attr[ATTR_BATTERY_LEVEL] = self._device.battery

if self._device.offset:
attr[ATTR_OFFSET] = self._device.offset

if self._device.valve is not None:
attr[ATTR_VALVE] = self._device.valve

return attr
@@ -10,13 +10,27 @@
CONF_ALLOW_CLIP_SENSOR = 'allow_clip_sensor'
CONF_ALLOW_DECONZ_GROUPS = 'allow_deconz_groups'

SUPPORTED_PLATFORMS = ['binary_sensor', 'cover',
SUPPORTED_PLATFORMS = ['binary_sensor', 'climate', 'cover',
'light', 'scene', 'sensor', 'switch']

DECONZ_REACHABLE = 'deconz_reachable'

NEW_GROUP = 'deconz_new_group'
NEW_LIGHT = 'deconz_new_light'
NEW_SCENE = 'deconz_new_scene'
NEW_SENSOR = 'deconz_new_sensor'

NEW_DEVICE = {
'group': NEW_GROUP,
'light': NEW_LIGHT,
'scene': NEW_SCENE,
'sensor': NEW_SENSOR
}

ATTR_DARK = 'dark'
ATTR_OFFSET = 'offset'
ATTR_ON = 'on'
ATTR_VALVE = 'valve'

DAMPERS = ["Level controllable output"]
WINDOW_COVERS = ["Window covering device"]
@@ -5,7 +5,8 @@
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect

from .const import COVER_TYPES, DAMPERS, DOMAIN as DECONZ_DOMAIN, WINDOW_COVERS
from .const import (
COVER_TYPES, DAMPERS, DOMAIN as DECONZ_DOMAIN, NEW_LIGHT, WINDOW_COVERS)
from .deconz_device import DeconzDevice

DEPENDENCIES = ['deconz']
@@ -39,7 +40,7 @@ def async_add_cover(lights):
async_add_entities(entities, True)

gateway.listeners.append(
async_dispatcher_connect(hass, 'deconz_new_light', async_add_cover))
async_dispatcher_connect(hass, NEW_LIGHT, async_add_cover))

async_add_cover(gateway.api.lights.values())

@@ -48,7 +49,7 @@ class DeconzCover(DeconzDevice, CoverDevice):
"""Representation of a deCONZ cover."""

def __init__(self, device, gateway):
"""Set up cover and add update callback to get data from websocket."""
"""Set up cover device."""
super().__init__(device, gateway)

self._features = SUPPORT_OPEN
Oops, something went wrong.

0 comments on commit c5dc6bc

Please sign in to comment.
You can’t perform that action at this time.