Alternatives to switches for sending commands to a Infrared Broadlink device using Alexa

Hi All,

Alexa works just fine using a rule/dummy switch item with tag “Switchable” to voice control the air conditioner.

However, taking it further to send voice temperature commands seems a bit tricky, especially if you have 5 preset temps you’d like or multiple fan speed adjustments.

It works by creating a dummy item for every single temperature and then creating this rule. In the Alexa App, I create a routine to Switch this item on/off. And that changes the temperature. The voice trigger command

"Alexa, change the temp to eighteen"

gets the job done, although not overly elegant :slight_smile:

Is there a better, more streamlined way? I have Fan speed and Temp controls.

Rule:


// Aircon to 18 degrees via Alexa Dummy Item
rule "Aircon Alexa to 18 degrees"
        when
                Item Aircon_18 received command
        then
            switch (receivedCommand)
                {
                        case ON:           Aircon.sendCommand("Temp18")
                }
end


ITEMS:


String Heater "Heater [MAP(en.map):%s]" { channel="broadlink:rm3:78-0f-77-18-43-03:command" }
String Aircon "Aircon [MAP(en.map):%s]" { channel="broadlink:rm3:78-0f-77-5a-cb-fa:command" }
String TV     "TV"                      { channel="broadlink:rm3:78-0f-77-18-43-03:command" }


Dimmer TV_Alexa "TV" [ "Switchable" ] // Dummy Item for Alexa as it doesnt understand Strings
Dimmer Heater_Alexa "Heater" [ "Switchable" ] // Dummy Item for Alexa as it doesnt understand Strings
Switch Aircon_Alexa "Aircon" [ "Switchable" ] // Dummy Item for Alexa as it doesnt understand Strings
Switch Aircon_18    "Temp18" [ "Switchable" ] // Dummy Item for Setting the Aircon to 18 degrees

Thank you