fix sensors path
This commit is contained in:
parent
18cdf3f565
commit
582d8382cc
1 changed files with 2 additions and 2 deletions
|
@ -97,8 +97,8 @@ class SpaceapiBot(Plugin):
|
|||
try:
|
||||
fmt = {
|
||||
'lastchange': datetime.fromtimestamp(state['state']['lastchange']).strftime('%H:%M'),
|
||||
'known_users': state.get('state', {}).get('sensors', {}).get('people_now_present', [{}])[0].get('names', ""),
|
||||
'user_cnt': state.get('state', {}).get('sensors', {}).get('people_now_present', [{}])[0].get('value', 0)
|
||||
'known_users': state.get('sensors', {}).get('people_now_present', [{}])[0].get('names', ""),
|
||||
'user_cnt': state.get('sensors', {}).get('people_now_present', [{}])[0].get('value', 0)
|
||||
}
|
||||
if state['state']['open']:
|
||||
body = self.config['messages']['open'].format(**fmt)
|
||||
|
|
Loading…
Reference in a new issue