davidusb-geek / emhass

emhass: Energy Management for Home Assistant, is a Python module designed to optimize your home energy interfacing with Home Assistant.
MIT License
260 stars 51 forks source link

web_server tweaked addon url/secret handling #210

Closed GeoDerp closed 4 months ago

GeoDerp commented 4 months ago

I believe I found a bug when setting url in add-on in HA environment.

Feel free to set:

        if url_from_options == 'empty' or url_from_options == '' or url_from_options == "http://supervisor/core/api":
            url = "http://supervisor/core/api/config"

back to:

         if url_from_options == 'empty' or url_from_options == '' :
            url = hass_url+"/config"
codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.63%. Comparing base (9d85851) to head (29bcfa9).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #210 +/- ## ======================================= Coverage 87.63% 87.63% ======================================= Files 6 6 Lines 1707 1707 ======================================= Hits 1496 1496 Misses 211 211 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

GeoDerp commented 4 months ago

Either way this PR results. I will likely add some text in the EMHASS-Add-on en.yaml of a url example.