djansen1987 / SAJeSolar

SAJ eSolar Portal Sensors
GNU General Public License v3.0
21 stars 13 forks source link

warnings on deprecated units #75

Closed Pierric82 closed 1 week ago

Pierric82 commented 4 months ago

Hi,

Just wanted to report HA told me this today when restarting the container:

2024-02-14T12:08:28.797946052Z 2024-02-14 13:08:28.795 WARNING (MainThread) [homeassistant.const] ENERGY_KILO_WATT_HOUR was used from saj_esolar, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfEnergy.KILO_WATT_HOUR instead, please create a bug report at https://github.com/djansen1987/SAJeSolar/issues

2024-02-14T12:08:28.819433336Z 2024-02-14 13:08:28.810 WARNING (MainThread) [homeassistant.const] POWER_WATT was used from saj_esolar, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.WATT instead, please create a bug report at https://github.com/djansen1987/SAJeSolar/issues

So I thought I'd be a good citizen and open this issue (haven't seen any other references to this)

djansen1987 commented 4 months ago

thanks, will update this in the following release. You may also do a pull requests if you want to get it resolved sooner

LAdegeest commented 2 months ago

Hi, I've solved the issue locally, but I've no experience with pull request. Do I have to create a branch first?

djansen1987 commented 2 months ago

Hi, Great that you want to help!

first you have to "Fork" this project on github. Like below image

After this a copy of the code is made in to your own github. In this copy you can make changes to the code (github desktop with vscode are good software options, or direct in the browser). After you saved (commit) the code go to your own github repository and click new pull request: image This will show the changes you made. Check if correct and click Create Pull Request. In my example i added the word Test to a readme.md. image After this i get a notification, i will then also review the code and if okay i will merge it in the existing code.

Hope this helps and will look our for your pull request, awesome that you want to help the project! Thanks

8OND007 commented 3 weeks ago

great, there is a PR request already I see to fix these units. Can it be merged now ?

djansen1987 commented 1 week ago

This is fixed by @LAdegeest in the latest release. Thanks for reporting!