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 additional validation for CONF_ENTRY_MAX_VOLUME value in the setup process to be greater than zero #24

Merged
merged 3 commits into from
Apr 1, 2024

Conversation

samuelspagl
Copy link
Owner

🐛 Add additional validation for CONF_ENTRY_MAX_VOLUME value in the setup process to be greater than zero

This PR closes #19 by adding an additional validation to the CONF_ENTRY_MAX_VOLUME int value.
Instead of just checking whether an int was provided, it will also check weather this int is between 1 and 100 with a default value of 100.

Changelog:

Added

  • The config flow now also checks whether the int provided for CONF_ENTRY_MAX_VOLUME is
    greater than 1 and lower than 100. This will make sure that a division by zero cannot happen.
  • Add default value 100 to CONF_ENTRY_MAX_VOLUME

Copy link

vercel bot commented Mar 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ha-samsung-soundbar ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2024 10:10am
ha-samsung-soundbar-kidd ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2024 10:10am

# Conflicts:
#	CHANGELOG.md
#	custom_components/samsung_soundbar/manifest.json
@samuelspagl samuelspagl merged commit 430f6a1 into main Apr 1, 2024
4 checks passed
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.

division by zero
1 participant