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

Trait FanSpeed, setter not working #762

Open
daniel-finger opened this issue May 24, 2024 · 0 comments
Open

Trait FanSpeed, setter not working #762

daniel-finger opened this issue May 24, 2024 · 0 comments

Comments

@daniel-finger
Copy link

When I define a FanSpeed Trait in Google Home, I can read the state, but I cannot set it
Expected behavior
Setting the FanSpeed works

Screenshots & Logfiles
I added a Fanspeed with the following Attribute:
{"availableFanSpeeds":{"ordered":true,"speeds":[{"speed_name":"Stufe_1","speed_values":[{"lang":"de","speed_synonym":["Niedrig","Langsam","Stufe eins"]}]},{"speed_name":"Stufe_2","speed_values":[{"lang":"de","speed_synonym":["Mittel","Stufe zwei"]}]},{"speed_name":"Stufe_3","speed_values":[{"lang":"de","speed_synonym":["Hoch","Stufe drei"]}]},{"speed_name":"Stufe_4","speed_values":[{"lang":"de","speed_synonym":["Maximum","Stufe vier"]}]}]},"reversible":false}

To get 4 Speed values. The original is percentage so I added conversions:
To GH if(value < 35) { return "Stufe_1"; } else if (value < 74) { return "Stufe_2"; } else if (value < 100) { return "Stufe_3"; } else { return "Stufe_4";}
To ioB: if(value == "Stufe_1") { return 1; } else if (value == "Stufe_2") { return 35; } else if (value == "Stufe_3") { return 74; } else { return 100; }

Versions:

  • Adapter version: I used my own daniel-finger@9c274b2 containing some fixes and your current master aaa54a5
  • JS-Controller version: 5.0.19
  • Node version: v18.17.1
  • Operating system: raspbian
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

1 participant