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

number | remove obsolete numDecimalPlaces #71

Merged
merged 6 commits into from
Apr 18, 2024

Conversation

RFDarter
Copy link
Contributor

@RFDarter RFDarter commented Apr 13, 2024

Since we made sure the web_server sends the the values with the right 'accuracy' we no longer need to parse the decimal places with the help of the step

Copy link

netlify bot commented Apr 13, 2024

Deploy Preview for esphome-webserver ready!

Name Link
🔨 Latest commit f3f355c
🔍 Latest deploy log https://app.netlify.com/sites/esphome-webserver/deploys/6619cd8f3b44e60008cca42a
😎 Deploy Preview https://deploy-preview-71--esphome-webserver.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@RFDarter RFDarter changed the title remove obsolete numDecimalPlaces numer | remove obsolete numDecimalPlaces Apr 13, 2024
@RFDarter RFDarter changed the title numer | remove obsolete numDecimalPlaces number | remove obsolete numDecimalPlaces Apr 13, 2024
@jesserockz jesserockz changed the base branch from main to dev April 18, 2024 02:33
max="${max || Math.max(10, val)}"
.value="${(val.toFixed(numDecimalPlaces))}"
min="${min || Math.min(0, value as number)}"
max="${max || Math.max(10, value as number)}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Not terribly important, but by keeping const val = Number(value); (or const val = parseFloat(value);), the type casting as number can be removed.

Copy link
Contributor

@kevireilly kevireilly left a comment

Choose a reason for hiding this comment

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

@jesserockz jesserockz merged commit beec790 into esphome:dev Apr 18, 2024
4 checks passed
@RFDarter RFDarter deleted the number-slider-current-value branch April 21, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants