Closed benoitm974 closed 8 months ago
Please @albertogeniola merge this pull request in order to restore the energy and power data
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.
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.
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.