Added if to discovery main

This commit is contained in:
Evan Fiordeliso 2021-12-18 20:57:54 -05:00
parent 5665d57191
commit f2883531df
1 changed files with 3 additions and 2 deletions

View File

@ -27,5 +27,6 @@ class FlickerstripDiscoveryClient:
if __name__ == "__main__":
client = FlickerstripDiscoveryClient()
flickerstrips = client.discover()
flickerstrips[0].force_update()
print(json.dumps(flickerstrips[0].status.to_json()))
if len(flickerstrips) > 0:
flickerstrips[0].force_update()
print(json.dumps(flickerstrips[0].status.to_json()))