'Set new target operation mode.'

def set_operation_mode(self, operation_mode):

    for (mode, state) in HM_STATE_MAP.items():
        if (state == operation_mode):
            code = getattr(self._hmdevice, mode, 0)
            self._hmdevice.MODE = code
