Commit Graph

19391 Commits (b78d156f0ea65ef53a2aad6948fa5fff06809a1a)

Author SHA1 Message Date
Vilppu Vuorinen b78d156f0e
Add MELCloud integration (#30712)
* Add MELCloud integration

* Provides a climate and sensor platforms. Multiple platforms on one go
is not the best option, but it does not make sense to remove them and
commit them later either.

* Email and access token are stored to the ConfigEntry. The token can be
updated by adding the integration again with the same email address. The
config flow is aborted and the update is performed on the background.

* Run isort

* Fix pylint errors

* Run black

* Increase coverage

* Update pymelcloud dependency

* Add HVAC_MODE_OFF emulation

* Remove print

* Update pymelcloud to enable device type filtering

* Collapse except blocks and chain ClientNotReadys

* Add preliminary documentation URL

* Use list comp for creating model info

Filters out empty model names form units.

* f-string galore

Dropped 'HVAC' from AtaDevice name template.

* Delegate fan mode mapping to pymelcloud

* Fix type annotation

* Access AtaDevice through self._device

* Prefer list comprehension

* Update pymelcloud to leverage device type grouping

The updated backend lib returns devices in a dict grouped by the device
type. The devices do not necessarily need to be in a single list and
this way isinstance is not required to extract devices by type.

* Remove DOMAIN presence check

This does not seem to make much sense after all.

* Fix async_setup_entry

Entry setup used half-baked naming from few experimentations back.
The naming conventiens were unified to match the platforms.

A redundant noneness check was also removed after evaluating the
possible return values from the backend lib.

* Simplify empty model name check

* Improve config validation

* Use config_validation strings.

* Add CONF_EMAIL to config schema. The value is not strictly required
when configuring through configuration.yaml, but having it there makes
things more consistent.

* Use dict[key] to access required properties.

* Add DOMAIN in config check back to async_setup. This is required if an
integration is configured throught config_flow.

* Remove unused manifest properties

* Remove redundant ClimateDevice property override

* Add __init__.py to coverage exclusion

* Use CONF_USERNAME instead of CONF_EMAIL

* Use asyncio.gather instead of asyncio.wait

* Misc fixes

* any -> Any

* Better names for dict iterations

* Proper dict access with mandatory/known keys

* Remove unused 'name' argument

* Remove unnecessary platform info from unique_ids

* Remove redundant methods from climate platform

* Remove redundant default value from dict get

* Update ConfigFlow sub-classing

* Define sensors in a dict instead of a list

* Use _abort_if_unique_id_configured to update token

* Fix them tests

* Remove current state guards

* Fix that gather call

* Implement sensor definitions without str manipulation

* Use relative intra-package imports

* Update homeassistant/components/melcloud/config_flow.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-02-10 22:09:12 +01:00
Hans Oischinger 7e0560c7dc
Vicare water_heater set_temperature fix and bump PyVicare to 0.1.7 (#31672)
* Fix ViCare water_heater set_temperature

This fixes a obvious but undiscovered bug in the water heater component:
Instead of the commanded value the prvious value was set on the API

* Bump PyVicare to 0.1.7
2020-02-10 21:23:02 +01:00
Maikel Punie 5a7e0b84ff
Bump velbus version + load velbus module names into device info (#31664) 2020-02-10 21:22:09 +01:00
cgtobi 7d0b50cadb
Fix wrong error message in netatmo integration (#31690) 2020-02-10 12:33:07 +01:00
Paulus Schoutsen 5092971452
Add brightness light device actions (#31567) 2020-02-09 19:47:59 -08:00
Paulus Schoutsen 12de3f1e47 Clean up frontend services and events (#31654)
* Clean up frontend services and events

* Fix bug in core instead

* Add test that core works correctly with callback marked async funcs
2020-02-09 19:47:16 -08:00
HomeAssistant Azure 118ba10442 [ci skip] Translation update 2020-02-10 00:31:37 +00:00
Balazs Sandor 41f3fb291a Add ZHA Texas Instruments CC device support (#31621) 2020-02-09 12:13:22 -05:00
Ben fb2e120563 Sure Petcare new features various improvements (#31437)
* add typing

* 100% battery_level is enough

* human-friendly datetime

* better enum usage

* add online and learning mode attrs

* use max two decimals in attrs

* use legacy style debug logging

* remove str usage of enums

* add feeder

* add feeder and adapt to new surepy version

* use ProductID instead of ThingID

* various changes and improvements

* add connectivity sensors for all devices & proper support for multiple hubs

* remove "side effects"/exception catching in attribs

* correct unique ids, reorder classes

* move Flap class from binary_sensor to sensor and add a sensore base class

* comments cleanup, minor typing and logging fixes

* remove commented code

* remove commented code

* add typing

* 100% battery_level is enough

* human-friendly datetime

* better enum usage

* add online and learning mode attrs

* use max two decimals in attrs

* use legacy style debug logging

* remove str usage of enums

* add feeder

* add feeder and adapt to new surepy version

* use ProductID instead of ThingID

* various changes and improvements

* add connectivity sensors for all devices & proper support for multiple hubs

* remove "side effects"/exception catching in attribs

* correct unique ids, reorder classes

* move Flap class from binary_sensor to sensor and add a sensore base class

* comments cleanup, minor typing and logging fixes

* remove commented code

* remove commented code

* fix spelling in comment to make the CI happy (seriously?!)

* fix manifest file

* fix requirements_all.txt file

* add missing docstrings

* fix available property

* remove typing from self

* remove commented code

* remove is_on property from sensor

* jump to new surepy version

* remove useles init methods
2020-02-09 17:46:00 +01:00
Jonathan Østrup 150b376cf9
Add recorder vars db_max_retries and db_retry_wait (#31561)
* added recorder vars db_max_retries and db_retry_wait

* fixed test_recorder_setup_failure

I failed because it was missing the two new variables. I simply added these with default values.

* fixed syntax error in test_recorder_setup_failure

* fixed formatting error in test_init_py for recorder component

* fixed typo in test case

* Updated the way the default keys for db_,max_wait and db_retry_wait is set

Implemented based on suggestions from @springstan

* Updated config_schema call to adhere to Black

* changed conf.get to conf[dict] for var retrieval

* removed 2 blank lines
2020-02-09 17:43:09 +01:00
crallian 645c673720
Added zone type Technical as power. (#31611)
*The zone type technical can be used in SPC to track status of e.g. mapping keys and outputs.
2020-02-09 17:41:43 +01:00
Paulus Schoutsen da0ddc84ab
Guard writing automation/scene/script config (#31568) 2020-02-08 17:26:58 -08:00
Josh Anderson 9987978d1a
Add unique ID to edimax switches (#27984)
* Add unique ID and device info data

* Don't get power info on switch models lacking it

* Move info fetching to update, update before adding

* Upgrade pyedimax to get device info

* Remove device info

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-08 16:45:28 -08:00
HomeAssistant Azure a2bea2cab8 [ci skip] Translation update 2020-02-09 00:31:39 +00:00
Bruno Furtado 9f58e5d6ea
Only auth on enter_learning in response to errors for broadlink (#27341)
* Only auth on enter_learning in response to errors.

* Remove extra newline.

* Add missing break on successful attempt.

* Avoid logging success message when auth is unsuccessful.
2020-02-08 16:17:40 -08:00
Tom Harris e3894d212c
Bump insteonplm to 0.16.7 (#31645) 2020-02-08 22:34:22 +01:00
Paulus Schoutsen 989dd32258
Hue to retry if hub errors out (#31616)
* Respect semaphore

* Add retries when connection reset

* Also catch OSError from aiohttp when authenticating
2020-02-08 13:20:37 -08:00
J. Nick Koston 0dd151c1c3
Resolve August integration makes too many requests and hits rate limits (#31558) 2020-02-08 20:22:48 +01:00
Paulus Schoutsen ca1319e1ef Device tracker entities based on GPS should always publish updates (#31551) 2020-02-08 19:56:48 +01:00
Ron Klinkien 1093e25a30
Catch garmin_connect keyerrors with unknown entity type updates (#31608)
* Catch keyerrors with unknown entity type updates

* Change debug level and removed . from log call
2020-02-08 18:47:54 +01:00
shred86 14e0dde055
Add Abode water valve support (#30635) 2020-02-08 16:58:07 +01:00
CHAZICLE 967b02073e
Remove stray debug from unifi integration (#31634) 2020-02-08 16:07:17 +01:00
Daniel Høyer Iversen 6037f7364f
Fix hvac_action for mill (#31630) 2020-02-08 16:00:20 +01:00
Yarmo Mackenbach 658c48b237 Handle missing next train from NS (#31626)
* Handle missing next train

* Ignore next attribute instead
2020-02-08 15:52:05 +01:00
springstan 83a79a434c
Use slug in ping device tracker config validation (#31329)
* Use slug instead of string for config validation
2020-02-08 15:19:46 +01:00
melyux ed3e16123e
Actually enable alarmdecoder to see open/close state of bypassed RF zones when armed (#31426) 2020-02-08 14:32:52 +01:00
Oliver a5b4f43ea5 Bump denonavr to 0.7.12 (#31629) 2020-02-08 13:46:13 +01:00
Paulus Schoutsen 111050bea9
Clean up core services (#31509)
* Clean up core services

* Fix conversation test
2020-02-08 13:10:59 +01:00
Alexei Chetroi 57ab30d534 Bump ZHA dependencies. (#31619)
Bump up zigpy-homeassistant==0.13.2
2020-02-08 06:50:50 -05:00
escoand 0823ee4385
Fix exceptions when using newer Samsung TVs (#31602)
* try to fix websocket problems

* use tuple

* catch websocket exceptions

* typo
2020-02-08 12:03:35 +01:00
SukramJ baa9184b33
Extract services from init.py for HomematicIP Cloud (#31376)
* Extract services from init.py for HomematicIP Cloud

* add ServiceCallType
2020-02-08 10:07:20 +01:00
elmurato 699d6ad658
Add Minecraft Server Integration (#30992)
* Add Minecraft Server integration

* Add unit test for config flow

* Fixed some review findings and increased unit test coverage

* Fixed docstrings of new test cases

* Removed unnecessary debug log messages

* Added unique IDs and device infos and removed duplicate name validation

* Attempt to fix unit test on CI

* Return state OFF instead of UNAVAILABLE in case connection to server drops

* Added property decorator to server properties, even less debug messages, improved sensor dispatcher connection and other review findings fixed

* Moved special property handling to sensors, fixed name confusion in sensor entity, switch to HA const for scan_interval, simplified building players list string

* Improved periodic update, speeded up unit tests

* Added type hints, added callback decorator to entity update callback, added const.py to unit test exclusions

* Changed state sensor to binary sensor, removed empty unit test file, added constants for icons and units

* Let HA handle unknown state, check for None in description and players list sensor

* Removed periods at end of log messages, removed constant for default host

* Updated requirements_test_pre_commit.txt, fixed codespell findings

* Use localhost as default host

* Removed passing hass to entities, moved log message from init, moved host lower to vol, use proper patch library, patch library instead of own code

* Replaced server properties with global instance attributes, removed config option scan_interval, switch back to async_track_time_interval

* Removed description and players list sensors, added players list as state attributes to online players sensor, raise OSError instead of deprecated IOError, other minor review findings fixed

* Use MAC address for unique_id in case of an IP address as host, added getmac to manifest.json, added invalid_ip to strings.json, added new test cases for changes in config_flow, replace all IOError's with OSError, other review findings fixed

* Removed double assignment

* Call get_mac_address async safe

* Handle unavailable and unknown states to reach silver quality scale, added quality scale to manifest.json
2020-02-08 09:28:35 +01:00
HomeAssistant Azure 5483de7e25 [ci skip] Translation update 2020-02-08 00:31:45 +00:00
MatthewFlamm f9e037a823
update pynws to 0.10.4 (#31591) 2020-02-07 09:16:56 -05:00
Rami Mosleh c0eb399d54
Fix librouteros response error handling (#31588) 2020-02-07 14:03:32 +01:00
Eugenio Panadero 37205f9f61
Unregister listener for stats sensor with max_age (#31580) 2020-02-07 11:06:46 +01:00
HomeAssistant Azure 274cf23269 [ci skip] Translation update 2020-02-07 00:31:50 +00:00
Franck Nijhof d093b5f5e8
Bump adguardhome to 0.4.1 (#31565) 2020-02-06 16:02:00 -08:00
jjlawren 3a3328dc13
Skip updates when Plex client viewing photos (#31556) 2020-02-06 14:26:34 -08:00
Alexei Chetroi 0e68ace3dd
Bump ZHA dependencies. (#31555) 2020-02-06 16:34:28 -05:00
Phil Bruckner d1e7ade6db
Make amcrest integration more robust (#30843)
- Bump amcrest package to 1.5.6. Includes networking improvements, no longer
  communicates during Http.__init__(), and allows running snapshot command
  without using stream mode.
- Handle login errors better, and not just at startup.
- Increase network connect & read timeout to 6.05 seconds.
- Increase network read timeout to 20 seconds for snapshot command.
- Run snapshot command in separate task, that cannot be cancelled, to eliminate
  possibility of two snapshot commands running simultaneously (since
  AmcrestCam.async_camera_image can be cancelled.) Also makes sure any exceptions
  from the command are caught properly.
2020-02-06 14:44:48 -06:00
Paulus Schoutsen 9e87a662d5 Update MQTT service description 2020-02-06 11:39:44 -08:00
Paulus Schoutsen 00c6f3cb85
Guard for reloading with no zone config (#31547) 2020-02-06 10:55:12 -08:00
Ville Skyttä 08a74ff686
Use min and m as units in Garmin Connect for consistency and correctness (#31543) 2020-02-06 10:54:01 -08:00
Josh Bendavid eee1ca9211
update aiopylgtv to 0.3.3 (#31545) 2020-02-06 10:00:54 -08:00
Paulus Schoutsen 0d474e1183
Update the update coordinator API to make it easier to use (#31471)
* Update the update coordinator API to make it easier to use

* failed_last_update -> last_update_success
2020-02-06 09:29:29 -08:00
Paulus Schoutsen d407b8e215
Deprecate old netatmo keys (#31544) 2020-02-06 09:26:51 -08:00
Quentame 9e4904cb21
Fix iCloud determine_interval: add default interval to max_interval (#31533) 2020-02-06 08:53:42 -08:00
Dougal Matthews 24c382d689
Only normalise Garmin connect data to minutes if the value is not None (#31526)
Otherwise this causes additional TypeError messages to be logged for
division of None.
2020-02-06 08:52:46 -08:00
Franck Nijhof 7233048fea
Limit OAuth scopes for Netatmo and Home Assistant Cloud (#31538)
* Limit OAuth scopes for Netatmo and Home Assistant Cloud

* Fix tests by making order of scopes predictable
2020-02-06 17:00:27 +01:00