Add significant change filtering to Google (#45566)
This commit is contained in:
parent
568962552b
commit
712a5a098d
7 changed files with 69 additions and 35 deletions
12
tests/components/switch/test_significant_change.py
Normal file
12
tests/components/switch/test_significant_change.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
"""Test the sensor significant change platform."""
|
||||
from homeassistant.components.switch.significant_change import (
|
||||
async_check_significant_change,
|
||||
)
|
||||
|
||||
|
||||
async def test_significant_change():
|
||||
"""Detect Switch significant change."""
|
||||
attrs = {}
|
||||
assert not async_check_significant_change(None, "on", attrs, "on", attrs)
|
||||
assert not async_check_significant_change(None, "off", attrs, "off", attrs)
|
||||
assert async_check_significant_change(None, "on", attrs, "off", attrs)
|
Loading…
Add table
Add a link
Reference in a new issue