Skip to content

Add device trigger support to sensor entities#27133

Merged
emontnemery merged 3 commits into
home-assistant:devfrom
emontnemery:device_trigger_sensor
Oct 3, 2019
Merged

Add device trigger support to sensor entities#27133
emontnemery merged 3 commits into
home-assistant:devfrom
emontnemery:device_trigger_sensor

Conversation

@emontnemery
Copy link
Copy Markdown
Contributor

Description:

Add device trigger support to sensor entities.
This includes trigger part from #26854

This PR is intended as a step towards home-assistant/architecture#178

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the [development checklist][dev-checklist]

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

Comment thread tests/common.py
Comment on lines +1131 to +1135
def assert_lists_same(a, b):
"""Compare two lists, ignoring order."""
assert collections.Counter([hashdict(i) for i in a]) == collections.Counter(
[hashdict(i) for i in b]
)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added to compare lists with different order since the order of automations is not deterministic when we have automations from different domains.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants