Skip to content

Commit

Permalink
2023.9.3 (#100755)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Sep 24, 2023
2 parents c6ed235 + 49b8937 commit 0cbd465
Show file tree
Hide file tree
Showing 67 changed files with 737 additions and 236 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,14 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build base image
uses: home-assistant/builder@2023.08.0
uses: home-assistant/builder@2023.09.0
with:
args: |
$BUILD_ARGS \
--${{ matrix.arch }} \
--cosign \
--target /data \
--generic ${{ needs.init.outputs.version }}
env:
CAS_API_KEY: ${{ secrets.CAS_TOKEN }}
- name: Archive translations
shell: bash
Expand Down Expand Up @@ -275,15 +273,13 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build base image
uses: home-assistant/builder@2023.08.0
uses: home-assistant/builder@2023.09.0
with:
args: |
$BUILD_ARGS \
--target /data/machine \
--cosign \
--machine "${{ needs.init.outputs.version }}=${{ matrix.machine }}"
env:
CAS_API_KEY: ${{ secrets.CAS_TOKEN }}
publish_ha:
name: Publish version files
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
name: requirements_diff

- name: Build wheels
uses: home-assistant/wheels@2023.04.0
uses: home-assistant/wheels@2023.09.1
with:
abi: ${{ matrix.abi }}
tag: musllinux_1_2
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:
sed -i "/numpy/d" homeassistant/package_constraints.txt
- name: Build wheels (part 1)
uses: home-assistant/wheels@2023.04.0
uses: home-assistant/wheels@2023.09.1
with:
abi: ${{ matrix.abi }}
tag: musllinux_1_2
Expand All @@ -192,7 +192,7 @@ jobs:
requirements: "requirements_all.txtaa"

- name: Build wheels (part 2)
uses: home-assistant/wheels@2023.04.0
uses: home-assistant/wheels@2023.09.1
with:
abi: ${{ matrix.abi }}
tag: musllinux_1_2
Expand All @@ -206,7 +206,7 @@ jobs:
requirements: "requirements_all.txtab"

- name: Build wheels (part 3)
uses: home-assistant/wheels@2023.04.0
uses: home-assistant/wheels@2023.09.1
with:
abi: ${{ matrix.abi }}
tag: musllinux_1_2
Expand Down
15 changes: 11 additions & 4 deletions homeassistant/components/airnow/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ class AirNowEntityDescription(SensorEntityDescription, AirNowEntityDescriptionMi
"""Describes Airnow sensor entity."""


def station_extra_attrs(data: dict[str, Any]) -> dict[str, Any]:
"""Process extra attributes for station location (if available)."""
if ATTR_API_STATION in data:
return {
"lat": data.get(ATTR_API_STATION_LATITUDE),
"long": data.get(ATTR_API_STATION_LONGITUDE),
}
return {}


SENSOR_TYPES: tuple[AirNowEntityDescription, ...] = (
AirNowEntityDescription(
key=ATTR_API_AQI,
Expand Down Expand Up @@ -93,10 +103,7 @@ class AirNowEntityDescription(SensorEntityDescription, AirNowEntityDescriptionMi
translation_key="station",
icon="mdi:blur",
value_fn=lambda data: data.get(ATTR_API_STATION),
extra_state_attributes_fn=lambda data: {
"lat": data[ATTR_API_STATION_LATITUDE],
"long": data[ATTR_API_STATION_LONGITUDE],
},
extra_state_attributes_fn=station_extra_attrs,
),
)

Expand Down
3 changes: 2 additions & 1 deletion homeassistant/components/airthings_ble/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ def async_migrate(hass: HomeAssistant, address: str, sensor_name: str) -> None:
not matching_reg_entry or "(" not in entry.unique_id
):
matching_reg_entry = entry
if not matching_reg_entry:
if not matching_reg_entry or matching_reg_entry.unique_id == new_unique_id:
# Already has the newest unique id format
return
entity_id = matching_reg_entry.entity_id
ent_reg.async_update_entity(entity_id=entity_id, new_unique_id=new_unique_id)
Expand Down
22 changes: 21 additions & 1 deletion homeassistant/components/assist_pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,26 @@ class Pipeline:

id: str = field(default_factory=ulid_util.ulid)

@classmethod
def from_json(cls, data: dict[str, Any]) -> Pipeline:
"""Create an instance from a JSON serialization.
This function was added in HA Core 2023.10, previous versions will raise
if there are unexpected items in the serialized data.
"""
return cls(
conversation_engine=data["conversation_engine"],
conversation_language=data["conversation_language"],
id=data["id"],
language=data["language"],
name=data["name"],
stt_engine=data["stt_engine"],
stt_language=data["stt_language"],
tts_engine=data["tts_engine"],
tts_language=data["tts_language"],
tts_voice=data["tts_voice"],
)

def to_json(self) -> dict[str, Any]:
"""Return a JSON serializable representation for storage."""
return {
Expand Down Expand Up @@ -1205,7 +1225,7 @@ def _create_item(self, item_id: str, data: dict) -> Pipeline:

def _deserialize_item(self, data: dict) -> Pipeline:
"""Create an item from its serialized representation."""
return Pipeline(**data)
return Pipeline.from_json(data)

def _serialize_item(self, item_id: str, item: Pipeline) -> dict:
"""Return the serialized representation of an item for storing."""
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/august/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
"documentation": "https://www.home-assistant.io/integrations/august",
"iot_class": "cloud_push",
"loggers": ["pubnub", "yalexs"],
"requirements": ["yalexs==1.8.0", "yalexs-ble==2.2.3"]
"requirements": ["yalexs==1.9.0", "yalexs-ble==2.3.0"]
}
4 changes: 2 additions & 2 deletions homeassistant/components/comelit/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from collections.abc import Mapping
from typing import Any

from aiocomelit import ComeliteSerialBridgeAPi, exceptions as aiocomelit_exceptions
from aiocomelit import ComeliteSerialBridgeApi, exceptions as aiocomelit_exceptions
import voluptuous as vol

from homeassistant import core, exceptions
Expand Down Expand Up @@ -37,7 +37,7 @@ async def validate_input(
) -> dict[str, str]:
"""Validate the user input allows us to connect."""

api = ComeliteSerialBridgeAPi(data[CONF_HOST], data[CONF_PIN])
api = ComeliteSerialBridgeApi(data[CONF_HOST], data[CONF_PIN])

try:
await api.login()
Expand Down
41 changes: 39 additions & 2 deletions homeassistant/components/comelit/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
from datetime import timedelta
from typing import Any

from aiocomelit import ComeliteSerialBridgeAPi
from aiocomelit import ComeliteSerialBridgeApi, ComelitSerialBridgeObject
from aiocomelit.const import BRIDGE
import aiohttp

from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryAuthFailed
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed

from .const import _LOGGER, DOMAIN
Expand All @@ -16,20 +19,54 @@
class ComelitSerialBridge(DataUpdateCoordinator):
"""Queries Comelit Serial Bridge."""

config_entry: ConfigEntry

def __init__(self, hass: HomeAssistant, host: str, pin: int) -> None:
"""Initialize the scanner."""

self._host = host
self._pin = pin

self.api = ComeliteSerialBridgeAPi(host, pin)
self.api = ComeliteSerialBridgeApi(host, pin)

super().__init__(
hass=hass,
logger=_LOGGER,
name=f"{DOMAIN}-{host}-coordinator",
update_interval=timedelta(seconds=5),
)
device_registry = dr.async_get(self.hass)
device_registry.async_get_or_create(
config_entry_id=self.config_entry.entry_id,
identifiers={(DOMAIN, self.config_entry.entry_id)},
model=BRIDGE,
name=f"{BRIDGE} ({self.api.host})",
**self.basic_device_info,
)

@property
def basic_device_info(self) -> dict:
"""Set basic device info."""

return {
"manufacturer": "Comelit",
"hw_version": "20003101",
}

def platform_device_info(
self, device: ComelitSerialBridgeObject, platform: str
) -> dr.DeviceInfo:
"""Set platform device info."""

return dr.DeviceInfo(
identifiers={
(DOMAIN, f"{self.config_entry.entry_id}-{platform}-{device.index}")
},
via_device=(DOMAIN, self.config_entry.entry_id),
name=device.name,
model=f"{BRIDGE} {platform}",
**self.basic_device_info,
)

async def _async_update_data(self) -> dict[str, Any]:
"""Update router data."""
Expand Down
14 changes: 3 additions & 11 deletions homeassistant/components/comelit/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from homeassistant.components.light import LightEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity

Expand Down Expand Up @@ -37,27 +36,20 @@ class ComelitLightEntity(CoordinatorEntity[ComelitSerialBridge], LightEntity):
"""Light device."""

_attr_has_entity_name = True
_attr_name = None

def __init__(
self,
coordinator: ComelitSerialBridge,
device: ComelitSerialBridgeObject,
config_entry_unique_id: str | None,
config_entry_unique_id: str,
) -> None:
"""Init light entity."""
self._api = coordinator.api
self._device = device
super().__init__(coordinator)
self._attr_name = device.name
self._attr_unique_id = f"{config_entry_unique_id}-{device.index}"
self._attr_device_info = DeviceInfo(
identifiers={
(DOMAIN, self._attr_unique_id),
},
manufacturer="Comelit",
model="Serial Bridge",
name=device.name,
)
self._attr_device_info = self.coordinator.platform_device_info(device, LIGHT)

async def _light_set_state(self, state: int) -> None:
"""Set desired light state."""
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/comelit/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/comelit",
"iot_class": "local_polling",
"loggers": ["aiocomelit"],
"requirements": ["aiocomelit==0.0.5"]
"requirements": ["aiocomelit==0.0.8"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/comelit/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"flow_title": "{host}",
"step": {
"reauth_confirm": {
"description": "Please enter the correct PIN for VEDO system: {host}",
"description": "Please enter the correct PIN for {host}",
"data": {
"pin": "[%key:common::config_flow::data::pin%]"
}
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/conversation/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"integration_type": "system",
"iot_class": "local_push",
"quality_scale": "internal",
"requirements": ["hassil==1.2.5", "home-assistant-intents==2023.8.2"]
"requirements": ["hassil==1.2.5", "home-assistant-intents==2023.9.22"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/devolo_home_network/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def async_update_firmware_available() -> UpdateFirmwareCheck:
"""Fetch data from API endpoint."""
assert device.device
try:
async with asyncio.timeout(10):
async with asyncio.timeout(30):
return await device.device.async_check_firmware_available()
except DeviceUnavailable as err:
raise UpdateFailed(err) from err
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/devolo_home_network/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"iot_class": "local_polling",
"loggers": ["devolo_plc_api"],
"quality_scale": "platinum",
"requirements": ["devolo-plc-api==1.4.0"],
"requirements": ["devolo-plc-api==1.4.1"],
"zeroconf": [
{
"type": "_dvl-deviceapi._tcp.local.",
Expand Down
4 changes: 3 additions & 1 deletion homeassistant/components/ecobee/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ def __init__(
self._attr_unique_id = self.thermostat["identifier"]
self.vacation = None
self._last_active_hvac_mode = HVACMode.HEAT_COOL
self._last_hvac_mode_before_aux_heat = HVACMode.HEAT_COOL

self._attr_hvac_modes = []
if self.settings["heatStages"] or self.settings["hasHeatPump"]:
Expand Down Expand Up @@ -541,13 +542,14 @@ def is_aux_heat(self) -> bool:
def turn_aux_heat_on(self) -> None:
"""Turn auxiliary heater on."""
_LOGGER.debug("Setting HVAC mode to auxHeatOnly to turn on aux heat")
self._last_hvac_mode_before_aux_heat = self.hvac_mode
self.data.ecobee.set_hvac_mode(self.thermostat_index, ECOBEE_AUX_HEAT_ONLY)
self.update_without_throttle = True

def turn_aux_heat_off(self) -> None:
"""Turn auxiliary heater off."""
_LOGGER.debug("Setting HVAC mode to last mode to disable aux heat")
self.set_hvac_mode(self._last_active_hvac_mode)
self.set_hvac_mode(self._last_hvac_mode_before_aux_heat)
self.update_without_throttle = True

def set_preset_mode(self, preset_mode: str) -> None:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/enphase_envoy/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"documentation": "https://www.home-assistant.io/integrations/enphase_envoy",
"iot_class": "local_polling",
"loggers": ["pyenphase"],
"requirements": ["pyenphase==1.11.0"],
"requirements": ["pyenphase==1.11.4"],
"zeroconf": [
{
"type": "_enphase-envoy._tcp.local."
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/fritz/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"documentation": "https://www.home-assistant.io/integrations/fritz",
"iot_class": "local_polling",
"loggers": ["fritzconnection"],
"requirements": ["fritzconnection[qr]==1.12.2", "xmltodict==0.13.0"],
"requirements": ["fritzconnection[qr]==1.13.2", "xmltodict==0.13.0"],
"ssdp": [
{
"st": "urn:schemas-upnp-org:device:fritzbox:1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"integration_type": "device",
"iot_class": "local_polling",
"loggers": ["fritzconnection"],
"requirements": ["fritzconnection[qr]==1.12.2"]
"requirements": ["fritzconnection[qr]==1.13.2"]
}
6 changes: 5 additions & 1 deletion homeassistant/components/fritzbox_callmonitor/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ def connect(self) -> None:
_LOGGER.debug("Setting up socket connection")
try:
self.connection = FritzMonitor(address=self.host, port=self.port)
kwargs: dict[str, Any] = {"event_queue": self.connection.start()}
kwargs: dict[str, Any] = {
"event_queue": self.connection.start(
reconnect_tries=50, reconnect_delay=120
)
}
Thread(target=self._process_events, kwargs=kwargs).start()
except OSError as err:
self.connection = None
Expand Down
Loading

0 comments on commit 0cbd465

Please sign in to comment.