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

Switch behaviour #658

Open
AlmightyOGA opened this issue Jan 21, 2025 · 1 comment
Open

Switch behaviour #658

AlmightyOGA opened this issue Jan 21, 2025 · 1 comment

Comments

@AlmightyOGA
Copy link

Discussed in #657

Originally posted by AlmightyOGA January 22, 2025
First of all i would like to thank you for this plugin 🙏

If a property like "vacuum-extend:carpet-press" has 2 values "0 : Open and 1: Close", why should it be 2 switches in Home App one for each value? Isn't it more logical to have one Switch that value 0 will show an open switch and with pressing the switch it will change the value to 1 and show it in Home App? It might be I'm missing something here.

@merdok
Copy link
Owner

merdok commented Jan 22, 2025

The switches are auto generated based on the property type. Boolean type properties will always be single switch as we can assume they will only have two values. Value list type properties will always create a single switch for every value.
So in the case of your property the manufacturer decided to make it a value list type property even that it only has two values, hence you are seeing two switches. In theory it would be possible to extend the logic to detect that, but it would require some work...

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

No branches or pull requests

2 participants