[solved] Configuring a shelly driven gate to show proper status and be ably to respond to "open/close" voice commands

Hi all,
Still quite new (much to learn) with home assistant.
I have allready added all my lights (using shellys) to HA, working as intended and with “turn on / turn off” voice commands working.

My next endeavour is a bit more difficult and I can’t find the right solution for my problem (have been searching and reading all afternoon).

My setup is the following :
I have a motoized gate giving access to my garge.
This gate can be opened / closed by a remote or since a few days with a shelly (emulating the remote. a “button” press will always open/stop/close depending on the state and last input.
I added a magnetic switch / reed switch which activates when the gate is fully closed → This gave me a new entity I named “gate_state”.
Now I can Open/Stop/Close the thing through home assistant, single button “activating” the action/simulating a remote press. Using Google Assistant, I can ask to “activate the gate”

What I would want :
I would like to see the current state (open/closed) and more importantly be able to ask my assistant to “open the gate” / “close the gate”, where it will activate it in a way to get it open if it was closed (easy) / close it if it was half-open / open (more difficult as it can’t tell where it exactly is / what the next “button press” will do… This is not so important, as “half-open” would be extremely rare and would mean I am next to it.

My problems are :

  1. I can’t get the lovelace card for the gate to change the icon color depending on the “gate_status” entity (as the “gate” entity itself doesn’t really have a status)
  2. I don’t know how to tell the google assistant integration to react to “open gate” / “close gate” commands and return the actual state.

I would love your help on this, as all my research always point me to people just wanting to theme their lovelace cards…

Thanks a lot !

I finally found the soluton (had to search using other terms / another logic).

What I needed was to know that “Covers” exist.
This (and particularly this thread) made it completely obvious.
For people trying the same landing on here before somewhere else : don’t forget to add the secret code to your google assistant integration, as garage / gate / door are seen as sensitive.

Happy to have found the solution myself =)