Commit Graph

11 Commits (9f14b2cef50c1ff3af922922e1b94b84b812d167)

Author SHA1 Message Date
jjlawren 31db3fcb23
Refactor Sonos alarms and favorites into system-level coordinators (#51757)
* Refactor alarms and favorites into household-level coordinators

Create SonosHouseholdCoodinator class for system-level data
Fix polling for both alarms and favorites
Adjust tests

* Fix docstring

* Review cleanup

* Move exception handling up a level, do not save a failed coordinator

* Apply suggestions from code review

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-16 10:30:05 -05:00
jjlawren c362ffd384
Clean up unused Sonos subscriptions (#51583) 2021-06-09 23:31:14 -05:00
jjlawren 2c9e6bd927
Handle Sonos connection issues better when polling (#51376) 2021-06-02 21:10:27 -07:00
jjlawren 39e62f9c90
Improve Sonos polling (#51170)
* Improve Sonos polling

Warn user if polling is being used
Provide callback IP:port to help user fix networking
Fix radio handling when polling (no event payload)
Clarify dispatch target to reflect polling action

* Lint

* Revert method removal
2021-05-28 12:07:58 +02:00
jjlawren b84cf915f3
Centralize storage and updating of Sonos favorites (#50581)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-16 11:11:35 +02:00
jjlawren d6a202bd74
Move core Sonos functionality out of entities (#50277) 2021-05-11 10:36:40 -07:00
Milan Meulemans 29d72714f3
Replace dict with DeviceInfo (#49950)
* Replace dict with DeviceInfo

* Clean up

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-02 00:37:19 +02:00
jjlawren adba82de8b
Do not pass hass.data to Sonos entities (#49881) 2021-04-30 07:01:09 +02:00
jjlawren d4ed65e0f5
Add power binary_sensor support to Sonos (#49730)
* 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 (#49716) 2021-04-26 23:59:04 +02:00
jjlawren 3be8c9c1c0
Add battery support for Sonos speakers (#49441)
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