Google assistant override device type

Hey community,

Is it possible to override device type when exposing to Google assistant ?

For example i have Daikin AC which is used via Daikin integration.
So all Climate entities get exposed as action.devices.types.THERMOSTAT is it possible to
export my specific Daikin entity as action.devices.types.AC_UNIT instead?

I had similar problem with my coffee maker which currently exposes as a switch :slight_smile:

Regards,

You can now control devices typed in Google home app itself…

Hi Fabio,

How can i do that ?! For me Device type is read only in Google Home app?!

yes i can control it but when i say adjust thermostat and AC turns on :slight_smile:

I have both Thermostat device for heating and AC unit. Both of them get exposed as Thermostat device type :frowning:

Its a feature since a few days, just click on a switch , the place where you can define a room, you can also define the type of switch

Nice! Thanks for the tip :slight_smile:

For coffee maker i’m now set :slight_smile:

But AC (thermostat) doesn’t have this changeable device type setting :frowning:

No problem, maybe you can override in HA, but I don’t know, I think it’s possible though

Actually i think i have a solution. Quick and dirty one :slight_smile:

Copied google_assistant component in custom_components folder.

then modified the helper.py and on line 409 i appended few lines:

409 if name == “coffee maker”:
410 device_type = “action.devices.types.COFFEE_MAKER”
411
412 if name == “air conditioner”:
413 device_type = “action.devices.types.AC_UNIT”
414
415 if name == “Heater”:
416 device_type = “action.devices.types.HEATER”

Problem solved :slight_smile:

Cool, I hope a PR is coming soon :wink:

Cause your method doesn’t work with nabucasa… You are working with local Google assistant?

I guess by local GA you mean GA connects directly to my instance.

Then yes i run local :slight_smile:

The best approach would have been to allow device_class attribute for climate and switch
and then introduce proper constants in google_assistant component and the proper changes in helper.py but it gets too complicated for someone who can’t write python code, like me :slight_smile:

Hopefully HA team will introduce something like this in near future :slight_smile:

Will come soon I guess :wink:

Still a new feature

I’m in the same situation as Lyubomir_Ivanov
I’ve follow the guide here (in italian) https://indomus.it/guide/integrare-gratuitamente-google-home-assistant-con-home-assistant-via-gcp/

at the end there is the following configuration code:

google_assistant:
  project_id: XXXXXXX
  service_account: !include YYYYYYY.json
  exposed_domains:
    - light
    - switch
    - climate
  entity_config:
    switch.ingresso:
      name: NOME_COL_QUALE_ESPORRE_LO_SWITCH_A_GOOGLE_HHOME
      aliases:
        - LUCI_FORTI
        - LUCI_INGRESSO
    light.bagno:
      expose: false
      room: BAGNO

maybe using the entity_config: you can override the thermostat in ac_unit.

Not possible right now,… Yet :wink:
I hope someone can create this feature

@Lyubomir_Ivanov,

I’m having difficultly copying your solution for device type by using an if statement to declare type, its been a little while now and the google assistant component may have been updated: do you know what section you put it under in ‘helper.py’ (custom_components/google_assistant/)?
I’m also trying to work out how to get Google Assistant to request acknowledgement on certain devices, I see the ability is there for it in ‘const.py’

Any help would be great, thanks.

I found a simple work around for correcting my device type from blinds to curtain by adding a few extra lines in ‘const.py’ - it grabs the device class from HA, so when it see its device class returns as curtain, it declares it as action.device.type.curtain instead of the default blinds… now google recognises my curtains are not blinds :slight_smile:

Line 75 - Declare Curtain

PREFIX_TYPES = "action.devices.types."
...
TYPE_CURTAIN = f"{PREFIX_TYPES}CURTAIN"
...

Line 150 - Device Class to Google Type

DEVICE_CLASS_TO_GOOGLE_TYPES = {
...
    (cover.DOMAIN, cover.DEVICE_CLASS_CURTAIN): TYPE_CURTAIN,
...
}