Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't control via HA climate entity any more, various errors... #16

Closed
edmooredop opened this issue Oct 23, 2023 · 11 comments
Closed

Can't control via HA climate entity any more, various errors... #16

edmooredop opened this issue Oct 23, 2023 · 11 comments

Comments

@edmooredop
Copy link

Since the last update I seem to have issues using the integration's base 'climate entity' that allows setting of temp, modes etc. All the 'seperate' entities like switching the LED on and off, powerful mode, etc seem to work fine. Hope I'm describing this clearly enough, sorry!

Getting lots of errors in the logs along these lines:

It feels like probably something changed in HA core that has caused an issue but I'm in no way smart enough to figure it out!

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:226
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 22 October 2023 at 19:37:33 (9 occurrences)
Last logged: 19:25:49

[140555377514688] int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
[140555172204992] int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
[140555398906304] int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 2012, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2049, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call
    response_data = await _handle_entity_call(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/fujitsu_airstage/switch.py", line 220, in async_turn_off
    await self.instance.coordinator.async_refresh()  # TODO: see if we can update entity
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 266, in async_refresh
    await self._async_refresh(log_failures=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 389, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 172, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 469, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 779, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 879, in _async_write_ha_state
    state, attr = self._async_generate_attributes()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 822, in _async_generate_attributes
    attr.update(self.state_attributes or {})
                ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in state_attributes
    self.target_temperature,
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fujitsu_airstage/climate.py", line 140, in target_temperature
    if self.hvac_mode == HVACMode.FAN_ONLY or int(self._ac.get_target_temperature()) >= 6000:
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
@edmooredop
Copy link
Author

Here's another error from the logs:

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/fujitsu_airstage/climate.py:140
Integration: Fujitsu Airstage
First occurred: 22 October 2023 at 19:33:50 (1649 occurrences)
Last logged: 19:40:52

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 233, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 389, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 172, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 469, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 779, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 879, in _async_write_ha_state
    state, attr = self._async_generate_attributes()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 822, in _async_generate_attributes
    attr.update(self.state_attributes or {})
                ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in state_attributes
    self.target_temperature,
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fujitsu_airstage/climate.py", line 140, in target_temperature
    if self.hvac_mode == HVACMode.FAN_ONLY or int(self._ac.get_target_temperature()) >= 6000:
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

@danielkaldheim
Copy link
Owner

Hi,

Thank you for your logs, that helps for sure!
I'll investigate!

@edmooredop
Copy link
Author

Hey Daniel, if it's any help - this seems to be only be affecting one of my three units. I think it MIGHT have been something to do with it being operating (fan mode) when HA was restarted. Maybe has got out of sync or something. Still getting the the 'int() argument must be a string.... not 'NoneType'' error any time I try and change the climate entity for the unit in question. In HA it is now permanently showing as in 'fan only'.

@edmooredop
Copy link
Author

Correction! It is affecting all three units, my mistake.

@esrocom
Copy link

esrocom commented Oct 31, 2023

Same here, all my 5 units could't be controlled anymore. I had to restore a backup prior to the latest updates.

@edmooredop
Copy link
Author

Hmm yes think I might have to do the same.

@liakjim
Copy link

liakjim commented Nov 1, 2023

Same here, all my 5 units could't be controlled anymore. I had to restore a backup prior to the latest updates.

Are you referring to homeassistant updates or airstage integration?

github-actions bot pushed a commit that referenced this issue Nov 2, 2023
## [1.1.7](v1.1.6...v1.1.7) (2023-11-02)

### Bug Fixes

* **climate:** Quickfix target temperature is none, issue [#16](#16) ([fc2e313](fc2e313))
@danielkaldheim
Copy link
Owner

Hi guys!
Thanks for detailed description of the issue!
I have fixed the TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType' and hopefully this is the source of these issues you are experience. I have tested with my own unit different scenarios, and from my perspective it looks like this fixes it (but let me know if you experience this different).

@esrocom
Copy link

esrocom commented Nov 2, 2023

Feedback: after applying the updates, the systems now keep on working without any problems as far as I can see.
FYI: I have one ASYG24KMTE (living room) and 4 ASYG09KMCE (bedrooms). If you want me to test some functions you cannot test yourself (like swing or human presence detection, let me know. Although the systems are installed in my holidayhouse in Greece, I can test remotely or otherwise in Januari when I am present again.

@edmooredop
Copy link
Author

Yep seems to have fixed it for me too, thanks Daniel!

@liakjim
Copy link

liakjim commented Nov 2, 2023

I also confirm that 1.17 fixed all issues. Thanks @danielkaldheim , beer incoming :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants