Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent partial custom component overlays #21070

Merged
merged 2 commits into from Feb 21, 2019

Conversation

Projects
None yet
3 participants
@balloob
Copy link
Member

balloob commented Feb 14, 2019

Description:

This will force platforms to be resolved based off the component path, if it exists.

Today, if you want, you can override the Hue light platform, but not the other parts of the Hue integration. If a future update evolves the Hue component, removing or changing internal methods that the custom platform relied upon, the custom platform will start failing (like this report).

To avoid this, we're going to no longer allow custom components to be partial overlays (just a platform). Instead, if you want to override a built-in platform, you will need to override the whole component.

This is enforced by first resolving the platform as a component, and if it exists, limiting the lookup path to the component path.

Example: if I look up the hue component, and it is provided by a custom component, then all platform lookups will also be looked up in the custom component dir. The same works the other way around, if a user would only try to override hue/light.py but not hue/__init__.py, the custom platform will be ignored.

Breaking change: Custom platforms that override a built-in platform that has a component, should now also include the component in the custom_components/ folder. So if you want to override hue/light.py with a custom version, you will also need to provide/copy over hue/__init__.py.

Related issue (if applicable): fixes home-assistant/architecture#141

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@balloob balloob requested a review from home-assistant/core as a code owner Feb 14, 2019

@wafflebot wafflebot bot added in progress and removed core labels Feb 14, 2019

@pvizeli pvizeli merged commit 2435456 into dev Feb 21, 2019

6 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls First build on prevent-partial-custom-overlays at 92.79%
Details

@wafflebot wafflebot bot removed the in progress label Feb 21, 2019

@delete-merged-branch delete-merged-branch bot deleted the prevent-partial-custom-overlays branch Feb 21, 2019

thibmaek added a commit to thibmaek/home-assistant that referenced this pull request Feb 21, 2019

Merge remote-tracking branch 'upstream/dev' into feature/discogs-v2
* upstream/dev: (948 commits)
  Prevent partial custom component overlays (home-assistant#21070)
  Alarm trigger support for Point (home-assistant#21207)
  Upgrade opensensemap-api to 0.1.4 (home-assistant#21240)
  Remove constraint from regex (home-assistant#21239)
  Updated frontend to 20190220.0
  Support OpenWRT 18.06 in luci device tracker (home-assistant#21236)
  Bump zigpy (home-assistant#21203)
  Fix bug in ZHA and tweak non sensor channel logic (home-assistant#21234)
  Don't dispatch to components when there are no channels for ZHA sensors (home-assistant#21223)
  Add zone and reps for Xiaomi vacuum (home-assistant#19777)
  Fix an Ambient PWS exception when location info is missing (home-assistant#21220)
  Add self to integration sensor and utility_meter (home-assistant#21226)
  Prevent invalid context from crashing (home-assistant#21231)
  Update pyhomematic to 0.1.56 (home-assistant#21227)
  Fix the build (home-assistant#21229)
  Updated frontend to 20190219.0
  Add yeelight flow action support (home-assistant#21195)
  Refactor ZHA listeners into channels (home-assistant#21196)
  Fix Homematic IP Cloud configuration (home-assistant#21202)
  Push pyads to 3.0.7 (home-assistant#21216)
  ...

@Sanderhuisman Sanderhuisman referenced this pull request Feb 21, 2019

Closed

The Great Migration #117

SukramJ added a commit to SukramJ/home-assistant that referenced this pull request Feb 21, 2019

pull from origin (#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)

@balloob balloob referenced this pull request Feb 21, 2019

Merged

Do not warn for internally loaded components #21287

0 of 9 tasks complete

SukramJ added a commit to SukramJ/home-assistant that referenced this pull request Feb 22, 2019

Home assistant dev (#3)
* Bumped version to 0.88.0b0

* Add legacy PLATFORM_SCHEMA config validation

* Fix tests

* Lint

* Add persistent notification

* Updated frontend to 20190215.0

* Set ZHA device availability on new join (home-assistant#21066)

* set availability on device join

* fix new join test

* Fix pushover schema

* Set uvloop version consistent with hass.io (home-assistant#21080)

This sets the uvloop version in Docker containers to 0.11.3, which is the
same version that hass.io uses.

uvloop might be causing issues with some Docker containers on some host
systems, as reported in home-assistant#20829

* Check against unlinked user (home-assistant#21081)

* Fix hue retry crash (home-assistant#21083)

* Fix Hue retry crash

* Fix hue retry crash

* Fix tests

* Update pychromecast (home-assistant#21097)

* Bump aioambient to 0.1.2 (home-assistant#21098)

* Bumped version to 0.88.0b1

* Update bootstrap.py

* Updated frontend to 20190216.0

* Bump thermoworks_smoke version to get new pyrebase version (home-assistant#21100)

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

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

* Don't expose services in Utility_Meter unless tariffs are available (home-assistant#20878)

* only expose services when tariffs configured

* don't register services multiple times

* Deprecate conf_update_interval (home-assistant#20924)

* Deprecate update_interval and replace with scan_interval

* Update tests

* Fix Darksky tests

* Fix Darksky tests correctly

This reverts commit a73384a.

* Provide the default for the non deprecated option

* Don't override default schema for sensors

* Add legacy PLATFORM_SCHEMA config validation

* Fix tests

* Lint

* Add persistent notification

* Update bootstrap.py

* Bumped version to 0.88.0b2

* Handle ValueError (home-assistant#21126)

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

* Bump pychromecast to 2.5.2 (home-assistant#21127)

* 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

* Updated frontend to 20190218.0

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

* SmartThings Component Enhancements/Fixes (home-assistant#21085)

* Improve component setup error logging/notification

* Prevent capabilities from being represented my multiple platforms

* Improved logging of received updates

* Updates based on review feedback

* Fix SmartThings Translation Error (home-assistant#21103)

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

* split validation

* remove any()

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

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

check available and add comments

ensure order on API test

* 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

* Bumped version to 0.88.0b3

* 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

* Updated frontend to 20190219.0

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

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

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

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

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

* Push to pyads 3.0.7

* Correct too long line

* Bumped version to 0.88.0b4

* 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

* Updated frontend to 20190220.0

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

* refactor listeners to channels

* update coveragerc

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

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

* Prevent invalid context from crashing

* Lint

* Bumped version to 0.88.0

* 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

* 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)

* Version bump: python-anthemav to v1.1.9 (home-assistant#21273)

* Do not warn for internally loaded components (home-assistant#21287)

* Fix yeelight config validation (home-assistant#21295)

* Update translations

* Remove index (home-assistant#21304)

* Remove index

* Remove emnumerate

@balloob balloob referenced this pull request Mar 6, 2019

Merged

0.89.0 #21712

@jonathand131 jonathand131 referenced this pull request Mar 7, 2019

Merged

Move files for 0.88 #120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.