Exception in update_sensor when dispatching 'pricanalyzer_checked_stuff': () Traceback (most recent call last): File "/config/custom_components/priceanalyzer/sensor.py", line 403, in update_sensor self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1008, in async_write_ha_state self.hass.verify_event_loop_thread("async_write_ha_state") File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread frame.report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report _report_integration(what, integration_frame, level, error_if_integration) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration raise RuntimeError( RuntimeError: Detected that custom integration 'priceanalyzer' calls async_write_ha_state from a thread at custom_components/priceanalyzer/sensor.py, line 403: self.async_write_ha_state(). Please report it to the author of the 'priceanalyzer' custom integration.
Exception in update_sensor when dispatching 'pricanalyzer_checked_stuff': () Traceback (most recent call last): File "/config/custom_components/priceanalyzer/sensor.py", line 332, in update_sensor self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1008, in async_write_ha_state self.hass.verify_event_loop_thread("async_write_ha_state") File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread frame.report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report _report_integration(what, integration_frame, level, error_if_integration) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration raise RuntimeError( RuntimeError: Detected that custom integration 'priceanalyzer' calls async_write_ha_state from a thread at custom_components/priceanalyzer/sensor.py, line 332: self.async_write_ha_state(). Please report it to the author of the 'priceanalyzer' custom integration.
Exception in update_sensor when dispatching 'pricanalyzer_checked_stuff': () Traceback (most recent call last): File "/config/custom_components/priceanalyzer/sensor.py", line 244, in update_sensor self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1008, in async_write_ha_state self.hass.verify_event_loop_thread("async_write_ha_state") File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread frame.report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report _report_integration(what, integration_frame, level, error_if_integration) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration raise RuntimeError( RuntimeError: Detected that custom integration 'priceanalyzer' calls async_write_ha_state from a thread at custom_components/priceanalyzer/sensor.py, line 244: self.async_write_ha_state(). Please report it to the author of the 'priceanalyzer' custom integration.
Describe the bug
Not working, no price sensor, and not updating vvb sensor
Debug log
2024-05-28 14:55:54.737 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{{ states.sensor.vvbsensor_molde.attributes.reason }}'
2024-05-28 14:55:54.738 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ states.sensor.vvbsensor_molde.attributes.reason }}) renders=2>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 585, in async_render
render_result = _render_with_context(self.template, compiled, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2600, in _render_with_context
return template.render(kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 1304, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 939, in handle_exception
raise rewrite_traceback_stack(source=source)
File "", line 1, in top-level template code
File "/usr/local/lib/python3.12/site-packages/jinja2/sandbox.py", line 327, in getattr
value = getattr(obj, attribute)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2632, in _fail_with_undefined_error
return super()._fail_with_undefined_error(*args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
jinja2.exceptions.UndefinedError: 'None' has no attribute 'attributes'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 713, in async_render_to_info
render_info._result = self.async_render(
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 587, in async_render
raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'attributes'
2024-05-28 14:55:54.740 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{{ states.sensor.vvbsensor_molde.attributes.reason }}'
2024-05-28 14:55:54.740 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template<template=({{ states.sensor.vvbsensor_molde.attributes.reason }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.vvbsensor_molde_reason'
2024-05-28 14:55:54.746 ERROR (MainThread) [homeassistant.core] Error running job: <Job onetime listen homeassistant_start <function _async_at_core_state.._matched_event at 0x7f7b0805a200> HassJobType.Callback <_OneTimeListener homeassistant.helpers.start:<function _async_at_core_state.._matched_event at 0x7f7b0805a200>>>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 658, in state
numerical_value = int(value)
^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 661, in state
numerical_value = float(value)
^^^^^^^^^^^^
ValueError: could not convert string to float: ''
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1571, in async_fire_internal
self._hass.async_run_hass_job(job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 947, in async_run_hass_job
hassjob.target(args)
File "/usr/src/homeassistant/homeassistant/core.py", line 1429, in call
self.hass.async_run_hass_job(self.listener_job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 947, in async_run_hass_job
hassjob.target(args)
File "/usr/src/homeassistant/homeassistant/helpers/start.py", line 44, in _matched_event
hass.async_run_hass_job(at_start_job, hass)
File "/usr/src/homeassistant/homeassistant/core.py", line 947, in async_run_hass_job
hassjob.target(args)
File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 487, in _async_template_startup
result_info.async_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1065, in async_refresh
self._refresh(None)
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1251, in _refresh
self.hass.async_run_hass_job(self._job, event, updates)
File "/usr/src/homeassistant/homeassistant/core.py", line 947, in async_run_hass_job
hassjob.target(*args)
File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 435, in _handle_results
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1009, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1132, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1015, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 665, in state
raise ValueError(
ValueError: Sensor sensor.nettleietrinn has device class 'None', state class 'None' unit 'NOK' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: '' (<class 'str'>)
2024-05-28 14:55:59.013 ERROR (MainThread) [homeassistant.components.google_assistant.http] Request for https://homegraph.googleapis.com/v1/devices:requestSync failed: 500
2024-05-28 14:56:12.292 ERROR (MainThread) [homeassistant.components.netatmo] Error during webhook registration - 400 - Bad request - Allowed ports for webhooks are 80, 88, 443 and 9443. (21) when accessing 'https://api.netatmo.com/api/addwebhook'
2024-05-28 14:57:15.752 ERROR (SyncWorker_13) [homeassistant.util.logging] Exception in update_sensor when dispatching 'pricanalyzer_checked_stuff': ()
Traceback (most recent call last):
File "/config/custom_components/priceanalyzer/sensor.py", line 403, in update_sensor
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1008, in async_write_ha_state
self.hass.verify_event_loop_thread("async_write_ha_state")
File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread
frame.report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report
_report_integration(what, integration_frame, level, error_if_integration)
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration
raise RuntimeError(
RuntimeError: Detected that custom integration 'priceanalyzer' calls async_write_ha_state from a thread at custom_components/priceanalyzer/sensor.py, line 403: self.async_write_ha_state(). Please report it to the author of the 'priceanalyzer' custom integration.
Version of the custom_component
1.4
Homeassistant version
Core-2024.05.5
Configuration
Add your logs here.
Logger: homeassistant.util.logging Kilde: util/logging.py:98 Førs oppstått: 14:57:15 (160 hendelser) Sist logget: 14:58:31
Exception in update_sensor when dispatching 'pricanalyzer_checked_stuff': () Traceback (most recent call last): File "/config/custom_components/priceanalyzer/sensor.py", line 403, in update_sensor self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1008, in async_write_ha_state self.hass.verify_event_loop_thread("async_write_ha_state") File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread frame.report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report _report_integration(what, integration_frame, level, error_if_integration) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration raise RuntimeError( RuntimeError: Detected that custom integration 'priceanalyzer' calls async_write_ha_state from a thread at custom_components/priceanalyzer/sensor.py, line 403: self.async_write_ha_state(). Please report it to the author of the 'priceanalyzer' custom integration. Exception in update_sensor when dispatching 'pricanalyzer_checked_stuff': () Traceback (most recent call last): File "/config/custom_components/priceanalyzer/sensor.py", line 332, in update_sensor self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1008, in async_write_ha_state self.hass.verify_event_loop_thread("async_write_ha_state") File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread frame.report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report _report_integration(what, integration_frame, level, error_if_integration) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration raise RuntimeError( RuntimeError: Detected that custom integration 'priceanalyzer' calls async_write_ha_state from a thread at custom_components/priceanalyzer/sensor.py, line 332: self.async_write_ha_state(). Please report it to the author of the 'priceanalyzer' custom integration. Exception in update_sensor when dispatching 'pricanalyzer_checked_stuff': () Traceback (most recent call last): File "/config/custom_components/priceanalyzer/sensor.py", line 244, in update_sensor self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1008, in async_write_ha_state self.hass.verify_event_loop_thread("async_write_ha_state") File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread frame.report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report _report_integration(what, integration_frame, level, error_if_integration) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration raise RuntimeError( RuntimeError: Detected that custom integration 'priceanalyzer' calls async_write_ha_state from a thread at custom_components/priceanalyzer/sensor.py, line 244: self.async_write_ha_state(). Please report it to the author of the 'priceanalyzer' custom integration.
Describe the bug
Not working, no price sensor, and not updating vvb sensor
Debug log
2024-05-28 14:55:54.737 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{{ states.sensor.vvbsensor_molde.attributes.reason }}' 2024-05-28 14:55:54.738 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ states.sensor.vvbsensor_molde.attributes.reason }}) renders=2> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 585, in async_render render_result = _render_with_context(self.template, compiled, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2600, in _render_with_context return template.render(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 1304, in render self.environment.handle_exception() File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 939, in handle_exception raise rewrite_traceback_stack(source=source) File "", line 1, in top-level template code File "/usr/local/lib/python3.12/site-packages/jinja2/sandbox.py", line 327, in getattr value = getattr(obj, attribute) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2632, in _fail_with_undefined_error return super()._fail_with_undefined_error(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ jinja2.exceptions.UndefinedError: 'None' has no attribute 'attributes' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 713, in async_render_to_info render_info._result = self.async_render( ^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 587, in async_render raise TemplateError(err) from err homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'attributes' 2024-05-28 14:55:54.740 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{{ states.sensor.vvbsensor_molde.attributes.reason }}' 2024-05-28 14:55:54.740 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template<template=({{ states.sensor.vvbsensor_molde.attributes.reason }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.vvbsensor_molde_reason' 2024-05-28 14:55:54.746 ERROR (MainThread) [homeassistant.core] Error running job: <Job onetime listen homeassistant_start <function _async_at_core_state.._matched_event at 0x7f7b0805a200> HassJobType.Callback <_OneTimeListener homeassistant.helpers.start:<function _async_at_core_state.._matched_event at 0x7f7b0805a200>>>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 658, in state
numerical_value = int(value)
^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 661, in state
numerical_value = float(value)
^^^^^^^^^^^^
ValueError: could not convert string to float: ''
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1571, in async_fire_internal
self._hass.async_run_hass_job(job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 947, in async_run_hass_job
hassjob.target( args)
File "/usr/src/homeassistant/homeassistant/core.py", line 1429, in call
self.hass.async_run_hass_job(self.listener_job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 947, in async_run_hass_job
hassjob.target(args)
File "/usr/src/homeassistant/homeassistant/helpers/start.py", line 44, in _matched_event
hass.async_run_hass_job(at_start_job, hass)
File "/usr/src/homeassistant/homeassistant/core.py", line 947, in async_run_hass_job
hassjob.target(args)
File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 487, in _async_template_startup
result_info.async_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1065, in async_refresh
self._refresh(None)
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1251, in _refresh
self.hass.async_run_hass_job(self._job, event, updates)
File "/usr/src/homeassistant/homeassistant/core.py", line 947, in async_run_hass_job
hassjob.target(*args)
File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 435, in _handle_results
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1009, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1132, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1015, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 665, in state
raise ValueError(
ValueError: Sensor sensor.nettleietrinn has device class 'None', state class 'None' unit 'NOK' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: '' (<class 'str'>)
2024-05-28 14:55:59.013 ERROR (MainThread) [homeassistant.components.google_assistant.http] Request for https://homegraph.googleapis.com/v1/devices:requestSync failed: 500
2024-05-28 14:56:12.292 ERROR (MainThread) [homeassistant.components.netatmo] Error during webhook registration - 400 - Bad request - Allowed ports for webhooks are 80, 88, 443 and 9443. (21) when accessing 'https://api.netatmo.com/api/addwebhook'
2024-05-28 14:57:15.752 ERROR (SyncWorker_13) [homeassistant.util.logging] Exception in update_sensor when dispatching 'pricanalyzer_checked_stuff': ()
Traceback (most recent call last):
File "/config/custom_components/priceanalyzer/sensor.py", line 403, in update_sensor
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1008, in async_write_ha_state
self.hass.verify_event_loop_thread("async_write_ha_state")
File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread
frame.report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report
_report_integration(what, integration_frame, level, error_if_integration)
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration
raise RuntimeError(
RuntimeError: Detected that custom integration 'priceanalyzer' calls async_write_ha_state from a thread at custom_components/priceanalyzer/sensor.py, line 403: self.async_write_ha_state(). Please report it to the author of the 'priceanalyzer' custom integration.