Commit Graph

42 Commits (148a7ff50cd2fbd9b05c2e8928459b546eeb98ef)

Author SHA1 Message Date
Erik Montnemery 3f263d5cbe
Remove deprecated host & platform configuration for cast (#41402) 2020-10-07 18:01:34 +02:00
J. Nick Koston 7b016063ca
Refactor zeroconf setup to be async (#39955)
* Refactor zeroconf setup to be async

Most of the setup was calling back to async because
we were setting up listeners.  Since we only need
to jump into the executor to create the zeroconf
instance, its much faster to setup in async.

In testing this cut the setup time in half
or better.

* partial revert to after_deps
2020-09-13 18:06:19 -05:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Erik Montnemery 91ba8c0ef0
Warn when casting of tts fails (#38603)
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 (#38242)
* 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
Erik Montnemery e3dc8a1ff2
Bump pychromecast to 7.2.0 (#38351) 2020-07-29 23:46:14 +02:00
Joakim Plate bcd604eec2
Detect lingering threads after tests (#37270)
* 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 (#37256)
* 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 (#37225)
* 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 (#36414)
* Revert "Prevent race in pychromecast.start_discovery (#36350)"

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 (#36350)
* Workaround for race in pychromecast

* Fix tests
2020-06-01 23:25:06 +02:00
Franck Nijhof e56dd8ed50
Detect use of deprecated base_url (#35353)
* Detect use of deprecated base_url

* Update get_url helper

* Update core migration

* Migrate all tests
2020-05-08 17:52:32 +02:00
Franck Nijhof 2223592486
Add get_url helper, deprecate base_url (#35224) 2020-05-08 02:29:47 +02:00
Paulus Schoutsen 2af984917e
Use asynctest-mock in most places (#35109)
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Paulus Schoutsen 76f392476b
Use a future for mock coro (#34989) 2020-04-30 16:31:00 -07:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
Paulus Schoutsen 0d700f6a63
Fix tests for Python 3.8 (#34672) 2020-04-25 14:32:55 -07:00
Erik Montnemery 8e150ff1f5
Bump pychromecast (#34466)
* 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 (#34082)
* 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 (#33884) 2020-04-10 10:36:57 -07:00
Erik Montnemery a0b3a9e50b
Discover manually added casts (#33922)
* Discover manually added casts
2020-04-10 17:19:44 +02:00
Erik Montnemery 3845539577
Lookup manufacturer name for casts (#33845)
* 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,… (#33735)
* 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
Bram Kragten a6d5ed0160
Add support for dashboards to lovelace cast service (#32913) 2020-03-26 16:23:46 -07:00
Franck Nijhof c5298dc4dc Migrate cast tests from coroutine to async/await (#30374) 2020-01-01 17:21:42 -06:00
Bas Nijholt f5288db93c use isort to sort imports according to PEP8 for cast (#29624) 2019-12-08 22:00:57 +05:30
Paulus Schoutsen 0ef79da281 Use Nabu Casa url if no https url set (#26682)
* Use Nabu Casa url if no https url set

* Update test_home_assistant_cast.py
2019-09-17 09:23:31 +02:00
Paulus Schoutsen adaa200935
Home Assistant Cast (#26566)
* Add backend support for Home Assistant Cast

* Update test reqs
2019-09-11 12:34:10 -06:00
Paulus Schoutsen 7468cc21be
Refactor Cast (#26550)
* 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 #22396 (#22661)
* Fix regression from PR #22396

* Fix test
2019-04-02 19:58:28 -07:00
emontnemery 4f2435103b Cast: Fix next/previous track (#22634)
* 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 (#22566)
* 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 (#22396)
* 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 (#21565)
* 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 (#21590)
* 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
emontnemery 888345e4ff Fix discovery of audio groups (#20947)
* Fix discovery of audio groups

* Fix tests

* Re-discover

* Review comments

* Remove failing tests

* Update dependencies

* Fix test
2019-02-12 15:00:54 -08:00
Paulus Schoutsen ec57db78b5
Consolidate config flow components (#20635)
* Consolidate config flow components

* Fix tests

* Fix tests

* Put unifi back

* Fix reqs

* Update coveragerc
2019-02-01 15:45:44 -08:00
Paulus Schoutsen 8b42d0c471 Add confirmation to Cast/Sonos/iOS config entries (#16769)
* Add confirmation to Cast/Sonos/iOS config entries

* Remove redundant code
2018-09-21 16:34:37 +02:00
Jason Hu 50daef9a52 Add context to login flow (#15914)
* Add context to login flow

* source -> context

* Fix unit test

* Update comment
2018-08-13 11:27:18 +02:00
Paulus Schoutsen 3204501174
Cast/Sonos: create config entry if manually configured (#15630)
* Cast/Sonos: create config entry if manually configured

* Add test for helper
2018-07-23 15:08:03 +02:00
Paulus Schoutsen 2c6e6c2a6f
Add config entry for Sonos + Cast (#14955)
* Add config entry for Sonos

* Lint

* Use add_job

* Add Cast config entry

* Lint

* Rename DOMAIN import

* Mock pychromecast in test
2018-06-14 15:17:54 -04:00