Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024.6.2 #119376

Merged
merged 41 commits into from
Jun 11, 2024
Merged

2024.6.2 #119376

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
fc83bb1
Fix statistic_during_period wrongly prioritizing ST statistics over L…
karwosts Jun 10, 2024
461f086
Bump pyElectra to 1.2.1 (#118958)
rubeecube Jun 11, 2024
7da1079
Update gardena library to 1.4.2 (#119010)
elupus Jun 6, 2024
ebb0a45
Calculate attributes when entity information available in Group senso…
gjohansson-ST Jun 11, 2024
db7a932
Bump google-generativeai to 0.6.0 (#119062)
tronikos Jun 7, 2024
a1f2140
Fix Azure data explorer (#119089)
kaareseras Jun 11, 2024
87f48b1
Ensure multiple executions of a restart automation in the same event …
bdraco Jun 8, 2024
96ac566
Fix control 4 on os 2 (#119104)
adrum Jun 10, 2024
34477d3
Properly handle escaped unicode characters passed to tools in Google …
tronikos Jun 8, 2024
0f8ed4e
Catch GoogleAPICallError in Google Generative AI (#119118)
tronikos Jun 8, 2024
df96b94
Bump aioshelly to 10.0.1 (#119123)
thecode Jun 8, 2024
a696ea1
Bump aiowaqi to 3.1.0 (#119124)
joostlek Jun 8, 2024
4bb1ea1
Ensure intent tools have safe names (#119144)
balloob Jun 8, 2024
7912c9e
Fix workday timezone (#119148)
TomBrien Jun 8, 2024
40ebf3b
Bump py-synologydsm-api to 2.4.4 (#119156)
mib1185 Jun 8, 2024
019d33c
Use more conservative timeout values in Synology DSM (#119169)
mib1185 Jun 8, 2024
9a8e3ad
Handle Shelly BLE errors during connect and disconnect (#119174)
thecode Jun 9, 2024
d8f3778
Fix elgato light color detection (#119177)
LapsTimeOFF Jun 10, 2024
57cc1f8
Bump opower to 0.4.7 (#119183)
tronikos Jun 9, 2024
c71b6bd
Add fallback to entry_id when no mac address is retrieved in enigma2 …
autinerd Jun 9, 2024
8d094bf
Fix envisalink alarm (#119212)
gjohansson-ST Jun 9, 2024
6a656c5
Fixes crashes when receiving malformed decoded payloads (#119216)
angelnu Jun 10, 2024
8b415a0
Fix Glances v4 network and container issues (glances-api 0.8.0) (#119…
wittypluck Jun 10, 2024
7896e76
Bump python-roborock to 2.3.0 (#119228)
Jun 9, 2024
1e7ab07
Revert SamsungTV migration (#119234)
epenet Jun 10, 2024
119d4c2
Always provide a currentArmLevel in Google assistant (#119238)
elupus Jun 10, 2024
5beff34
Remove myself as codeowner for unifiprotect (#118824)
bdraco Jun 4, 2024
f9352df
Switch unifiprotect lib to use uiprotect (#119243)
bdraco Jun 9, 2024
a28f5ba
Fix wrong arg name in Idasen Desk config flow (#119247)
abmantis Jun 10, 2024
38cd84f
Fix climate on/off in nexia (#119254)
bdraco Jun 10, 2024
eed126c
Bump google-nest-sdm to 4.0.5 (#119255)
allenporter Jun 10, 2024
8d40f4d
Bump uiprotect to 0.4.0 (#119256)
bdraco Jun 10, 2024
74b4955
Improve workday test coverage (#119259)
bdraco Jun 10, 2024
1929e10
Fix persistence on OpenWeatherMap raised repair issue (#119289)
frenck Jun 10, 2024
3bc6cf6
Bump uiprotect to 0.4.1 (#119308)
bdraco Jun 10, 2024
1357351
Add more debug logging to Ping integration (#119318)
jpbede Jun 10, 2024
a0ac9fe
Update frontend to 20240610.0 (#119320)
bramkragten Jun 10, 2024
6ea18a7
Fix statistic_during_period after core restart (#119323)
emontnemery Jun 10, 2024
b656ef4
Fix AladdinConnect OAuth domain (#119336)
swcloudgenie Jun 10, 2024
7ced4e9
Bump `imgw-pib` backend library to version 1.0.5 (#119360)
bieniu Jun 11, 2024
415bfb4
Bump version to 2024.6.2
frenck Jun 11, 2024
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
1 change: 0 additions & 1 deletion .strict-typing
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ homeassistant.components.easyenergy.*
homeassistant.components.ecovacs.*
homeassistant.components.ecowitt.*
homeassistant.components.efergy.*
homeassistant.components.electrasmart.*
homeassistant.components.electric_kiwi.*
homeassistant.components.elgato.*
homeassistant.components.elkm1.*
Expand Down
2 changes: 0 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -1486,8 +1486,6 @@ build.json @home-assistant/supervisor
/tests/components/unifi/ @Kane610
/homeassistant/components/unifi_direct/ @tofuSCHNITZEL
/homeassistant/components/unifiled/ @florisvdk
/homeassistant/components/unifiprotect/ @bdraco
/tests/components/unifiprotect/ @bdraco
/homeassistant/components/upb/ @gwww
/tests/components/upb/ @gwww
/homeassistant/components/upc_connect/ @pvizeli @fabaff
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/aladdin_connect/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

DOMAIN = "aladdin_connect"

OAUTH2_AUTHORIZE = "https://app.aladdinconnect.com/login.html"
OAUTH2_AUTHORIZE = "https://app.aladdinconnect.net/login.html"
OAUTH2_TOKEN = "https://twdvzuefzh.execute-api.us-east-2.amazonaws.com/v1/oauth2/token"
9 changes: 4 additions & 5 deletions homeassistant/components/azure_data_explorer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,12 @@ async def async_setup(hass: HomeAssistant, yaml_config: ConfigType) -> bool:

Adds an empty filter to hass data.
Tries to get a filter from yaml, if present set to hass data.
If config is empty after getting the filter, return, otherwise emit
deprecated warning and pass the rest to the config flow.
"""

hass.data.setdefault(DOMAIN, {DATA_FILTER: {}})
hass.data.setdefault(DOMAIN, {DATA_FILTER: FILTER_SCHEMA({})})
if DOMAIN in yaml_config:
hass.data[DOMAIN][DATA_FILTER] = yaml_config[DOMAIN][CONF_FILTER]
hass.data[DOMAIN][DATA_FILTER] = yaml_config[DOMAIN].pop(CONF_FILTER)

return True


Expand Down Expand Up @@ -207,6 +206,6 @@ def _parse_event(
if "\n" in state.state:
return None, dropped + 1

json_event = str(json.dumps(obj=state, cls=JSONEncoder).encode("utf-8"))
json_event = json.dumps(obj=state, cls=JSONEncoder)

return (json_event, dropped)
37 changes: 24 additions & 13 deletions homeassistant/components/azure_data_explorer/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
CONF_APP_REG_ID,
CONF_APP_REG_SECRET,
CONF_AUTHORITY_ID,
CONF_USE_FREE,
CONF_USE_QUEUED_CLIENT,
)

_LOGGER = logging.getLogger(__name__)
Expand All @@ -35,7 +35,6 @@ class AzureDataExplorerClient:
def __init__(self, data: Mapping[str, Any]) -> None:
"""Create the right class."""

self._cluster_ingest_uri = data[CONF_ADX_CLUSTER_INGEST_URI]
self._database = data[CONF_ADX_DATABASE_NAME]
self._table = data[CONF_ADX_TABLE_NAME]
self._ingestion_properties = IngestionProperties(
Expand All @@ -45,24 +44,36 @@ def __init__(self, data: Mapping[str, Any]) -> None:
ingestion_mapping_reference="ha_json_mapping",
)

# Create cLient for ingesting and querying data
kcsb = KustoConnectionStringBuilder.with_aad_application_key_authentication(
self._cluster_ingest_uri,
data[CONF_APP_REG_ID],
data[CONF_APP_REG_SECRET],
data[CONF_AUTHORITY_ID],
# Create client for ingesting data
kcsb_ingest = (
KustoConnectionStringBuilder.with_aad_application_key_authentication(
data[CONF_ADX_CLUSTER_INGEST_URI],
data[CONF_APP_REG_ID],
data[CONF_APP_REG_SECRET],
data[CONF_AUTHORITY_ID],
)
)

if data[CONF_USE_FREE] is True:
# Create client for querying data
kcsb_query = (
KustoConnectionStringBuilder.with_aad_application_key_authentication(
data[CONF_ADX_CLUSTER_INGEST_URI].replace("ingest-", ""),
data[CONF_APP_REG_ID],
data[CONF_APP_REG_SECRET],
data[CONF_AUTHORITY_ID],
)
)

if data[CONF_USE_QUEUED_CLIENT] is True:
# Queded is the only option supported on free tear of ADX
self.write_client = QueuedIngestClient(kcsb)
self.write_client = QueuedIngestClient(kcsb_ingest)
else:
self.write_client = ManagedStreamingIngestClient.from_dm_kcsb(kcsb)
self.write_client = ManagedStreamingIngestClient.from_dm_kcsb(kcsb_ingest)

self.query_client = KustoClient(kcsb)
self.query_client = KustoClient(kcsb_query)

def test_connection(self) -> None:
"""Test connection, will throw Exception when it cannot connect."""
"""Test connection, will throw Exception if it cannot connect."""

query = f"{self._table} | take 1"

Expand Down
5 changes: 3 additions & 2 deletions homeassistant/components/azure_data_explorer/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

from homeassistant import config_entries
from homeassistant.config_entries import ConfigFlowResult
from homeassistant.helpers.selector import BooleanSelector

from . import AzureDataExplorerClient
from .const import (
Expand All @@ -19,7 +20,7 @@
CONF_APP_REG_ID,
CONF_APP_REG_SECRET,
CONF_AUTHORITY_ID,
CONF_USE_FREE,
CONF_USE_QUEUED_CLIENT,
DEFAULT_OPTIONS,
DOMAIN,
)
Expand All @@ -34,7 +35,7 @@
vol.Required(CONF_APP_REG_ID): str,
vol.Required(CONF_APP_REG_SECRET): str,
vol.Required(CONF_AUTHORITY_ID): str,
vol.Optional(CONF_USE_FREE, default=False): bool,
vol.Required(CONF_USE_QUEUED_CLIENT, default=False): BooleanSelector(),
}
)

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/azure_data_explorer/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
CONF_SEND_INTERVAL = "send_interval"
CONF_MAX_DELAY = "max_delay"
CONF_FILTER = DATA_FILTER = "filter"
CONF_USE_FREE = "use_queued_ingestion"
CONF_USE_QUEUED_CLIENT = "use_queued_ingestion"
DATA_HUB = "hub"
STEP_USER = "user"

Expand Down
14 changes: 9 additions & 5 deletions homeassistant/components/azure_data_explorer/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@
"step": {
"user": {
"title": "Setup your Azure Data Explorer integration",
"description": "Enter connection details.",
"description": "Enter connection details",
"data": {
"cluster_ingest_uri": "Cluster ingest URI",
"database": "Database name",
"table": "Table name",
"cluster_ingest_uri": "Cluster Ingest URI",
"authority_id": "Authority ID",
"client_id": "Client ID",
"client_secret": "Client secret",
"authority_id": "Authority ID",
"database": "Database name",
"table": "Table name",
"use_queued_ingestion": "Use queued ingestion"
},
"data_description": {
"cluster_ingest_uri": "Ingest-URI of the cluster",
"use_queued_ingestion": "Must be enabled when using ADX free cluster"
}
}
},
Expand Down
7 changes: 6 additions & 1 deletion homeassistant/components/control4/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
director_all_items = json.loads(director_all_items)
entry_data[CONF_DIRECTOR_ALL_ITEMS] = director_all_items

entry_data[CONF_UI_CONFIGURATION] = json.loads(await director.getUiConfiguration())
# Check if OS version is 3 or higher to get UI configuration
entry_data[CONF_UI_CONFIGURATION] = None
if int(entry_data[CONF_DIRECTOR_SW_VERSION].split(".")[0]) >= 3:
entry_data[CONF_UI_CONFIGURATION] = json.loads(
await director.getUiConfiguration()
)

# Load options from config entry
entry_data[CONF_SCAN_INTERVAL] = entry.options.get(
Expand Down
11 changes: 8 additions & 3 deletions homeassistant/components/control4/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,18 @@ async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Set up Control4 rooms from a config entry."""
entry_data = hass.data[DOMAIN][entry.entry_id]
ui_config = entry_data[CONF_UI_CONFIGURATION]

# OS 2 will not have a ui_configuration
if not ui_config:
_LOGGER.debug("No UI Configuration found for Control4")
return

all_rooms = await get_rooms(hass, entry)
if not all_rooms:
return

entry_data = hass.data[DOMAIN][entry.entry_id]
scan_interval = entry_data[CONF_SCAN_INTERVAL]
_LOGGER.debug("Scan interval = %s", scan_interval)

Expand Down Expand Up @@ -119,8 +126,6 @@ async def async_update_data() -> dict[int, dict[str, Any]]:
if "parentId" in item and k > 1
}

ui_config = entry_data[CONF_UI_CONFIGURATION]

entity_list = []
for room in all_rooms:
room_id = room["id"]
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/electrasmart/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/electrasmart",
"iot_class": "cloud_polling",
"requirements": ["pyElectra==1.2.0"]
"requirements": ["pyElectra==1.2.1"]
}
10 changes: 9 additions & 1 deletion homeassistant/components/elgato/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,15 @@ def __init__(self, coordinator: ElgatoDataUpdateCoordinator) -> None:
self._attr_unique_id = coordinator.data.info.serial_number

# Elgato Light supporting color, have a different temperature range
if self.coordinator.data.settings.power_on_hue is not None:
if (
self.coordinator.data.info.product_name
in (
"Elgato Light Strip",
"Elgato Light Strip Pro",
)
or self.coordinator.data.settings.power_on_hue
or self.coordinator.data.state.hue is not None
):
self._attr_supported_color_modes = {ColorMode.COLOR_TEMP, ColorMode.HS}
self._attr_min_mireds = 153
self._attr_max_mireds = 285
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/enigma2/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ def __init__(
self._device: OpenWebIfDevice = device
self._entry = entry

self._attr_unique_id = device.mac_address
self._attr_unique_id = device.mac_address or entry.entry_id

self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, device.mac_address)},
identifiers={(DOMAIN, self._attr_unique_id)},
manufacturer=about["info"]["brand"],
model=about["info"]["model"],
configuration_url=device.base,
Expand Down
39 changes: 6 additions & 33 deletions homeassistant/components/envisalink/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ def __init__(
):
"""Initialize the alarm panel."""
self._partition_number = partition_number
self._code = code
self._panic_type = panic_type
self._alarm_control_panel_option_default_code = code
self._attr_code_format = CodeFormat.NUMBER

_LOGGER.debug("Setting up alarm: %s", alarm_name)
super().__init__(alarm_name, info, controller)
Expand All @@ -141,13 +142,6 @@ def async_update_callback(self, partition):
if partition is None or int(partition) == self._partition_number:
self.async_write_ha_state()

@property
def code_format(self) -> CodeFormat | None:
"""Regex for code format or None if no code is required."""
if self._code:
return None
return CodeFormat.NUMBER

@property
def state(self) -> str:
"""Return the state of the device."""
Expand All @@ -169,44 +163,23 @@ def state(self) -> str:

async def async_alarm_disarm(self, code: str | None = None) -> None:
"""Send disarm command."""
if code:
self.hass.data[DATA_EVL].disarm_partition(str(code), self._partition_number)
else:
self.hass.data[DATA_EVL].disarm_partition(
str(self._code), self._partition_number
)
self.hass.data[DATA_EVL].disarm_partition(code, self._partition_number)

async def async_alarm_arm_home(self, code: str | None = None) -> None:
"""Send arm home command."""
if code:
self.hass.data[DATA_EVL].arm_stay_partition(
str(code), self._partition_number
)
else:
self.hass.data[DATA_EVL].arm_stay_partition(
str(self._code), self._partition_number
)
self.hass.data[DATA_EVL].arm_stay_partition(code, self._partition_number)

async def async_alarm_arm_away(self, code: str | None = None) -> None:
"""Send arm away command."""
if code:
self.hass.data[DATA_EVL].arm_away_partition(
str(code), self._partition_number
)
else:
self.hass.data[DATA_EVL].arm_away_partition(
str(self._code), self._partition_number
)
self.hass.data[DATA_EVL].arm_away_partition(code, self._partition_number)

async def async_alarm_trigger(self, code: str | None = None) -> None:
"""Alarm trigger command. Will be used to trigger a panic alarm."""
self.hass.data[DATA_EVL].panic_alarm(self._panic_type)

async def async_alarm_arm_night(self, code: str | None = None) -> None:
"""Send arm night command."""
self.hass.data[DATA_EVL].arm_night_partition(
str(code) if code else str(self._code), self._partition_number
)
self.hass.data[DATA_EVL].arm_night_partition(code, self._partition_number)

@callback
def async_alarm_keypress(self, keypress=None):
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/frontend/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"documentation": "https://www.home-assistant.io/integrations/frontend",
"integration_type": "system",
"quality_scale": "internal",
"requirements": ["home-assistant-frontend==20240605.0"]
"requirements": ["home-assistant-frontend==20240610.0"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/gardena_bluetooth/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"dependencies": ["bluetooth_adapters"],
"documentation": "https://www.home-assistant.io/integrations/gardena_bluetooth",
"iot_class": "local_polling",
"requirements": ["gardena-bluetooth==1.4.1"]
"requirements": ["gardena-bluetooth==1.4.2"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/glances/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/glances",
"iot_class": "local_polling",
"loggers": ["glances_api"],
"requirements": ["glances-api==0.7.0"]
"requirements": ["glances-api==0.8.0"]
}
Loading