You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ValueError: Sensor sensor.smart_meter_gas_import_today has device class energy, state class measurement unit kWh and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: unknown (<class 'str'>)
#37
Open
watsonpaul80 opened this issue
May 19, 2023
· 0 comments
First occurred: 5:46:20 PM (634 occurrences)
Last logged: 7:31:50 PM
Exception raised when updating state of sensor.smart_meter_gas_import_today, topic: 'glow/441793504B04/SENSOR/gasmeter' with payload: b'{"gasmeter":{"timestamp":"2023-05-19T18:29:14Z","energy":{"import":{"cumulative":87448.000,"day":0.000,"week":null,"month":null,"units":"kWh","cumulativevol":87448.000,"cumulativevolunits":"kWh","dayvol":0.000,"weekvol":null,"monthvol":null,"dayweekmonthvolunits":"kWh","mprn":"1288362102","supplier":"---","price":{"unitrate":0.10199,"standingcharge":0.28484}}}}}'
Exception raised when updating state of sensor.smart_meter_gas_import_today, topic: 'glow/441793504B04/SENSOR/gasmeter' with payload: b'{"gasmeter":{"timestamp":"2023-05-19T18:29:46Z","energy":{"import":{"cumulative":87448.000,"day":0.000,"week":null,"month":null,"units":"kWh","cumulativevol":87448.000,"cumulativevolunits":"kWh","dayvol":0.000,"weekvol":null,"monthvol":null,"dayweekmonthvolunits":"kWh","mprn":"1288362102","supplier":"---","price":{"unitrate":0.10199,"standingcharge":0.28484}}}}}'
Exception raised when updating state of sensor.smart_meter_gas_import_today, topic: 'glow/441793504B04/SENSOR/gasmeter' with payload: b'{"gasmeter":{"timestamp":"2023-05-19T18:30:18Z","energy":{"import":{"cumulative":87448.000,"day":0.000,"week":null,"month":null,"units":"kWh","cumulativevol":87448.000,"cumulativevolunits":"kWh","dayvol":0.000,"weekvol":null,"monthvol":null,"dayweekmonthvolunits":"kWh","mprn":"1288362102","supplier":"---","price":{"unitrate":0.10199,"standingcharge":0.28484}}}}}'
Exception raised when updating state of sensor.smart_meter_gas_import_today, topic: 'glow/441793504B04/SENSOR/gasmeter' with payload: b'{"gasmeter":{"timestamp":"2023-05-19T18:30:43Z","energy":{"import":{"cumulative":87448.000,"day":0.000,"week":null,"month":null,"units":"kWh","cumulativevol":87448.000,"cumulativevolunits":"kWh","dayvol":0.000,"weekvol":null,"monthvol":null,"dayweekmonthvolunits":"kWh","mprn":"1288362102","supplier":"---","price":{"unitrate":0.10199,"standingcharge":0.28484}}}}}'
Exception raised when updating state of sensor.smart_meter_gas_import_today, topic: 'glow/441793504B04/SENSOR/gasmeter' with payload: b'{"gasmeter":{"timestamp":"2023-05-19T18:31:16Z","energy":{"import":{"cumulative":87448.000,"day":0.000,"week":null,"month":null,"units":"kWh","cumulativevol":87448.000,"cumulativevolunits":"kWh","dayvol":0.000,"weekvol":null,"monthvol":null,"dayweekmonthvolunits":"kWh","mprn":"1288362102","supplier":"---","price":{"unitrate":0.10199,"standingcharge":0.28484}}}}}'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 579, in state
numerical_value = int(value)
ValueError: invalid literal for int() with base 10: 'unknown'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/mqtt/models.py", line 270, in process_write_state_requests
entity.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 583, in state
raise ValueError(
ValueError: Sensor sensor.smart_meter_gas_import_today has device class energy, state class measurement unit kWh and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: unknown (<class 'str'>)
The text was updated successfully, but these errors were encountered:
First occurred: 5:46:20 PM (634 occurrences)
Last logged: 7:31:50 PM
Exception raised when updating state of sensor.smart_meter_gas_import_today, topic: 'glow/441793504B04/SENSOR/gasmeter' with payload: b'{"gasmeter":{"timestamp":"2023-05-19T18:29:14Z","energy":{"import":{"cumulative":87448.000,"day":0.000,"week":null,"month":null,"units":"kWh","cumulativevol":87448.000,"cumulativevolunits":"kWh","dayvol":0.000,"weekvol":null,"monthvol":null,"dayweekmonthvolunits":"kWh","mprn":"1288362102","supplier":"---","price":{"unitrate":0.10199,"standingcharge":0.28484}}}}}'
Exception raised when updating state of sensor.smart_meter_gas_import_today, topic: 'glow/441793504B04/SENSOR/gasmeter' with payload: b'{"gasmeter":{"timestamp":"2023-05-19T18:29:46Z","energy":{"import":{"cumulative":87448.000,"day":0.000,"week":null,"month":null,"units":"kWh","cumulativevol":87448.000,"cumulativevolunits":"kWh","dayvol":0.000,"weekvol":null,"monthvol":null,"dayweekmonthvolunits":"kWh","mprn":"1288362102","supplier":"---","price":{"unitrate":0.10199,"standingcharge":0.28484}}}}}'
Exception raised when updating state of sensor.smart_meter_gas_import_today, topic: 'glow/441793504B04/SENSOR/gasmeter' with payload: b'{"gasmeter":{"timestamp":"2023-05-19T18:30:18Z","energy":{"import":{"cumulative":87448.000,"day":0.000,"week":null,"month":null,"units":"kWh","cumulativevol":87448.000,"cumulativevolunits":"kWh","dayvol":0.000,"weekvol":null,"monthvol":null,"dayweekmonthvolunits":"kWh","mprn":"1288362102","supplier":"---","price":{"unitrate":0.10199,"standingcharge":0.28484}}}}}'
Exception raised when updating state of sensor.smart_meter_gas_import_today, topic: 'glow/441793504B04/SENSOR/gasmeter' with payload: b'{"gasmeter":{"timestamp":"2023-05-19T18:30:43Z","energy":{"import":{"cumulative":87448.000,"day":0.000,"week":null,"month":null,"units":"kWh","cumulativevol":87448.000,"cumulativevolunits":"kWh","dayvol":0.000,"weekvol":null,"monthvol":null,"dayweekmonthvolunits":"kWh","mprn":"1288362102","supplier":"---","price":{"unitrate":0.10199,"standingcharge":0.28484}}}}}'
Exception raised when updating state of sensor.smart_meter_gas_import_today, topic: 'glow/441793504B04/SENSOR/gasmeter' with payload: b'{"gasmeter":{"timestamp":"2023-05-19T18:31:16Z","energy":{"import":{"cumulative":87448.000,"day":0.000,"week":null,"month":null,"units":"kWh","cumulativevol":87448.000,"cumulativevolunits":"kWh","dayvol":0.000,"weekvol":null,"monthvol":null,"dayweekmonthvolunits":"kWh","mprn":"1288362102","supplier":"---","price":{"unitrate":0.10199,"standingcharge":0.28484}}}}}'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 579, in state
numerical_value = int(value)
ValueError: invalid literal for int() with base 10: 'unknown'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/mqtt/models.py", line 270, in process_write_state_requests
entity.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 583, in state
raise ValueError(
ValueError: Sensor sensor.smart_meter_gas_import_today has device class energy, state class measurement unit kWh and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: unknown (<class 'str'>)
The text was updated successfully, but these errors were encountered: