Commit graph

31 commits

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

* Fix more imports
2023-02-09 20:15:37 +01:00
Franck Nijhof
f39f3b612a
String formatting and max line length - Part 5 (#84501)
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2022-12-23 16:43:17 +01:00
jjlawren
f887aeedfe
Fix Sonos alarm 'scheduled_today' attribute logic (#82816)
fixes undefined
2022-11-28 15:31:32 +01:00
Robert Hillis
73ba7a989b
Make Sonos typing more complete (#68072) 2022-09-05 13:12:37 -05:00
krazos
567f181a21
Fix capitalization of Sonos "Status light" entity name (#76035)
Tweak capitalization of "Status light" entity name

Tweak capitalization of "Status light" entity name for consistency with blog post guidance, which states that entity names should start with a capital letter, with the rest of the words lower case
2022-08-01 18:45:18 +02:00
Franck Nijhof
5f728b955e
Migrate Sonos to new entity naming style (#74909) 2022-07-10 13:19:13 -07:00
jjlawren
07a46dee39
Additional surround controls for Sonos (#73805) 2022-06-22 09:08:31 +02:00
jjlawren
30e71dd96f
Add support for Sonos loudness switch (#72572) 2022-05-30 16:09:14 +02:00
jjlawren
5bcc83f6f2
Remove "sonos" prefix for Sonos switch entity_ids (#70698) 2022-04-25 16:01:54 -10:00
Marc Mueller
1053314a30
Fix error decorator [sonos] (#66399) 2022-02-12 13:51:53 -08:00
jjlawren
a7fd477c64
Refactor Sonos polling (#65722)
* 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
740a8c33ee
Add audio_delay number entity to Sonos (#63566) 2022-01-10 16:04:40 +01:00
jjlawren
2172679f41
Make Sonos alarm unique_id unique with multiple households (#62645) 2021-12-31 11:10:10 +01:00
jjlawren
a8fe9f2eff
Add missing migration for Sonos speech enhancement switch entities (#63010) 2021-12-29 17:31:04 +01:00
epenet
e01b0a3625
Add setup type hints to sonos, unifi and wake_on_lan (#62876)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-27 23:42:24 +01:00
jjlawren
00307e1ade
Bump soco to 0.25.2 (#62691) 2021-12-23 11:07:29 -08:00
epenet
c59ae54dc8
Use new enums in sonos (#62202) 2021-12-17 13:35:21 -06:00
jjlawren
171b57bf32
Use _attrs where possible in Sonos (#60931) 2021-12-03 10:57:19 -08:00
jjlawren
b883014ed4
Add Sonos subwoofer and surround on/off controls (#60918) 2021-12-03 16:05:40 +01:00
jjlawren
aa5cf175f4
Set Sonos availability based on activity and discovery (#59994) 2021-11-21 18:48:57 -06:00
jjlawren
6e7fe13d51
Disable polling Sonos switches by default (#58705) 2021-10-29 14:43:59 -05:00
jjlawren
5a20d9fce3
Set Sonos alarm and battery entity categories (#58340) 2021-10-24 12:52:15 -10:00
jjlawren
084fd2d19f
Expose Sonos features as switch entities (#54502)
Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
2021-10-23 23:11:27 +02:00
jjlawren
0d6aa89fd4
Refactor Sonos alarms and favorites updating (#55529) 2021-09-28 09:49:32 +02:00
Anders Melchiorsen
e85b0ec052
Move Sonos to upstream SoCo (#53351) 2021-07-23 00:40:30 +02:00
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
bd34059c11
Fix use of async in Sonos switch (#51210)
* Fix use of async in Sonos switch

* Simplify

* Convert to callback
2021-05-28 23:28:07 -05:00
jjlawren
4b2831ddde
Improve Sonos alarm logging (#51212) 2021-05-29 00:45:43 +02: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
Aaron David Schneider
f7f8672eea
Add tests for sonos switch platform (#51142)
* add tests

* refactor async_added_to_hass

* fix tests and race condition

* use async_get

* typo
2021-05-27 19:56:59 +02:00
Aaron David Schneider
9bf6ea60db
Add Sonos alarm to sonos component (#50719)
* add sonos_alarm

* bug fix for _update_device

* fix pylint and black and co

* small bug fix in speaker.available_alarms

* cleanup and add _LOGGER.debug statements, fix pylint

* fix pylint

* _alarm_id to alarm_id

* fixed rare bug due to raceconditions

* Part 2 of raceconditionfix

* address review suggestions

* readd check for not yet subscribed

* - platforms_ready fix
- add alarmClock to pytest mock

* fixture for ListAlarms

* cleanup mock and match UUID for test

* add simple tests for sonos_alarm

* extend test for attributes

* typhint fix

* typo

* use get_alarms() directly

* refactor available_alarms

* fix attributes

* some cleanup

* change logic of fetch_alarms_for_speaker and rename to update_alarms_for_speaker

* update_alarms_for_speaker is now a method

* Update homeassistant/components/sonos/switch.py

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>

* Update homeassistant/components/sonos/speaker.py

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2021-05-25 11:32:25 -05:00