def fixture_hass_states_mock():
    """Mocks a HA state machine which returns a mock state."""
    hass = Mock()
    hass.states.get.return_value = Mock(attributes={ATTR_BRIGHTNESS: 10})
    return hass
Mocks a HA state machine which returns a mock state.
tests/test_adaptation_utils.py