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

Temp sensors not updating and different to value shown on climate entity #91990

Closed
breendan opened this issue Apr 25, 2023 · 16 comments · Fixed by #93635
Closed

Temp sensors not updating and different to value shown on climate entity #91990

breendan opened this issue Apr 25, 2023 · 16 comments · Fixed by #93635

Comments

@breendan
Copy link

The problem

For the past few months I have noticed the temperature sensors provided by this integration don't update. Restarting Home Assistant or updating the sensor precision causes a refresh and the values change but otherwise they stay stuck on the last value.

The issue is with both the internal and external temps. The internal temp reported through the climate entity updates fine but not the sensor entities.

I have deleted the integration and reinstalled but no joy.

I've reviewed the debug logs but nothing obvious. It reports the sensor refresh intervals.

Any ideas?

What version of Home Assistant Core has the issue?

core-2023.4.6

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

daikin

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-04-25 18:27:46.246 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['aircon/get_sensor_info', 'aircon/get_control_info', 'aircon/get_day_power_ex', 'aircon/get_week_power', 'aircon/get_day_power_ex', 'aircon/get_week_power']
2023-04-25 18:28:46.247 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['aircon/get_sensor_info', 'aircon/get_control_info', 'aircon/get_day_power_ex', 'aircon/get_week_power', 'aircon/get_day_power_ex', 'aircon/get_week_power']
2023-04-25 18:29:46.248 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['aircon/get_sensor_info', 'aircon/get_control_info', 'aircon/get_day_power_ex', 'aircon/get_week_power', 'aircon/get_day_power_ex', 'aircon/get_week_power']
2023-04-25 18:30:46.249 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['aircon/get_sensor_info', 'aircon/get_control_info', 'aircon/get_day_power_ex', 'aircon/get_week_power', 'aircon/get_day_power_ex', 'aircon/get_week_power']
2023-04-25 18:31:46.249 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['aircon/get_sensor_info', 'aircon/get_control_info', 'aircon/get_day_power_ex', 'aircon/get_week_power', 'aircon/get_day_power_ex', 'aircon/get_week_power']
2023-04-25 18:32:46.251 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['aircon/get_sensor_info', 'aircon/get_control_info', 'aircon/get_day_power_ex', 'aircon/get_week_power', 'aircon/get_day_power_ex', 'aircon/get_week_power']
2023-04-25 18:33:46.251 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['aircon/get_sensor_info', 'aircon/get_control_info', 'aircon/get_day_power_ex', 'aircon/get_week_power', 'aircon/get_day_power_ex', 'aircon/get_week_power']
2023-04-25 18:34:46.252 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['aircon/get_sensor_info', 'aircon/get_control_info', 'aircon/get_day_power_ex', 'aircon/get_week_power', 'aircon/get_day_power_ex', 'aircon/get_week_power']
2023-04-25 18:35:46.252 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['aircon/get_sensor_info', 'aircon/get_control_info', 'aircon/get_day_power_ex', 'aircon/get_week_power', 'aircon/get_day_power_ex', 'aircon/get_week_power']
2023-04-25 18:36:46.253 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['aircon/get_sensor_info', 'aircon/get_control_info', 'aircon/get_day_power_ex', 'aircon/get_week_power', 'aircon/get_day_power_ex', 'aircon/get_week_power']

Additional information

When I click the Diagnostic information download it gives me the info for the Unifi integration and not the Daikin one sorry.

@home-assistant
Copy link

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

Code owner commands

Code owners of daikin 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 daikin Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


daikin documentation
daikin source
(message by IssueLinks)

@Shep084
Copy link

Shep084 commented May 10, 2023

Hi, for what it’s worth I’m also experiencing the same issue. Appreciate any support to fix this issue. Thanks

@breendan
Copy link
Author

I have created a workaround by pulling the values directly from the heatpump itsself. Here is a snip of my sensor code:

# Daikin AC temp sensors because integration doesnt work
- platform: rest
  name: Heat Pump Raw Data
  resource: 'http://{device_ip}/aircon/get_sensor_info'
  value_template: '{{ value }}'
  
- platform: template
  sensors:
    living_room_inside_temperature:
      value_template: "{{ states('sensor.heat_pump_raw_data').split(',')[1].split('=')[1] | float(0) }}"
      device_class: temperature
      unit_of_measurement: "°C"
      friendly_name: Living Room Temp
      
    living_room_outside_temperature:
      value_template: "{{ states('sensor.heat_pump_raw_data').split(',')[3].split('=')[1] | float(0) }}"
      device_class: temperature
      unit_of_measurement: "°C"
      friendly_name: Outside Temp

But hopefully the integration can be fixed shortly :)

@Shep084
Copy link

Shep084 commented May 16, 2023

Thanks for sharing. I’ll have a look.

I’ve also been trying to find a work around. I created a temporary solution, but hopefully the automation can be fixed.

See below, I created an automations to reload all entity if it’s stuck in the same temperature for more than 4 hours.
This appears to fix the issue.

alias: Office Outdoor Temp Reset
description: ""
trigger: - platform: state
entity_id:

  • sensor.office_outside_temperature
    for:
    hours: 4
    minutes: 0
    seconds: 0
    condition: []
    action:
    • service: homeassistant.reload_all
      data: {}
      mode: single

@breendan
Copy link
Author

That's clever. I found mine would only update upon restart or reload of the integration. Do you get more frequent updates or does this effectively give you a new value every four hours?

@sjwright
Copy link

Can also confirm. Only reloading the integration updates the values.

@Shep084
Copy link

Shep084 commented May 21, 2023

After more playing around I’ve realised my automation doesn’t fix the issue.
The only way I can get it resolved is to restart home Assistant.

@fredrike Any update on a resolution

@fredrike
Copy link
Contributor

@fredrike Any update on a resolution

No, it is hard to see what's causing this. I need to see full logs with loglevel NOTSET for both pydaikin and the http-lib.

@fakemoth
Copy link

fakemoth commented May 25, 2023

I can only confirm this issue, noticed it a couple of months ago and quietly hoped it will be fixed. Unfortunately it wasn't. For me is only the second sensor, the external/outside one. The one in the room seems to be OK. Got things like this in the log:
2023-05-21 20:48:01.239 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform daikin Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 469, in state value = self.native_value File "/usr/src/homeassistant/homeassistant/components/daikin/sensor.py", line 206, in native_value return self.entity_description.value_func(self._api.device) File "/usr/src/homeassistant/homeassistant/components/daikin/sensor.py", line 120, in <lambda> value_func=lambda device: round(device.today_energy_consumption, 2), File "/usr/local/lib/python3.10/site-packages/pydaikin/daikin_base.py", line 414, in today_energy_consumption return self.today_cool_energy_consumption + self.today_heat_energy_consumption TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType' 2023-05-21 20:48:01.243 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up daikin platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 312, in _async_setup_platform await asyncio.gather(*pending) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 469, in state value = self.native_value File "/usr/src/homeassistant/homeassistant/components/daikin/sensor.py", line 206, in native_value return self.entity_description.value_func(self._api.device) File "/usr/src/homeassistant/homeassistant/components/daikin/sensor.py", line 120, in <lambda> value_func=lambda device: round(device.today_energy_consumption, 2), File "/usr/local/lib/python3.10/site-packages/pydaikin/daikin_base.py", line 414, in today_energy_consumption return self.today_cool_energy_consumption + self.today_heat_energy_consumption TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
2023-05-23 22:51:07.968 WARNING (MainThread) [homeassistant.components.switch] Updating daikin switch took longer than the scheduled update interval 0:00:30

@fredrike
Copy link
Contributor

The external/outdoor sensor is only active when the AC is running, but the logs suggests other issues.

@mlemainque: any ideas what's going on here:

"/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 469, in state value = self.native_value File "/usr/src/homeassistant/homeassistant/components/daikin/sensor.py", line 206, in native_value return self.entity_description.value_func(self._api.device) File "/usr/src/homeassistant/homeassistant/components/daikin/sensor.py", line 120, in <lambda> value_func=lambda device: round(device.today_energy_consumption, 2), 
File "/usr/local/lib/python3.10/site-packages/pydaikin/daikin_base.py", line 414, in today_energy_consumption return self.today_cool_energy_consumption + self.today_heat_energy_consumption TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType' 2023-05-21 20:48:01.243 ERROR (MainThread) 

@fakemoth
Copy link

fakemoth commented May 25, 2023

The external/outdoor sensor is only active when the AC is running, but the logs suggests other issues.

I can confidently assure you that is not the case, and is wasn't working at all for long time - so, since you replied, I started the AC on and checked it regularly. The temperature is still stuck at 24 degrees when it was bellow and now it is above that for sure, also have an external Aqara sensors to confirm. And it is at 24C for a week now, no matter the on/off state (AC is always plugged in BTW). I even had an power outage, so it was "unplugged" for an hour in the morning. Reported temp is the same.

Also in the past it was never the case, at least not for me - the outside sensor was continuously updated no matter the state of AC. My device is a Daikin Comfora Bluevolution FTXP25M-RXP25M Inverter 9000 BTU AC, and I also bought as per the HA docs a compatible Wifi Daikin BRP069B45.

Summer is coming. So - yeah, given it helps to know how toasty it is outside helps a lot with decisions/automations as I also have rack nearby.

@Shep084
Copy link

Shep084 commented May 25, 2023

I am also lead to believe now it’s only the outdoor sensor with the issue.

I can confirm some AC models do have continues recording of outdoor sensors. I have both new and old models and have experience with both.

From what I have worked out, the only way I can rectify the issue is to restart home assistant. It appears to fix itself and work correctly after a restart. It’s been running now for 2 days without an issue. I think the problem occurs for me after a power outage and requires the restart to fix the issue.

I can’t see anything in the log that would indicate an issue. I’m now considering buying an outdoor sensor to do outdoor temperature. Otherwise the plugin is amazing

@fredrike
Copy link
Contributor

I've created a small patch for the NoneType + NoneType issue, not sure if it is what causes the sensor values to stop updating though.

https://bitbucket.org/mustang51/pydaikin/pull-requests/58

Will merge that patch and create a new version of pydaikin the coming days.

@Shep084
Copy link

Shep084 commented May 25, 2023

Thanks, appreciate the help

@fakemoth
Copy link

Indeed only a restart will do it. Tried right now, all of the sudden the temperature jumped from 24 to 26. And it will remain there I bet, even if at night it will be 16, or the sun exploding will get it right now to 136 :)

@fakemoth
Copy link

I've created a small patch for the NoneType + NoneType issue, not sure if it is what causes the sensor values to stop updating though.

https://bitbucket.org/mustang51/pydaikin/pull-requests/58

Will merge that patch and create a new version of pydaikin the coming days.

Thanks for the effort and taking the time in this!

@mover85 mover85 mentioned this issue May 27, 2023
20 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants