Skip to content

Commit

Permalink
Bump pyRFXtrx to 0.30.0 (#74146)
Browse files Browse the repository at this point in the history
  • Loading branch information
elupus authored and balloob committed Jul 1, 2022
1 parent 762fe17 commit 135d104
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 25 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/rfxtrx/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"domain": "rfxtrx",
"name": "RFXCOM RFXtrx",
"documentation": "https://www.home-assistant.io/integrations/rfxtrx",
"requirements": ["pyRFXtrx==0.29.0"],
"requirements": ["pyRFXtrx==0.30.0"],
"codeowners": ["@danielhiversen", "@elupus", "@RobBie1221"],
"config_flow": true,
"iot_class": "local_push",
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ pyMetEireann==2021.8.0
pyMetno==0.9.0

# homeassistant.components.rfxtrx
pyRFXtrx==0.29.0
pyRFXtrx==0.30.0

# homeassistant.components.switchmate
# pySwitchmate==0.4.6
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ pyMetEireann==2021.8.0
pyMetno==0.9.0

# homeassistant.components.rfxtrx
pyRFXtrx==0.29.0
pyRFXtrx==0.30.0

# homeassistant.components.tibber
pyTibber==0.22.3
Expand Down
12 changes: 9 additions & 3 deletions tests/components/rfxtrx/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ async def test_options_configure_rfy_cover_device(hass):
result["flow_id"],
user_input={
"automatic_add": True,
"event_code": "071a000001020301",
"event_code": "0C1a0000010203010000000000",
},
)

Expand All @@ -863,7 +863,10 @@ async def test_options_configure_rfy_cover_device(hass):

await hass.async_block_till_done()

assert entry.data["devices"]["071a000001020301"]["venetian_blind_mode"] == "EU"
assert (
entry.data["devices"]["0C1a0000010203010000000000"]["venetian_blind_mode"]
== "EU"
)

device_registry = dr.async_get(hass)
device_entries = dr.async_entries_for_config_entry(device_registry, entry.entry_id)
Expand Down Expand Up @@ -897,7 +900,10 @@ async def test_options_configure_rfy_cover_device(hass):

await hass.async_block_till_done()

assert entry.data["devices"]["071a000001020301"]["venetian_blind_mode"] == "EU"
assert (
entry.data["devices"]["0C1a0000010203010000000000"]["venetian_blind_mode"]
== "EU"
)


def test_get_serial_by_id_no_dir():
Expand Down
37 changes: 20 additions & 17 deletions tests/components/rfxtrx/test_cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,11 @@ async def test_rfy_cover(hass, rfxtrx):
"071a000001020301": {
"venetian_blind_mode": "Unknown",
},
"071a000001020302": {"venetian_blind_mode": "US"},
"071a000001020303": {"venetian_blind_mode": "EU"},
"0c1a0000010203010000000000": {
"venetian_blind_mode": "Unknown",
},
"0c1a0000010203020000000000": {"venetian_blind_mode": "US"},
"0c1a0000010203030000000000": {"venetian_blind_mode": "EU"},
}
)
mock_entry = MockConfigEntry(domain="rfxtrx", unique_id=DOMAIN, data=entry_data)
Expand Down Expand Up @@ -199,9 +202,9 @@ async def test_rfy_cover(hass, rfxtrx):
)

assert rfxtrx.transport.send.mock_calls == [
call(bytearray(b"\x08\x1a\x00\x00\x01\x02\x03\x01\x00")),
call(bytearray(b"\x08\x1a\x00\x01\x01\x02\x03\x01\x01")),
call(bytearray(b"\x08\x1a\x00\x02\x01\x02\x03\x01\x03")),
call(bytearray(b"\x0C\x1a\x00\x00\x01\x02\x03\x01\x00\x00\x00\x00\x00")),
call(bytearray(b"\x0C\x1a\x00\x01\x01\x02\x03\x01\x01\x00\x00\x00\x00")),
call(bytearray(b"\x0C\x1a\x00\x02\x01\x02\x03\x01\x03\x00\x00\x00\x00")),
]

# Test a blind with venetian mode set to US
Expand Down Expand Up @@ -252,12 +255,12 @@ async def test_rfy_cover(hass, rfxtrx):
)

assert rfxtrx.transport.send.mock_calls == [
call(bytearray(b"\x08\x1a\x00\x00\x01\x02\x03\x02\x00")),
call(bytearray(b"\x08\x1a\x00\x01\x01\x02\x03\x02\x0F")),
call(bytearray(b"\x08\x1a\x00\x02\x01\x02\x03\x02\x10")),
call(bytearray(b"\x08\x1a\x00\x03\x01\x02\x03\x02\x11")),
call(bytearray(b"\x08\x1a\x00\x04\x01\x02\x03\x02\x12")),
call(bytearray(b"\x08\x1a\x00\x00\x01\x02\x03\x02\x00")),
call(bytearray(b"\x0C\x1a\x00\x00\x01\x02\x03\x02\x00\x00\x00\x00\x00")),
call(bytearray(b"\x0C\x1a\x00\x01\x01\x02\x03\x02\x0F\x00\x00\x00\x00")),
call(bytearray(b"\x0C\x1a\x00\x02\x01\x02\x03\x02\x10\x00\x00\x00\x00")),
call(bytearray(b"\x0C\x1a\x00\x03\x01\x02\x03\x02\x11\x00\x00\x00\x00")),
call(bytearray(b"\x0C\x1a\x00\x04\x01\x02\x03\x02\x12\x00\x00\x00\x00")),
call(bytearray(b"\x0C\x1a\x00\x00\x01\x02\x03\x02\x00\x00\x00\x00\x00")),
]

# Test a blind with venetian mode set to EU
Expand Down Expand Up @@ -308,10 +311,10 @@ async def test_rfy_cover(hass, rfxtrx):
)

assert rfxtrx.transport.send.mock_calls == [
call(bytearray(b"\x08\x1a\x00\x00\x01\x02\x03\x03\x00")),
call(bytearray(b"\x08\x1a\x00\x01\x01\x02\x03\x03\x11")),
call(bytearray(b"\x08\x1a\x00\x02\x01\x02\x03\x03\x12")),
call(bytearray(b"\x08\x1a\x00\x03\x01\x02\x03\x03\x0F")),
call(bytearray(b"\x08\x1a\x00\x04\x01\x02\x03\x03\x10")),
call(bytearray(b"\x08\x1a\x00\x00\x01\x02\x03\x03\x00")),
call(bytearray(b"\x0C\x1a\x00\x00\x01\x02\x03\x03\x00\x00\x00\x00\x00")),
call(bytearray(b"\x0C\x1a\x00\x01\x01\x02\x03\x03\x11\x00\x00\x00\x00")),
call(bytearray(b"\x0C\x1a\x00\x02\x01\x02\x03\x03\x12\x00\x00\x00\x00")),
call(bytearray(b"\x0C\x1a\x00\x03\x01\x02\x03\x03\x0F\x00\x00\x00\x00")),
call(bytearray(b"\x0C\x1a\x00\x04\x01\x02\x03\x03\x10\x00\x00\x00\x00")),
call(bytearray(b"\x0C\x1a\x00\x00\x01\x02\x03\x03\x00\x00\x00\x00\x00")),
]
4 changes: 2 additions & 2 deletions tests/components/rfxtrx/test_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from tests.common import MockConfigEntry, mock_restore_cache
from tests.components.rfxtrx.conftest import create_rfx_test_cfg

EVENT_RFY_ENABLE_SUN_AUTO = "081a00000301010113"
EVENT_RFY_DISABLE_SUN_AUTO = "081a00000301010114"
EVENT_RFY_ENABLE_SUN_AUTO = "0C1a0000030101011300000003"
EVENT_RFY_DISABLE_SUN_AUTO = "0C1a0000030101011400000003"


async def test_one_switch(hass, rfxtrx):
Expand Down

0 comments on commit 135d104

Please sign in to comment.