Nov-16-2016, 03:48 PM
Im fetching data from firebase like this:
#imports.... class AIHome: def __init__(self, onTime, offTime): #init stuff def fetchUpdate(self): AIHome.authentication = firebase.FirebaseAuthentication('mykey', 'myemail', extra={'id': 123}) AIHome.firebase = firebase.FirebaseApplication('https://myapp.firebaseio.com/', AIHome.authentication) print AIHome.authentication.extra AIHome.user = AIHome.authentication.get_user() print AIHome.user.firebase_auth_token AIHome.results = AIHome.firebase.get('/Relays', None)#, {'print': 'pretty'}) print AIHome.results print AIHome.results.Relay1ON #when i try to use it here it fails!!!!! print AIHome.results.Relay1OFF self.relayToggle()it returns this:
{u'Relay1ON': 1800, u'Relay1OFF': u'0600'}so when I try to use the dict and read its value I get this:
File "tsrb430.py", line 54, in fetchUpdate print AIHome.results.Relay1ON AttributeError: 'dict' object has no attribute 'Relay1ON'Please help