The device will turn ON/OFF from the GUI only and not from some other way.
I am having issue, sometime my end device will not turn on instantly or will not turn on at all. But once it turn ON/OFF it will send the reply back about the status. Base on the reply back status I want to show that in the GUI.
Currently I and doing it with rules, may be its not the write way.
This is a tricky one because in order to have a good UI experience you need feedback on the UI that you have successfully triggered the action. On the other hand you want to represent the actual state of the heater.
So I see a few different approaches:
Forget about the feedback on the UI and use a mapping to turn the toggle into a button and the visibility flag to change the icon and text of the button depending on the real state.
For example:
Switch item=T_D_Garage1 label="Garage Door 1" icon="garagedoor-closed" mappings=[ON=Open] visibility=[N_D_GarageDoor1!="OPEN"]
Switch item=T_D_Garage1 label="Garage Door 1" icon="garagedoor-open" mappings=[ON=Close] visibility=[N_D_GarageDoor1=="OPEN"]
When N_D_GarageDoor1 says the door is OPEN, the button says “Close” and the icon is an opened garage door. When N_D_GarageDoor1 says the door is CLOSED, the button says “Open” and the icon is a closed garage door.
The command to open or close the door goes to one Item (T_D_Garage1) but the way the line looks on the sitemap depends on the status of a second Item. So if you split your setup into two Items, one for controlling and one for status this should work.