Status feedback from Google Assistant to Home Assistant

Some background:
I have moved into a newly build house last year. The house came with a built in home control system, called “One Smart Control” It is a system by a Belgium based company, and the system is really closed. No web-service, no API, only control with the wall switches and their own app.
The have promised Google Assistant integration, and because of that I have searched for options to work with that, and found Assistant Relay.

What I did
Since there is no Google Assistant integration yet, I tested with another light (Tuya in this case, but in the end it doesn’t really matter)

Please note I don’t have a lot programming experience, but I know how to use Google. So things might be overly complex, but I got it working in the end.

Using Assistant relay I can use a dummy light and use the state changes from that light to trigger Google Assistant.

First I installed Assistant Relay and added it to my configuration.yaml:

# assistant relay
rest_command:
  assistant_broadcast:
    url: http://[ip]:3000/assistant
    method: POST
    content_type: 'application/json'
    payload: '{"command":"{{ command }}", "user":"[username]", "broadcast":true}'
    
  assistant_converse:
    url: http://[ip]:3000/assistant
    method: POST
    content_type: 'application/json'
    payload: '{"command":"{{ command }}", "user":"[username]", "converse":true}'

  assistant_relay:
    url: http://[ip]:3000/assistant
    method: POST
    content_type: 'application/json'
    payload: '{"command":"{{ command }}", "user":"[username]"}'

Then I created a dummy light (staande lamp is Dutch for standing lamp):

# dummy light
light:
  - platform: template
    lights:
      test_staande_lamp:
        friendly_name: "Test Staande lamp"
        turn_on:
          service: input_boolean.turn_on
          entity_id: input_boolean.test_staande_lamp
        turn_off:
          service: input_boolean.turn_off
          entity_id: input_boolean.test_staande_lamp
        set_level:
          service: input_number.set_value
          data_template:
            value: "{{ brightness }}"
            entity_id: input_number.test_staande_lamp

# input_boolean to switch it on and off
input_boolean :
  test_staande_lamp:

# input_number for brightness percentage
input_number:
  test_staande_lamp:
    min: 0
    max: 100

After that I created two scripts for turning it on and off. I use Dutch for Google Assistant, so my actual commands are in Dutch here. That’s also why I could not put it all in on Automation, and I had to use scripts, since on and off are not the same as aan and uit in Dutch.

test_staandelamp_on:
  alias: Test Staande Lamp On
  sequence:
  - data:
      command: zet staande lamp aan
    service: rest_command.assistant_relay
test_staandelamp_off:
  alias: Test Staande Lamp Off
  sequence:
  - data:
      command: zet staande lamp uit
    service: rest_command.assistant_relay

Using these scripts, I could create an automation which will trigger these scripts when the dummy light is turned off and on. The brightness slider can also be used and will trigger an automation to change brightness.

- id: '1592232113619'
  alias: Test Staande Lamp GA
  trigger:
  - entity_id: input_boolean.test_staande_lamp
    platform: state
  action:
  - service_template: script.test_staandelamp_{{trigger.to_state.state}}
- id: '15922321136191'
  alias: Test Staande Lamp GA brightness
  trigger:
  - entity_id: input_number.test_staande_lamp
    platform: state
  action:
  - data_template: 
      command: "zet staande lamp op {{ trigger.to_state.state | int }} procent"
    service: rest_command.assistant_relay

So, this works, I can turn the light on and off, and adjust brightness.

The problem:
In the end I want to use this to perform other automations, like e.g. turning the lights off when I leave my house, or turn off a light after it has been on for 15 minutes (because I always forget to turn off the bathroom light).

The problem I have is that when the dummy light is off in Home Assistant, I can switch the actual light on with Google Assistant, or the wall switch.
When I would leave my house, HA will think the light is off (because the dummy light is off) and will not turn the actual light off.

Therefor I’m looking for a way to get the status of my light in Google Assistant/Home and adjust my Dummy light accordingly.
Despite a lot of Google-Fu, I did not find a way to do this yet. Does anybody have an idea to achieve this?

Google home is a very closed ecosystem. There’s no way to get state information out of it at the moment.

For future reference, I thought it might work if I use a smart bulb (like the Tuya bulbs I already have in use).
If the light is switched off my using the actual wall button, the Tuya light will become unavailable. I can use that information to turn off the dummy light (so either when the Tuya light is off or unavailable the dummy should be off).
When the wall button is used to turn the light on, the Tuya light will also turn on (even if it was off before). This then can also toggle the dummy light.