MickMake / HomeAssistantAddons

MIT License
43 stars 26 forks source link

ValueError: could not convert string to float #12

Closed millesm closed 1 year ago

millesm commented 1 year ago

I am seeing this same error on multiple entries in the log on start-up.

First occurred: 11:20:54 AM (898 occurrences)

One example below

Exception in message_received when handling msg on 'homeassistant/sensor/GoSungrow/GoSungrow-getPsDetail-904132-p83075/state': '{"value":""}' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1710, in forgiving_float_filter return float(value) ValueError: could not convert string to float: '' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 44, in wrapper msg_callback(msg) File "/usr/src/homeassistant/homeassistant/components/mqtt/sensor.py", line 302, in message_received _update_state(msg) File "/usr/src/homeassistant/homeassistant/components/mqtt/sensor.py", line 262, in _update_state payload = self._template(msg.payload, PayloadSentinel.DEFAULT) File "/usr/src/homeassistant/homeassistant/components/mqtt/models.py", line 246, in async_render_with_possible_json_value rendered_payload = self._value_template.async_render_with_possible_json_value( File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 589, in async_render_with_possible_json_value return _render_with_context(self.template, compiled, variables).strip() File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1942, in _render_with_context return template.render(kwargs) File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render self.environment.handle_exception() File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception raise rewrite_traceback_stack(source=source) File "