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

numereic / non-numeric type errors in latest home assistant beta #25

Closed
B-Hartley opened this issue Jan 30, 2023 · 4 comments
Closed

numereic / non-numeric type errors in latest home assistant beta #25

B-Hartley opened this issue Jan 30, 2023 · 4 comments

Comments

@B-Hartley
Copy link

errors in log: Home Assistant 2023.2.0b4

 [homeassistant.components.sensor] Sensor sensor.smart_meter_ihd_software_version has device class None, state class measurement and unit None thus indicating it has a numeric value; however, it has the non-numeric value: v1.8.13 (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
 [homeassistant.components.sensor] Sensor sensor.smart_meter_ihd_hardware has device class None, state class measurement and unit None thus indicating it has a numeric value; however, it has the non-numeric value: GLOW-IHD-01-1v4-SMETS2 (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
[homeassistant.components.sensor] Entity sensor.smart_meter_electricity_import_unit_rate (<class 'custom_components.hildebrand_glow_ihd.sensor.HildebrandGlowMqttSensor'>) is using state class 'measurement' which is impossible considering device class ('monetary') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
[homeassistant.components.sensor] Entity sensor.smart_meter_electricity_import_standing_charge (<class 'custom_components.hildebrand_glow_ihd.sensor.HildebrandGlowMqttSensor'>) is using state class 'measurement' which is impossible considering device class ('monetary') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
 [homeassistant.components.sensor] Entity sensor.smart_meter_electricity_cost_today (<class 'custom_components.hildebrand_glow_ihd.sensor.HildebrandGlowMqttSensor'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
 [homeassistant.components.sensor] Entity sensor.smart_meter_gas_import_unit_rate (<class 'custom_components.hildebrand_glow_ihd.sensor.HildebrandGlowMqttSensor'>) is using state class 'measurement' which is impossible considering device class ('monetary') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
[homeassistant.components.sensor] Entity sensor.smart_meter_gas_import_standing_charge (<class 'custom_components.hildebrand_glow_ihd.sensor.HildebrandGlowMqttSensor'>) is using state class 'measurement' which is impossible considering device class ('monetary') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
 [homeassistant.components.sensor] Entity sensor.smart_meter_gas_cost_today (<class 'custom_components.hildebrand_glow_ihd.sensor.HildebrandGlowMqttSensor'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

@Clam58
Copy link

Clam58 commented Feb 2, 2023

I’m seeing similar entries in the release version (HA 2023.2] e.g.

Logger: homeassistant.components.sensor
Source: components/sensor/init.py:605
Integration: Sensor (documentation, issues)
First occurred: 10:51:05 (2 occurrences)
Last logged: 10:51:05

Sensor sensor.smart_meter_ihd_software_version has device class None, state class measurement and unit None thus indicating it has a numeric value; however, it has the non-numeric value: v1.8.13 (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Sensor sensor.smart_meter_ihd_hardware has device class None, state class measurement and unit None thus indicating it has a numeric value; however, it has the non-numeric value: GLOW-IHD-01-1v4-SMETS2 (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

and

Logger: homeassistant.components.sensor
Source: components/sensor/init.py:503
Integration: Sensor (documentation, issues)
First occurred: 10:51:05 (6 occurrences)
Last logged: 10:51:05

Entity sensor.smart_meter_electricity_import_standing_charge (<class 'custom_components.hildebrand_glow_ihd.sensor.HildebrandGlowMqttSensor'>) is using state class 'measurement' which is impossible considering device class ('monetary') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Entity sensor.smart_meter_electricity_cost_today (<class 'custom_components.hildebrand_glow_ihd.sensor.HildebrandGlowMqttSensor'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Entity sensor.smart_meter_gas_import_unit_rate (<class 'custom_components.hildebrand_glow_ihd.sensor.HildebrandGlowMqttSensor'>) is using state class 'measurement' which is impossible considering device class ('monetary') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Entity sensor.smart_meter_gas_import_standing_charge (<class 'custom_components.hildebrand_glow_ihd.sensor.HildebrandGlowMqttSensor'>) is using state class 'measurement' which is impossible considering device class ('monetary') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Entity sensor.smart_meter_gas_cost_today (<class 'custom_components.hildebrand_glow_ihd.sensor.HildebrandGlowMqttSensor'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

@viking2010
Copy link

I can confirm having just installed this integration tonight that I am also getting the same errors. I'm running on:

Home Assistant 2023.2.2
Supervisor 2023.01.1
Operating System 9.5
Frontend 20230202.0 - latest

@viking2010
Copy link

Looking at this, it would appear this is due to the "v" in the version number that's picked up. if the "v" can be stripped from the front of the text then that would fix this issue I think. I'm not sure how to do that, but I'm sure someone cleverer than me can do it!!

So when the data gets pulled through, the values are coming in like this:

{"software":"v1.8.12","timestamp":"2022-06-11T20:54:53Z",............etc, etc

Then from line 40 in sensor.py, the following section creates the sensor:

    "name": "Smart Meter IHD Software Version",
    "device_class": None,
    "unit_of_measurement": None,
    "state_class": SensorStateClass.MEASUREMENT,
    "entity_category": EntityCategory.DIAGNOSTIC,
    "icon": "mdi:information-outline",
    "func": lambda js: js["software"],  

On the last line, is there anything that can be done at this point to drop the first letter of the "software" value??

@viking2010
Copy link

@Clam58 I've seen this too and found the following from a spot of Googling.....
home-assistant/core#86780
According to one person on here they say "Looks like state_class for monetary can only be total which I think makes sense".

I tried replacing the value "state_class": SensorStateClass.MEASUREMENT, with "state_class": SensorStateClass.TOTAL, on line 123 as well as the other sensors reporting an error, but that didn't seem to work. However, changing it to "state_class": None, does work. What the impact of this is elsewhere, I'm not sure.

Also found that someone has mentioned a similar problem on the DCC version of this repo:
HandyHat/ha-hildebrandglow-dcc#304

I've also found a couple of my own template sensors with this issue too.

@megakid megakid closed this as completed Apr 19, 2023
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