'Test to simulate a press.'

def simulate_press(self, number):

    _LOGGER.info('***    simulate    press    of    %d', number)
    callback = self.switch_pressed_callbacks.get(number)
    with mock.patch('homeassistant.helpers.condition.dt_util.utcnow', return_value=(self.start_time + self.last_delta)):
        if (callback is not None):
            callback()
        self.hass.block_till_done()
