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.25k stars 30.24k forks source link

fujitsu_fglair: `TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'` #127742

Open fdcastel opened 1 day ago

fdcastel commented 1 day ago

The problem

Simply adding the integration to latest Home Assistant causes the following error in log:

2024-10-06 12:43:13.379 ERROR (MainThread) [homeassistant.components.climate] Error while setting up fujitsu_fglair platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 369, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 628, in async_add_entities
    for entity in new_entities:
  File "/usr/src/homeassistant/homeassistant/components/fujitsu_fglair/climate.py", line 70, in <genexpr>
    FGLairDevice(entry.runtime_data, device)
  File "/usr/src/homeassistant/homeassistant/components/fujitsu_fglair/climate.py", line 112, in __init__
    self._set_attr()
  File "/usr/src/homeassistant/homeassistant/components/fujitsu_fglair/climate.py", line 168, in _set_attr
    self._attr_current_temperature = self.device.sensed_temp
                                     ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ayla_iot_unofficial/fujitsu_hvac.py", line 292, in sensed_temp
    int(self.property_values[DISPLAY_TEMP])
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

What version of Home Assistant Core has the issue?

core-2024.10.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

fujitsu_fglair

Link to integration documentation on our website

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

Diagnostics information

home-assistant_fujitsu_fglair_2024-10-06T15-53-00.492Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Maybe related: https://github.com/home-assistant/core/issues/125274

home-assistant[bot] commented 1 day ago

Hey there @crevetor, mind taking a look at this issue as it has been labeled with an integration (fujitsu_fglair) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `fujitsu_fglair` 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 fujitsu_fglair` 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)


fujitsu_fglair documentation fujitsu_fglair source (message by IssueLinks)

charstring1 commented 8 hours ago

Same here.


Source: helpers/entity_platform.py:369
integration: Climate (documentation, issues)
First occurred: October 6, 2024 at 12:04:17 PM (2 occurrences)
Last logged: October 6, 2024 at 7:46:48 PM

Error while setting up fujitsu_fglair platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 369, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 628, in async_add_entities
    for entity in new_entities:
  File "/usr/src/homeassistant/homeassistant/components/fujitsu_fglair/climate.py", line 70, in <genexpr>
    FGLairDevice(entry.runtime_data, device)
  File "/usr/src/homeassistant/homeassistant/components/fujitsu_fglair/climate.py", line 112, in __init__
    self._set_attr()
  File "/usr/src/homeassistant/homeassistant/components/fujitsu_fglair/climate.py", line 168, in _set_attr
    self._attr_current_temperature = self.device.sensed_temp
                                     ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ayla_iot_unofficial/fujitsu_hvac.py", line 292, in sensed_temp
    int(self.property_values[DISPLAY_TEMP])
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'