cyberjunky / home-assistant-toon_smartmeter

This component reads and displays sensor values from the meteradapter connected to a rooted Toon thermostat.
MIT License
26 stars 13 forks source link

issues with energy dashboard (calculating costs) #76

Closed Edwintenhaaf closed 8 months ago

Edwintenhaaf commented 10 months ago

I'm having some issues with calculating the energy costs. Also did a post on the HA community forum about this. https://community.home-assistant.io/t/energy-costs-not-calculated/632253

Don't know if it's related to this Custom Component or HA itself Using the zonneplan addon for the energy/gas prices

The eror in the log is:

`Logger: homeassistant.helpers.event Source: helpers/event.py:293 First occurred: 3:31:03 AM (1644 occurrences) Last logged: 8:16:46 AM

Error while dispatching event for sensor.toon_gas_used_cnt to <Job track state_changed event ['sensor.toon_gas_used_cnt'] HassJobType.Callback <function EnergyCostSensor.async_added_to_hass..async_state_changed_listener at 0x7fb827a420c0>> Error while dispatching event for sensor.toon_p1_power_prod_cnt_low to <Job track state_changed event ['sensor.toon_p1_power_prod_cnt_low'] HassJobType.Callback <function EnergyCostSensor.async_added_to_hass..async_state_changed_listener at 0x7fb827a41f80>> Error while dispatching event for sensor.toon_p1_power_prod_cnt_high to <Job track state_changed event ['sensor.toon_p1_power_prod_cnt_high'] HassJobType.Callback <function EnergyCostSensor.async_added_to_hass..async_state_changed_listener at 0x7fb827a41e40>> Error while dispatching event for sensor.toon_p1_power_use_cnt_low to <Job track state_changed event ['sensor.toon_p1_power_use_cnt_low'] HassJobType.Callback <function EnergyCostSensor.async_added_to_hass..async_state_changed_listener at 0x7fb827a41d00>> Error while dispatching event for sensor.toon_p1_power_use_cnt_high to <Job track state_changed event ['sensor.toon_p1_power_use_cnt_high'] HassJobType.Callback <function EnergyCostSensor.async_added_to_hass..async_state_changed_listener at 0x7fb827a418a0>> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 293, in _async_dispatch_entity_id_event hass.async_run_hass_job(job, event) File "/usr/src/homeassistant/homeassistant/core.py", line 659, in async_run_hass_job hassjob.target(*args) File "/usr/src/homeassistant/homeassistant/components/energy/sensor.py", line 421, in async_state_changed_listener self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 743, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 843, in _async_write_ha_state state, attr = self._async_generate_attributes() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 784, in _async_generate_attributes state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 749, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 634, in state raise ValueError( ValueError: Sensor sensor.toon_gas_used_cnt_cost has device class 'monetary', state class 'total' unit 'EUR' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-finite value: 'nan'`

cyberjunky commented 8 months ago

Does this still happen? The _cost sensors are generated by home assistant when a device has a certain type.

Edwintenhaaf commented 8 months ago

Yes it does data from today.

image
cyberjunky commented 8 months ago

I think I have to close it, since it's not related to this integration..

Edwintenhaaf commented 8 months ago

No problem, I understand.


Van: Ron @.> Verzonden: Saturday, December 23, 2023 4:28:33 PM Aan: cyberjunky/home-assistant-toon_smartmeter @.> CC: Edwin ten Haaf @.>; Author @.> Onderwerp: Re: [cyberjunky/home-assistant-toon_smartmeter] issues with energy dashboard (calculating costs) (Issue #76)

I think I have to close it, since it's not related to this integration..

— Reply to this email directly, view it on GitHubhttps://github.com/cyberjunky/home-assistant-toon_smartmeter/issues/76#issuecomment-1868315704, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMISZYS52JIHZYQGYQHL6OLYK32CDAVCNFSM6AAAAAA7PLLUJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGMYTKNZQGQ. You are receiving this because you authored the thread.Message ID: @.***>