Commit graph

52 commits

Author SHA1 Message Date
Erik Montnemery
eda9291ca1
Improve google cast state reporting () 2021-12-22 14:54:36 +01:00
Erik Montnemery
a7a0cfd9e6
Make it possible to turn on audio only google cast devices () 2021-12-20 11:18:11 -08:00
Erik Montnemery
c96606df68
Don't use the homeassistant media app when casting media () 2021-12-20 14:28:02 +01:00
Erik Montnemery
f17164fa47
Don't override pychromecast MediaController's APP ID () 2021-12-15 10:40:37 +01:00
Erik Montnemery
615198a58f
Use pychromecast CastInfo type in cast integration () 2021-11-23 23:17:58 +01:00
Erik Montnemery
bfafeb7965
Don't mock all of pychromecast in tests () 2021-11-18 11:28:35 +01:00
Erik Montnemery
593bc866f0
Bump pychromecast to 10.1.0 ()
* Prepare for pychromecast 10

* Bump pychromecast to 10.0.0

* Bump pychromecast to 10.1.0

* Update homeassistant/components/cast/discovery.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-17 09:05:25 +01:00
Erik Montnemery
e88ea2d48c
Show cast as playing when an app without media support is active () 2021-11-15 20:13:43 +01:00
Erik Montnemery
a29264518c
Don't allow turning on audio only chromecasts ()
* Don't allow turning on audio only chromecasts

* Improve tests

* Adjust tests
2021-11-11 12:33:15 +01:00
Erik Montnemery
731bec3145
Improve test coverage () 2021-11-11 10:25:23 +01:00
Erik Montnemery
a14131a679
Suppress media status when the lovelace cast app is active ()
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2021-11-10 22:33:07 -08:00
blawford
0709aa7c8c
Pass metadata when casting an app ()
* Pass through metadata when casting an app

* Remove passing kwargs to quick_play

Add metadata to the app_data dict.

* Include pass-through of metadata

* Bump pychromecast to 9.2.0

* Add changes to test to verify metadata

* Fix order of imports
2021-06-14 08:48:32 +02:00
jan iversen
6a4f414236
Change HomeAssistantType to HomeAssistant () 2021-04-21 15:53:06 -10:00
Erik Montnemery
3188f796f9
Add allowed UUIDs and ignore CEC to Google Cast options flow () 2021-03-25 14:06:01 +01:00
Marc Mueller
54d1e9985f
Update typing 15 () 2021-03-18 15:13:22 +01:00
Erik Montnemery
87e7cebd36
Update tests c-h to use registry async_get () 2021-03-09 14:31:17 +01:00
Erik Montnemery
96cc17b462
Add support for a list of known hosts to Google Cast () 2021-03-01 15:18:18 -08:00
Erik Montnemery
dfbb653107
Bump pychromecast to 9.0.0 ()
* Adapt to Pychromecast 9.0.0

* Bump pychromecast to 9.0.0

* Fix lint issues
2021-02-26 13:43:53 +01:00
Erik Montnemery
c66d9ea25c
Hide volume control for cast devices with fixed volume () 2021-02-10 08:39:10 -05:00
Erik Montnemery
02bfc68842
Support dynamic Google Cast groups ()
* Re-add support for dynamic groups

* Add tests

* Add support for manufacturer

* Refactor support for dynamic groups

* Bump pychromecast to 7.7.0

* Bump pychromecast to 7.7.1

* Tweak tests

* Apply review suggestion
2021-01-06 09:23:18 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest () 2021-01-01 22:31:56 +01:00
Erik Montnemery
31b806ced1
Revert "Change http to auto for cast media image url" () 2020-12-17 17:43:52 +01:00
Erik Montnemery
b626df1316
Improve cast integration tests ()
* Improve cast tests

* Address review comments

* Further cleanup of tests
2020-10-23 16:16:55 +02:00
Erik Montnemery
3f263d5cbe
Remove deprecated host & platform configuration for cast () 2020-10-07 18:01:34 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 () 2020-08-27 13:56:20 +02:00
Erik Montnemery
91ba8c0ef0
Warn when casting of tts fails ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-08-21 17:17:36 +02:00
Kendell R
0cdd47b014
Change http to auto for cast media image url ()
* Change http to auto

* Update media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Format
2020-08-06 17:21:45 +02:00
Joakim Plate
bcd604eec2
Detect lingering threads after tests ()
* Detect lingering threads after tests

* Make sure cast is setup before checking state

* Make sure we ask executors of old hass to shutdown

We are not waiting here, just hoping for the best

* Make sure all instances of hass and executors is stopped.

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Also apply hass stopping to scripts

* Adjust to changes how we set up executor

* Add new CoreState.stopped

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-07-09 16:15:14 +02:00
Erik Montnemery
550f9ba9b0
Modify cast tests to setup via cast integration ()
* Improve tests

* Improve tests

* Don't start zeroconf from tests
2020-07-08 12:11:34 -07:00
Erik Montnemery
86c27b50f1
Bump pychromecast to 7.0.1 ()
* Bump pychromecast to 7.0.1

* Fix tests

* Mark configuration via platform for removal in 0.116

* Fix uuid check
2020-06-30 16:35:10 +02:00
Erik Montnemery
f170c80bea
Bump pychromecast to 6.0.0 ()
* Revert "Prevent race in pychromecast.start_discovery ()"

This reverts commit 391983a0cf.

* Adapt to pychromecast 6.0.0
2020-06-04 20:32:00 +02:00
Erik Montnemery
391983a0cf
Prevent race in pychromecast.start_discovery ()
* Workaround for race in pychromecast

* Fix tests
2020-06-01 23:25:06 +02:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 () 2020-04-30 13:29:50 -07:00
Paulus Schoutsen
0d700f6a63
Fix tests for Python 3.8 () 2020-04-25 14:32:55 -07:00
Erik Montnemery
8e150ff1f5
Bump pychromecast ()
* Bump pychromecast

* Fix tests
2020-04-21 07:57:39 +02:00
Erik Montnemery
ec2c7ea932
Don't do http requests to determine Cast device details ()
* Don't do http requests to determine cast device details

* Fix tests

* Update homeassistant/components/cast/media_player.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-04-12 15:02:28 -07:00
Erik Montnemery
6d3046cb42
Remove support for cast dynamic speaker groups () 2020-04-10 10:36:57 -07:00
Erik Montnemery
a0b3a9e50b
Discover manually added casts ()
* Discover manually added casts
2020-04-10 17:19:44 +02:00
Erik Montnemery
3845539577
Lookup manufacturer name for casts ()
* Lookup manufacturer name, remove use of get_multizone_status

* Bump pychromecast

* Bump pychromecast

* Fix test
2020-04-09 10:58:19 +02:00
Ziv
bee742994e
Fix uncaught exceptions for discovery, unify_direct, spotify,… ()
* used coroutinemock to avoid exception

* added spec to mock to remove exception

* added the current_user return value so it doesnt throw exception

* fix the mocks so properties do not need .return_value

* fixed missing mock values that were causing exceptions

* moved patch to asynctest so no need to define m_init

* fixed black error
2020-04-07 09:34:13 -07:00
Franck Nijhof
c5298dc4dc Migrate cast tests from coroutine to async/await () 2020-01-01 17:21:42 -06:00
Bas Nijholt
f5288db93c use isort to sort imports according to PEP8 for cast () 2019-12-08 22:00:57 +05:30
Paulus Schoutsen
7468cc21be
Refactor Cast ()
* Refactor Cast

* Fix tests & address comments

* Update reqs
2019-09-10 13:05:46 -07:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
emontnemery
e736521e9f Fix regression from PR ()
* Fix regression from PR 

* Fix test
2019-04-02 19:58:28 -07:00
emontnemery
4f2435103b Cast: Fix next/previous track ()
* Fix next/previous track

* Bump pychromecast

* Update test, fixup
2019-04-02 19:58:02 -07:00
emontnemery
54777a81bc Forward media control to playing group ()
* Forward media control to playing group

* Fix forwarding control to dynamic group

* Fix, add tests
2019-03-30 20:07:01 -07:00
emontnemery
2e375aa802 Improve handling of audio groups ()
* Improve handling of audio groups

* Review comments

* Fix tests

* Add tests

* Review comment

* Bump pychromecast
2019-03-30 10:19:18 -07:00
emontnemery
fc85b3fc5f Don't hang forever if manually added cast is down ()
* Don't hang forever if manually added cast is down

* Adapt to pychromecast

* Do not set available until connected

* Update __init__.py

* Update requirements

* Lint, tests

* Fix tests
2019-03-10 19:57:30 -07:00
emontnemery
fc81826763 Introduce Entity.async_write_ha_state() to not miss state transition ()
* Copy state in schedule_update_ha_state

* Lint

* Fix broken test

* Review comment, improve docstring

* Preserve order of state updates

* Rewrite

* Break up async_update_ha_state

* Update binary_sensor.py

* Review comments

* Update docstring

* hass -> ha

* Update entity.py

* Update entity.py
2019-03-09 09:52:22 -08:00