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

@staticmethod
def map_mode_hass_max(operation_mode):

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