core icon indicating copy to clipboard operation
core copied to clipboard

Warning in HA 2023.2.0: has the non-numeric value: None

Open GerdRuetten opened this issue 2 years ago • 6 comments

The problem

After updating on HA 2023.2.0 i get following error:

Logger: homeassistant.components.sensor Source: components/sensor/init.py:605 Integration: Sensor (documentation, issues) First occurred: 18:09:20 (4 occurrences) Last logged: 18:09:20

Sensor sensor.handsender_pascal_action_duration has device class None, state class None and unit second thus indicating it has a numeric value; however, it has the non-numeric value: None (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22 Sensor sensor.zigbee_router_1_transmit_power has device class None, state class None and unit dBm thus indicating it has a numeric value; however, it has the non-numeric value: None (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22 Sensor sensor.handsender_marvin_action_duration has device class None, state class None and unit second thus indicating it has a numeric value; however, it has the non-numeric value: None (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22 Sensor sensor.zigbee_router_2_transmit_power has device class None, state class None and unit dBm thus indicating it has a numeric value; however, it has the non-numeric value: None (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22

What version of Home Assistant Core has the issue?

2023.2.0

What was the last working version of Home Assistant Core?

2023.1.7

What type of installation are you running?

Home Assistant OS

Integration causing the issue

MQTT

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-02-02 18:09:20.546 WARNING (MainThread) [homeassistant.components.sensor] Sensor sensor.handsender_pascal_action_duration has device class None, state class None and unit second thus indicating it has a numeric value; however, it has the non-numeric value: None (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
2023-02-02 18:09:20.590 WARNING (MainThread) [homeassistant.components.sensor] Sensor sensor.zigbee_router_1_transmit_power has device class None, state class None and unit dBm thus indicating it has a numeric value; however, it has the non-numeric value: None (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
2023-02-02 18:09:20.659 WARNING (MainThread) [homeassistant.components.sensor] Sensor sensor.handsender_marvin_action_duration has device class None, state class None and unit second thus indicating it has a numeric value; however, it has the non-numeric value: None (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
2023-02-02 18:09:20.673 WARNING (MainThread) [homeassistant.components.sensor] Sensor sensor.zigbee_router_2_transmit_power has device class None, state class None and unit dBm thus indicating it has a numeric value; however, it has the non-numeric value: None (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22

Additional information

No response

GerdRuetten avatar Feb 02 '23 17:02 GerdRuetten

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (sensor) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of sensor can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign sensor Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


sensor documentation sensor source (message by IssueLinks)

home-assistant[bot] avatar Feb 02 '23 17:02 home-assistant[bot]

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

Code owner commands

Code owners of mqtt can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign mqtt Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


mqtt documentation mqtt source (message by IssueLinks)

home-assistant[bot] avatar Feb 02 '23 17:02 home-assistant[bot]

Not sure what value is causing the issue, but I am working on a bugfix to allow an empty string to be ignored and None to be accepted as an unknown state for numeric sensors. That should probably solve these errors if the sensors are MQTT sensors. https://github.com/home-assistant/core/pull/87004

jbouwh avatar Feb 02 '23 18:02 jbouwh

With 2023.2, I started to get this same error but with Modbus sensors:

Logger: homeassistant.components.sensor
Source: components/sensor/__init__.py:608 
Integration: Sensor ([documentation](https://www.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22)) 
First occurred: 19.46.11 (8 occurrences) 
Last logged: 19.46.11

Sensor sensor.watertemp has device class None, state class None and unit °C thus indicating it has a numeric value; however, it has the non-numeric value: unavailable (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+modbus%22
Sensor sensor.blower has device class None, state class None and unit RPM thus indicating it has a numeric value; however, it has the non-numeric value: unavailable (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+modbus%22

Running: Home Assistant 2023.2.2, Supervisor 2023.01.1, Operating System 9.5

hiatsu0 avatar Feb 05 '23 20:02 hiatsu0

With 2023.2, I started to get this same error but with Modbus sensors:

Logger: homeassistant.components.sensor
Source: components/sensor/__init__.py:608 
Integration: Sensor ([documentation](https://www.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22)) 
First occurred: 19.46.11 (8 occurrences) 
Last logged: 19.46.11

Sensor sensor.watertemp has device class None, state class None and unit °C thus indicating it has a numeric value; however, it has the non-numeric value: unavailable (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+modbus%22
Sensor sensor.blower has device class None, state class None and unit RPM thus indicating it has a numeric value; however, it has the non-numeric value: unavailable (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+modbus%22

Running: Home Assistant 2023.2.2, Supervisor 2023.01.1, Operating System 9.5

AFAIN an issue for that is already available. The warnings have been added, not breaking things yet. but they will in the future.

jbouwh avatar Feb 06 '23 07:02 jbouwh

i have the same issue with a HUE remote, apparently the values of the buttons are set to "None" when no button has been pressed yet after a restart of Z2M. It's easily re-producible here, if you need any logs or something just let me know.

yolani avatar Feb 06 '23 12:02 yolani

What about template sensors? I have plenty of template sensors which may be “unknown” on HA startup. As a result my log is flooded by these warnings.

ildar170975 avatar Feb 10 '23 06:02 ildar170975

What about template sensors? I have plenty of template sensors which may be “unknown” on HA startup. As a result my log is flooded by these warnings.

Please open a new issue

jbouwh avatar Feb 10 '23 12:02 jbouwh

What about template sensors? I have plenty of template sensors which may be “unknown” on HA startup. As a result my log is flooded by these warnings.

If you use availability you can avoid the warnings in your log. 😉

edwardtfn avatar Feb 11 '23 13:02 edwardtfn