Commit Graph
36630 Commits
Author SHA1 Message Date
31db3fcb23 Refactor Sonos alarms and favorites into system-level coordinators (#51757)
* Refactor alarms and favorites into household-level coordinators

Create SonosHouseholdCoodinator class for system-level data
Fix polling for both alarms and favorites
Adjust tests

* Fix docstring

* Review cleanup

* Move exception handling up a level, do not save a failed coordinator

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-16 10:30:05 -05:00
Franck NijhofandGitHub bc3e5b39ed Clean up cover group (#51924) 2021-06-16 14:47:29 +02:00
djtimcaandGitHub dc9f1411d4 Add Omnilogic switch defaults for max_speed and min_speed (#51889) 2021-06-16 14:39:09 +02:00
Franck NijhofandGitHub 13bf5dbee4 Upgrade mypy to 0.902 (#51907) 2021-06-16 14:35:32 +02:00
Franck NijhofandGitHub 4655e3aa08 Clean up light group (#51922) 2021-06-16 14:30:25 +02:00
jan iversenandGitHub 7ad91fdf71 Add swap to climate and change data_count -> count in modbus (#51668) 2021-06-16 12:11:23 +02:00
61079ab7fa Support receiving long-press events from WeMo devices (#45503)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-16 12:00:34 +02:00
Franck NijhofandGitHub c65d120633 Fix typo in min/max mired(s) entity class attribute (#51921) 2021-06-16 09:58:21 +02:00
Franck NijhofandGitHub 37d3a4dd53 Use entity class vars in Switch demo (#51906)
* Use entity class vars in Switch demo

* Fix missing initial state of the demo switch
2021-06-16 08:29:31 +02:00
Rob BierboomsandGitHub ff0c753c87 Bump pyRFXtrx to 0.27.0 (#51911)
* Bump version

* Fix test
2021-06-15 20:34:05 -05:00
GitHub Action a072fb059d [ci skip] Translation update 2021-06-16 00:09:27 +00:00
uvjustinandGitHub 6d656dd2ec Speed up record stream audio test (#51901) 2021-06-15 14:27:53 -04:00
Milan MeulemansandGitHub 63e20f2ced Mark config flow fields as required (#51898)
* flo

* goalzero

* mutesync

* ring

* roon

* risco

* Ruckus Unleashed

* Scaffold template
2021-06-15 19:21:30 +02:00
3488b78365 Add a menu_cursor service to the yamaha component (#44819)
* Add a menu_cursor service to the yamaha component

* Update homeassistant/components/yamaha/media_player.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update service description to new format

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-15 19:17:10 +02:00
Franck NijhofandGitHub 37af42e470 Upgrade pillow to 8.2.0 (#51897) 2021-06-15 19:14:57 +02:00
Matthias AlphartandGitHub b08f473da4 Add current hvac_action to KNX climate (#51464) 2021-06-15 17:51:16 +02:00
Franck NijhofandGitHub 16d5d7e508 Upgrade codecov to 2.1.11 (#51885) 2021-06-15 15:04:48 +02:00
Franck NijhofandGitHub e4202aa4de Upgrade pytest-cov to 2.12.1 (#51886) 2021-06-15 15:04:07 +02:00
22b8dc16c2 Add services to ezviz integration (#48984)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-06-15 13:23:32 +02:00
Kevin WorrelandGitHub 515bd18ddd Don't create unsupported pump sensors (#51828)
* Don't create unsupported pump sensors

* Remove old code and simplify new statements.

* Address notes
2021-06-15 13:19:48 +02:00
Matthias AlphartandGitHub c0d311473c Restore state of KNX Switch (#51761) 2021-06-15 13:08:19 +02:00
JanandGitHub 333f199bd4 Additional units for HM-ES-TX-WM with ES-IEC (#50713)
The Homematic HM-ES-TX-WM with ES-IEC adapter needs additional unit cast for `IEC_POWER` and `IEC_ENERGY_COUNTER`.
2021-06-15 12:13:03 +02:00
Erik MontnemeryandGitHub f3c6e846fa Enable asyncio debugging from debugpy integration (#51880)
* Optionally enable asyncio debugging from debugpy integration

* Unconditionally enable asyncio debugging
2021-06-15 12:10:47 +02:00
Raman GuptaandGitHub 3db8d9ede5 Require admin for new node status WS API command (#51863) 2021-06-15 09:34:04 +02:00
Erik MontnemeryandGitHub 59a3e0f4dc Improve editing of device conditions referencing non-added HVAC (#51832) 2021-06-15 02:23:13 +02:00
GitHub Action 5469cc8fb2 [ci skip] Translation update 2021-06-15 00:11:31 +00:00
dfe21eb78f Add selectors to BMW Connected Drive service definitions (#47065)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2021-06-15 00:56:14 +02:00
e1538594cd Update fortios device tracker to support FortiOS 7.0 (#51640)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-15 00:29:37 +02:00
3a2d50fe23 Add Xiaomi Miio EU gateway support (#47955)
* Add EU gateway support

* add options flow translations

* fix options flow

* fix missing import

* try to fix async_add_executor_job

* try to fix async_add_executor_job

* fix unload

* check for login succes

* fix not reloading

* use cloud option

* fix styling

* Return after if

Co-authored-by: Nathan Tilley <nathan@tilley.xyz>

* cleanup

* add options flow tests

* fix new tests

* fix typo in docstring

* add missing blank line

* Use async_on_unload

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Use async_on_unload

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Use async_setup_platforms

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Use async_unload_platforms

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/xiaomi_miio/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/xiaomi_miio/const.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* default use_cloud False

* add options flow checks

* fix styling

* fix issort

* add MiCloud check tests

* fix indent

* fix styling

* fix tests

* fix tests

* fix black

* re-write config flow

* add explicit return type

* update strings.json

* black formatting

* fix config flow

Tested the config flow and it is now fully working

* fix styling

* Fix current tests

* Add missing tests

* fix styling

* add re-auth flow

* fix styling

* fix reauth flow

* Add reauth flow test

* use ConfigEntryAuthFailed

* also trigger reauth @ login error

* fix styling

* remove unused import

* fix spelling

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Fix spelling

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* fix spelling

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* remove unessesary .keys()

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* combine async_add_executor_job calls

* remove async_step_model

* fix wrong indent

* fix gatway.py

* fix tests

Co-authored-by: Nathan Tilley <nathan@tilley.xyz>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-15 00:05:40 +02:00
Raman GuptaandGitHub 8705168fe6 Add zwave_js WS API cmds to get node state and version info (#51396)
* Add zwave_js view to retrieve a node's state

* remove typehints

* Make dump views require admin

* Add version info to node level dump

* Add back typehints

* switch from list to dict

* switch from dump node view to two WS API commands

* switch to snake
2021-06-14 16:43:51 -04:00
Raman GuptaandGitHub f00f2b4ae4 Add zwave_js ping node service (#51435)
* Add zwave_js ping node service

* uncomment code

* use asyncio.gather
2021-06-14 16:38:35 -04:00
Brian TowlesandGitHub b1fa01e4bc Cleanup of code reviews from initial modern forms (#51794) 2021-06-14 21:04:02 +02:00
yllarandGitHub 7329dc4f6b Add missing languages to Microsoft TTS (#51774) 2021-06-14 14:10:21 -04:00
jjlawrenandGitHub e929774481 Add warning during playback if Plex token missing (#51853) 2021-06-14 20:09:27 +02:00
Raman GuptaandGitHub 0d40ba463e Create zwave_js node status sensor when the node is added (#51850)
* Create node status sensor when the node is added

* Handle race condition

* reduce repeat code
2021-06-14 19:31:44 +02:00
Franck NijhofandGitHub 347ef9cb4c Define NumberEntity entity attributes as class variables (#51842) 2021-06-14 09:05:01 -07:00
Franck NijhofandGitHub 32409a2c93 Define HumidifierEntity entity attributes as class variables (#51841) 2021-06-14 09:04:46 -07:00
Joakim SørensenandGitHub c8755cd896 Migrate the name for the hassio user (#51771) 2021-06-14 09:01:18 -07:00
97e77ab229 Improve type hints in stream (#51837)
* Improve type hints in stream

* Fix import locations

* Add stream to .strict-typing

Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
2021-06-14 23:59:25 +08:00
Malte FrankenandGitHub 7cd57dd156 Bump aio_geojson_geonetnz_quakes to v0.13 (#51846) 2021-06-14 17:29:23 +02:00
Erik MontnemeryandGitHub 4c9f12b9c5 Correct trace path for trigger with custom id (#51847) 2021-06-14 17:09:20 +02:00
Erik MontnemeryandGitHub a989677bef Improve editing of device conditions referencing non-added binary sensor (#51831)
* Improve editing of device conditions referencing non-added binary sensor

* Update tests
2021-06-14 15:26:46 +02:00
Erik MontnemeryandGitHub 06fc21e287 Improve editing of device conditions referencing non-added sensor (#51835) 2021-06-14 15:22:31 +02:00
Erik MontnemeryandGitHub 59ef55c34f Improve editing of device conditions referencing non-added cover (#51833) 2021-06-14 14:34:59 +02:00
Erik MontnemeryandGitHub af05543744 Improve editing of device conditions referencing non-added humidifier (#51834) 2021-06-14 14:12:42 +02:00
Malte FrankenandGitHub 33ec6621c7 Bump georss_ign_sismologia_client to v0.3 (#51838) 2021-06-14 13:51:11 +02:00
Felipe Martins DielandGitHub fca79237c3 Create dataclass to mock entry setup in Broadlink tests (#50134) 2021-06-14 13:28:57 +02:00
Erik MontnemeryandGitHub 08af791d4c Improve editing of device conditions referencing non-added alarm (#51830) 2021-06-14 13:05:27 +02:00
jan iversenandGitHub 77f6d1f5cb Do not return an exception in modbus (#51829) 2021-06-14 10:56:24 +02:00
7e1fec8ee4 Rewrite of Yamaha musiccast integration (#51561)
* Initial commit for new musiccast integration

* Add zone support

* Get/set volume level

* Remove volume step

* Create custom MusicCastData type

* Create MusicCastDevice

* Fix await

* Add power and mute control

* Implement all basic media_player parts

* Support input switching

* Add duration/position support

* Add advanced tuner functions

* Basic media browser

* Add layer in media browser to see all available list_infos

* Added join/unjoin services and group informations. Known issue: You can not link zone 2 to main at the moment (WIP)

* Many fixes to make multiple zones and grouping work. Next step: implement error handling and remove debugging information

* WIP: Added Multizone Support and allows clients to directly jump from one group to another. Known issue: If a server tries to join a group as client, he has to close his group first. Sometimes the device that was a server previously jumps out of the group directly after joining.

* Updated group management to make it wait for the updated group information before performing the next actions - Timeouts after 1 second, then polls the distribution data. If the data are still not updated, there will be one retry before an Exception is thrown. Extended the state attributes for clients to make them return group details from their servers (leads to inactive group management buttons for the client). Added documentation and restructured the code.

* Make the service handle function name for group specific service calls unique

* Added service descriptions for set_sleep_timer, set_alarm, recall_netusb_preset, store_netusb_preset

* Added data entries for alarm specific values and a netusb preset list. Implemented fetching function for clock and netusb presets.

* Registered and implemented services for set_sleep_timer, set_alarm, recall_netusb_preset, store_netusb_preset. The set_alarm service works with a special mediaplayer alarm lovelace card, I am currently working on.
The NetUSB Presets are also available using the media browser. Maybe we could also add the Tuner presets in the future for both setting up the alarm and recalling them via service and media browser.

* Removed some debug prints

* Moved MusicCast Integration to the aiomusiccast library. This library supports media browsers with multiple pages. Added ssdp support for the discovery

* Minor fix in the group management and tidied up a bit

* Updated manifest of yamaha musiccast

* Update library

* Minor fix in the media browser. get_distribution_num does not have to be async, so it has been changed. Adjusted the client join function to turn on the client before joining a group - the musiccast app does so, so hopefully this fixes the rare errors when adding a turned off client to a group. Some reformating and by hooks fixed most of the requirements of the hooks. Known exception from this: mypy throws an error for line 116.

* Removed some old out commented code. Fixed some error handling, when the user enters a non reachable or non yamaha host in the manual setup. Fixed linting/styling errors. Implemented tests to bring the coverage for the config flow to 100%.

* Fixed linting/styling errors. Return a DeviceInfo object instead of a dict.

* Fixed linting/styling errors. Added a new error type to the translations.

* In the yamaha API the system_id is equal to the serial number in the DLNA description. Due to that it was possible to configure a device twice, because the serial number from the yamaha API was different. This issue was fixed.

* Updated tests and added a test for adding a device manually, which is already present in the system

* Remove print statements

* Fix sleep timer service call

* Fix yamllint error

* Shrink PR down to just new library + config flow with discovery

* Add __init__.py to .coveragerc

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>

* Implement suggestions from code review

* Improve identifiers and connections, remove event loop parameter

* Add coordinator back

* Better exception handling

* Fix unique id in ssdp step

* Remove abc.ABC from MusicCasteDeviceEntity

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/yamaha_musiccast/config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Replace the repeat mode mapping from mc to ha by a generic solution

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* add coordinator to the super call of the mediaplayer

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* add the coordinator to the init function of the MusicCastEntity

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Pass the coordinator from the MusicCastEntity init function to the CoordinatorEntity init function

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* merged _handle_config_flow into async_step_user

* reformated the exception handling of the user step. In the case that the device already exists, the AbortFlow will be raised.

* Removed model from the config entry. It was neither set nor used anymore.

* Fixed the test for the config flow.

* Use async_write_ha_state instead of schedule_update_ha_state.

* Add default value for the system ID gotten in the user step

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/yamaha_musiccast/test_config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Added a fixture to avoid IO in the test_user_input_device_not_found test

* Use absolute imprt to import data_entry_flow.

* Use local vars for host and serial_number in async_step_user.

* Remove ip_address and zone_id properties.

* Use device id for the unique ID of an entity instead of the macs

* Removed entry_id from the MusicCastEntity init function.

* Updated strings and English translation.

* don't set the coordinator in the mediaplayer init.

* Implemented legacy configuration.yaml support for existing configurations.

* Added tests for the newly added config flow step.

* Use device_id as identifier

* Fix an accidentally relative import

* Fix pylint warnings

* use logger.error instead of logger.exception in the import step.

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Use CONF_HOST instead of 'host'

* Only support the import from configuration.yaml if no config entries are setup for musiccast. If there are already config entries in HA and none of them is a representation of a config given in configuration.yaml (e.g. config added after the first import), an error will be logged.

* Update homeassistant/components/yamaha_musiccast/media_player.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Readded PLATFORM_SCHEMA for configuration.yaml

* Raise an exception for all services, which are only supported for specific sources.

* Bump aiomusiccast to 0.6 to support asyncio sockets

Co-authored-by: Michael Harbarth <michael.harbarth@gmx.de>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-14 08:58:42 +02:00