Closed glsf91 closed 3 years ago
The percentage thing is new. I'll have to look at this as a bug and correct. Its basically all due to the short hand evaluations I do (tradeoff of doing something generically in a less-than-good way to avoid a massive maintenance headache managing 50+ some odd implementations). Basically it just does a find-replace for "fanSpeed", and having two settings like "fanSpeed" and "fanSpeedPercent" like this, it's gonna catch both of them in the replacement.
In addition the fan speed command validator is going to have to be changed to support percentage as a setting... I'll probably do that BEFORE the looking at replacing the validation layer with a generated one (see #101 ) just to limit moving parts, so I'll take a look at including this one in the next release.
Ok, I just released a version that should fix this for you.
Thanks. Which one did you fix, problem 1,2,3 or 4?
FYI When using this fanspeed stuff in the google validator it gives an error. I made a issue at google and they confirm the validator is outdated on this.
Should fix all 4.
I can confirm all 4 are fixed indeed.
Only when using only fanSpeedPercent instead of fanSpeed google does not sent a EXECUTE anymore when changing fanspeed percentage on my google Hub. But I think this is an issue at google. I made an issue at google for this. When using both, it is working.
Nice. If you find there is some issue with the implementation, reopen and Ill adjust.
Only when using only fanSpeedPercent instead of fanSpeed google does not sent a EXECUTE anymore when changing fanspeed percentage on my google Hub. But I think this is an issue at google. I made an issue at google for this.
I know this item is closed but issue is fixed by google.
I see a few problems with action.devices.commands.SetFanSpeed.
Problem 1 In the trait action.devices.commands.SetFanSpeed I use for commands:
Then I get an error: "Trait 'FanSpeed' is missing command param 'fanSpeed' for command 'action.devices.commands.SetFanSpeed'"
There is no error when I use:
But in the google documentation is mentioned: "The payload contains one of the following:" So suggesting that fanSpeed is not required.
Problem 2 And also in the attribute template the "availableFanSpeeds" part is required, but in the google documentation this is not the case, I think. It says: "Contains any of the following items:" (availableFanSpeeds or supportsFanSpeedPercent)
Problem 3 I also see someting is going wrong in the response on an EXECUTE for the fanspeed. Request:
Response:
The state currentFanSpeedSettingPercent should be currentFanSpeedPercent. I think because in CommandToStateKeyMapper fanSpeed is replaced by currentFanSpeedSetting. But fanSpeed should by replaced by currentFanSpeedSetting and fanSpeedPercent should be replaced by currentFanSpeedPercent.
In state I have:
Problem 4 In state I have to add the currentFanSpeedSetting part but I think this is not required by Google.