1
0
mirror of https://github.com/home-assistant/core.git synced 2025-08-11 14:29:58 +00:00
Commit Graph

22 Commits

Author SHA1 Message Date
J. Nick Koston
e0e54ab9d3 Migrate more sonos tasks to use eager_start () 2024-04-04 11:43:15 -10:00
J. Nick Koston
9a79320861 Mark executor jobs as background unless created from a tracked task ()
* Mark executor jobs as background unless created from a tracked task

If the current task is not tracked the executor job should not
be a background task to avoid delaying startup and shutdown.

Currently any executor job created in a untracked task or
background task would end up being tracked and delaying
startup/shutdown

* import exec has the same issue

* Avoid tracking import executor jobs

There is no reason to track these jobs as they are always awaited
and we do not want to support fire and forget import executor jobs

* fix xiaomi_miio

* lots of fire time changed without background await

* revert changes moved to other PR

* more

* more

* more

* m

* m

* p

* fix fire and forget tests

* scrape

* sonos

* system

* more

* capture callback before block

* coverage

* more

* more races

* more races

* more

* missed some

* more fixes

* missed some more

* fix

* remove unneeded

* one more race

* two
2024-03-30 00:16:53 -04:00
Marc Mueller
7d6251ca08 Add empty line after module docstring [tests q-s] () 2024-03-08 14:47:22 +01:00
Joost Lekkerkerker
81ce6e4797 Add entity translations to Sonos ()
* Add entity translations to Sonos

* Add entity translations to Sonos

* Add entity translations to Sonos

* Add entity translations to Sonos
2023-07-15 00:36:26 +02:00
epenet
9762b684c2 Adjust entity registry access in tests (3) () 2023-03-01 16:04:40 +01:00
epenet
3a9adacdde Add type hints to integration tests (part 20) () 2023-02-15 15:23:34 +01:00
jjlawren
1b592e6885 Use subscription callbacks to discover Sonos speakers ()
fixes undefined
2023-01-08 09:50:18 -10:00
jjlawren
ac88d0be14 Add Sonos favorites sensor () 2022-04-21 10:37:16 -07:00
jjlawren
76149876ab Enable fallback polling for Sonos microphone binary_sensor () 2022-02-21 19:46:20 +01:00
jjlawren
4d944e35fd Skip polling Sonos audio input sensor when idle () 2022-02-10 12:48:13 -08:00
jjlawren
8a8ffa1c08 Add support for Sonos microphone binary_sensor ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-01-04 18:45:40 +01:00
jjlawren
9f3a4c3617 Improve Sonos tests, begin adding coverage ()
* Update entity registry handling

* Add and use fixtures to test setup via config entry

* Remove legacy redundant tests

* Remove unnecessary mock_coro

* Remove unnecessary namespace change

* Move zeroconf payload to fixture

* Begin adding Sonos to codecov

* Mock proper return value

* Revert return value for platform
2021-12-08 19:28:27 +01:00
jjlawren
cbf2bf2e1f Add audio input format sensor to Sonos HT devices () 2021-12-03 10:06:56 -08:00
Anders Melchiorsen
e85b0ec052 Move Sonos to upstream SoCo () 2021-07-23 00:40:30 +02:00
jjlawren
578c897161 Ignore unused keys from Sonos device properties callback ()
* Ignore known but unused keys from device callback

* Fix bug, add test
2021-07-08 11:56:50 +02:00
jjlawren
7b5ed8faa8 Catch unexpected battery update payloads on Sonos () 2021-06-20 21:38:07 -07:00
jjlawren
e257dd4d07 Fix Sonos battery sensors on S1 firmware () 2021-06-08 00:29:17 +02:00
jjlawren
84f0d3f961 Centralize Sonos subscription logic ()
* Centralize Sonos subscription logic

* Clean up mocked Sonos Service instances, use subscription callback

* Use existing mocked attributes

* Use event dispatcher dict, move methods together, make update_alarms sync

* Create dispatcher dict once
2021-05-28 21:32:50 -05:00
jjlawren
1e86818f85 Add battery support for Sonos S1 speakers () 2021-05-25 18:39:31 +02:00
jjlawren
d4ed65e0f5 Add power binary_sensor support to Sonos ()
* Add power binary_sensor support to Sonos

* Prepare for future unloading of config entries

* Remove unnecessary calls to super() inits

* Add binary_sensor to tests, remove invalid test for empty battery payload

* Move sensor added_to_hass to common sensor class

* Avoid dispatching sensors if no battery

* Use proper attributes property

* Remove power source fallback

* Update homeassistant/components/sonos/speaker.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-27 04:52:05 -10:00
jjlawren
dc50524f32 Cleanup implementation of new Sonos sensors () 2021-04-26 23:59:04 +02:00
jjlawren
3be8c9c1c0 Add battery support for Sonos speakers ()
Co-authored-by: Walter Huf <hufman@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-04-25 07:20:21 -10:00