Commit graph

48 commits

Author SHA1 Message Date
GitHub Action
66d757115c [ci skip] Translation update 2022-03-11 00:21:48 +00:00
GitHub Action
102ae9f0e3 [ci skip] Translation update 2022-02-22 00:17:23 +00:00
GitHub Action
c4cc6ca0ba [ci skip] Translation update 2022-02-20 00:20:09 +00:00
GitHub Action
208671418e [ci skip] Translation update 2022-02-16 00:14:09 +00:00
GitHub Action
ad0cb4831e [ci skip] Translation update 2022-02-14 00:15:30 +00:00
GitHub Action
2da4d280b2 [ci skip] Translation update 2022-02-06 00:17:31 +00:00
GitHub Action
ca7d4234e1 [ci skip] Translation update 2022-01-31 00:14:28 +00:00
GitHub Action
77ef86faee [ci skip] Translation update 2022-01-30 00:14:21 +00:00
GitHub Action
5e62ff95b9 [ci skip] Translation update 2022-01-29 00:13:03 +00:00
GitHub Action
0827608302 [ci skip] Translation update 2022-01-08 00:14:39 +00:00
GitHub Action
d2c06c5947 [ci skip] Translation update 2022-01-05 00:15:18 +00:00
GitHub Action
b22a9e4d0a [ci skip] Translation update 2021-12-16 00:13:36 +00:00
GitHub Action
77843be01f [ci skip] Translation update 2021-12-15 00:13:42 +00:00
GitHub Action
eb345bfdf1 [ci skip] Translation update 2021-12-14 00:13:33 +00:00
GitHub Action
f75b325ab2 [ci skip] Translation update 2021-12-12 00:14:30 +00:00
GitHub Action
0aaf9459ab [ci skip] Translation update 2021-12-10 00:13:29 +00:00
GitHub Action
1f1a29cada [ci skip] Translation update 2021-12-09 00:13:16 +00:00
GitHub Action
d69c6e3ab3 [ci skip] Translation update 2021-12-08 00:13:50 +00:00
GitHub Action
5258c5fc9c [ci skip] Translation update 2021-12-07 00:51:52 +00:00
micha91
f94085c83e
Add Yamaha MusicCast Select Entities (#60645)
* Add select entity for Yamaha MusicCast Capabilities

* Add musiccast select to .coveragerc

* Move status strings to string.select.json and auto generate the english translations from it. Let the device class start with yamaha_musiccast__.

* Make all device classes lower case

* Use platform enum to add select
2021-12-06 18:05:49 +01:00
GitHub Action
68ca0a05c8 [ci skip] Translation update 2021-12-04 00:13:16 +00:00
GitHub Action
9e606abb0c [ci skip] Translation update 2021-11-23 00:13:54 +00:00
GitHub Action
31d4239b64 [ci skip] Translation update 2021-11-22 00:13:02 +00:00
GitHub Action
9a85c8d894 [ci skip] Translation update 2021-11-18 00:12:48 +00:00
GitHub Action
fc539da42b [ci skip] Translation update 2021-11-14 00:12:48 +00:00
GitHub Action
f00effaba2 [ci skip] Translation update 2021-11-13 00:11:56 +00:00
GitHub Action
e35b83081e [ci skip] Translation update 2021-11-08 00:12:31 +00:00
GitHub Action
332a571bb4 [ci skip] Translation update 2021-11-07 00:12:38 +00:00
GitHub Action
c9c95165e4 [ci skip] Translation update 2021-11-04 00:12:21 +00:00
GitHub Action
4e419d8c6f [ci skip] Translation update 2021-11-01 00:13:04 +00:00
GitHub Action
f9d985553c [ci skip] Translation update 2021-10-22 00:14:10 +00:00
GitHub Action
f42c2f5170 [ci skip] Translation update 2021-10-02 12:59:05 +00:00
GitHub Action
19dcb19d07 [ci skip] Translation update 2021-09-04 00:13:17 +00:00
GitHub Action
65d14909ee [ci skip] Translation update 2021-08-27 00:14:42 +00:00
GitHub Action
45baf88862 [ci skip] Translation update 2021-08-22 00:11:30 +00:00
GitHub Action
0626542a14 [ci skip] Translation update 2021-08-12 00:14:10 +00:00
GitHub Action
8c5620e74b [ci skip] Translation update 2021-08-02 03:40:04 +00:00
GitHub Action
531733da7b [ci skip] Translation update 2021-07-19 00:09:50 +00:00
GitHub Action
b347226820 [ci skip] Translation update 2021-07-10 00:09:24 +00:00
GitHub Action
0c5ce9cac2 [ci skip] Translation update 2021-07-07 00:11:57 +00:00
GitHub Action
ad20b5ced0 [ci skip] Translation update 2021-07-02 00:11:25 +00:00
GitHub Action
d805e971b4 [ci skip] Translation update 2021-06-22 00:14:17 +00:00
GitHub Action
067b5258c6 [ci skip] Translation update 2021-06-21 00:09:58 +00:00
GitHub Action
8901e1f157 [ci skip] Translation update 2021-06-19 00:10:05 +00:00
GitHub Action
17414439df [ci skip] Translation update 2021-06-17 00:10:03 +00:00
GitHub Action
a072fb059d [ci skip] Translation update 2021-06-16 00:09:27 +00:00
GitHub Action
5469cc8fb2 [ci skip] Translation update 2021-06-15 00:11:31 +00:00
Tom Schneider
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