'Map MAX! Operation Modes to Home Assistant Operation Modes.'

@staticmethod
def map_mode_max_hass(mode):

    from maxcube.device import MAX_DEVICE_MODE_AUTOMATIC, MAX_DEVICE_MODE_MANUAL, MAX_DEVICE_MODE_VACATION, MAX_DEVICE_MODE_BOOST
    if (mode == MAX_DEVICE_MODE_AUTOMATIC):
        operation_mode = STATE_AUTO
    elif (mode == MAX_DEVICE_MODE_MANUAL):
        operation_mode = STATE_MANUAL
    elif (mode == MAX_DEVICE_MODE_VACATION):
        operation_mode = STATE_VACATION
    elif (mode == MAX_DEVICE_MODE_BOOST):
        operation_mode = STATE_BOOST
    else:
        operation_mode = None
    return operation_mode
