Increase test coverage for rfxtrx integration (#39340)
* Increase switch coverage * Increase binary sensor coverage * Final improvements * Remove debug statement * Adjust test duplicate cover * Remove None return test * Assert on length of conf_entries Co-authored-by: Chris Talkington <chris@talkingtontech.com> Co-authored-by: Chris Talkington <chris@talkingtontech.com>
This commit is contained in:
parent
b315df2118
commit
5658a1efec
4 changed files with 110 additions and 0 deletions
|
@ -114,3 +114,26 @@ async def test_discover_covers(hass, rfxtrx_automatic):
|
|||
state = hass.states.get("cover.lightwaverf_siemens_f394ab_2")
|
||||
assert state
|
||||
assert state.state == "open"
|
||||
|
||||
|
||||
async def test_duplicate_cover(hass, rfxtrx):
|
||||
"""Test with 2 duplicate covers."""
|
||||
assert await async_setup_component(
|
||||
hass,
|
||||
"rfxtrx",
|
||||
{
|
||||
"rfxtrx": {
|
||||
"device": "abcd",
|
||||
"devices": {
|
||||
"0b1400cd0213c7f20d010f51": {},
|
||||
"0b1400cd0213c7f20d010f50": {},
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
state = hass.states.get("cover.lightwaverf_siemens_0213c7_242")
|
||||
assert state
|
||||
assert state.state == "closed"
|
||||
assert state.attributes.get("friendly_name") == "LightwaveRF, Siemens 0213c7:242"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue