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

Diagnostic values show Unavailable, working before #236

Closed
klingon888 opened this issue May 4, 2023 · 15 comments · Fixed by #237
Closed

Diagnostic values show Unavailable, working before #236

klingon888 opened this issue May 4, 2023 · 15 comments · Fixed by #237

Comments

@klingon888
Copy link

I have a SLP98 furnace and XP21 HP with S30 tstat. I just migrated to a new server and restored my HASS backup. Now some of my diagnostic values are showing as Unavailable when it used to show values. I checked the S30 Diagnostics tab and all the values are shown. I've uninstalled and reinstalled the integration, still same. Any help in diagnosing this? Thanks.

image

Version

  • Home Assistant: HAASIO 2023.5.0
  • This Integration: 2023.4.0.

**Integration Configuration **

  • Local Connection
  • Sensor Diagnostics Enabled: yes
  • System_diagnostic_level: 2
@PeteRager
Copy link
Owner

PeteRager commented May 4, 2023

I'd try toggling the diagnostic level to zero and then reset to two and see if that makes the values come available.

If that doesn't solve it, then look in the home assistant log for errors or warnings. Perhaps something has changed in 2022.5.0.

@klingon888
Copy link
Author

I've already done the toggling step, still same. Nothing obvious in the logs except this

ValueError: Sensor sensor.system_ou_comp_short_cycle_delay_active has device class None, state class measurement unit None and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: No (<class 'str'>)

Clicking on the unavailable entity shows

image

@klingon888
Copy link
Author

I think 2023.5.0 broke the integration. I went back to the old server, started HASS which was on 2023.4.0 and everything worked. I then upgraded HASS to 2023.5.0 and the Unavailable started showing up. Even tried toggling Diag level, still same.

@PeteRager
Copy link
Owner

Ok, that indicates that the integration is no longer providing an entity for that value.

Go into devices and click on the device and see what entities are there. Also, go into the entities tab and look around. There may be entities with an _2 - meaning we have dups. This could have occurred when removing and readding the integration.

There are 3 possibilities:
a) the S30 are no longer providing these diagnostic values
b) the entity names have changed
c) the integration is failing to create them

I'll go run a quick test on 2022.5.0 and see if it works for me.

@klingon888
Copy link
Author

As far as I can see, no dupes. And all the entities are listed under Devices. All the Unavailable entities have this under the Status column. Clicking on it brings back the "entity is no longer provided by integration" screen
image

@PeteRager
Copy link
Owner

I'm seeing errors like this in the logs at startup:

ha_lennox_test | Traceback (most recent call last):
ha_lennox_test |   File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 579, in state
ha_lennox_test |     numerical_value = int(value)
ha_lennox_test | ValueError: invalid literal for int() with base 10: 'No'
ha_lennox_test |
ha_lennox_test | The above exception was the direct cause of the following exception:
ha_lennox_test |
ha_lennox_test | Traceback (most recent call last):
ha_lennox_test |   File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
ha_lennox_test |     self._context.run(self._callback, *self._args)
ha_lennox_test |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state
ha_lennox_test |     self._async_write_ha_state()
ha_lennox_test |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state
ha_lennox_test |     state = self._stringify_state(available)
ha_lennox_test |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state
ha_lennox_test |     if (state := self.state) is None:
ha_lennox_test |   File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 583, in state
ha_lennox_test |     raise ValueError(
ha_lennox_test | ValueError: Sensor sensor.sagehouse_ou_comp_short_cycle_delay_active has device class None, state class measurement unit None and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: No (<class 'str'>)

@PeteRager
Copy link
Owner

Would it be accurate to say that the ones that are unavailable usually do not have a numeric value?

@klingon888
Copy link
Author

I think you're onto something with those error msgs. And your assumption is correct. Those values are typically on/off

@klingon888
Copy link
Author

Previous working shot:
image

@PeteRager
Copy link
Owner

Looks like a wide-spread problem, seeing many issues being reported with different integrations.
However, the integration should not be classifying an On/Off values as a measurement. I'll start looking at a fix.

PeteRager added a commit that referenced this issue May 4, 2023
@PeteRager PeteRager linked a pull request May 4, 2023 that will close this issue
PeteRager added a commit that referenced this issue May 4, 2023
#236 - Diagnostic Sensors unavailable
@PeteRager
Copy link
Owner

Will have new release in a few, doing installation testing

@PeteRager PeteRager reopened this May 4, 2023
@PeteRager
Copy link
Owner

This release should fix the problem. Please verify when you have time.

https://github.com/PeteRager/lennoxs30/releases/tag/2023.5.0

@klingon888
Copy link
Author

Awesome. Thank you!

@klingon888
Copy link
Author

Looks like everything is back to normal and all entities showing values. Thank you for the quick action on this!

@PeteRager
Copy link
Owner

Thanks for reporting it.

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

Successfully merging a pull request may close this issue.

2 participants