-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Hi,
I've just installed this through HACS and am getting the following error. No data is being recorded or passed from my meters/sensors.
Logger: homeassistant.helpers.event
Source: helpers/event.py:355
First occurred: 12:35:45 pm (21 occurrences)
Last logged: 12:50:00 pm
Error while dispatching event for sensor.envoy_122309098553_lifetime_net_energy_production to <Job track state_changed event ['sensor.envoy_122309098553_lifetime_net_energy_production'] HassJobType.Callback <bound method SimulatedBatteryHandle.async_reading_handler of <custom_components.battery_sim.SimulatedBatteryHandle object at 0x7f30fe9b5d30>>>
Error while dispatching event for sensor.envoy_122309098553_lifetime_net_energy_production to <Job track state_changed event ['sensor.envoy_122309098553_lifetime_net_energy_production'] HassJobType.Callback <bound method SimulatedBatteryHandle.async_reading_handler of <custom_components.battery_sim.SimulatedBatteryHandle object at 0x7f310d6387d0>>>
Error while dispatching event for sensor.envoy_122309098553_lifetime_net_energy_production to <Job track state_changed event ['sensor.envoy_122309098553_lifetime_net_energy_production'] HassJobType.Callback <bound method SimulatedBatteryHandle.async_reading_handler of <custom_components.battery_sim.SimulatedBatteryHandle object at 0x7f30c7704a50>>>
Error while dispatching event for sensor.envoy_122309098553_lifetime_net_energy_consumption to <Job track state_changed event ['sensor.envoy_122309098553_lifetime_net_energy_consumption'] HassJobType.Callback <bound method SimulatedBatteryHandle.async_reading_handler of <custom_components.battery_sim.SimulatedBatteryHandle object at 0x7f310d6387d0>>>
Error while dispatching event for sensor.envoy_122309098553_lifetime_net_energy_consumption to <Job track state_changed event ['sensor.envoy_122309098553_lifetime_net_energy_consumption'] HassJobType.Callback <bound method SimulatedBatteryHandle.async_reading_handler of <custom_components.battery_sim.SimulatedBatteryHandle object at 0x7f30c7704a50>>>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 355, in _async_dispatch_entity_id_event
hass.async_run_hass_job(job, event)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 940, in async_run_hass_job
hassjob.target(*args)
~~~~~~~~~~~~~~^^^^^^^
File "/config/custom_components/battery_sim/init.py", line 336, in async_reading_handler
new_state_value = float(new_state.state) * conversion_factor
^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'conversion_factor' where it is not associated with a value