Allow for multiple run types, but still show as "ON"

This commit is contained in:
bohdan-s
2022-03-03 14:07:48 +11:00
parent a9869383b2
commit a0861ced8e
+1 -1
View File
@@ -329,7 +329,7 @@ class SungrowInverter():
# to help with graphing.
try:
if self.latest_scrape.get('start_stop'):
if self.latest_scrape.get('start_stop', False) == 'Start' and self.latest_scrape.get('work_state_1', False) == 'Run':
if self.latest_scrape.get('start_stop', False) == 'Start' and self.latest_scrape.get('work_state_1', False).contains('Run'):
self.latest_scrape["run_state"] = "ON"
else:
self.latest_scrape["run_state"] = "OFF"