We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a2e2a05 + 9aacae2 commit 2666df3Copy full SHA for 2666df3
custom_components/mixergy/tank.py
@@ -347,7 +347,10 @@ async def fetch_tank_information(self):
347
348
tank_configuration_json = tank_url_result["configuration"]
349
tank_configuration = json.loads(tank_configuration_json)
350
- self._has_pv_diverter = (tank_configuration["mixergyPvType"] != "NO_INVERTER")
+
351
+ # Some tanks do not return a mixergyPvType - so force to NO_INVERTER
352
+ tank_configuration_pvtype = tank_configuration.get("mixergyPvType", "NO_INVERTER")
353
+ self._has_pv_diverter = (tank_configuration_pvtype != "NO_INVERTER")
354
355
_LOGGER.debug("Measurement URL is %s", self._latest_measurement_url)
356
_LOGGER.debug("Control URL is %s", self._control_url)
0 commit comments