Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
commandPayload.retrieveDate = convertToDate(commandPayload.retrieveDate)!
const { retrieveDate } = commandPayload
- if (chargingStation.stationInfo?.firmwareStatus !== OCPP16FirmwareStatus.Installed) {
+ if (
+ chargingStation.stationInfo?.firmwareStatus != null &&
+ chargingStation.stationInfo.firmwareStatus !== OCPP16FirmwareStatus.Installed
+ ) {
logger.warn(
`${chargingStation.logPrefix()} ${moduleName}.handleRequestUpdateFirmware: Cannot simulate firmware update: firmware update is already in progress`
)