'Test states of sensors.'

def test_states(self):

    now = dt_util.utc_from_timestamp(1495068856)
    device = time_date.TimeDateSensor(self.hass, 'time')
    device._update_internal_state(now)
    assert (device.state == '00:54')
    device = time_date.TimeDateSensor(self.hass, 'date')
    device._update_internal_state(now)
    assert (device.state == '2017-05-18')
    device = time_date.TimeDateSensor(self.hass, 'time_utc')
    device._update_internal_state(now)
    assert (device.state == '00:54')
    device = time_date.TimeDateSensor(self.hass, 'beat')
    device._update_internal_state(now)
    assert (device.state == '@079')
