@staticmethod
def build_config_dict(r: dict) ->dict:
    """Build configuration dictionary from API response."""
    if r.get('theshold') is not None:
        threshold = r.get('threshold')
    else:
        threshold = r.get('threshHold')
    return {'current_firmware_version': r.get('currentFirmVersion'),
        'latest_firmware_version': r.get('latestFirmVersion'), 'maxPower':
        r.get('maxPower'), 'threshold': threshold, 'power_protection': r.
        get('powerProtectionStatus'), 'energy_saving_status': r.get(
        'energySavingStatus')}
