Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'trueplay' property to SoCo #775

Merged
merged 4 commits into from Dec 27, 2020
Merged

Add 'trueplay' property to SoCo #775

merged 4 commits into from Dec 27, 2020

Conversation

pwt
Copy link
Contributor

@pwt pwt commented Dec 9, 2020

This PR adds a gettable/settable property trueplay, with accompanying tests. The property allows the Trueplay state of a speaker (True or False) to be determined, and to be changed.

Devices that do not support Trueplay, or which do not have a current Trueplay calibration, will return None on getting the property, and raise a NotSupportedException when setting the property. Can only be set on visible devices. Attempting to set on non-visible devices will raise a SoCoNotVisibleException.

Tested on S1 and S2 devices, devices that don't support Trueplay, and devices that do support Trueplay, with and without a current calibration profile.

@pwt pwt added the Enhancement label Dec 9, 2020
@pwt pwt added this to the 0.21 milestone Dec 9, 2020
@pwt pwt self-assigned this Dec 9, 2020
@pwt pwt marked this pull request as draft December 9, 2020 11:36
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 57.431% when pulling 5d2dfdd on pwt:add_trueplay_property into cf5cd34 on SoCo:master.

@coveralls
Copy link

coveralls commented Dec 9, 2020

Coverage Status

Coverage increased (+0.1%) to 57.431% when pulling 75b479e on pwt:add_trueplay_property into cf5cd34 on SoCo:master.

@pwt pwt marked this pull request as ready for review December 12, 2020 20:17
@rytilahti
Copy link
Contributor

rytilahti commented Dec 26, 2020

Works fine on a trueplay tuned beam, changing the value reflects immediately to the settings in the mobile app. The NotSupportedException gets raised correctly on a non-tuned Symfonisk speaker.

soco/core.py Outdated Show resolved Hide resolved
@pwt
Copy link
Contributor Author

pwt commented Dec 27, 2020

Passes all check jobs locally, and has been independently tested, so I'm going to merge this.

@pwt pwt merged commit 35b23b8 into SoCo:master Dec 27, 2020
@pwt pwt deleted the add_trueplay_property branch December 27, 2020 12:48
@pwt pwt mentioned this pull request Dec 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants