summaryrefslogtreecommitdiff
path: root/src/home/inverter/monitor.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/home/inverter/monitor.py')
-rw-r--r--src/home/inverter/monitor.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/home/inverter/monitor.py b/src/home/inverter/monitor.py
index f661d73..86f75ac 100644
--- a/src/home/inverter/monitor.py
+++ b/src/home/inverter/monitor.py
@@ -113,9 +113,7 @@ class InverterMonitor(Thread):
# Reading rated configuration
rated = inverter.exec('get-rated')['data']
- self.osp = OutputSourcePriority.SolarBatteryUtility \
- if rated['output_source_priority'] == 'Solar-Battery-Utility' \
- else OutputSourcePriority.SolarUtilityBattery
+ self.osp = OutputSourcePriority.from_text(rated['output_source_priority'])
# Read data and run implemented programs every 2 seconds.
while not self.interrupted: