Commit Graph

37 Commits (fe5cd5c55c89f5a4b1d56a7b4a59743907b10983)

Author SHA1 Message Date
peteS-UK bd306abace
Add album artist media browser category to Squeezebox (#139210) 2025-02-25 17:55:53 -06:00
peteS-UK 2451e5578a
Add support for Apps and Radios to Squeezebox Media Browser (#135009) 2025-02-24 13:39:04 -06:00
peteS-UK d1f0e0a70f
Add support for announce to Squeezebox media player (#129460)
* initial

* Add support for announce: true to media player

* Move play_announcement to _player

* update snapshot

* conftest update

* remove conftest update

* Update conftest.py

* Test Updates

* Updates post moving functions to library

* test fixes

* Review updates

* Snapshot update

* rebase updates

* Merge updates

* Review updates

* Review updates
2025-02-18 11:22:19 -06:00
peteS-UK bdeb24cb61
Add OptionsFlow to Squeezebox to allow setting Browse Limit and Volume Step (#129578)
* Initial

* prettier strings

* Updates

* remove error strings

* prettier again

* Update strings.json

vscode prettier fails check

* update test to remove invalid value

* Remove config_entry __init__

* remove param

* Review updates

* ruff fixes

* Review changes

* Shorten options flow ui string

* Review changes

* Remove errant mock attib

---------

Co-authored-by: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>
2025-02-16 15:02:29 -06:00
Erik Montnemery 4b34d1bbb5
Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f3.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

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

* Improve docstrings and strings.json

---------

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

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-10 16:40:07 +01:00
epenet 64500e837f
Use new ServiceInfo location in component tests (part 1) (#136057) 2025-01-20 13:09:34 +01:00
peteS-UK 139b747a70
Expand Squeezebox auth test for config_flow to finish on create_entry (#133612)
Expand auth test to create_entry
2025-01-09 23:47:53 +01:00
peteS-UK d4f38099ae
Small fix to allow playing of expandable favorites on Squeezebox (#134572) 2025-01-03 20:28:05 +01:00
peteS-UK 920de90603
Increase Squeezebox config_flow test coverage to 100% (#133484)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-12-18 18:22:22 +01:00
Raj Laud 07c070e253
Refactor squeezebox integration media_player to use coordinator (#127695) 2024-10-29 14:21:28 +01:00
peteS-UK 0c6a640e50
Add New Music Category for Media Browser (#128147) 2024-10-20 16:00:55 +02:00
Phill (pssc) 0fcbfa996f
Add squeezebox API failure test (#128066)
* add api failure test

* Update tests/components/squeezebox/test_init.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-10-10 17:38:14 +02:00
peteS-UK 8a2dccddc5
Add Model and Manufacturer details for Squeezebox devices (#126435)
* Add models and manufacturer

* Updates re: comments

* Updates for test

* Dedupe model

* Update homeassistant/components/squeezebox/media_player.py

* Change Squeezelite to SqueezeLite

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-23 16:59:22 +02:00
Raj Laud a01036760e
Add tests to the media_player platform of the Squeezebox integration (#125378)
* Squeezebox media_player platform tests

* Fix play-pause test

* Squeezebox remove stray reference to deprecated property

* More tests for squeezebox

* Update tests to fix merge conflict with binary_sensor

* Refactor tests to use autospec

* Use freeze and snapshot

* Update media player entity before adding

* Consolidate test fixtures for different platforms

* Merge in sensor platform

* Use deepcopy

* Update tests with suggestions from code review
2024-09-13 15:20:31 +02:00
Phill (pssc) a16ef5b7ff
Add squeezebox service sensors (#125349)
* Add server sensors

* Fix Platforms order

* Fix spelling

* Fix translations

* Add sensor test

* Case changes

* refactor to use native_value attr override

* Fix typing

* Fix cast to type

* add cast

* use update platform for LMS versions

* Fix translation

* remove update entity

* remove possible update entites

* Fix and clarify

* update to icon trans remove update plaform entitiy supporting items

* add UOM to sensors

* correct criptic prettier fail

* reword other players

* Apply suggestions from code review

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-10 17:17:26 +02:00
Phill (pssc) 38f3fa0210
Add Squeezebox server service binary sensors (#122473)
* squeezebox add binary sensor + coordinator

* squeezebox add connected via for media_player

* squeezebox add Player type for player

* Add more type info

* Fix linter errors

* squeezebox use our own status entity

* squeezebox rework device handling based on freedback

* Fix device creation

* squeezebox rework coordinator error handling

* Fix lint type error

* Correct spelling

* Correct spelling

* remove large comments

* insert small comment

* add translation support

* Simply sensor

* clean update function, minimise comments to the useful bits

* Fix after testing

* Update homeassistant/components/squeezebox/entity.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* move data prep out of Device assign for clarity

* stop being a generic api

* Humans need to read the sensors...

* ruff format

* Humans need to read the sensors...

* Revert "ruff format"

This reverts commit 8fcb8143e7.

* ruff format

* Humans need to read the sensors...

* errors after testing

* infered

* drop context

* cutdown coordinator for the binary sensors

* add tests for binary sensors

* Fix import

* add some basic media_player tests

* Fix spelling and file headers

* Fix spelling

* remove uuid and use service device cat

* use diag device

* assert execpted value

* ruff format

* Update homeassistant/components/squeezebox/__init__.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Simplify T/F

* Fix file header

* remove redudant check

* remove player tests from this commit

* Fix formatting

* remove unused

* Fix function Type

* Fix Any to bool

* Fix browser tests

* Patch our squeebox componemt not the server in the lib

* ruff

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-05 16:49:07 +02:00
Raj Laud 78517f75e8
Add favorites support to Media Browser for Squeezebox integration (#124732)
* Add Favorites support to Media Browser

* CI fixes

* More CI Fixes

* Another CI

* Change icons for other library items to use standard LMS icons

* Change max favorites to BROWSE_LIMIT

* Simplify library_payload to consolidate favorite and non-favorite items

* Simplify library_payload to consolidate favorite and non-favorite items

* Add support for favorite hierarchy

* small fix for icon naming with local albums

* Add ability to expand an album from a favorite list

* Reformat to fix linting error

* and ruff format

* Use library calls from pysqueezebox

* Folder and playback support

* Bump to pysqueezebox 0.8.0

* Bump pysqueezebox version to 0.8.1

* Add unit tests

* Improve unit tests

* Refactor tests to use websockets and services.async_call

* Apply suggestions from code review

---------

Co-authored-by: peteS-UK <64092177+peteS-UK@users.noreply.github.com>
2024-09-03 16:50:55 +02:00
Joost Lekkerkerker ee66f6ec8c
Use is in enum comparison in config flow tests P-T (#114675) 2024-04-02 11:21:50 -10:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller 7d6251ca08
Add empty line after module docstring [tests q-s] (#112711) 2024-03-08 14:47:22 +01:00
J. Nick Koston 35bcf2e9e4
Fix formatting of mac addresses from dhcp discovery mocking in squeezebox (#110604)
dhcp returns addresses in lowercase without :
2024-02-14 17:22:51 -05:00
Jan-Philipp Benecke 5da31a3f1d
Avoid calling internals when adding mock config entry in Squeezebox (#110601) 2024-02-14 22:59:49 +01:00
Raj Laud 45f7ffb34c
Add support for accessing Squeezebox over over https (#95088)
* Supports access to squeezebox server behind https reverse proxy

* Update squeezebox test

* Update homeassistant/components/squeezebox/config_flow.py

Co-authored-by: Robert Resch <robert@resch.dev>

* Update homeassistant/components/squeezebox/config_flow.py

Co-authored-by: Robert Resch <robert@resch.dev>

* Update squeezebox unit tests based on code review

* Migration unit test

* Run black on suggestions accepted in code review

* Apply suggestions from code review

Instead of upgrading squeezebox config, just assume a default of https=False.

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update test_init.py

Remove migrate entry test since we are no longer migrating

* Delete tests/components/squeezebox/test_init.py

Remove unused test

---------

Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-12-08 15:51:19 +01:00
epenet ba85fdcd61
Add type hints to integration tests (q-s) (#87706) 2023-02-08 08:12:54 -08:00
Franck Nijhof 5e81d28116
Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01:00
Franck Nijhof a6244eea28
Search/replace RESULT_TYPE_* by FlowResultType enum (#74656) 2022-07-07 21:28:18 +02:00
Robert Hillis ee878513a7
Remove deprecated yaml config from squeezebox (#62537) 2021-12-22 12:03:31 +01:00
Michael 16eb85bfc8
Fix slow config_flow test in squeezebox (#60373) 2021-11-25 23:26:28 +01:00
epenet 382efef2e2
Use DhcpServiceInfo in squeezebox (#60100) 2021-11-21 16:33:44 -06:00
Ville Skyttä 50e0c58310
Use http.HTTPStatus in components/s* (#58291) 2021-10-23 20:49:04 +02:00
Raj Laud 2db278a7a7
Fix Squeezebox dhcp discovery (#54137)
* Fix Squeezebox dhcp discovery and allow ignore

* Test ignoring known Squeezebox players

* Fix linter errors
2021-08-06 09:29:52 -07:00
Raj Laud b3607343fc
Fix error in Squeezebox DHCP discovery flow (#50771)
* Map data from dhcp to squeezebox discovery flow

* Add tests for squeezebox dhcp discovery
2021-05-26 10:30:15 +02:00
Franck Nijhof 6ec3234ccc
Clean up superfluous integration setup - part 2 (#48478) 2021-03-29 13:23:07 -10:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Paulus Schoutsen 0c771f1c42
Replace asynctest with tests.async_mock (#37428) 2020-07-03 11:29:35 -07:00
rajlaud 3f427602ba
Squeezebox config flow (#35669)
* Squeezebox add config flow and player discovery

* Fixes to config flow

* Unavailable player detection and recovery

* Improved error message for auth failure

* Testing for squeezebox config flow

* Import configuration.yaml

* Support for discovery integration

* Internal server discovery

* Fix bug restoring previously detected squeezebox player

* Tests for user and edit steps in config flow

* Tests for import config flow

* Additional config flow tests and fixes

* Linter fixes

* Check that players are found before iterating them

* Remove noisy logger message

* Update requirements_all after rebase

* Use asyncio.Event in discovery task

* Use common keys in strings.json

* Bump pysqueezebox to v0.2.2 for fixed server discovery using python3.7

* Bump pysqueezebox version to v0.2.3

* Don't trap AbortFlow exception

Co-authored-by: J. Nick Koston <nick@koston.org>

* Refactor validate_input

* Update squeezebox tests

* Build data flow schema using function

* Fix linter error

* Updated en.json

* Update homeassistant/components/squeezebox/media_player.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/squeezebox/media_player.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/squeezebox/media_player.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/squeezebox/media_player.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update .coveragerc for squeezebox config flow test

* Mock TIMEOUT for faster testing

* More schema de-duplication and testing improvements

* Apply suggestions from code review

Co-authored-by: J. Nick Koston <nick@koston.org>

* Testing and config flow improvements

* Remove unused exceptions

* Remove deprecated logger message

* Update homeassistant/components/squeezebox/media_player.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Implement suggestions from code review

* Add async_unload_entry

* Use MockConfigEntry in squeezebox tests

* Remove unnecessary config schema

* Stop server discovery task when last config entry unloaded

* Improvements to async_unload_entry

* Fix bug in _discovery arguments

* Do not await server discovery in async_setup_entry

* Do not await start server discovery in async_setup

* Do not start server discovery from async_setup_entry until homeassistant running

* Re-detect players when server removed and re-added without restart

* Use entry.entry_id instead of unique_id

* Update unittests to avoid patching homeassistant code

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-06-22 09:29:01 -05:00