Commit Graph

63 Commits (63ed0af644af7338a5ff7512d27b4255a6010935)

Author SHA1 Message Date
micha91 b4730f4ffe
Add Yamaha MusicCast number entities (#60093) 2021-11-28 07:52:46 -10:00
micha91 e615e70e49
Add Yamaha MusicCast zone specific devices (#58285) 2021-11-23 16:29:34 +01: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
micha91 37259a1448
Fix udp ports (#59293) 2021-11-07 07:38:12 -08: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
Marc Mueller 84618fa831
Use assignment expressions 30 (#58714) 2021-10-30 16:33:42 +02:00
Marc Mueller ea2e94a4e5
Use assignment expressions 24 (#58181) 2021-10-22 14:07:19 +02:00
GitHub Action f9d985553c [ci skip] Translation update 2021-10-22 00:14:10 +00:00
micha91 518151fbe6
Fix Yamaha MusicCast media_stop (#58024) 2021-10-20 00:18:08 +02:00
Tom Schneider c6aa767be6
Add volume_up and volume_down to musiccast (#57919) 2021-10-20 00:14:55 +02:00
Marc Mueller d5116810d4
Use assignment expressions 08 (#57788) 2021-10-17 20:02:42 +02:00
micha91 20d08fa470
Upgrade aiomusiccast to tolererate not decodable characters (#57461) 2021-10-11 11:34:37 +02:00
GitHub Action f42c2f5170 [ci skip] Translation update 2021-10-02 12:59:05 +00:00
Steven Looman 73260c5b88
Move parts of ssdp to async_upnp_client (#55540)
* Move parts of ssdp to async_upnp_client

* Fix test for environments with multiple sources

* Fix sonos tests

* More fixes/changes

* More fixes

* Use async_upnp_client==0.21.0

* Pylint/test fixes

* More changes after review

* Fix tests

* Improve testing

* Fix mypy

* Fix yamaha_musiccast tests?

* Changes after review

* Pylint

* Reduce calls to combined_headers

* Update to async_upnp_client==0.21.1

* Update to async_upnp_client==0.21.2

* use as_dict

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-11 13:38:16 -10:00
micha91 948a942a0d
Fix UDP message handling by upgrading aiomusiccast to 0.9.2 (#56041) 2021-09-10 15:03:34 +02: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
micha91 6eadc0c303
Yamaha Musiccast Media Browser feature (#54864) 2021-08-19 20:42:11 +02:00
GitHub Action 0626542a14 [ci skip] Translation update 2021-08-12 00:14:10 +00:00
Milan Meulemans 8ab3d9cc12
Use homeassistant.const instead of integration const for device_info ATTR_ (#53703) 2021-08-02 15:11:41 +02:00
GitHub Action 8c5620e74b [ci skip] Translation update 2021-08-02 03:40:04 +00:00
Milan Meulemans 348d7a5622
Remove incorrect use of ConfigType in config flows (#53544) 2021-07-27 12:33:17 +02:00
Milan Meulemans 0471b27179
Replace HomeAssistantType with HomeAssistant (#53545) 2021-07-27 12:30:56 +02:00
micha91 f4d65e3751
Musiccast grouping fixes (#52339)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-07-26 20:48:20 +02:00
Ville Skyttä 470f2dd73f
Upgrade pyupgrade to 2.21.2, apply its changes (#52987) 2021-07-19 10:46:09 +02: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
Tom Schneider dc407fe7a1
Fix MusicCast subwoofers (#52335) 2021-06-30 13:09:57 +02:00
micha91 8133793f23
Yamaha musiccast grouping-services (#51952)
Co-authored-by: Tom Schneider <tom.schneider-github@sutomaji.net>
2021-06-28 13:57:01 +02: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
Franck Nijhof 055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
springstan 228e167b03
Remove unnecessary should poll from media player classes (#41220) 2020-10-04 21:26:09 +02:00
Franck Nijhof 4cf186a47e
Small collection of random styling tweaks, fixes and Pythonism (#35390) 2020-05-09 00:10:17 +02:00
Erik Montnemery 62bc02fdda
Rename MediaPlayerDevice to MediaPlayerEntity (#34592) 2020-04-25 18:00:57 +02:00