'Test the updating between rooms.'

def test_room_update(self):

    self.send_message(BEDROOM_TOPIC, FAR_MESSAGE)
    self.assert_state(BEDROOM)
    self.assert_distance(10)
    self.send_message(LIVING_ROOM_TOPIC, NEAR_MESSAGE)
    self.assert_state(LIVING_ROOM)
    self.assert_distance(1)
    self.send_message(BEDROOM_TOPIC, FAR_MESSAGE)
    self.assert_state(LIVING_ROOM)
    self.assert_distance(1)
    time = (dt.utcnow() + datetime.timedelta(seconds=7))
    with patch('homeassistant.helpers.condition.dt_util.utcnow', return_value=time):
        self.send_message(BEDROOM_TOPIC, FAR_MESSAGE)
        self.assert_state(BEDROOM)
        self.assert_distance(10)
