#For grid consumption, cant pick entity with device_class = power
1 messages ยท Page 1 of 1 (latest)
that's for modifying states only, not sensor attributes
if you want to create an energy sensor from a power sensor you need the integration helper
is that under add-ons?
Which method should i use?
Depends what kind of device it is
If its offline for long periods then you want left Riemann sum
Otherwise trapezoidal
Been trying to do something with this... because I need to make the value positive, but I am not getting anything
The helper worked.. but setting it as grid consumption entity gave me an error about it wanting a positive value.
it should only go offline (for 5-10 seconds) when I switch from grid power to backup power
yeah but does it stop reporting values? for example does it stay at 0 for a long time
if yes, then it will cause issues with the trapezoidal method
Don't put quotes in the template editor
Remove the first and last " in your value template
Anyway what are you trying to do there? You can't change a power sensor to an energy sensor with a template.
no
it's completely mathematically incorrect
If your power sensor is negative, then you can use a template to negate it, but it's still a power sensor.
You then use an integral helper on that inverted power sensor.
Make that sensor power and W (not Wh), then integrate that, and you'll be good
(technically that's misnamed, it's grid energy, not grid power)
Delete that sensor and make a new one, using grid sensor.positive_grid_power_usage as the source
wait for one update from sensor.positive_grid_power_usage and it should get a postiive value and device_class: energy
all this look correct?
erase the sub interval, you don't need it (with fast updating sensors)
otherwise it's fine
it will learn it automatically from the source sensor
if you give it a device class power sensor, after the first update, it will become device_class energy
this seems to be logging data and not graphing numbers...
show me developer-tools/states for that entity
it looks messed up, it should have a line graph
not that multicolored thing
the number the integral is giving out is way lower than the positive grid power
Well it would because it's Watt-Hours.
If you use 3000 W for 1 hour it will be 3000 Wh.
If you use 3000 W for 1 minute it will be much less than that in Wh.
the integral vs the positive
looks correct to me
The template is missing device class power
You can add that in the template settings
I thought it had to be set to energy to be usable for grid consumption?
the HVAC kicked on and this graph is still basically flat...
and this graph looks how i expect
well it does say energy now.. but its not in the list as an option yet..
The template sensor is the power, the integration of power is energy.
all the wrong configs have probably caused issues
check dev tools -> statistics for broken sensors
I dont understand how this is so much trouble, Q10 in the FAQ tells you exactly what to do ๐
There was a fix issue warning that showed up under settings
after it ran a while.. the data started to work
and I can use it now for grid consumption
Thanks
BTW is there a way to reset the number every night....
Or would that break how grid consumption works?
It seems like that number ever increasing would be confusing if i try use this graph
BTW is there a way to reset the number every night....
Utility meter helper.
if you use something like statistics graph card you don't need to create a separate utility meter
Thanks y'all. I guess I have more reading to do ๐
I thought all the PM or EM Shelly's also have an energy entity already. No need to integrate the power sensor.
there is... but it is giving me very small numbers that dont make any sense
Can you show us and explain why it doesn't make sense?
I see so many PEBCAK with energy and because of the power vs energy confusion above I can't help but suspect the same here.
talking about the sensor output for energy.. explain more later
thats why it doesnt make sense
@versed grove
even if i look at the one for a specific phase
As a start I don't see anything wrong. It's only a bit low. What kind of devices does it measure?
and as there are tons of people using the Shelly for energy I only see two options. Or de device is defective. In that case I would also certainly not trust the power metering as well. Or it's nog connected the right way. Two very important point is that the Vx input mataches the Cx of the CT (aka, same number). And that the CT is oriented correctly. And the fact you see negative power I put my bet on that ๐
Or there is a sensor for the other direction as well. But for normal flow it should read positive for both energy and power.
well when the power entity is showing me number that match what I expect... and the energy entity is showing 0.00xx numbers... doesnt seem right
The height of the power doesn't need to match with the energy as an important factor is the time. But granted, the energy seems a bit low. But again, tons of people use the Shelly. And as you also have negative power you either have the wrong sensor of installed it wrong. Aka, you ignored basically everything I said ๐
What did I ignore? forgive me if i did.
I did try to use the energy entity to start with for grid consumption.
I tried to follow the little diagram that came with it, but there was no text that described how to orient the CTs
The whole fact there is something wrong ๐ Did you check any of the given points?
Can you show all energy entities (or all entities all together) of that device?
And it's a while I used a Shelly EM and I don't have a 3EM, but from the top of my head there is an arrow or the marking K-L on it. L should point in the direction of the power flow aka to the load.
And did you verify the CT and the Vx connection do match?
Whats a Vx connection?
lol i guess the returned energy is why that other one is so low
you expect active energy to be positive and active returned to be 0?
confusing sensor names
Yep, which makes sense as your power is negative. Aka, the CT is installed backwards