Skip to content

Commit

Permalink
Update openhab2-exporter.py
Browse files Browse the repository at this point in the history
@gersilex's suggestion.
  • Loading branch information
imaginator authored May 15, 2019
1 parent f9ed383 commit 147c70d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openhab2-exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def print_metrics(metrics, type, timestamp):
name = metric['name']
value = metric['state']

if value is None or value == 'NULL' or value == 'UNDEF':
if value in [None, 'NULL', 'UNDEF']:
continue

if metric['type'].lower() == 'switch':
Expand Down

0 comments on commit 147c70d

Please sign in to comment.