Read-only Light from Google Home to HA

I try to integrate a light which can only work for Google Home to HA.
My idea now is to create a light sensor exposing to Google Home via Home-Assistant-Matter-Hub. The state can be updated with Google Home automation and I wanted to avoid end users accidentally modify the state in HA.

The 1st easiest way seems to create a input_boolean and template light with empty action but it cannot prevent users to change the input_boolean directly and I still need a “dummy” input_boolean in between.

My second idea is trigger-based template light/switch. It seems not possible at the moment since template light/switch cannot have triggers at all.

The 3rd idea, which ChatGPT told me, is using MQTT light but Google Home failed to update state of the HA entity.

- platform: mqtt
  name: "Google Home Light"
  state_topic: "home/google_home_light/state"
  command_topic: "home/google_home_light/ignore"
  retain: true
  payload_on: "ON"
  payload_off: "OFF"

Any thoughts for a better approach? Thanks in advance.

With the Google Assistant SDK integration you can actually control the light from HA, so you could use that to control the light in your template light.

What do you mean with users changing the state of a binary_sensor? Users can’t usually do that. Or are you mixing binary_sensor with input_boolean?

Thanks for the reply.

Is there a way I could create entities with Google Assistant SDK? My understanding is that it can only send command out but not maintain smart device status.

You are right that I mean input_boolean instead.

It can indeed send commands, but you can use those commands as actions in a template light.

So if you can use the input boolean to get the actual status of the light, you have everything you need to create a template light.

Something like this:

light:
  - platform: template
    lights:
      google_light:
        unique_id: something unique
        friendly_name: My Google Light
        value_template: "{{ is_state('input_boolean.google_light', 'on') }}"
        turn_on:
          - action: google_assistant_sdk.send_text_command
            data:
              command: Turn on the Google light
        turn_on:
          - action: google_assistant_sdk.send_text_command
            data:
              command: Turn off the Google light