-
openHAB version: 2.5
-
Issue of the topic: I am trying to set up a mqtt-controlled cooker fan to be responsive to Alexa, but am getting a “Fan doesn’t support that” to my requests to turn fan on/off.
Details of setup follow. Also welcome any suggestions to simplify/improve what I have so far.
[edited to include code fences] -
Items configuration related to the issue
Group Fan "Fan" {alexa="Endpoint.Other"}
Number CookerFan_Control "CookerFan Ctrl [%d]" <cooker> (Fan) {alexa="RangeController.rangeValue" [supportedRange="1:3:1", presets="1=@ Value.Minimum:@Value.Low:Lowest,3=@Value.Maximum:@Value.High:Highest",friendlyNames="@Setting.FanSpeed,Speed"], mqtt="<[mymosquitto:home/cookfan/fanstate:state:default], >[mymosquitto:home/cookfan/control:command:0:f0], >[mymosquitto:home/cookfan/control:command:1:f1], >[mymosquitto:home/cookfan/control:command:2:f2], >[mymosquitto:home/cookfan/control:command:3:f3]"}
Switch CookerFan_Power "Cookerfan Power" <cooker> (Fan) {alexa="ToggleController.toggleState" [friendlyNames="@Setting.Fan,Power"], mqtt=">[mymosquitto:home/cookfan/control:command:ON:f1],>[mymosquitto:home/cookfan/control:command:OFF:f0], <[mymosquitto:home/cookfan/fanstate:state:MAP(fanonoff.map)]"}
Switch CookerFan_lights "Cookerfan Light" <light> {alexa="Switchable", mqtt=">[mymosquitto:home/cookfan/control:command:ON:l1],>[mymosquitto:home/cookfan/control:command:OFF:l0], <[mymosquitto:home/cookfan/lights:state:MAP(onoff.map)]"}
- Sitemap configuration related to the issue
Text label="Cooker Fan" icon="kitchen" {
Setpoint item=CookerFan_Control minValue=0 maxValue=3 step=1
Switch item=CookerFan_Power label="Fan"
Switch item=CookerFan_lights label="Lights" //mappings=[0=OFF, 1=ON]
}
Desired response:
Alexa phrase | Desired Action | Command |
---|---|---|
Alexa, turn on the fan | Turn the fan on to lowest speed | Mqtt: home/cookfan/control, f1 |
Alexa, increase / decrease the fan speed | Increase / decrease fan speed | Mqtt: home/cookfan/control, f1/f2/f3 |
Alexa, turn off the fan | Turn the fan off | Mqtt: home/cookfan/control, f0 |
Alexa, turn on the fan light | Turn on the fan light | Mqtt: home/cookfan/control, l1 |
Alea turn off the fan light | Turn off the fan light | Mqtt: home/cookfan/control, l0 |