-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
adding energy sensor for plugs #460
Conversation
Please @albertogeniola merge this pull request in order to restore the energy and power data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @benoitm974 for the PR.
In general I think it is going through the right direction, but there are some changes (imho) that should be performed before merging. Let mw know what you think about those.
@adicrescenzo : let's wait for @benoitm974 to apply the requested changes. Once applied, I'll test it and merge in dev/main, releasing the next version.
Taking @albertogeniola requests for pull-request merge
Original intent was to add energy sensor as part of switch I didn't though there would be energy sensor not being electricity devices ... I've included the changes mentioned. Thanks for your feedback. |
By th way I was not able to conclude whether you’d remove the previous code from the switch file since it was depreciated in home assistant. I’m not familiar enough with home assistant code practice for this. |
Since it has been deprecated, I think it is ok to get rid of them on the switch entity. However this will possibly break things for people who use them. For now, let's start by merging your work. I suggest to propose a new PR for getting rid of the deprecated properties. |
Is there a version mecanism in home assistant where we could test the version and not execute the code ? I was not able to identify if home assistant simply don't call those anymore in newer version or still call it but it gets ignore or fails... therefore we could had a if version > then. |
@albertogeniola can we close both issue #404 and #439 ? Thanks a lot for integration in 1.2.10! |
Done! Thanks. |
Since homeassistant deprecated the energy and power in switch entity, moving energy as sensor.