openhab / openhab-google-assistant

openHAB Google Assistant: Actions on Google for openHAB
Eclipse Public License 2.0
176 stars 86 forks source link

Adjust Fan to use supportsFanSpeedPercent option #514

Closed michikrug closed 8 months ago

michikrug commented 9 months ago

As stated in https://developers.home.google.com/cloud-to-cloud/traits/fanspeed#device-attributes there is now a new option called supportsFanSpeedPercent that should be set to true if no speeds are defined.

This PR adds this option in case the devices is coming from a Dimmer item and does not provide a speeds config.

To actually set the speed in percent, the new command SetFanSpeed with the parameter fanSpeedPercent is added.

This is also reflected in the state reporting that now either reports the percentage or settings value.