diff --git a/custom_components/fpl/fplapi.py b/custom_components/fpl/fplapi.py index 3a9cd8c..9520e7a 100644 --- a/custom_components/fpl/fplapi.py +++ b/custom_components/fpl/fplapi.py @@ -26,10 +26,6 @@ _LOGGER = logging.getLogger(__package__) URL_TERRITORY = API_HOST + "/cs/customer/v1/territoryid/public/territory" -class NoTerrytoryAvailableException(Exception): - """Thrown when not possible to determine user territory""" - - class FplApi: """A class for getting energy usage information from Florida Power & Light.""" @@ -58,7 +54,7 @@ class FplApi: territoryArray = json_data["data"]["territory"] if len(territoryArray) == 0: - raise NoTerrytoryAvailableException() + return FPL_MAINREGION self._territory = territoryArray[0] return territoryArray[0]