-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract mystrom switch energy attributes into sensors #53319
Comments
Besides not using a standalone sensor, the current code only extracts power (W) from what I can tell. According to the myStrom API documentation the
So it seems averaged, which is definitely not ideal. But I guess it could be used to calculate energy used as part of the library/integration. I don't have one of these but was thinking to get one. However, is energy extraction turns out to be not possible/inaccurate, I'll probably won't go for it. |
Ws can be converted to Wh |
It is actually weird that they say "average of energy consumed per second". Energy already has a unit with a time component (like watts per second), if they write energy per second it sound like time unit squared 😅 I am probably overthinking it. Most likely they just return energy in watt seconds and we can summarize it. Would statistics etc. work if the integration would set |
No. The state that changes reset is set as new "base line", no growth is calculated. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
Now with the update to 2022.4 the attribute 'current_power_w' is being removed from the switch core entity platform. Can this issue be fixed in a timely manner? I really need that attribute to notify when my coffee machine has switched off... |
It's not an issue, it's a deprecation of an old feature, that is no longer available. Feel free to jump in to make that happen 👍 ../Frenck |
Unfortunately my codings skills are really basic, otherwise I think I would. But as a workaround: because the current drawn power of the switch can be read via REST ([IP of switch]/report) I think I'm just going to configure my sensor to pull the data from there. |
@Schnabulation same issue here... I use a RESTful Sensor as workaround (not a solution), example:
|
will a PR for just the additional sensors be accepted or is a change to user flow required? |
just opened a PR to add the power consumption as a sensor. not sure if this is the right approach as I'm new to HA internals and python. Feedback would be great. I will try to add energy sensors if this is the correct way. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
Still need it, I think the PR is currently blocked by the review of #74719. Please, kind robot, do not close this just yet! |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
it's still a issue, PR: #74719 |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
This is waiting on #69745 |
Oh, looks like we have 2 PRs for the same thing I guess? #69745 and #97024. I think I like the #97024 approach better as it correctly splits up the sensors into its own file. Let's discuss here how we're going to pick this up, otherwise it would be double work. cc @OneCyrus @MadMonkey87 |
This issue is for the switch platform of the mystrom integration.
The switch integration has embedded sensors for energy usage. This is no longer the preferred approach. Integrations using this approach should turn this data into standalone sensors.
This is important because Home Assistant is going to introduce home energy management (HEM) in 2021.8. HEM will be able to consume the data if it is exposed as standalone sensors.
To make sure that the sensors that represent total kWh is usable for HEM, set
state_class
toSTATE_CLASS_TOTAL_INCREASING
. See sensor documentation for more information.Link to the architecture discussion.
The text was updated successfully, but these errors were encountered: