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; }
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: