Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions homeassistant/components/amberelectric/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
SelectSelectorMode,
)

from .const import CONF_SITE_ID, CONF_SITE_NAME, DOMAIN
from .const import CONF_SITE_ID, CONF_SITE_NAME, DOMAIN, REQUEST_TIMEOUT

API_URL = "https://app.amber.com.au/developers"

Expand Down Expand Up @@ -64,7 +64,9 @@ def _fetch_sites(self, token: str) -> list[Site] | None:
api = amberelectric.AmberApi(api_client)

try:
sites: list[Site] = filter_sites(api.get_sites())
sites: list[Site] = filter_sites(
api.get_sites(_request_timeout=REQUEST_TIMEOUT)
)
except amberelectric.ApiException as api_exception:
if api_exception.status == 403:
self._errors[CONF_API_TOKEN] = "invalid_api_token"
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/amberelectric/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
GENERAL_CHANNEL = "general"
CONTROLLED_LOAD_CHANNEL = "controlled_load"
FEED_IN_CHANNEL = "feed_in"

REQUEST_TIMEOUT = 15
8 changes: 6 additions & 2 deletions homeassistant/components/amberelectric/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from homeassistant.core import HomeAssistant
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed

from .const import LOGGER
from .const import LOGGER, REQUEST_TIMEOUT
from .helpers import normalize_descriptor

type AmberConfigEntry = ConfigEntry[AmberUpdateCoordinator]
Expand Down Expand Up @@ -82,7 +82,11 @@ def update_price_data(self) -> dict[str, dict[str, Any]]:
"grid": {},
}
try:
data = self._api.get_current_prices(self.site_id, next=288)
data = self._api.get_current_prices(
self.site_id,
next=288,
_request_timeout=REQUEST_TIMEOUT,
)
intervals = [interval.actual_instance for interval in data]
except ApiException as api_exception:
raise UpdateFailed("Missing price data, skipping update") from api_exception
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/esphome/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

DEFAULT_PORT: Final = 6053

STABLE_BLE_VERSION_STR = "2025.5.0"
STABLE_BLE_VERSION_STR = "2025.8.0"
STABLE_BLE_VERSION = AwesomeVersion(STABLE_BLE_VERSION_STR)
PROJECT_URLS = {
"esphome.bluetooth-proxy": "https://esphome.github.io/bluetooth-proxies/",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/netatmo/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"integration_type": "hub",
"iot_class": "cloud_polling",
"loggers": ["pyatmo"],
"requirements": ["pyatmo==9.2.1"]
"requirements": ["pyatmo==9.2.3"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/sleepiq/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"documentation": "https://www.home-assistant.io/integrations/sleepiq",
"iot_class": "cloud_polling",
"loggers": ["asyncsleepiq"],
"requirements": ["asyncsleepiq==1.5.3"]
"requirements": ["asyncsleepiq==1.6.0"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/smartthings/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
"iot_class": "cloud_push",
"loggers": ["pysmartthings"],
"quality_scale": "bronze",
"requirements": ["pysmartthings==3.2.8"]
"requirements": ["pysmartthings==3.2.9"]
}
6 changes: 3 additions & 3 deletions requirements_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions requirements_test_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 20 additions & 6 deletions tests/components/amberelectric/test_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
from dateutil import parser
import pytest

from homeassistant.components.amberelectric.const import CONF_SITE_ID, CONF_SITE_NAME
from homeassistant.components.amberelectric.const import (
CONF_SITE_ID,
CONF_SITE_NAME,
REQUEST_TIMEOUT,
)
from homeassistant.components.amberelectric.coordinator import AmberUpdateCoordinator
from homeassistant.const import CONF_API_TOKEN
from homeassistant.core import HomeAssistant
Expand Down Expand Up @@ -104,7 +108,9 @@ async def test_fetch_general_site(hass: HomeAssistant, current_price_api: Mock)
result = await data_service._async_update_data()

current_price_api.get_current_prices.assert_called_with(
GENERAL_ONLY_SITE_ID, next=288
GENERAL_ONLY_SITE_ID,
next=288,
_request_timeout=REQUEST_TIMEOUT,
)

assert result["current"].get("general") == GENERAL_CHANNEL[0].actual_instance
Expand Down Expand Up @@ -136,7 +142,9 @@ async def test_fetch_no_general_site(
await data_service._async_update_data()

current_price_api.get_current_prices.assert_called_with(
GENERAL_ONLY_SITE_ID, next=288
GENERAL_ONLY_SITE_ID,
next=288,
_request_timeout=REQUEST_TIMEOUT,
)


Expand All @@ -150,7 +158,9 @@ async def test_fetch_api_error(hass: HomeAssistant, current_price_api: Mock) ->
result = await data_service._async_update_data()

current_price_api.get_current_prices.assert_called_with(
GENERAL_ONLY_SITE_ID, next=288
GENERAL_ONLY_SITE_ID,
next=288,
_request_timeout=REQUEST_TIMEOUT,
)

assert result["current"].get("general") == GENERAL_CHANNEL[0].actual_instance
Expand Down Expand Up @@ -201,7 +211,9 @@ async def test_fetch_general_and_controlled_load_site(
result = await data_service._async_update_data()

current_price_api.get_current_prices.assert_called_with(
GENERAL_AND_CONTROLLED_SITE_ID, next=288
GENERAL_AND_CONTROLLED_SITE_ID,
next=288,
_request_timeout=REQUEST_TIMEOUT,
)

assert result["current"].get("general") == GENERAL_CHANNEL[0].actual_instance
Expand Down Expand Up @@ -241,7 +253,9 @@ async def test_fetch_general_and_feed_in_site(
result = await data_service._async_update_data()

current_price_api.get_current_prices.assert_called_with(
GENERAL_AND_FEED_IN_SITE_ID, next=288
GENERAL_AND_FEED_IN_SITE_ID,
next=288,
_request_timeout=REQUEST_TIMEOUT,
)

assert result["current"].get("general") == GENERAL_CHANNEL[0].actual_instance
Expand Down
2 changes: 1 addition & 1 deletion tests/components/togrill/test_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ async def test_set_number_disconnected(
)
mock_client.is_connected = False

with pytest.raises(HomeAssistantError, match=""):
with pytest.raises(HomeAssistantError):
await hass.services.async_call(
NUMBER_DOMAIN,
SERVICE_SET_VALUE,
Expand Down
Loading