home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.77k stars 30.48k forks source link

Google Assistant: JWT error when calling Request Sync from developer tools #124364

Closed NorthLake closed 2 months ago

NorthLake commented 2 months ago

The problem

Calling google_assistant.request_sync gives the following error in the UI:

Failed to perform the action google_assistant.request_sync. Unknown error See logs for detailed error messages and tracebacks.

What version of Home Assistant Core has the issue?

core-2024.8.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Google Assistant

Link to integration documentation on our website

https://www.home-assistant.io/integrations/google_assistant/

Diagnostics information

Expand ```json { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2024.8.2", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.12.4", "docker": true, "arch": "aarch64", "timezone": "Europe/Amsterdam", "os_name": "Linux", "os_version": "6.6.31-haos-raspi", "supervisor": "2024.08.0", "host_os": "Home Assistant OS 13.0", "docker_version": "26.1.4", "chassis": "embedded", "run_as_root": true }, "custom_components": { "weatherdotcom": { "documentation": "https://github.com/jaydeethree/Home-Assistant-weatherdotcom", "version": "1.1.8", "requirements": [] }, "hacs": { "documentation": "https://hacs.xyz/docs/configuration/start", "version": "1.34.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "localtuya": { "documentation": "https://github.com/rospogrigio/localtuya/", "version": "5.2.1", "requirements": [] }, "versatile_thermostat": { "documentation": "https://github.com/jmcollin78/versatile_thermostat", "version": "6.2.9", "requirements": [] }, "home_connect_alt": { "documentation": "https://github.com/ekutner/home-connect-hass", "version": "1.1.7", "requirements": [ "home-connect-async==0.8.0" ] }, "hvac_group": { "documentation": "https://github.com/tetele/hvac_group", "version": "0.2.0", "requirements": [] } }, "integration_manifest": { "domain": "google_assistant", "name": "Google Assistant", "after_dependencies": [ "camera", "matter" ], "codeowners": [ "home-assistant/cloud" ], "dependencies": [ "http" ], "documentation": "https://www.home-assistant.io/integrations/google_assistant", "integration_type": "system", "iot_class": "cloud_push", "is_built_in": true }, "setup_times": { "null": { "setup": 0.0008009370067156851 }, "a766a5a9efd0c17a099cbde76f228bf4": { "wait_import_platforms": -3.7413755059969844, "wait_base_component": -0.00369296500866767, "config_entry_setup": 3.7695471990009537 } }, "data": { "config_entry": { "created_at": "1970-01-01T00:00:00+00:00", "data": { "project_id": "home-assistant-ecb94" }, "disabled_by": null, "domain": "google_assistant", "entry_id": "a766a5a9efd0c17a099cbde76f228bf4", "minor_version": 1, "modified_at": "1970-01-01T00:00:00+00:00", "options": {}, "pref_disable_new_entities": false, "pref_disable_polling": false, "source": "import", "title": "home-assistant-ecb94", "unique_id": "home-assistant-ecb94", "version": 1 }, "yaml_config": { "project_id": "home-assistant-ecb94", "service_account": "**REDACTED**", "report_state": true, "entity_config": { "switch.boekenkast_socket_1": { "expose": false }, "switch.boekenkast_local": { "expose": false }, "switch.ledstrip_socket_1": { "expose": false }, "switch.ledstrip_local": { "expose": false }, "switch.schemerlamp_socket_1": { "expose": false }, "switch.schemerlamp_local": { "expose": false }, "switch.schemerlampje_achter_socket_1": { "expose": false }, "switch.schemerlampje_achter_local": { "expose": false }, "switch.schemerlampjes_voor_socket_1": { "expose": false }, "switch.schemerlampjes_voor_local": { "expose": false }, "switch.staande_dimlamp_socket_1": { "expose": false }, "switch.staande_dimlamp_local": { "expose": false } }, "exposed_domains": [ "alarm_control_panel", "binary_sensor", "climate", "cover", "event", "fan", "group", "humidifier", "input_boolean", "input_select", "light", "lock", "media_player", "scene", "script", "select", "sensor", "switch", "vacuum", "valve", "water_heater" ], "expose_by_default": true }, "sync": { "agentUserId": "**REDACTED**", "devices": [ { "id": "scene.tradfri_10_oranje", "name": { "name": "Tradfri 10% oranje" }, "attributes": {}, "traits": [ "action.devices.traits.Scene" ], "willReportState": true, "type": "action.devices.types.SCENE", "otherDeviceIds": [ { "deviceId": "scene.tradfri_10_oranje" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Slaapkamer" }, { "id": "scene.tradfri_80_wit", "name": { "name": "Tradfri 80% wit" }, "attributes": {}, "traits": [ "action.devices.traits.Scene" ], "willReportState": true, "type": "action.devices.types.SCENE", "otherDeviceIds": [ { "deviceId": "scene.tradfri_80_wit" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Slaapkamer" }, { "id": "scene.tradfri_uit", "name": { "name": "Tradfri uit" }, "attributes": {}, "traits": [ "action.devices.traits.Scene" ], "willReportState": true, "type": "action.devices.types.SCENE", "otherDeviceIds": [ { "deviceId": "scene.tradfri_uit" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" } }, { "id": "scene.tradfri_80_groen_telefoon_opgeladen", "name": { "name": "Tradfri 80% groen (telefoon opgeladen)" }, "attributes": {}, "traits": [ "action.devices.traits.Scene" ], "willReportState": true, "type": "action.devices.types.SCENE", "otherDeviceIds": [ { "deviceId": "scene.tradfri_80_groen_telefoon_opgeladen" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" } }, { "id": "scene.tradfri_30_groen_telefoon_opgeladen", "name": { "name": "Tradfri 30% groen (telefoon opgeladen)" }, "attributes": {}, "traits": [ "action.devices.traits.Scene" ], "willReportState": true, "type": "action.devices.types.SCENE", "otherDeviceIds": [ { "deviceId": "scene.tradfri_30_groen_telefoon_opgeladen" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" } }, { "id": "scene.tradfri_50_rood_telefoon_bijna_leeg", "name": { "name": "Tradfri 50% rood (telefoon bijna leeg)" }, "attributes": {}, "traits": [ "action.devices.traits.Scene" ], "willReportState": true, "type": "action.devices.types.SCENE", "otherDeviceIds": [ { "deviceId": "scene.tradfri_50_rood_telefoon_bijna_leeg" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" } }, { "id": "scene.tradfri_80_rood_telefoon_opgeladen", "name": { "name": "Tradfri 80% rood (telefoon opgeladen)" }, "attributes": {}, "traits": [ "action.devices.traits.Scene" ], "willReportState": true, "type": "action.devices.types.SCENE", "otherDeviceIds": [ { "deviceId": "scene.tradfri_80_rood_telefoon_opgeladen" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" } }, { "id": "light.tradfri_slaapkamer", "name": { "name": "Tradfri slaapkamer" }, "attributes": { "colorModel": "hsv", "colorTemperatureRange": { "temperatureMaxK": 4000, "temperatureMinK": 2202 } }, "traits": [ "action.devices.traits.Brightness", "action.devices.traits.OnOff", "action.devices.traits.ColorSetting" ], "willReportState": true, "type": "action.devices.types.LIGHT", "otherDeviceIds": [ { "deviceId": "light.tradfri_slaapkamer" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" } }, { "id": "light.ledstrip", "name": { "name": "Ledstrip" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.LIGHT", "otherDeviceIds": [ { "deviceId": "light.ledstrip" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Slaapkamer" }, { "id": "light.boekenkast", "name": { "name": "Boekenkast" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.LIGHT", "otherDeviceIds": [ { "deviceId": "light.boekenkast" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Woonkamer" }, { "id": "light.schemerlamp", "name": { "name": "Schemerlamp" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.LIGHT", "otherDeviceIds": [ { "deviceId": "light.schemerlamp" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Woonkamer" }, { "id": "light.schemerlampje_achter", "name": { "name": "Schemerlampje achter" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.LIGHT", "otherDeviceIds": [ { "deviceId": "light.schemerlampje_achter" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Woonkamer" }, { "id": "light.schemerlampjes_voor", "name": { "name": "Schemerlampjes voor" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.LIGHT", "otherDeviceIds": [ { "deviceId": "light.schemerlampjes_voor" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Woonkamer" }, { "id": "light.staande_dimlamp", "name": { "name": "Staande dimlamp" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.LIGHT", "otherDeviceIds": [ { "deviceId": "light.staande_dimlamp" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Woonkamer" }, { "id": "switch.pc_martijn", "name": { "name": "PC-Martijn", "nicknames": [ "PC-Martijn", "Computer", "PC" ] }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.SWITCH", "otherDeviceIds": [ { "deviceId": "switch.pc_martijn" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Slaapkamer" }, { "id": "media_player.sony_kd_49xh8577_3", "name": { "name": "SONY KD-49XH8577" }, "attributes": { "commandOnlyOnOff": true, "volumeCanMuteAndUnmute": true, "commandOnlyVolume": true, "volumeMaxLevel": 100, "levelStepSize": 10, "transportControlSupportedCommands": [ "NEXT", "PAUSE", "PREVIOUS", "RESUME", "STOP" ], "supportActivityState": true, "supportPlaybackState": true, "availableChannels": [], "commandOnlyChannels": true }, "traits": [ "action.devices.traits.OnOff", "action.devices.traits.Volume", "action.devices.traits.TransportControl", "action.devices.traits.MediaState", "action.devices.traits.Channel" ], "willReportState": true, "type": "action.devices.types.TV", "otherDeviceIds": [ { "deviceId": "media_player.sony_kd_49xh8577_3" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "TV", "deviceInfo": { "manufacturer": "Sony", "model": "BRAVIA 4K UR3" } }, { "id": "light.tradfri_bulb_3", "name": { "name": "TRADFRI bulb 3" }, "attributes": { "colorModel": "hsv", "colorTemperatureRange": { "temperatureMaxK": 4000, "temperatureMinK": 2202 } }, "traits": [ "action.devices.traits.Brightness", "action.devices.traits.OnOff", "action.devices.traits.ColorSetting" ], "willReportState": true, "type": "action.devices.types.LIGHT", "otherDeviceIds": [ { "deviceId": "light.tradfri_bulb_3" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Slaapkamer", "deviceInfo": { "manufacturer": "IKEA of Sweden", "model": "TRADFRI bulb E14 CWS 470lm", "swVersion": "1.0.021" } }, { "id": "light.tradfri_bulb_2", "name": { "name": "TRADFRI bulb 2" }, "attributes": { "colorModel": "hsv", "colorTemperatureRange": { "temperatureMaxK": 4000, "temperatureMinK": 2202 } }, "traits": [ "action.devices.traits.Brightness", "action.devices.traits.OnOff", "action.devices.traits.ColorSetting" ], "willReportState": true, "type": "action.devices.types.LIGHT", "otherDeviceIds": [ { "deviceId": "light.tradfri_bulb_2" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Slaapkamer", "deviceInfo": { "manufacturer": "IKEA of Sweden", "model": "TRADFRI bulb E14 CWS 470lm", "swVersion": "1.0.021" } }, { "id": "light.tradfri_bulb_7", "name": { "name": "TRADFRI bulb 7" }, "attributes": { "colorModel": "hsv", "colorTemperatureRange": { "temperatureMaxK": 4000, "temperatureMinK": 2202 } }, "traits": [ "action.devices.traits.Brightness", "action.devices.traits.OnOff", "action.devices.traits.ColorSetting" ], "willReportState": true, "type": "action.devices.types.LIGHT", "otherDeviceIds": [ { "deviceId": "light.tradfri_bulb_7" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Slaapkamer", "deviceInfo": { "manufacturer": "IKEA of Sweden", "model": "TRADFRI bulb E14 CWS 470lm", "swVersion": "1.0.021" } }, { "id": "light.tradfri_bulb_5", "name": { "name": "TRADFRI bulb 5" }, "attributes": { "colorModel": "hsv", "colorTemperatureRange": { "temperatureMaxK": 4000, "temperatureMinK": 2202 } }, "traits": [ "action.devices.traits.Brightness", "action.devices.traits.OnOff", "action.devices.traits.ColorSetting" ], "willReportState": true, "type": "action.devices.types.LIGHT", "otherDeviceIds": [ { "deviceId": "light.tradfri_bulb_5" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Slaapkamer", "deviceInfo": { "manufacturer": "IKEA of Sweden", "model": "TRADFRI bulb E14 CWS 470lm", "swVersion": "1.0.021" } }, { "id": "light.tradfri_bulb_4", "name": { "name": "TRADFRI bulb 4" }, "attributes": { "colorModel": "hsv", "colorTemperatureRange": { "temperatureMaxK": 4000, "temperatureMinK": 2202 } }, "traits": [ "action.devices.traits.Brightness", "action.devices.traits.OnOff", "action.devices.traits.ColorSetting" ], "willReportState": true, "type": "action.devices.types.LIGHT", "otherDeviceIds": [ { "deviceId": "light.tradfri_bulb_4" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Slaapkamer", "deviceInfo": { "manufacturer": "IKEA of Sweden", "model": "TRADFRI bulb E14 CWS 470lm", "swVersion": "1.0.021" } }, { "id": "light.tradfri_bulb_6", "name": { "name": "TRADFRI bulb 6" }, "attributes": { "colorModel": "hsv", "colorTemperatureRange": { "temperatureMaxK": 4000, "temperatureMinK": 2202 } }, "traits": [ "action.devices.traits.Brightness", "action.devices.traits.OnOff", "action.devices.traits.ColorSetting" ], "willReportState": true, "type": "action.devices.types.LIGHT", "otherDeviceIds": [ { "deviceId": "light.tradfri_bulb_6" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Slaapkamer", "deviceInfo": { "manufacturer": "IKEA of Sweden", "model": "TRADFRI bulb E14 CWS 470lm", "swVersion": "1.0.021" } }, { "id": "light.tradfri_bulb_8", "name": { "name": "TRADFRI bulb 8" }, "attributes": { "colorModel": "hsv", "colorTemperatureRange": { "temperatureMaxK": 4000, "temperatureMinK": 2202 } }, "traits": [ "action.devices.traits.Brightness", "action.devices.traits.OnOff", "action.devices.traits.ColorSetting" ], "willReportState": true, "type": "action.devices.types.LIGHT", "otherDeviceIds": [ { "deviceId": "light.tradfri_bulb_8" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Slaapkamer", "deviceInfo": { "manufacturer": "IKEA of Sweden", "model": "TRADFRI bulb E14 CWS 470lm", "swVersion": "1.0.021" } }, { "id": "light.tradfri_bulb", "name": { "name": "TRADFRI bulb" }, "attributes": { "colorModel": "hsv", "colorTemperatureRange": { "temperatureMaxK": 4000, "temperatureMinK": 2202 } }, "traits": [ "action.devices.traits.Brightness", "action.devices.traits.OnOff", "action.devices.traits.ColorSetting" ], "willReportState": true, "type": "action.devices.types.LIGHT", "otherDeviceIds": [ { "deviceId": "light.tradfri_bulb" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "Slaapkamer", "deviceInfo": { "manufacturer": "IKEA of Sweden", "model": "TRADFRI bulb E14 CWS 470lm", "swVersion": "1.0.021" } }, { "id": "media_player.sony_kd_49xh8577_2", "name": { "name": "TV: DLNA" }, "attributes": { "availableModes": [ { "name": "sound mode", "name_values": [ { "name_synonym": [ "sound mode", "effects" ], "lang": "en" } ], "settings": [ { "setting_name": "FactoryDefaults", "setting_values": [ { "setting_synonym": [ "FactoryDefaults" ], "lang": "en" } ] } ], "ordered": false } ], "volumeCanMuteAndUnmute": true, "commandOnlyVolume": false, "volumeMaxLevel": 100, "levelStepSize": 10, "transportControlSupportedCommands": [ "NEXT", "PAUSE", "PREVIOUS", "RESUME", "SEEK_RELATIVE", "SEEK_TO_POSITION", "SHUFFLE", "STOP" ], "supportActivityState": true, "supportPlaybackState": true }, "traits": [ "action.devices.traits.OnOff", "action.devices.traits.Modes", "action.devices.traits.Volume", "action.devices.traits.TransportControl", "action.devices.traits.MediaState" ], "willReportState": true, "type": "action.devices.types.SETTOP", "otherDeviceIds": [ { "deviceId": "media_player.sony_kd_49xh8577_2" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "TV", "deviceInfo": { "manufacturer": "Sony Corporation", "model": "MediaRenderer" } }, { "id": "media_player.stereo_noordermeer", "name": { "name": "Stereo Noordermeer" }, "attributes": { "supportActivityState": true, "supportPlaybackState": true }, "traits": [ "action.devices.traits.OnOff", "action.devices.traits.MediaState" ], "willReportState": true, "type": "action.devices.types.SETTOP", "otherDeviceIds": [ { "deviceId": "media_player.stereo_noordermeer" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "deviceInfo": { "manufacturer": "Sony Corporation", "model": "STR-DN850" } }, { "id": "climate.woonkamer", "name": { "name": "Woonkamer" }, "attributes": { "thermostatTemperatureUnit": "C", "thermostatTemperatureRange": { "minThresholdCelsius": 5, "maxThresholdCelsius": 35 }, "availableThermostatModes": [ "off", "heat", "on" ] }, "traits": [ "action.devices.traits.OnOff", "action.devices.traits.TemperatureSetting" ], "willReportState": true, "type": "action.devices.types.THERMOSTAT", "roomHint": "Woonkamer" }, { "id": "script.naar_bed", "name": { "name": "Naar bed" }, "attributes": {}, "traits": [ "action.devices.traits.Scene" ], "willReportState": true, "type": "action.devices.types.SCENE", "otherDeviceIds": [ { "deviceId": "script.naar_bed" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" } }, { "id": "script.tradfri_loop", "name": { "name": "Tradfri loop" }, "attributes": {}, "traits": [ "action.devices.traits.Scene" ], "willReportState": true, "type": "action.devices.types.SCENE", "otherDeviceIds": [ { "deviceId": "script.tradfri_loop" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" } }, { "id": "script.ledstrip_seizure", "name": { "name": "Ledstrip seizure" }, "attributes": {}, "traits": [ "action.devices.traits.Scene" ], "willReportState": true, "type": "action.devices.types.SCENE", "otherDeviceIds": [ { "deviceId": "script.ledstrip_seizure" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" } }, { "id": "climate.martijn", "name": { "name": "Martijn" }, "attributes": { "thermostatTemperatureUnit": "C", "thermostatTemperatureRange": { "minThresholdCelsius": 5, "maxThresholdCelsius": 35 }, "availableThermostatModes": [ "off", "heat", "on" ] }, "traits": [ "action.devices.traits.OnOff", "action.devices.traits.TemperatureSetting" ], "willReportState": true, "type": "action.devices.types.THERMOSTAT", "roomHint": "Slaapkamer" }, { "id": "media_player.sony_kd_49xh8577", "name": { "name": "TV: Google Cast" }, "attributes": { "volumeCanMuteAndUnmute": true, "commandOnlyVolume": false, "volumeMaxLevel": 100, "levelStepSize": 10, "transportControlSupportedCommands": [ "NEXT", "PAUSE", "PREVIOUS", "RESUME", "STOP" ], "supportActivityState": true, "supportPlaybackState": true }, "traits": [ "action.devices.traits.OnOff", "action.devices.traits.Volume", "action.devices.traits.TransportControl", "action.devices.traits.MediaState" ], "willReportState": true, "type": "action.devices.types.SETTOP", "otherDeviceIds": [ { "deviceId": "media_player.sony_kd_49xh8577" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "TV", "deviceInfo": { "manufacturer": "Sony", "model": "BRAVIA 4K UR3" } }, { "id": "media_player.sony_bravia_tv", "name": { "name": "Sony KD-49XH8577" }, "attributes": { "commandOnlyOnOff": true, "availableInputs": [ { "key": "HDMI 1", "names": [ { "name_synonym": [ "HDMI 1" ], "lang": "en" } ] }, { "key": "HDMI 2", "names": [ { "name_synonym": [ "HDMI 2" ], "lang": "en" } ] }, { "key": "HDMI 3 (eARC/ARC)", "names": [ { "name_synonym": [ "HDMI 3 (eARC/ARC)" ], "lang": "en" } ] }, { "key": "HDMI 4", "names": [ { "name_synonym": [ "HDMI 4" ], "lang": "en" } ] }, { "key": "AV/Component", "names": [ { "name_synonym": [ "AV/Component" ], "lang": "en" } ] } ], "orderedInputs": true, "volumeCanMuteAndUnmute": true, "commandOnlyVolume": true, "volumeMaxLevel": 100, "levelStepSize": 10, "transportControlSupportedCommands": [ "NEXT", "PAUSE", "PREVIOUS", "RESUME", "STOP" ], "supportActivityState": true, "supportPlaybackState": true, "availableChannels": [], "commandOnlyChannels": true }, "traits": [ "action.devices.traits.OnOff", "action.devices.traits.InputSelector", "action.devices.traits.Volume", "action.devices.traits.TransportControl", "action.devices.traits.MediaState", "action.devices.traits.Channel" ], "willReportState": true, "type": "action.devices.types.TV", "otherDeviceIds": [ { "deviceId": "media_player.sony_bravia_tv" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "roomHint": "TV", "deviceInfo": { "manufacturer": "Sony", "model": "KD-49XH8577" } }, { "id": "binary_sensor.koelkast_door", "name": { "name": "Koelkast" }, "attributes": { "queryOnlyOpenClose": true, "discreteOnlyOpenClose": true }, "traits": [ "action.devices.traits.OpenClose" ], "willReportState": true, "type": "action.devices.types.DOOR", "otherDeviceIds": [ { "deviceId": "binary_sensor.koelkast_door" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "deviceInfo": { "manufacturer": "Siemens", "model": "KI86SHDD0" } }, { "id": "binary_sensor.vaatwasser_door", "name": { "name": "Vaatwasser Door" }, "attributes": { "queryOnlyOpenClose": true, "discreteOnlyOpenClose": true }, "traits": [ "action.devices.traits.OpenClose" ], "willReportState": true, "type": "action.devices.types.DOOR", "otherDeviceIds": [ { "deviceId": "binary_sensor.vaatwasser_door" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "deviceInfo": { "manufacturer": "Bosch", "model": "SMV4HAX40N" } }, { "id": "switch.koelkast_power", "name": { "name": "Koelkast Power" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.SWITCH", "otherDeviceIds": [ { "deviceId": "switch.koelkast_power" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "deviceInfo": { "manufacturer": "Siemens", "model": "KI86SHDD0" } }, { "id": "switch.koelkast_childlock", "name": { "name": "Koelkast ChildLock" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.SWITCH", "otherDeviceIds": [ { "deviceId": "switch.koelkast_childlock" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "deviceInfo": { "manufacturer": "Siemens", "model": "KI86SHDD0" } }, { "id": "switch.vaatwasser_program_intensiv70", "name": { "name": "Vaatwasser Program Intensiv70" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.SWITCH", "otherDeviceIds": [ { "deviceId": "switch.vaatwasser_program_intensiv70" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "deviceInfo": { "manufacturer": "Bosch", "model": "SMV4HAX40N" } }, { "id": "switch.vaatwasser_program_auto2", "name": { "name": "Vaatwasser Program Auto2" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.SWITCH", "otherDeviceIds": [ { "deviceId": "switch.vaatwasser_program_auto2" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "deviceInfo": { "manufacturer": "Bosch", "model": "SMV4HAX40N" } }, { "id": "switch.vaatwasser_program_eco50", "name": { "name": "Vaatwasser Program Eco50" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.SWITCH", "otherDeviceIds": [ { "deviceId": "switch.vaatwasser_program_eco50" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "deviceInfo": { "manufacturer": "Bosch", "model": "SMV4HAX40N" } }, { "id": "switch.vaatwasser_program_prerinse", "name": { "name": "Vaatwasser Program PreRinse" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.SWITCH", "otherDeviceIds": [ { "deviceId": "switch.vaatwasser_program_prerinse" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "deviceInfo": { "manufacturer": "Bosch", "model": "SMV4HAX40N" } }, { "id": "switch.vaatwasser_program_nightwash", "name": { "name": "Vaatwasser Program NightWash" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.SWITCH", "otherDeviceIds": [ { "deviceId": "switch.vaatwasser_program_nightwash" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "deviceInfo": { "manufacturer": "Bosch", "model": "SMV4HAX40N" } }, { "id": "switch.vaatwasser_program_quick65", "name": { "name": "Vaatwasser Program Quick65" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.SWITCH", "otherDeviceIds": [ { "deviceId": "switch.vaatwasser_program_quick65" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "deviceInfo": { "manufacturer": "Bosch", "model": "SMV4HAX40N" } }, { "id": "switch.vaatwasser_program_machinecare", "name": { "name": "Vaatwasser Program MachineCare" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.SWITCH", "otherDeviceIds": [ { "deviceId": "switch.vaatwasser_program_machinecare" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "deviceInfo": { "manufacturer": "Bosch", "model": "SMV4HAX40N" } }, { "id": "switch.vaatwasser_power", "name": { "name": "Vaatwasser Power" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.SWITCH", "otherDeviceIds": [ { "deviceId": "switch.vaatwasser_power" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "deviceInfo": { "manufacturer": "Bosch", "model": "SMV4HAX40N" } }, { "id": "switch.vaatwasser_childlock", "name": { "name": "Vaatwasser ChildLock" }, "attributes": {}, "traits": [ "action.devices.traits.OnOff" ], "willReportState": true, "type": "action.devices.types.SWITCH", "otherDeviceIds": [ { "deviceId": "switch.vaatwasser_childlock" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "deviceInfo": { "manufacturer": "Bosch", "model": "SMV4HAX40N" } }, { "id": "media_player.spotify_northlake", "name": { "name": "Spotify NorthLake" }, "attributes": { "availableInputs": [ { "key": "OPPO Reno4 5G", "names": [ { "name_synonym": [ "OPPO Reno4 5G" ], "lang": "en" } ] }, { "key": "PC-MARTIJN", "names": [ { "name_synonym": [ "PC-MARTIJN" ], "lang": "en" } ] } ], "orderedInputs": true, "volumeCanMuteAndUnmute": false, "commandOnlyVolume": false, "volumeMaxLevel": 100, "levelStepSize": 10, "transportControlSupportedCommands": [ "NEXT", "PAUSE", "PREVIOUS", "RESUME", "SEEK_RELATIVE", "SEEK_TO_POSITION", "SHUFFLE" ], "supportActivityState": true, "supportPlaybackState": true }, "traits": [ "action.devices.traits.OnOff", "action.devices.traits.InputSelector", "action.devices.traits.Volume", "action.devices.traits.TransportControl", "action.devices.traits.MediaState" ], "willReportState": true, "type": "action.devices.types.SETTOP", "otherDeviceIds": [ { "deviceId": "media_player.spotify_northlake" } ], "customData": { "webhookId": null, "httpPort": 8123, "uuid": "**REDACTED**" }, "deviceInfo": { "manufacturer": "Spotify AB", "model": "Spotify premium" } } ] }, "query": { "devices": { "scene.tradfri_10_oranje": { "online": true }, "scene.tradfri_80_wit": { "online": true }, "scene.tradfri_uit": { "online": true }, "scene.tradfri_80_groen_telefoon_opgeladen": { "online": true }, "scene.tradfri_30_groen_telefoon_opgeladen": { "online": true }, "scene.tradfri_50_rood_telefoon_bijna_leeg": { "online": true }, "scene.tradfri_80_rood_telefoon_opgeladen": { "online": true }, "light.tradfri_slaapkamer": { "online": true, "on": false }, "light.ledstrip": { "online": true, "on": false }, "light.boekenkast": { "online": true, "on": false }, "light.schemerlamp": { "online": true, "on": false }, "light.schemerlampje_achter": { "online": true, "on": false }, "light.schemerlampjes_voor": { "online": true, "on": false }, "light.staande_dimlamp": { "online": true, "on": false }, "switch.pc_martijn": { "online": true, "on": true }, "media_player.sony_kd_49xh8577_3": { "online": true, "on": true, "currentVolume": 0, "isMuted": true, "activityState": "STANDBY", "playbackState": "STOPPED" }, "light.tradfri_bulb_3": { "online": true, "on": false }, "light.tradfri_bulb_2": { "online": true, "on": false }, "light.tradfri_bulb_7": { "online": true, "on": false }, "light.tradfri_bulb_5": { "online": true, "on": false }, "light.tradfri_bulb_4": { "online": true, "on": false }, "light.tradfri_bulb_6": { "online": true, "on": false }, "light.tradfri_bulb_8": { "online": true, "on": false }, "light.tradfri_bulb": { "online": true, "on": false }, "media_player.sony_kd_49xh8577_2": { "online": true, "on": true, "currentModeSettings": { "sound mode": null }, "currentVolume": 0, "isMuted": true, "activityState": "STANDBY", "playbackState": "STOPPED" }, "media_player.stereo_noordermeer": { "online": false }, "climate.woonkamer": { "online": true, "on": true, "thermostatMode": "heat", "thermostatTemperatureAmbient": 23.6, "thermostatTemperatureSetpoint": 20.5 }, "script.naar_bed": { "online": true }, "script.tradfri_loop": { "online": true }, "script.ledstrip_seizure": { "online": true }, "climate.martijn": { "online": true, "on": true, "thermostatMode": "heat", "thermostatTemperatureAmbient": 23.7, "thermostatTemperatureSetpoint": 18.0 }, "media_player.sony_kd_49xh8577": { "online": true, "on": true, "currentVolume": 0, "isMuted": false, "activityState": "ACTIVE", "playbackState": "PLAYING" }, "media_player.sony_bravia_tv": { "online": true, "on": true, "currentInput": "", "currentVolume": 0, "isMuted": true, "activityState": "STANDBY", "playbackState": "STOPPED" }, "binary_sensor.koelkast_door": { "online": true, "openPercent": 0 }, "binary_sensor.vaatwasser_door": { "online": true, "openPercent": 0 }, "switch.koelkast_power": { "online": true, "on": true }, "switch.koelkast_childlock": { "online": true, "on": false }, "switch.vaatwasser_program_intensiv70": { "online": true, "on": false }, "switch.vaatwasser_program_auto2": { "online": true, "on": false }, "switch.vaatwasser_program_eco50": { "online": true, "on": false }, "switch.vaatwasser_program_prerinse": { "online": true, "on": false }, "switch.vaatwasser_program_nightwash": { "online": true, "on": false }, "switch.vaatwasser_program_quick65": { "online": true, "on": false }, "switch.vaatwasser_program_machinecare": { "online": true, "on": false }, "switch.vaatwasser_power": { "online": true, "on": false }, "switch.vaatwasser_childlock": { "online": true, "on": false }, "media_player.spotify_northlake": { "online": true, "on": true, "currentInput": "OPPO Reno4 5G", "currentVolume": 100, "activityState": "ACTIVE", "playbackState": "PLAYING" } } } } } ```

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.websocket_api.http.connection
Source: components/google_assistant/http.py:61
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 4:20:11 PM (2 occurrences)
Last logged: 4:24:10 PM

[546979622208] Error handling message: Unknown error (unknown_error) [redacted] from 192.168.178.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/jwt/algorithms.py", line 350, in prepare_key
    RSAPrivateKey, load_pem_private_key(key_bytes, password=None)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: ('Could not deserialize key data. The data may be in an incorrect format, the provided password may be incorrect, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [<OpenSSLError(code=503841036, lib=60, reason=524556, reason_text=unsupported)>])

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 793, in handle_execute_script
    script_result = await script_obj.async_run(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1799, in async_run
    return await asyncio.shield(create_eager_task(run.async_run()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 463, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 527, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 557, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 525, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 764, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 727, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2763, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2806, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/__init__.py", line 162, in request_sync_service_handler
    await google_config.async_sync_entities(agent_user_id)
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/helpers.py", line 232, 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 208, in _async_request_sync_devices
    return await self.async_call_homegraph_api(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/http.py", line 272, in async_call_homegraph_api
    await self._async_update_token()
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/http.py", line 246, in _async_update_token
    _get_homegraph_jwt(
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/http.py", line 61, in _get_homegraph_jwt
    return jwt.encode(jwt_raw, key, algorithm="RS256")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/jwt/api_jwt.py", line 73, in encode
    return api_jws.encode(
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/jwt/api_jws.py", line 160, in encode
    key = alg_obj.prepare_key(key)
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/jwt/algorithms.py", line 353, in prepare_key
    return cast(RSAPublicKey, load_pem_public_key(key_bytes))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Unable to load PEM file. See https://cryptography.io/en/latest/faq/#why-can-t-i-import-my-pem-file for more details. InvalidData(InvalidByte(0, 92))
Logger: homeassistant.helpers.script.websocket_api_script
Source: helpers/script.py:525
First occurred: 4:20:11 PM (4 occurrences)
Last logged: 4:41:46 PM

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Unable to load PEM file. See https://cryptography.io/en/latest/faq/#why-can-t-i-import-my-pem-file for more details. InvalidData(InvalidByte(0, 92))
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/jwt/algorithms.py", line 350, in prepare_key
    RSAPrivateKey, load_pem_private_key(key_bytes, password=None)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: ('Could not deserialize key data. The data may be in an incorrect format, the provided password may be incorrect, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [<OpenSSLError(code=503841036, lib=60, reason=524556, reason_text=unsupported)>])

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 525, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 764, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 727, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2763, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2806, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/__init__.py", line 162, in request_sync_service_handler
    await google_config.async_sync_entities(agent_user_id)
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/helpers.py", line 232, 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 208, in _async_request_sync_devices
    return await self.async_call_homegraph_api(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/http.py", line 272, in async_call_homegraph_api
    await self._async_update_token()
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/http.py", line 246, in _async_update_token
    _get_homegraph_jwt(
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/http.py", line 61, in _get_homegraph_jwt
    return jwt.encode(jwt_raw, key, algorithm="RS256")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/jwt/api_jwt.py", line 73, in encode
    return api_jws.encode(
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/jwt/api_jws.py", line 160, in encode
    key = alg_obj.prepare_key(key)
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/jwt/algorithms.py", line 353, in prepare_key
    return cast(RSAPublicKey, load_pem_public_key(key_bytes))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Unable to load PEM file. See https://cryptography.io/en/latest/faq/#why-can-t-i-import-my-pem-file for more details. InvalidData(InvalidByte(0, 92))

Additional information

I had just followed all the steps for local fulfillment, but I don't know if that's related to this.

home-assistant[bot] commented 2 months ago

Hey there @home-assistant/cloud, mind taking a look at this issue as it has been labeled with an integration (google_assistant) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `google_assistant` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign google_assistant` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


google_assistant documentation google_assistant source (message by IssueLinks)

NorthLake commented 2 months ago

I (actually @joostlek) realized that it probably has something to do with the private key of the service account. It does seem to be set correctly, though:

service_account:
  private_key: '-----BEGIN PRIVATE KEY-----\n[redacted]=\n-----END PRIVATE KEY-----\n'
NorthLake commented 2 months ago

And then I realized \n does not get parsed in yaml and it broke because of that. Removed the newlines, but then got the error ValueError: Valid PEM but no BEGIN PUBLIC KEY/END PUBLIC KEY delimiters. Are you sure this is a public key?. Lastly I decided to just create a new json key in Google Cloud and upload the file and use that with !include. That solved the issue.