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 brightness range to display model #788

Merged
merged 6 commits into from
Jan 14, 2025
Merged

Conversation

joostlek
Copy link
Contributor

Add brightness range to display model, because when the device is connected to a computer, it won't be able to be put on full brightness. Hence we need to know what the min and max are

@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.68%. Comparing base (53134cb) to head (99f8c76).
Report is 137 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #788      +/-   ##
==========================================
+ Coverage   93.73%   94.68%   +0.95%     
==========================================
  Files           6        6              
  Lines         383      414      +31     
  Branches       35       24      -11     
==========================================
+ Hits          359      392      +33     
+ Misses         22       17       -5     
- Partials        2        5       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@frenck frenck added the enhancement Enhancement of the code, not introducing new features. label Jan 13, 2025
src/demetriek/models.py Outdated Show resolved Hide resolved
@frenck
Copy link
Owner

frenck commented Jan 13, 2025

Should we leave in brightness range as well?

@joostlek
Copy link
Contributor Author

But I'm not sure what that would represent

@frenck
Copy link
Owner

frenck commented Jan 13, 2025

That would represent the min/max (represented as 0-100% in Home Assistant), while the limit limits what can be set at that point in time?

@joostlek
Copy link
Contributor Author

The limits are already represented by the limits. I am not sure why they return 2 ranges, but the limit seems to be smaller

@frenck
Copy link
Owner

frenck commented Jan 14, 2025

I am not following? What is your goal? To redefine the range of the slider in Home Assistant?

If that is the case, I think that would be incorrect.

Looking at the newer LaMetric model, it will still show the full audio volume range on display, but doesn't allow one to go beyond a certain point.

To mimic that behavior, you'd need both?

@joostlek
Copy link
Contributor Author

Let's have both and have this discussion in the home assistant repo

Copy link
Owner

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @joostlek 👍

../Frenck

@frenck frenck added new-feature New features or options. and removed enhancement Enhancement of the code, not introducing new features. labels Jan 14, 2025
@frenck frenck merged commit acf1a05 into frenck:main Jan 14, 2025
16 checks passed
@joostlek joostlek deleted the brightness-range branch January 14, 2025 09:47
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-feature New features or options.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants