def test_get_significant_states_with_initial(hass_history):
    'Test that only significant states are returned.\n\n    We should get back every thermostat change that\n    includes an attribute change, but only the state updates for\n    media player (attribute changes are not significant and not returned).\n    '
    hass = hass_history
    (zero, four, states) = record_states(hass)
    one = (zero + timedelta(seconds=1))
    one_and_half = (zero + timedelta(seconds=1.5))
    for entity_id in states:
        if (entity_id == 'media_player.test'):
            states[entity_id] = states[entity_id][1:]
        for state in states[entity_id]:
            if (state.last_changed == one):
                state.last_changed = one_and_half
    hist = get_significant_states(hass, one_and_half, four, filters=history.Filters(), include_start_time_state=True)
    assert (states == hist)
Test that only significant states are returned.

We should get back every thermostat change that
includes an attribute change, but only the state updates for
media player (attribute changes are not significant and not returned).
def test_get_significant_states_with_initial(hass_history):
    'Test that only significant states are returned.\n\n    We should get back every thermostat change that\n    includes an attribute change, but only the state updates for\n    media player (attribute changes are not significant and not returned).\n    '
    hass = hass_history
    (zero, four, states) = record_states(hass)
    one = (zero + timedelta(seconds=1))
    one_and_half = (zero + timedelta(seconds=1.5))
    for entity_id in states:
        if (entity_id == 'media_player.test'):
            states[entity_id] = states[entity_id][1:]
        for state in states[entity_id]:
            if (state.last_changed == one):
                state.last_changed = one_and_half
    hist = get_significant_states(hass, one_and_half, four, filters=history.Filters(), include_start_time_state=True)
    assert (states == hist)