Open sgouw-hacs opened 3 years ago
You could help yourself, add state class, device class and last reset to the sensor via customize.yaml. Did the update of counts work for you? See issue 3.
Thanks for this. I am pretty new to HA so I didn't that I could add it myself. The update of counts doesn't seem to work, I only get new values when I restart.
@synack666 I added the state class, device class and last reset to the "sensor.apsystems_energy_day" using customize_glob. https://www.home-assistant.io/docs/configuration/customizing-devices/. It has been nice if this could be done from the plugin.
In the configuration.yaml I put in this:
homeassistant:
customize_glob:
sensor.apsystems_energy_day:
last_reset: '1970-01-01T00:00:00+00:00'
device_class: energy
state_class: measurement
should work if the counter updatet, hope this will be fixed soon.
Hello @bgbraga - any plans on adding this within your integration?
thanks!
should work if the counter updatet, hope this will be fixed soon.
I was able to add this to the energy tab with the code you provided , hope this works now :)
And hope mr Braga can have that updated in the integration itself.
thank you guys!
should work if the counter updatet, hope this will be fixed soon.
I was able to add this to the energy tab with the code you provided , hope this works now :)
And hope mr Braga can have that updated in the integration itself.
thank you guys!
Edit: Issue fixed by removing "last reset and changing state class to total_increasing
thanks!
Guys,
Any idea why the counter went negative in the beggining of the day? 17,68 is what was produced yesterday.
This is what happened when I added the code @synack666 suggested.
thanks!
i have the same problem... did you find any solution for the negative start value ?
Issue fixed by removing "last reset and changing state class to total_increasing
Issue fixed by removing "last reset and changing state class to total_increasing
Issue fixed by removing "last reset and changing state class to total_increasing
Issue fixed by removing "last reset and changing state class to total_increasing
how do you do this ?
Issue fixed by removing "last reset and changing state class to total_increasing
Issue fixed by removing "last reset and changing state class to total_increasing
how do you do this ?
This is what I have in my config.yaml
thanx, i will test that right away :)
thanx @andrebbruno that fixed it for me.... now i only need to figure out if there is some way to make it update every hour, as it seems to only update every 3 hours which makes bad graphs in the energy overview
thanx @andrebbruno that fixed it for me.... now i only need to figure out if there is some way to make it update every hour, as it seems to only update every 3 hours which makes bad graphs in the energy overview
cool! 3 Hours update is new to me ... mine updates every hour in the energy tab.
well i found out why it doesn't update that often.... still looking into why
Logger: homeassistant.helpers.entity
Source: custom_components/apsystems/sensor.py:156
Integration: apsystems (documentation)
First occurred: 09:07:33 (34 occurrences)
Last logged: 11:52:28
Update for sensor.apsystems_energy_latest fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 487, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 691, in async_device_update
raise exc
File "/config/custom_components/apsystems/sensor.py", line 156, in async_update
value = value[-1]
IndexError: list index out of range
well i found out why it doesn't update that often.... still looking into why
Logger: homeassistant.helpers.entity Source: custom_components/apsystems/sensor.py:156 Integration: apsystems (documentation) First occurred: 09:07:33 (34 occurrences) Last logged: 11:52:28 Update for sensor.apsystems_energy_latest fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 487, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 691, in async_device_update raise exc File "/config/custom_components/apsystems/sensor.py", line 156, in async_update value = value[-1] IndexError: list index out of range
yeah unfortunately we´re a bit out of luck, the developer seems DoA on his own integration
i'm working on fixing it, and if he doesn't come back, i will do a fork and fix it in that.
This sounds great and I thank you already!!!
looks like i got it fixed, i will post tomorrow if works there too.....
i have made a fix and put it on my own page https://github.com/skelgaard/homeassistant-apsystems please post there, if any other problems
Cant see how to post there, button "Issues" dont exist. I installed today and from sunrise to now it works perfect.
i have made a fix and put it on my own page https://github.com/skelgaard/homeassistant-apsystems please post there, if any other problems
should I remove the current integration in HACS and add yours?
thats the way i do it, leave the config untouched, works
@skelgaard How could we report issues, there is no issues button in your fork. (only for interest, no problems found)
missing a checkmark... done now for both issues and discussions :)
pefrect
I want to use this for the new Energy dashboard. Is it possible to add this? https://developers.home-assistant.io/docs/core/entity/sensor#long-term-statistics