Closed hajo62 closed 1 year ago
There is no extra configuration you can do using the integration. But maybe you can achieve this using the entity customization in HA.
Regular sensor entities are currently not supported. The sensor capabilities of plugs are implemented in the switch entity using the attributes of the SwitchEntity
. However, they seem to be deprecated which may be why the entities do not show up on the new energy dashboard.
Maybe you can use template entities as a workaround.
Thanks for your info. Will have a loock at it.
But I still have a question:
The plug entities have an attribute today_energy_kwh
which I assume is created by your integration.
Shouldn't that be a total energy with kWh as unit?
today_energy_kwh
is implemented in switch.py
:
@property
def today_energy_kwh(self):
"""Return the total power usage in kWh."""
if self.has_attribute(AttributeType.ACCUMULATED_ENERGY_USE):
return self.attribute(AttributeType.ACCUMULATED_ENERGY_USE)
else:
return None
this was implemented by @BetaTobi in #7. It just returns the ACCUMULATED_ENERGY_USE
attribute from homee. I am not entirely sure what that value exactly represents in homee.
At least for my Fibaro and my Cyrrus plugs the values shown in today_energy_kwh
are the all time accumulation starting from last reset and not a kind of accumulation per day.
Would it be possible to change today_energy_kwh
to total_energy_kwh
?
And accoording to the new energy dashboard (and to the International System of Units, the unit should be written with an uppercase W -> kWh. With an lowercase w the home assistant energy dashboard does not recognize the sensor as an energy sensor.
Correct. "today_energy_kwh" is the total accumulated energy (not just of one single day). However, this naming has been done on HA side, not within this integration.
Okay, that means that this could not be changed on your side.
When I look at the current_power_w
, it looks like the unit provided is kWh, althoug it should be W.
Do you have an idea, why energy dashboard does not recognize/offer my sensors?
I just double-checked in my HA configuration. "current_power_w" returns the current power of my plugs, in Watt. So this should be correct.
But I do not know, why the energy dashboard does not recognize your sensors. Actually, I did not yet use the energy dashboard :-) But I will have a look now, and if I find something, I will report it (here).
As I said before, according to the docs these properties are deprecated for the switch entity. Unfortunately, I believe the switches won't show up on the new energy dashboard unless the information about the power is migrated to a separate sensor entity.
May mistake. I had tried to do a customization for one of the sensor: Without customization they do not show any unit of measurement:
I've got the sensors working as separate entities on my branch - tidying it up before merging hopefully this weekend:
:tada: This issue has been resolved in version 2.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
How would I configure how a sensor get's imported. I.e. my Fibaro wall plug is shown like this. Entity state attributes:
file core.entity_register:
I would like to i.e. the
unit_of_measurement: kWh
(uppercase W) and maybe set thestate_class: total_increasing
. I would hope, that this device than is available to the new energy dashboard.