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

[FR] Quick Fix on HassSetVolume: Use expansion rule instead of hardcoded de #2083

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

jlpouffier
Copy link
Contributor

Problem

This sentence does not work:

  • Règle le volume des enceintes sur 50%

But this one does:

  • Règle le volume de les enceintes sur 50%

CleanShot 2024-03-14 at 14 31 38

Solution

Just like we do for brightness, colors, and cover position, I am now using the expansion rule <de> instead of a hardcoded de here:

- "<regle> le volume [<de>] [<le>]{name} [à|sur] {volume:volume_level}<pourcent>"

This allows users to say more natural sentences for media players that are plural:

  • Règle le volume des enceintes sur 50%

NOTE: I added tests with a plural example to make sure we think about these in the future.

@jlpouffier jlpouffier merged commit fe7e207 into main Mar 21, 2024
2 checks passed
@jlpouffier jlpouffier deleted the fr-new-expansion-rules branch March 21, 2024 19:46
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.

2 participants