Hi everyone, i’ve just discovered this very neat integration. thanks for creating this.
I’ve tried to use it via a yaml configuration, but somehow this kind of simple example doesn’t work.
I want a different fixed power of my “Shelly Plus Plug S” when it’s state is enabled (0.5w) or disabled (0.3w).
But somehow, this sensor displays 0.5w when enabled and 0w when disabled. What is wrong?
I’m using Powercalc for some of my power draws. I have set it to give me utility meters for daily, weekly, monthly and yearly periods. My other utility meters (set up via utility meter helpers) give me daily, weekly, monthly, monthly with offset and yearly.
My initial question was going to be how do I get a utility meter with an offset using powercalc - but I saw an (undocumented?) capability earlier in this thread using the global setting of:
Hi, I will add this missing option to the documentation.
This option applies to all utility meters created by powercalc.
I’m not going to further complicate the configuration for such an edge case.
When you like to have different utility meter cycle/offset combinations I suggest to just create the utility meters with the helpers section, and set create_utility_meters: false in powercalc. Select the energy sensor generated by powercalc as the source of your utility meter.
In fact the utility meters created by powercalc are just using the same code as the helpers.
Only powercalc makes it more easy to create the utility meters, without having to add hundreds of them manually.
You could also set:
utility_meter_types:
- daily
- weekly
- yearly
And create the monthly utility meter manually with the helpers.
Maybe not the answer you hoped on, but I hope it helps anyway.
Oh my, i feel really stupid - but in order to follow the new Structures, i am struggeling with restructuring the Sensors, and in the same Time outsourcing it to a separate yaml.
Can somebody, maybe the Master @bramski himself , see whats going wrong and assist me?
Given:
The old configuration.yaml (one Section with powercalc:, and all sensors been working like below:
The Error when having two or more Sensor like this is:
Logger: homeassistant.setup
Source: custom_components/powercalc/__init__.py:225
Integration: powercalc (documentation, issues)
First occurred: 14:00:52 (1 occurrences)
Last logged: 14:00:52
Error during setup of component powercalc
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 288, in _async_setup_component
result = await task
^^^^^^^^^^
File "/config/custom_components/powercalc/__init__.py", line 225, in async_setup
sorted_sensors = sorted(
^^^^^^^
TypeError: '<' not supported between instances of 'NodeDictClass' and 'NodeDictClass'
After fiddeling around, i found out when using sensors: before every Sensor, there is no Error Log / Notification. But all beloved Sensors from Powercalc are “unavailable” (‘not longer provided by Powercalc…’).
I am not really sure seeing this error. But I see you got some newlines between the first and second sensor. Pretty sure you can’t have newlines when defining array in YAML, so this could potentially be the issue.
Though i was pretty sure i already tried it, but rechecked it again - with again the same Error
This powercalc.yaml (removed Newlines) leads to the same Error upon restart:
Tried it with a less “complicated” 2nd Sensor as well, with the same Error.
Every Sensor for itself alone doesn’t generate that Error. Absolutely weird.
I really don’t know what to do
Noooooo! I should have waited before submitting the Error
Yessssss! Awesome, looking forward to check it out! While i cant wait, probably it will be tomorrow…
Thank you, that is Worldrecord in reacting and fixing