Excluding exposure of some entities from Google Assistant

Hi

I’ve setup Google Assistant on hassio and it all works fine using this config:

google_assistant:
  project_id: ****
  client_id: ****
  access_token: ****
  agent_user_id: ****
  expose_by_default: true
  exposed_domains:
    - switch
    - light
    - media_player
    - climate

I now would like to exclude certain things such as the fire alarm switches, so they can’t be activated by Google Assistant by mistake.

I’ve taken a look at this:

And according to this, I’ve started adding exclusions for my fire alarms as per below in the configuration.yaml:

google_assistant:
  project_id: ****
  client_id: ****
  access_token: ****
  agent_user_id: ****
  expose_by_default: true
  exposed_domains:
    - switch
    - light
    - media_player
    - climate
  entity_config:
    switch.smoke_detector_downstairs_hallway_switch
      expose: false
      room: downstairs hallway
    switch.smoke_detector_upstairs_hallway_switch
      expose: false
      room: upstairs hallway

Problem is that I then get this error on startup:

2018-03-18 11:05:05 ERROR (SyncWorker_0) [homeassistant.util.yaml] mapping values are not allowed here
in “/config/configuration.yaml”, line 169, column 13
2018-03-18 11:05:05 ERROR (MainThread) [homeassistant.bootstrap] Error loading /config/configuration.yaml: mapping values are not allowed here
in “/config/configuration.yaml”, line 169, column 13

I’ve tried multiple ways, and can’t seem to get this to work!

Any tips appreciated! :slight_smile:

Cheers

Will.

You are missing the ending punctuation for each entity in your entity_config:

  entity_config:
    switch.smoke_detector_downstairs_hallway_switch
      expose: false
      room: downstairs hallway
    switch.smoke_detector_upstairs_hallway_switch
      expose: false
      room: upstairs hallway

to

  entity_config:
    switch.smoke_detector_downstairs_hallway_switch:
      expose: false
      room: downstairs hallway
    switch.smoke_detector_upstairs_hallway_switch:
      expose: false
      room: upstairs hallway

Also, remove room if you are excluding it. No need. Reading the doc leads me to believe that when it is used, it combines all the ‘room devices’ into a single toggle. That would defeat the purpose of hiding it.