diff --git a/packages/modules/devices/shelly/inverter.py b/packages/modules/devices/shelly/inverter.py index b700b778d5..e2131cf325 100644 --- a/packages/modules/devices/shelly/inverter.py +++ b/packages/modules/devices/shelly/inverter.py @@ -43,7 +43,10 @@ def total_power_from_shelly(self) -> int: for meter in meters: total = total + meter['power'] else: - total = status['switch:0']['apower'] + if 'switch:0' in status: + total = status['switch:0']['apower'] + else: + total = status['em:0']['total_act_power'] # shelly Pro3EM except KeyError: log.exception("unsupported shelly device?") finally: