Add binary sensor for myq gateway connectivity (#33423)
This commit is contained in:
1 parent
12b408219e
commit
b783aab41b
8 files changed
+397
-3
No files matched your search
@@ -0,0 +1,50 @@
|
||||
"""The scene tests for the myq platform."""
|
||||
|
||||
from homeassistant.const import STATE_CLOSED
|
||||
|
||||
from .util import async_init_integration
|
||||
|
||||
|
||||
async def test_create_covers(hass):
|
||||
"""Test creation of covers."""
|
||||
|
||||
await async_init_integration(hass)
|
||||
|
||||
state = hass.states.get("cover.large_garage_door")
|
||||
assert state.state == STATE_CLOSED
|
||||
expected_attributes = {
|
||||
"device_class": "garage",
|
||||
"friendly_name": "Large Garage Door",
|
||||
"supported_features": 3,
|
||||
}
|
||||
# Only test for a subset of attributes in case
|
||||
# HA changes the implementation and a new one appears
|
||||
assert all(
|
||||
state.attributes[key] == expected_attributes[key] for key in expected_attributes
|
||||
)
|
||||
|
||||
state = hass.states.get("cover.small_garage_door")
|
||||
assert state.state == STATE_CLOSED
|
||||
expected_attributes = {
|
||||
"device_class": "garage",
|
||||
"friendly_name": "Small Garage Door",
|
||||
"supported_features": 3,
|
||||
}
|
||||
# Only test for a subset of attributes in case
|
||||
# HA changes the implementation and a new one appears
|
||||
assert all(
|
||||
state.attributes[key] == expected_attributes[key] for key in expected_attributes
|
||||
)
|
||||
|
||||
state = hass.states.get("cover.gate")
|
||||
assert state.state == STATE_CLOSED
|
||||
expected_attributes = {
|
||||
"device_class": "gate",
|
||||
"friendly_name": "Gate",
|
||||
"supported_features": 3,
|
||||
}
|
||||
# Only test for a subset of attributes in case
|
||||
# HA changes the implementation and a new one appears
|
||||
assert all(
|
||||
state.attributes[key] == expected_attributes[key] for key in expected_attributes
|
||||
)
|
||||
Reference in new issue
Block a user