Bump library version for Advantage Air (#52813)

* Bump library version

* Bump version to 0.2.5

* Add tests to cover this edge case
This commit is contained in:
Brett 2021-07-17 21:45:29 +10:00 committed by GitHub
parent 24cc5c8a0a
commit 7fe3f78c24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 5 deletions

View File

@ -3,8 +3,12 @@
"name": "Advantage Air",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/advantage_air",
"codeowners": ["@Bre77"],
"requirements": ["advantage_air==0.2.1"],
"codeowners": [
"@Bre77"
],
"requirements": [
"advantage_air==0.2.5"
],
"quality_scale": "platinum",
"iot_class": "local_polling"
}
}

View File

@ -114,7 +114,7 @@ adext==0.4.2
adguardhome==0.5.0
# homeassistant.components.advantage_air
advantage_air==0.2.1
advantage_air==0.2.5
# homeassistant.components.frontier_silicon
afsapi==0.0.4

View File

@ -57,7 +57,7 @@ adext==0.4.2
adguardhome==0.5.0
# homeassistant.components.advantage_air
advantage_air==0.2.1
advantage_air==0.2.5
# homeassistant.components.agent_dvr
agent-py==0.0.23

View File

@ -112,3 +112,35 @@ async def test_cover_async_setup_entry(hass, aioclient_mock):
assert data["ac2"]["zones"]["z01"]["state"] == ADVANTAGE_AIR_STATE_CLOSE
assert aioclient_mock.mock_calls[-1][0] == "GET"
assert aioclient_mock.mock_calls[-1][1].path == "/getSystemData"
# Test controlling multiple Cover Zone Entity
await hass.services.async_call(
COVER_DOMAIN,
SERVICE_CLOSE_COVER,
{
ATTR_ENTITY_ID: [
"cover.zone_open_without_sensor",
"cover.zone_closed_without_sensor",
]
},
blocking=True,
)
assert len(aioclient_mock.mock_calls) == 11
data = loads(aioclient_mock.mock_calls[-2][1].query["json"])
assert data["ac2"]["zones"]["z01"]["state"] == ADVANTAGE_AIR_STATE_CLOSE
assert data["ac2"]["zones"]["z02"]["state"] == ADVANTAGE_AIR_STATE_CLOSE
await hass.services.async_call(
COVER_DOMAIN,
SERVICE_OPEN_COVER,
{
ATTR_ENTITY_ID: [
"cover.zone_open_without_sensor",
"cover.zone_closed_without_sensor",
]
},
blocking=True,
)
assert len(aioclient_mock.mock_calls) == 13
data = loads(aioclient_mock.mock_calls[-2][1].query["json"])
assert data["ac2"]["zones"]["z01"]["state"] == ADVANTAGE_AIR_STATE_OPEN
assert data["ac2"]["zones"]["z02"]["state"] == ADVANTAGE_AIR_STATE_OPEN