Thanks Very usefull power consumpion calculator . How can i change 1,000.0 W to 1000 W ?
I see you got it working ;-). Not sure how you can change the thousands separator, this is not something powercalc does but more a frontend formatting thing of Home Assistant. Maybe someone else knows how to do it.
My guess is that is based on your homeassistant language but as bramski says that is only how it is shown the thousand separator isnât in the data from powercalc.
Try âNumber Formatâ in User Settings. However Swiss standard is not represented, maybe yoursâŠ
best f
Have a question about other peopleâs experience.
Once I found this integration fell in love with it and spent days measuring various devices around my house!!
Recently I noticed my backupâs started taking forever and then I blew the limit on my Google Drive where the back upâs sync to. My database has ballooned over the past 3 months, whilst Iâve got the headroom on my hardware was curious.
Ran a quick query on the database and identified the biggest offenders were the sensors from PowerCalc (which when you think about it makes sense):
SELECT
COUNT(*) AS cnt,
COUNT(*) * 100 / (SELECT COUNT(*) FROM states) AS cnt_pct,
SUM(LENGTH(attributes)) AS bytes,
SUM(LENGTH(attributes)) * 100 / (SELECT SUM(LENGTH(attributes)) FROM states) AS bytes_pct,
entity_id
FROM states
GROUP BY entity_id
ORDER BY cnt DESC
source: How to keep your recorder database size under control
So Iâve been trying to get my head around what I want this data for. I use the current power in Lovelace next to the individual device â so I donât need this in the recorder and could exclude it? I have my device group data in the energy dashboard, again I donât think I need this in the recorder to source it there?
I was about to start a bit of testing around this, but any thoughts appreciatedâŠ.
The second point of pondering is long term statistics, and I canât find the answer â if I excluded these from the recorder would I still build the LTS data?
Of course I can reduce the duration of data retention to mitigate this, there are feature requests kicking around to allow this to be defined by entity which could help. As I say, just some thoughts and any feedback or similar experiences would be welcome
There are few areas You touch in this post. And I am not sure is it the best place to talk about databases. I am sure that powercalc data is not very different from other.
But quick 5 cents:
- order in area what to record is cruicial. Most probably You do not need long history of most entities.
- IMO dividing data for short and long term is helpful as well. I store 1 day in relative database MariadB and longer in influx which need less space and works better for long time data
- Now we have statistics as well which consume less space
@QbaF thanks for the commentsâŠ
Firstly, this was not a criticism of PowerCalc - I simply posted here because the increase in my database size seemed to be attributable to this awesome integration.
For the time being I purged the database and reduced my retention period to shave down some Gbâs off the size. The challenge wasnât directly with all the data I had, it was the back ups were taking a while!!
Iâve pondered Influx for a while, might be time to dive down that rabbit hole
I did not say or even feel that You are criticizing Powercalc:) Just would like to say that most probably there is a better place which gathers more people engaged in that problem.
And I need to clear my databases as well, so will be happy to know that kind of place. It looks like bigger, unsolved problem of HA users. One of HA founders has dB with size in TB:)
I have completed working on estimating power consumption of WLED controlled light strips.
Looking for other users which also have WLED lights and are able to test this functionality.
Hello,
Iâve just installed the powercalc through hacs. Then I added the following configuration:
- platform: powercalc
entity_id: light.aquarium
wled:
voltage: 5
Finally, I received the following:
Invalid config for [sensor.powercalc]: [wled] is an invalid option for [sensor.powercalc]. Check: sensor.powercalc->wled. (See ?, line ?).
Could you please tell me what I am doing wrong?
Hi, this feature is new and has not been released yet. Will be in upcoming version v0.13. Will release this next week. You could also install the master branch. Click âRe downloadâ in HACS and than select master branch.
Thanks.
I did this. Then restarted HA. Then added configuration for several WLED entities and restarted the HA.
Finally, I received the following error:
Logger: homeassistant.setup
Source: setup.py:316
First occurred: 10:27:09 (3 occurrences)
Last logged: 10:27:09
Unable to prepare setup for platform powercalc.sensor: Unable to set up component.
Logger: homeassistant.setup
Source: custom_components/powercalc/model_discovery.py:34
Integration: powercalc (documentation, issues)
First occurred: 10:27:09 (1 occurrences)
Last logged: 10:27:09
Error during setup of component powercalc
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/setup.py", line 254, in _async_setup_component
result = await task
File "/home/homeassistant/.homeassistant/custom_components/powercalc/__init__.py", line 94, in async_setup
await autodiscover_entities(config, domain_config, hass)
File "/home/homeassistant/.homeassistant/custom_components/powercalc/__init__.py", line 118, in autodiscover_entities
light_model = await get_light_model(hass, source_entity.entity_entry, {})
File "/home/homeassistant/.homeassistant/custom_components/powercalc/model_discovery.py", line 34, in get_light_model
manufacturer = config.get(CONF_MANUFACTURER)
AttributeError: 'RegistryEntry' object has no attribute 'get'
Is there anything that I should do in another way?
@sani Could you please create an issue on github? Issues · bramstroker/homeassistant-powercalc · GitHub. Could you also mention your HA version?
I will have a look soon.
Also just released v0.13.0-beta.1 which has the WLED functionality and compatibility for upcoming HA 2021.12.x version.
I created the issue. Here is it: Setup error with WLED configuration usage · Issue #396 · bramstroker/homeassistant-powercalc · GitHub
Thanks.
@bramski I think there is an issue in version v0.13.0 and v.0.13.1 where power sensors stop working when âcreate_energy_sensorsâ is set to false. I have this set in global settings and after update from v.0.12.1 all of my power sensors stopped working except the one with âcreate_energy_sensor: trueâ.
Also when I set âcreate_energy_sensors: trueâ everything starts to work again but I would like to have it set to false as I already have my own energy sensors. Can you please look into this? Thanks for your amazing work!
Thanks for reporting. Could you please create an issue on github? Will have a look soon.
Probably a stupid problem with an obvious solution I just canât see. Auto detection fails for all my Hue lights as it canât find the model name which I assume is supposed to correlate with whatâs listed in the signify folder. Or is whatâs listed as âmodelâ below expected behavior?
A couple of examples:
2021-12-16 21:40:15 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.kjokken_tak: Auto discovered model (manufacturer=Signify Netherlands B.V., model=Hue ambiance spot)
2021-12-16 21:40:15 DEBUG (MainThread) [custom_components.powercalc] light.kjokken_tak: Model not found in library, skipping auto configuration
2021-12-16 21:40:15 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.kjokken_overskap: Auto discovered model (manufacturer=Signify Netherlands B.V., model=Hue lightstrip plus)
2021-12-16 21:40:15 DEBUG (MainThread) [custom_components.powercalc] light.kjokken_overskap: Model not found in library, skipping auto configuration
2021-12-16 21:40:15 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.soverom_tak_2: Auto discovered model (manufacturer=Signify Netherlands B.V., model=Hue color spot)
2021-12-16 21:40:15 DEBUG (MainThread) [custom_components.powercalc] light.soverom_tak_2: Model not found in library, skipping auto configuration
Which version of Home Assistant are you using? I guess itâs 2012.11.x. If so, could you try upgrading to 2012.12? You are correct, the model should match the directory name i.e. LCT012
Supervisor was already 12.2, but Core was at 11.5. Seems to be solved by updating core to 12.2. Thanks!
(Mostly have LTW013, GU10 white ambiance, which isnât listed. Just copied and renamed the folder of the identical version with colors as I suppose the consumption should be pretty identical. Everything seems to now populate automatically.)
Great that you got it working.
You can put custom models in config/powercalc-custom-models
so in your case config/powercalc-custom-models/signify/LTW013
. Powercalc will look there first. This allows you to upgrade powercalc without your files being overwritten.