dotKrad / hass-fpl

FPL Component for Home Assistant
MIT License
40 stars 20 forks source link

no terrytory issues when setting up integration #40

Open colinfoxdc opened 1 year ago

colinfoxdc commented 1 year ago

I just downloaded the custom component from this repo and when I try to log in it gives me an error and returns the following in the logs. I saw a post from the end of last year on this but I didn't see a fix or what might be causing it. Any help here would be appreciated. I am not using the NW territory.

`This error originated from a custom integration.

Logger: custom_components.fpl Source: custom_components/fpl/fplapi.py:125 Integration: FPL (documentation, issues) First occurred: 10:08:01 AM (3 occurrences) Last logged: 10:28:56 AM

Error : <class 'custom_components.fpl.fplapi.NoTerrytoryAvailableException'>`

zoopster commented 1 year ago

There isn't a fix or workaround because it cannot be duplicated. I'm using it daily in the "FPL" region (not the "FPL Northwest FL" region).

fpl_ss

Try accessing the api from your browser then....login, then replace the URL with 'https://www.fpl.com/api/resources/account'. Post the error, if any (don't post any PII).

colinfoxdc commented 1 year ago

I'm not showing any errors when accessing the API in the browser. It does fill with my account information, do I need any info for the flpapi.yml or the config file?

zoopster commented 1 year ago

Not that I'm aware of...I didn't have to.

hamboneaf commented 1 year ago

What is the api address so that I can try logging in there? I am having this same issue and would like to troubleshoot.

zoopster commented 1 year ago

easiest way in your browser is to login then change the url to https://www.fpl.com/api/resources/account

fliswa commented 1 year ago

I was able to get this integration working using the following steps:

1 - change line 26 of fplapi.py to URL_TERRITORY = "https://www.fpl.com/api/resources/account" 2 - change line 42 of fplapi.py to self._territory = FPL_MAINREGION

Restart HA and it worked perfectly once I signed in with my FPL credentials

colinfoxdc commented 1 year ago

I was able to get this integration working using the following steps:

1 - change line 26 of fplapi.py to URL_TERRITORY = "https://www.fpl.com/api/resources/account" 2 - change line 42 of fplapi.py to self._territory = FPL_MAINREGION

Restart HA and it worked perfectly once I signed in with my FPL credentials

THIS WORKED! thank you!!!

hamboneaf commented 11 months ago

What if my territory is Northwest FL? What should I do to replace self._territory = FPL_MAINREGION Should I leave it the same? Also, when I paste https://www.fpl.com/api/resources/account into my browser after logging in to FPL.com, all I get is "{}" on the screen.