I use sitemap when I control my AC or Googlehome.
String version:
Items:
Group Gree_Modechannel "Gree" { ga="Thermostat" [modes="auto,cool,dry,fan-only,heat,on,off"] } // új Gree bindinggal
Switch GreePower "Power" {channel="gree:airconditioner:2059a0b49c2f:power" }
String GreeMode_GA "Gree mode" (Gree_Modechannel) { ga="thermostatMode" }
String GreeMode "Gree mode" (Gree_Modechannel) {channel="gree:airconditioner:2059a0b49c2f:mode" }
Sitemap:
Selection label="Mód [%s]" item=GreeMode mappings=["auto"="Auto", "cool"="Cool", "dry"="Dry", "fan-only"="Fan", "heat"="Heat", "on"="On", "off"="Off"] icon=fan_box
Number Version:
Items:
Group Gree_Modechannel "Gree" { ga="Thermostat" [modes="auto,cool,dry,fan-only,heat,on,off"] } // új Gree bindinggal
Switch GreePower "Power" {channel="gree:airconditioner:2059a0b49c2f:power" }
String GreeMode_GA "Gree mode" (Gree_Modechannel) { ga="thermostatMode" }
Number GreeMode "Gree mode" (Gree_Modechannel) {channel="gree:airconditioner:2059a0b49c2f:mode" }
Sitemap:
Selection label="Mód [%s]" item=GreeMode mappings=[0="Auto", 1="Cool", 2="Dry", 3="Fan", 4="Heat", 12="On", 11="Off"] icon=fan_box
When I turned back item to Number and change to this sitemap line, mode change was not working from my Sitemap. Can it have connection to Stronge mode? Anyway String version is perfect.
Group item is required for Googlehome connection as I wrote before.
There is a rule behind for Googleassitant link what is translating between binding and GA:
rule "Translate Mode from GA 2"
when
Item GreeMode_GA changed
then
if(GreePower.state == OFF) {
sendCommand(GreePower,ON)
}
if(GreeMode_GA.state == "auto" ) {
sendCommand(GreeMode,0)
}
if(GreeMode_GA.state == "cool" ) {
sendCommand(GreeMode,1)
}
if(GreeMode_GA.state == "dry" ) {
sendCommand(GreeMode,2)
}
if(GreeMode_GA.state == "fan-only" ) {
sendCommand(GreeMode,3)
}
if(GreeMode_GA.state == "heat" ) {
sendCommand(GreeMode,4)
}
if(GreeMode_GA.state == "off" ) {
sendCommand(GreePower,OFF)
}
end
Google Assistant controls now all 4 modes, on/off with that rule with above string version set up including Group Item. Avaiable modes set up is at Group Item level and works. It can change temperature as well.
I think fan speed can be controlled with it as well. I’ll check it later this week.