Skip to content

Commit

Permalink
resolves an issue with NoneType errors
Browse files Browse the repository at this point in the history
  • Loading branch information
keatontaylor committed May 19, 2020
1 parent d012016 commit 33bbfdb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lambda_function.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## VERSION 0.6.0

# UPDATE THESE VARIABLES WITH YOUR CONFIG
HOME_ASSISTANT_URL = 'https://ha.invertedorigin.com' # REPLACE WITH THE URL FOR YOUR HA FRONTEND
HOME_ASSISTANT_URL = 'https://yourhainstall.com' # REPLACE WITH THE URL FOR YOUR HA FRONTEND
VERIFY_SSL = True # SET TO FALSE IF YOU DO NOT HAVE VALID CERTS
TOKEN = '' # ADD YOUR LONG LIVED TOKEN IF NEEDED OTHERWISE LEAVE BLANK

Expand Down Expand Up @@ -49,11 +49,10 @@ def __init__(self, handler_input=None):

self.token = self._fetch_token() if TOKEN == "" else TOKEN

if not hasattr(self, 'ha_state'):
if not hasattr(self, 'ha_state') or self.ha_state is None:
self.get_ha_state()

def _clear_state(self):
self.handler_input = None
self.ha_state = None

def _fetch_token(self):
Expand Down

0 comments on commit 33bbfdb

Please sign in to comment.