Skip to content

Commit

Permalink
Bump pyloadapi to v1.3.2 (home-assistant#121709)
Browse files Browse the repository at this point in the history
  • Loading branch information
tr4nt0r authored Jul 10, 2024
1 parent 4fd5ced commit f3fe61f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/pyload/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class PyLoadData:
speed: float
download: bool
reconnect: bool
captcha: bool
captcha: bool | None = None
free_space: int


Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/pyload/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"iot_class": "local_polling",
"loggers": ["pyloadapi"],
"quality_scale": "platinum",
"requirements": ["PyLoadAPI==1.2.0"]
"requirements": ["PyLoadAPI==1.3.2"]
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ PyFlume==0.6.5
PyFronius==0.7.3

# homeassistant.components.pyload
PyLoadAPI==1.2.0
PyLoadAPI==1.3.2

# homeassistant.components.mvglive
PyMVGLive==1.1.4
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ PyFlume==0.6.5
PyFronius==0.7.3

# homeassistant.components.pyload
PyLoadAPI==1.2.0
PyLoadAPI==1.3.2

# homeassistant.components.met_eireann
PyMetEireann==2021.8.0
Expand Down
22 changes: 22 additions & 0 deletions tests/components/pyload/test_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,25 @@ async def test_deprecated_yaml(
assert issue_registry.async_get_issue(
domain=HOMEASSISTANT_DOMAIN, issue_id=f"deprecated_yaml_{DOMAIN}"
)


async def test_pyload_pre_0_5_0(
hass: HomeAssistant,
config_entry: MockConfigEntry,
mock_pyloadapi: AsyncMock,
) -> None:
"""Test setup of the pyload sensor platform."""
mock_pyloadapi.get_status.return_value = {
"pause": False,
"active": 1,
"queue": 6,
"total": 37,
"speed": 5405963.0,
"download": True,
"reconnect": False,
}
config_entry.add_to_hass(hass)
await hass.config_entries.async_setup(config_entry.entry_id)
await hass.async_block_till_done()

assert config_entry.state is ConfigEntryState.LOADED

0 comments on commit f3fe61f

Please sign in to comment.