We’re talking about Basic UI /Classic UI?
This is a bit tricky. The first step is to get a Push button instead of a switch:
.sitemap:
Switch item=vent_niveau_3 mappings=[ON="Click"]
To prevent the Button stay pressed, you would have to set the item like this.
.items:
Switch vent_niveau_3 "Ventilation max" (vent) {ihc="0x33c311", autoupdate="false"}
Now, you want to get another icon instead of the switched one. You can get this by using visibility.
.items:
Switch vent_niveau_3 "Ventilation max" (vent) {ihc="0x33c311", autoupdate="false"}
Switch vent_niveau_3_state "Ventilation max" (vent) {ihc="0x33c312"}
.sitemap:
Switch item=vent_niveau_3 mappings=[ON="ON"] icon="switch-off" visibility=[vent_niveau_3_state == OFF]
Switch item=vent_niveau_3 mappings=[ON="OFF"] icon="switch-on" visibility=[vent_niveau_3_state == ON]