MQTT lights are hidden for Google Home

MQTT lights are hidden for Google Home

I have Z-Wave lights connected to Fibaro HC3 gateway. Using official Home Assistant Add-on: Mosquitto broker and “Fibaro Home Center 3” to “Home Assistant” integration QuickApp (https://github.com/alexander-vitishchenko/hc3-to-mqtt) I have integrated lights from Fibaro to Home Assistant successfully and I am able to switch on/off and dime all of them in HA UI.

I am using Google Assistant integration (without Home Assistant Cloud) (https://www.home-assistant.io/integrations/google_assistant) and it works fine for all other devices except those connected via MQTT.

But I am not able to expose any device connected from Fibaro through MQTT.

My yaml configuration is simple:

google_assistant:
  project_id: home-assistant-xxxxx
  service_account: !include includes/service_account.json
  expose_by_default: false
  report_state: true

Is there some limitation for MQTT or other trick?

Please check documentation on ‘expose_by_default’.
And further…

Thank you for your comment. I am sorry, a copy paste mistake.

My current configuration for testing is

google_assistant:
  project_id: home-assistant-xxxx
  service_account: !include includes/service_account.json
  expose_by_default: true
  report_state: true

I don’t know if there is some relation with this, but in the log, there is one issue for the Google Assistant:

Logger: homeassistant
Source: components/google_assistant/http.py:57
First occurred: 17:29:20 (2 occurrences)
Last logged: 17:29:58

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/jwt/algorithms.py", line 257, in prepare_key
    key = load_pem_private_key(key, password=None)
  File "/usr/local/lib/python3.10/site-packages/cryptography/hazmat/primitives/serialization/base.py", line 22, in load_pem_private_key
    return ossl.load_pem_private_key(data, password)
  File "/usr/local/lib/python3.10/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 921, in load_pem_private_key
    return self._load_key(
  File "/usr/local/lib/python3.10/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1189, in _load_key
    self._handle_key_loading_error()
  File "/usr/local/lib/python3.10/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1248, in _handle_key_loading_error
    raise ValueError(
ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [_OpenSSLErrorWithText(code=151584876, lib=9, reason=108, reason_text=b'error:0909006C:PEM routines:get_name:no start line')])

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/helpers.py", line 110, in sync_google
    await self.async_sync_entities_all()
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/helpers.py", line 227, in async_sync_entities_all
    res = await gather(
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/helpers.py", line 217, in async_sync_entities
    status = await self._async_request_sync_devices(agent_user_id)
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/http.py", line 163, in _async_request_sync_devices
    return await self.async_call_homegraph_api(
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/http.py", line 205, in async_call_homegraph_api
    await self._async_update_token()
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/http.py", line 179, in _async_update_token
    _get_homegraph_jwt(
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/http.py", line 57, in _get_homegraph_jwt
    return jwt.encode(jwt_raw, key, algorithm="RS256")
  File "/usr/local/lib/python3.10/site-packages/jwt/api_jwt.py", line 67, in encode
    return api_jws.encode(json_payload, key, algorithm, headers, json_encoder)
  File "/usr/local/lib/python3.10/site-packages/jwt/api_jws.py", line 153, in encode
    key = alg_obj.prepare_key(key)
  File "/usr/local/lib/python3.10/site-packages/jwt/algorithms.py", line 259, in prepare_key
    key = load_pem_public_key(key)
  File "/usr/local/lib/python3.10/site-packages/cryptography/hazmat/primitives/serialization/base.py", line 30, in load_pem_public_key
    return ossl.load_pem_public_key(data)
  File "/usr/local/lib/python3.10/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 968, in load_pem_public_key
    self._handle_key_loading_error()
  File "/usr/local/lib/python3.10/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1248, in _handle_key_loading_error
    raise ValueError(
ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [_OpenSSLErrorWithText(code=151584876, lib=9, reason=108, reason_text=b'error:0909006C:PEM routines:get_name:no start line')])