Commit graph

18 commits

Author SHA1 Message Date
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const ()
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Robert Hillis
73ba7a989b
Make Sonos typing more complete () 2022-09-05 13:12:37 -05:00
Franck Nijhof
5f728b955e
Migrate Sonos to new entity naming style () 2022-07-10 13:19:13 -07:00
jjlawren
76149876ab
Enable fallback polling for Sonos microphone binary_sensor () 2022-02-21 19:46:20 +01:00
jjlawren
a7fd477c64
Refactor Sonos polling ()
* Refactor Sonos polling

Explicitly rename fallback polling
Catch soco exceptions centrally where possible
Create SonosPollingEntity subclass
Remove unnecessary soco_error fixture argument
Remove unnecessary polling in update_volume()
Adjust log levels and wording
Set explicit timeout on library

* Adjust logging to use raised exceptions

* Simplify availabiliity checks when using built-in poller

* Fix typing for return values
2022-02-08 12:17:05 -06: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
epenet
e01b0a3625
Add setup type hints to sonos, unifi and wake_on_lan ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-27 23:42:24 +01:00
jjlawren
4475e88707
Fix Sonos updating when entities are disabled ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-12-21 20:36:12 -08:00
epenet
c59ae54dc8
Use new enums in sonos () 2021-12-17 13:35:21 -06:00
jjlawren
171b57bf32
Use _attrs where possible in Sonos () 2021-12-03 10:57:19 -08:00
jjlawren
5a20d9fce3
Set Sonos alarm and battery entity categories () 2021-10-24 12:52:15 -10:00
jjlawren
084fd2d19f
Expose Sonos features as switch entities ()
Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
2021-10-23 23:11:27 +02:00
Robert Hillis
488a636aec
Clean up unused loggers () 2021-10-14 10:03:38 -07:00
jjlawren
39e62f9c90
Improve Sonos polling ()
* 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
1e86818f85
Add battery support for Sonos S1 speakers () 2021-05-25 18:39:31 +02:00
jjlawren
d6a202bd74
Move core Sonos functionality out of entities () 2021-05-11 10:36:40 -07:00
jjlawren
adba82de8b
Do not pass hass.data to Sonos entities () 2021-04-30 07:01:09 +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