diff --git a/custom_components/zaptec/zaptec/api.py b/custom_components/zaptec/zaptec/api.py index 90087c2..b7474e1 100644 --- a/custom_components/zaptec/zaptec/api.py +++ b/custom_components/zaptec/zaptec/api.py @@ -317,6 +317,16 @@ async def poll_firmware_info(self) -> None: charger = self.zaptec.get(fm["ChargerId"]) if charger is None: continue + if ( + fm.get("CurrentVersion") is None + or fm.get("AvailableVersion") is None + or fm.get("IsUpToDate") is None + ): + # If the charger is already added to the Zaptec platform but not yet + # initialized, these fields are not available. + _LOGGER.warning("Missing firmware info for charger %s", charger.qual_id) + continue + charger.set_attributes( { "firmware_current_version": fm["CurrentVersion"],