Commit Graph

25415 Commits (cc443ff37a52c5f6b1a24cb7c724ff492435f2e8)

Author SHA1 Message Date
Maciej Bieniek 5c2bd8b743
Add unique ID propery to braviatv entity (#33037)
* Add unique_id property

* Use cid to generate unique_id

* Remove debug file

* Add _unique_id declaration

* Suggested change

* Remove unused self._id
2020-03-23 22:16:17 +01:00
Franck Nijhof 513abcb7e5
Add effect service to WLED integration (#33026)
* Add effect service to WLED integration

* Inline service schema
2020-03-23 13:21:35 -07:00
Paulus Schoutsen 1ff245d9c2
Make sure entity platform services work for all platforms of d… (#33176)
* Make sure entity platform services work for all platforms of domain

* Register a bad service handler

* Fix cleaning up

* Tiny cleanup
2020-03-23 12:59:36 -07:00
J. Nick Koston 2360fd4141
Switch legacy calls to init_recorder_component using async_add… (#33185) 2020-03-23 11:27:45 -07:00
Pascal Vizeli 95de94e53f Update azure-pipelines-wheels.yml for Azure Pipelines 2020-03-23 16:48:44 +00:00
Pascal Vizeli ea23ffedfe Update azure-pipelines-wheels.yml for Azure Pipelines 2020-03-23 17:47:43 +01:00
Alexei Chetroi bf4b099f11
Update sw_version in device registry for ZHA devices (#33184)
* Update firmware version in device registry.
Parse recevied OTA requests for firmware version and update device
registry.

* Update tests.
* Cleanup sw_id_update listener.
* Update ZHA test devices list.
2020-03-23 12:42:41 -04:00
J. Nick Koston b8fdebd05c
Add aircleaner and humidify service to nexia climate (#33078)
* Add aircleaner and humidify service to nexia climate

* These were removed from the original merge to reduce review scope

* Additional tests for binary_sensor, sensor, and climate states

* Switch to signals for services

Get rid of everywhere we call device and change to zone or thermostat
as it was too confusing

Renames to make it clear that zone and thermostat are tightly coupled

* Make scene activation responsive

* no need to use update for only one key/value

* stray comma

* use async_call_later

* its async, need ()s

* cleaner

* merge entity platform services testing branch
2020-03-23 11:01:48 -05:00
Pascal Vizeli 181b2803cd Update azure-pipelines-wheels.yml for Azure Pipelines 2020-03-23 15:56:50 +00:00
Pascal Vizeli 0e3dc7976c Update azure-pipelines-wheels.yml for Azure Pipelines 2020-03-23 16:54:06 +01:00
jasperro c8d4cf08d9
Add Tado set presence (#32765)
* Updated tado integration climate.py to allow for presence change

* Updated tado integration __init__.py to allow for presence change

* Black formatting

* Added missing docstring

* Added missing period to docstring

* Using constants from climate component

* Filter out other preset_modes

* Linting error fix

* Isort error fix

* Filtering of unwanted presence mode in init

* Bumped python-tado version to 0.5.0

Removed unnecessary preset mode check

* Update requirements_all.txt
2020-03-23 10:40:15 -05:00
Balazs Keresztury df67ab995f
Add support for Bosch BMP280 Sensor (#30837)
* Implement support for Bosch BMP280 Sensor

* Fixed linting errors

* Fixed case of the requirement RPi.GPIO so it is ignored in requirements

* Update homeassistant/components/bmp280/manifest.json

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update homeassistant/components/bmp280/sensor.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Fix linting errors

* Implemented changes suggested by code review

* Fixed incomplete refactoring

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-03-23 09:12:59 -05:00
Pascal Vizeli e0f2fa33df [skip ci] Update azure-pipelines-wheels.yml for Azure Pipelines 2020-03-23 13:19:14 +00:00
Pascal Vizeli 884c346bdf Fix dockerfile 2020-03-23 13:19:02 +00:00
Pascal Vizeli c218ff5a75 Integrate dockerbuild (#33168)
* Integrate dockerbuild

* cleanup
2020-03-23 13:18:48 +00:00
Pascal Vizeli fa43a218d2 Update azure-pipelines-wheels.yml for Azure Pipelines 2020-03-23 13:18:33 +00:00
Pascal Vizeli f4cc64d289 [skip ci] add rc into build 2020-03-23 13:18:18 +00:00
Pascal Vizeli 4c31829832 [skip ci] update wheels builder version 2020-03-23 13:18:00 +00:00
Pascal Vizeli ff32c1c3e9 Update azure-pipelines-wheels.yml 2020-03-23 13:17:49 +00:00
Pascal Vizeli c21a2eab22 [skip ci] Update azure-pipelines-wheels.yml for Azure Pipelines 2020-03-23 13:14:50 +01:00
Vegetto df2351b920
Support for COLOR_TEMP in Homematic dimmers (#31207)
* Support for COLOR_TEMP in Homematic dimmers

* Fix lint issues

* Added pre-checks

* Fix review feedback

* Remove unneded code
2020-03-23 10:56:44 +01:00
Olivier B 4332cbe112
Add Tesla sentry mode switch (#32938)
* Add Tesla sentry mode switch

* add available property, fix is_on

* bump teslajsonpy to 0.6.0
2020-03-23 10:52:59 +01:00
J. Nick Koston f9a7c64106
Config flow for doorbird (#33165)
* Config flow for doorbird

* Discoverable via zeroconf

* Fix zeroconf test

* add missing return

* Add a test for legacy over ride url (will go away when refactored to cloud hooks)

* Update homeassistant/components/doorbird/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* without getting the hooks its not so useful

* Update homeassistant/components/doorbird/config_flow.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* fix copy pasta

* remove identifiers since its in connections

* self review fixes

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-23 10:14:21 +01:00
Jason Swails 49ebea2be3
Add support for occupancy/vacancy groups in Lutron Caseta component (#33032)
* Add support for Lutron Caseta occupancy/vacancy sensors

This follows updates to pylutron-caseta to add support for these
devices. This code works for me as a custom component in Home Assistant
Core with pylutron-caseta 0.6.0 (currently unreleased).

* black formatting

* Update requirements_all.txt

* Apply black formatting

* Resolve some review comments

* serial -> unique_id

* Black formatting

* Resolve linting errors

* Add code owner...

* Fix isort complaint

* Fix remaining isort complaints

* Update codeowners

* Resolve outstanding review comments

* Remove caseta_
2020-03-23 07:51:24 +01:00
J. Nick Koston b09a9fc81a
Add config flow for Nuheat (#32885)
* Modernize nuheat for new climate platform

* Home Assistant state now mirrors the
  state displayed at mynewheat.com

* Remove off mode as the device does not implement
  and setting was not implemented anyways

* Implement missing set_hvac_mode for nuheat

* Now shows as unavailable when offline

* Add a unique id (serial number)

* Fix hvac_mode as it was really implementing hvac_action

* Presets now map to the open api spec
  published at https://api.mynuheat.com/swagger/

* ThermostatModel: scheduleMode

* Revert test cleanup as it leaves files behind.

Its going to be more invasive to modernize the tests so
it will have to come in a new pr

* Config flow for nuheat

* codeowners

* Add an import test as well

* remove debug
2020-03-23 00:29:45 -05:00
J. Nick Koston fa60e9b03b
Improve sense timeout exception handling (#33127)
asyncio.Timeout needs to be trapped as well
2020-03-22 21:41:59 -07:00
J. Nick Koston 0b2a8bf79a
Make harmony handle IP address changes (#33173)
If the IP address of the harmony hub changed it would
not be rediscovered.  We now connect to get the
unique id and then update config entries with
the correct ip if it is already setup.
2020-03-22 21:24:49 -07:00
Alan Tse 087b672449
Add enable_wake_on_start option to Tesla (#33035) 2020-03-22 22:33:55 -05:00
Pascal Vizeli d3f9408650 Fix dockerfile 2020-03-23 01:00:00 +01:00
Pascal Vizeli 6e6ad94df6
Integrate dockerbuild (#33168)
* Integrate dockerbuild

* cleanup
2020-03-23 00:39:37 +01:00
J. Nick Koston e344c2ea64
Add gate support to myq, fix bouncy updates (#33124)
* Add gate support to myq, fix bouncy updates

Switch to DataUpdateCoordinator, previously
we would hit the myq api every 60 seconds per device.

If you have access to 20 garage doors on the account it means
we would have previously tried to update 20 times per minutes.

* switch to async_call_later
2020-03-22 16:28:55 -07:00
Ivan Dyedov ab8c50895e
Add fahrenheit support in miflora sensor (#33136)
* add support for fahrenheit in miflora sensor

* fix error introduced when resolving merge conflict

* fix formatting
2020-03-22 21:58:35 +01:00
Matt Snyder f0472f2dc2
Fix QVR Pro connection error and add port option (#33070)
* Allow port specification.  Handle connection error gracefully.

* Allow port specification.  Handle connection error gracefully.

* Alias exception. Requested changes.
2020-03-22 21:43:45 +01:00
Quentame 0249daef2e
Bump iCloud to 0.9.6.1 (#33161) 2020-03-22 21:05:27 +01:00
Eugenio Panadero 8d2e72cdf6
Add pvpc electricity prices integration (#32092)
* Add new integration: pvpc_hourly_pricing

to add a sensor with the current hourly price of electricity in Spain.
Configuration is done by selecting one of the 3 reference tariffs, with
1, 2, or 3 billing periods.

* Features config flow, entity registry, RestoreEntity, options flow
  to change tariff, manual yaml config as integration or sensor platform
* Cloud polling sensor with minimal API calls (3/hour at random times)
  and smart retry; fully async
* Only 1 state change / hour (only when the price changes)
* At evening, try to download published tomorrow prices, to always store
  prices info for a window of [3, 27] hours in the future.
* Include useful state attributes to program automations to be run
  at best electric prices.
* Add spanish and english translations.

* Requires `xmltodict` to parse official xml file with hourly prices
for each day.

* Update requirements and add to codeowners

* Avoid passing in hass as a parameter to the entity

Instead, create time change listeners in async_added_to_hass and
call async_generate_entity_id before async_add_entities

* Fix lint issues

* Add tests for config & options flow

* Add tests for manual yaml config

with entity definition as integration and also as a sensor platform

* Fix placement of PLATFORM_SCHEMA and update generated config_flows

* Store prices internally linked to UTC timestamps

- to deal with days with DST changes
- and work with different local timezones

* Add availability to sensor

to 'expire' the sensor if there is no connection available
 and current hour is not in the stored prices.

Also, turn off logging and retrying if prices can't be downloaded
repeatedly, by flagging `data_source_available` as False, so there is no
log-flood mess.

* Add more tests

- to cover behavior in DST changes and complete coverage of sensor logic
- to cover abort config flow

* fix linter

* Better handling of sensor availability and minor enhancements

- Emmit 1 error if data source is marked as unavailable
  (after some retries), and be silent until cloud access is recovered,
  then emmit 1 warning.
- Follow standard of camel_case keys in attributes

* Mock aiosession to not access real API, store fixture data

- Store a set of daily xml files to test sensor logic for all situations
- Mock time and session to run tests with stored API responses
- Add availability test to simulate a lost + recovery of cloud access,
  checking that logging is reasonable: 1 error to flag the continued
  disconnection + 1 warning in recovery.

* Change API endpoint to retrieve JSON data

and remove xmltodict from reqs.

It seems that this endpoint is more reliable than the XML.

* Adapt tests to new API endpoint

* Translate tariff labels to plain English

and sync the default timeout value for all ways of configuration.

* Relax logging levels to meet silver requirements

- 1 warning when becoming unavailable, another warning when recovered.
- Warnings for unexpected TimeoutError or ClientError
- Move the rest to debug level, leaving info for HA internals

Also reduce number of API calls from 3 to 2 calls/hour.

* Fix requirements

* Mod tests to work with timezone Atlantic/Canary

and fix state attributes for timezones != reference, by using 3 price
prefixes: 'price_last_day_XXh', 'price_next_day_XXh' and 'price_XXh',
all generated with local time (backend timezone)

* Try to fix CI tests

* Externalize pvpc data and simplify sensor.py

* add new `aiopvpc` to requirements
* Remove data parsing and price logic from here
* Replace some constant properties with class variables

* Simplify tests for pvpc_hourly_pricing

* Fix updater for options flow

* Updater always reloads
* `tariff` value comes 1st from entry.options, 2nd from entry.data

* Fix lint

* Bump aiopvpc

* Remove options flow and platform setup

- Remove PLATFORM_SCHEMA and async_setup_platform
- Generate config_entry.unique_id with tariff instead of entity_id, in flow step.
- Remove TariffSelectorConfigFlow
- Adapt tests to maintain full coverage

* Fix docstring on test

and rename SENSOR_SCHEMA to SINGLE_SENSOR_SCHEMA to avoid confusion

* Remove timeout manual config, fix entry.options usage, simplify unique_id

* Simplify tests

- No need for a test_setup now, as platform setup is removed and integration
  setup is already used in `test_availability`
- Simplified `_process_time_step`: only one async_fire(EVENT_TIME_CHANGED)/hour

* Fix possible duplicated update

when source is not available.

* Do not access State last_changed for log messages

* Do not update until entity is added to hass

and call to async_update after 1st download or when recovering access, so
async_write_ha_state is not called twice on those.

* minor changes

* Rename method to select current price and make it a callback
2020-03-22 14:25:31 -05:00
Pascal Vizeli 52ac7285a7 Update azure-pipelines-wheels.yml for Azure Pipelines 2020-03-22 19:40:25 +01:00
Jason Swails 2a3d688923
General code cleanups for lutron_caseta component (#33144)
* General code cleanups for lutron_caseta component

* black

* Update homeassistant/components/lutron_caseta/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-22 17:35:01 +01:00
Raman Gupta ca3a22b5a3
Filter out duplicate app names from vizio's source list (#33051)
* filter out additional app config names from pyvizios app list

* add test

* change where filtering app list occurs

* fix test

* fix mistake in change

* hopefully final test fix

* fix test scenario that unknowingly broke with test change
2020-03-22 17:34:00 +01:00
Pascal Vizeli 912cda4e6f
[skip ci] add rc into build 2020-03-22 16:37:33 +01:00
Austin Mroczek c79b3df73f
Handle generic_thermostat state unavailable (#32852)
* fix sensor unavailable error

* fix climate.py
2020-03-22 09:35:58 -05:00
Christian Ferbar 8423d18d8d
Add Miflora go_unavailable_timeout (#31156)
* Clear state on exception

Clear state if querying the device fails. The state is then set to unknown, so it can be tracked if a miflora device isn't responding any more.

* Add available()

Signal valid data via available()

* miflora: add timeout to go unavailable

* code cleanup

* miflora: tox cleanup
2020-03-22 14:00:09 +01:00
Maciej Bieniek 9d87c1ab1a
Bump gios to 0.0.4 (#33141) 2020-03-22 13:44:57 +01:00
Paulus Schoutsen f95c3e265d
Fix script logging with name (#33120) 2020-03-22 13:29:50 +01:00
On Freund 66402b9b38
Monoprice PR followups (#33133) 2020-03-22 13:25:27 +01:00
jjlawren 99877c32b1
Bump pyecobee to 0.2.3 (#33130) 2020-03-22 13:19:26 +01:00
Pascal Vizeli 4510e83150
[skip ci] update wheels builder version 2020-03-22 12:31:14 +01:00
Pascal Vizeli 252d934caa
Update azure-pipelines-wheels.yml 2020-03-22 12:17:48 +01:00
On Freund e8bd1b9216
Config Flow and Entity registry support for Monoprice (#30337)
* Entity registry support for monoprice

* Add test for unique_id

* Add unique id namespace to monoprice

* Config Flow for Monoprice

* Update monoprice tests

* Remove TODOs

* Handle entity unloading

* Fix update test

* Streamline entity handling in monoprice services

* Increase coverage

* Remove devices cache

* Async validation in monoprice config flow
2020-03-21 18:12:32 -07:00
guillempages 99d732b974
Revert "Validate UUID for tankerkoenig (#32805)" (#33123)
This reverts commit 49c2a4a4e3.
The validation was causing more problems than it was fixing, so removed
it completely
2020-03-21 17:48:18 -07:00
Paulus Schoutsen 05e7238c45 Merge remote-tracking branch 'origin/master' into dev 2020-03-21 17:25:46 -07:00