aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/esphomeapi.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/esphomeapi.py')
-rw-r--r--scripts/esphomeapi.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/esphomeapi.py b/scripts/esphomeapi.py
index 57f4ebc..5fcbe37 100644
--- a/scripts/esphomeapi.py
+++ b/scripts/esphomeapi.py
@@ -1,18 +1,18 @@
#!/usr/bin/env python3
''' Check on esphome-devices '''
-import os
-import sys
-from datetime import datetime
-from aioesphomeapi import APIClient, ReconnectLogic, SensorState, APIConnectionError
-import asyncio
import argparse
+import asyncio
import logging
-#import colorlog
-import zeroconf
+import os
+import sys
import common
+#import colorlog
+import zeroconf
+from aioesphomeapi import APIClient, APIConnectionError, ReconnectLogic, SensorState
+
sleepsec = 60
noise_psk = os.environ['el_esphome_api_psk']
@@ -56,7 +56,7 @@ async def main(args):
await api.disconnect()
def callback(state):
- if type(state) == SensorState and state.missing_state == False:
+ if type(state) == SensorState and state.missing_state is False:
log.debug('function callback(' + str(state) + ')')
sensor = sensors[state.key]