Commit Graph

27 Commits (4f32a329a794e5dae4b0745a4e505fb3e8d5d876)

Author SHA1 Message Date
Dan Klaffenbach 56e93ff0ec
Add support for HEOS groups (#32568)
* Add support for grouping HEOS media players

* Update homeassistant/components/heos/media_player.py

Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>

* Update homeassistant/components/heos/media_player.py

Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>

* Update homeassistant/components/heos/media_player.py

Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>

* Update homeassistant/components/heos/media_player.py

Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>

* Update homeassistant/components/heos/media_player.py

Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>

* Update homeassistant/components/heos/media_player.py

Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>

* Handle groups at controller level, refine tests.

Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>

* Fix linting issues

* Update homeassistant/components/heos/media_player.py

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

* Update homeassistant/components/heos/media_player.py

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

* Rename variables and improve resolving of entity_ids

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

* Don't patch internal methods

Use the pytest fixtures which have already been defined for this.

* Fix linting issues

* Remove unused property

* Ignore groups with unknown leader

This makes sure that the group_members attribute won't contain a `None`
value as a leader entity_id.

* Don't call force_update_groups() from tests

* Don't pass `None` player ids to HEOS API

* Use signal for group manager communication

* Use imports for async_dispatcher_send/async_dispatcher_connect

* Raise exception when leader/player could not be resolved

* Disconnect signal handlers, avoid calling async_update_groups too early

* Update homeassistant/components/heos/__init__.py

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

Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-21 12:57:31 +01:00
Robert Hillis 4a8e9df026
Use DeviceInfo Class H (#58276) 2021-10-23 15:35:33 +02:00
Franck Nijhof 17b2678aee
Define media_player entity attributes as class variables (#51192) 2021-05-28 12:32:31 +02:00
Ville Skyttä 59f32f7c9c
Make device info a TypedDict (#49670) 2021-04-30 23:21:39 +02:00
jan iversen 017e32a0cb
Integrations h*: Rename HomeAssistantType to HomeAssistant. (#49590) 2021-04-23 09:49:02 +02:00
Marc Mueller c07646db5d
Update typing syntax (#49480)
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
Erik Montnemery af4d06b12e
Update integrations f-i to override extra_state_attributes() (#47757) 2021-03-11 16:57:47 +01:00
avocadio 2196bd66c7
Add TTS support to Heos (#35386)
* TTS seems unsupported on heos media player #32862 

TTS seems unsupported on heos media player #32862 

The type media_type music which is required by TTS was not covered.

* Update homeassistant/components/heos/media_player.py

Co-authored-by: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>

* Update to test_media_player.py

Test for TTS support to Heos #35386

* Update test

Add TTS support to Heos #35386

* Update to test_play_media_music

assert set to "Unable to play music: Failure (1)" seems to cause an issue.

* test_play_media_music

syntax

Co-authored-by: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>
2020-06-20 09:54:44 +02:00
Erik Montnemery 62bc02fdda
Rename MediaPlayerDevice to MediaPlayerEntity (#34592) 2020-04-25 18:00:57 +02:00
Franck Nijhof fb35d382e1
Remove all empty *_setup_platform() from integrations (#31025)
* Remove all empty *_setup_platform() from integrations

* Fix tests for smartthings

* Fix tests for heos
2020-01-21 12:38:38 +01:00
Paulus Schoutsen ed6aef2fd7
Implement capability attributes (#30545)
* Implement capability attributes

* Fix HeOS update order

* Fix test
2020-01-08 21:22:56 +01:00
Franck Nijhof f9edec19ad Use literal string interpolation in integrations H-J (f-strings) (#26380) 2019-09-03 17:27:14 +02:00
Andrew Sayre 7bfb365f62 Update pyheos to 0.6.0 (#26191) 2019-08-25 20:57:43 +02:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Andrew Sayre 0194905e97 Move imports to top (#24108) 2019-05-26 13:47:11 +02:00
Andrew Sayre bf649e373c Update IDs after firmware upgrade in HEOS (#23641)
* Initial work

* Update tests
2019-05-06 17:53:11 +02:00
Andrew Sayre b30afde8ab
Extend play_media support (#23580) 2019-05-02 19:54:36 -05:00
Andrew Sayre f3925b7ede Bump pyheos (#23616) 2019-05-01 22:39:59 -07:00
Andrew Sayre f1b2622d78 Use remote image for HEOS (#23420) 2019-04-27 13:02:42 -07:00
Andrew Sayre e3e7fb5ff6 Bump pyheos to 0.4.1 (#23360)
* Bump pyheos==0.4.1

* Refresh player after reconnection
2019-04-24 21:31:31 -07:00
Andrew Sayre 8daba68dc1 Add support to play url (#23273) 2019-04-22 12:10:55 -07:00
Andrew Sayre b697bb7a26 Update pyheos and log service errors in HEOS integration (#23222)
* Update pyheos and command error handling

* Correct comment and remove unnecessary autospec
2019-04-19 22:22:40 -04:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Andrew Sayre 4110bd0acf Add support for when device is not logged in to HEOS (#22913) 2019-04-09 18:21:00 +02:00
Andrew Sayre 9f2c5b7231
Add source selection to Heos component (#22592)
* Add select source support

* Review feedback changes

* Removed unused import

* Ignore 'umused' import used in typing

* Only include trace back on useful errors

* Remove return from play_source
2019-04-01 11:58:52 -05:00
Andrew Sayre 1bfe86b30d Change HEOS component library and add basic config flow (#22517)
* Update heos lib

* Update requirements files

* Removed unecessary mock_coro usage

* Remove assert_called_once usage

* Updates from review feedback

* Remove extra param to error format
2019-03-29 21:10:00 -07:00
Andreas Rydbrink 01052f516b Add HEOS media player component (#21721)
## Description:
Denon HEOS media player.

**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** home-assistant/home-assistant.io#8848

## Example entry for `configuration.yaml` (if applicable):
```yaml
heos:
  host: HEOS-1                              
```

## Checklist:
  - [X] The code change is tested and works locally.
  - [X] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [X] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:
  - [X] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)

If the code communicates with devices, web services, or third-party tools:
  - [X] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
  - [X] New dependencies are only imported inside functions that use them ([example][ex-import]).
  - [X] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
  - [X] New files were added to `.coveragerc`.

If the code does not interact with devices:
  - [ ] Tests have been added to verify that the new code works.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23


Co-authored-by: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>
2019-03-28 19:03:02 -07:00