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
71.01k stars 29.65k forks source link

Google assistant - Error doing job: Task exception was never retrieved #121816

Closed lennon101 closed 1 month ago

lennon101 commented 1 month ago

The problem

Google Assisant reporting an issue in the logs relating to a string comparison with an int.

Logger: homeassistant
Source: util/percentage.py:56
First occurred: 07:24:46 (1 occurrences)
Last logged: 07:24:46

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/report_state.py", line 171, in initial_report
    entity_data = entity.query_serialize()
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/helpers.py", line 702, in query_serialize
    deep_update(attrs, trt.query_attributes())
                       ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/google_assistant/trait.py", line 1780, in query_attributes
    response["currentFanSpeedSetting"] = percentage_to_ordered_list_item(
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/percentage.py", line 56, in percentage_to_ordered_list_item
    if percentage <= upper_bound:
       ^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<=' not supported between instances of 'str' and 'int'

System Information

version core-2024.7.1
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 4.4.302+
arch x86_64
timezone Australia/Brisbane
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4924 Installed Version | 1.34.0 Stage | running Available Repositories | 1396 Downloaded Repositories | 51 HACS Data | ok
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | July 28, 2024 at 10:00 relayer_connected | true relayer_region | ap-southeast-1 remote_enabled | true remote_connected | true alexa_enabled | false google_enabled | true remote_server | ap-southeast-1-1.ui.nabu.casa certificate_status | ready instance_id | a7f834509b1646709c46aa01a8eb1863 can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Dashboards dashboards | 11 -- | -- resources | 33 views | 44 mode | storage
Recorder oldest_recorder_run | July 9, 2024 at 20:50 -- | -- current_recorder_run | July 12, 2024 at 07:21 estimated_db_size | 2656.85 MiB database_engine | sqlite database_version | 3.45.3

What version of Home Assistant Core has the issue?

2024.7.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Google Assistant

Link to integration documentation on our website

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

Diagnostics information

config_entry-google_assistant-9c5d019f739a3e4281c5f7377637a024.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 month 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)

elupus commented 1 month ago

You have some fan entity with invalid data.

lennon101 commented 1 month ago

Good point. Sorry I didn't pick that up. How do I discover what that entity's name is? I don't have any entities labeled "currentFanSpeedSetting"

lennon101 commented 1 month ago

These are all my fan entites and their attributes:

image

lennon101 commented 1 month ago

After looking at this, i'm guessing it's that fan.aroma_diffuser entity with the percentage: "small"? I've disabled that and hopefully fixed my problem. Thanks! I'll close the issue

elupus commented 1 month ago

If the aroma diffuser is a integration, please report that error to the integration developers.

lennon101 commented 1 month ago

Yeah, it's from the local Tuya integration. I'll make sure I report it.