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
2 changes: 1 addition & 1 deletion homeassistant/components/adguard/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"integration_type": "service",
"iot_class": "local_polling",
"loggers": ["adguardhome"],
"requirements": ["adguardhome==0.8.0"]
"requirements": ["adguardhome==0.8.1"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/bluetooth/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"bluetooth-adapters==2.1.0",
"bluetooth-auto-recovery==1.5.3",
"bluetooth-data-tools==1.28.4",
"dbus-fast==2.45.0",
"dbus-fast==2.45.1",
"habluetooth==5.7.0"
]
}
1 change: 1 addition & 0 deletions homeassistant/components/mqtt/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,7 @@
"speed": "[%key:component::sensor::entity_component::speed::name%]",
"sulphur_dioxide": "[%key:component::sensor::entity_component::sulphur_dioxide::name%]",
"temperature": "[%key:component::sensor::entity_component::temperature::name%]",
"temperature_delta": "[%key:component::sensor::entity_component::temperature_delta::name%]",
"timestamp": "[%key:component::sensor::entity_component::timestamp::name%]",
"volatile_organic_compounds": "[%key:component::sensor::entity_component::volatile_organic_compounds::name%]",
"volatile_organic_compounds_parts": "[%key:component::sensor::entity_component::volatile_organic_compounds_parts::name%]",
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/random/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
"speed": "[%key:component::sensor::entity_component::speed::name%]",
"sulphur_dioxide": "[%key:component::sensor::entity_component::sulphur_dioxide::name%]",
"temperature": "[%key:component::sensor::entity_component::temperature::name%]",
"temperature_delta": "[%key:component::sensor::entity_component::temperature_delta::name%]",
"timestamp": "[%key:component::sensor::entity_component::timestamp::name%]",
"volatile_organic_compounds": "[%key:component::sensor::entity_component::volatile_organic_compounds::name%]",
"volatile_organic_compounds_parts": "[%key:component::sensor::entity_component::volatile_organic_compounds_parts::name%]",
Expand Down
49 changes: 49 additions & 0 deletions homeassistant/components/saunum/diagnostics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"""Diagnostics support for Saunum Leil Sauna Control Unit integration."""

from __future__ import annotations

from dataclasses import asdict
from typing import Any

from homeassistant.components.diagnostics import async_redact_data
from homeassistant.const import CONF_HOST
from homeassistant.core import HomeAssistant

from . import LeilSaunaConfigEntry

REDACT_CONFIG = {CONF_HOST}


async def async_get_config_entry_diagnostics(
hass: HomeAssistant, entry: LeilSaunaConfigEntry
) -> dict[str, Any]:
"""Return diagnostics for a config entry."""
coordinator = entry.runtime_data

# Build diagnostics data
diagnostics_data: dict[str, Any] = {
"config": async_redact_data(entry.data, REDACT_CONFIG),
"client_info": {"connected": coordinator.client.is_connected},
"coordinator_info": {
"last_update_success": coordinator.last_update_success,
"update_interval": str(coordinator.update_interval),
"last_exception": str(coordinator.last_exception)
if coordinator.last_exception
else None,
},
}

# Add coordinator data if available
if coordinator.data:
data_dict = asdict(coordinator.data)
diagnostics_data["coordinator_data"] = data_dict

# Add alarm summary
alarm_fields = [
key
for key, value in data_dict.items()
if key.startswith("alarm_") and value is True
]
diagnostics_data["active_alarms"] = alarm_fields

return diagnostics_data
4 changes: 2 additions & 2 deletions homeassistant/components/saunum/quality_scale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ rules:

# Gold tier
devices: done
diagnostics: todo
diagnostics: done
discovery:
status: exempt
comment: Device uses generic Espressif hardware with no unique identifying information (MAC OUI or hostname) that would distinguish it from other Espressif-based devices on the network.
discovery-update-info: todo
docs-data-update: done
docs-examples: todo
docs-known-limitations: done
docs-supported-devices: todo
docs-supported-devices: done
docs-supported-functions: done
docs-troubleshooting: done
docs-use-cases: done
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/scrape/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
"speed": "[%key:component::sensor::entity_component::speed::name%]",
"sulphur_dioxide": "[%key:component::sensor::entity_component::sulphur_dioxide::name%]",
"temperature": "[%key:component::sensor::entity_component::temperature::name%]",
"temperature_delta": "[%key:component::sensor::entity_component::temperature_delta::name%]",
"timestamp": "[%key:component::sensor::entity_component::timestamp::name%]",
"volatile_organic_compounds": "[%key:component::sensor::entity_component::volatile_organic_compounds::name%]",
"volatile_organic_compounds_parts": "[%key:component::sensor::entity_component::volatile_organic_compounds_parts::name%]",
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/sql/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"speed": "[%key:component::sensor::entity_component::speed::name%]",
"sulphur_dioxide": "[%key:component::sensor::entity_component::sulphur_dioxide::name%]",
"temperature": "[%key:component::sensor::entity_component::temperature::name%]",
"temperature_delta": "[%key:component::sensor::entity_component::temperature_delta::name%]",
"timestamp": "[%key:component::sensor::entity_component::timestamp::name%]",
"volatile_organic_compounds": "[%key:component::sensor::entity_component::volatile_organic_compounds::name%]",
"volatile_organic_compounds_parts": "[%key:component::sensor::entity_component::volatile_organic_compounds_parts::name%]",
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/template/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,7 @@
"speed": "[%key:component::sensor::entity_component::speed::name%]",
"sulphur_dioxide": "[%key:component::sensor::entity_component::sulphur_dioxide::name%]",
"temperature": "[%key:component::sensor::entity_component::temperature::name%]",
"temperature_delta": "[%key:component::sensor::entity_component::temperature_delta::name%]",
"timestamp": "[%key:component::sensor::entity_component::timestamp::name%]",
"volatile_organic_compounds": "[%key:component::sensor::entity_component::volatile_organic_compounds::name%]",
"volatile_organic_compounds_parts": "[%key:component::sensor::entity_component::volatile_organic_compounds_parts::name%]",
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/tuya/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ class DPCode(StrEnum):
ALARM_DELAY_TIME = "alarm_delay_time"
ALARM_MESSAGE = "alarm_message"
ALARM_MSG = "alarm_msg"
ALARM_STATE = "alarm_state"
ALARM_SWITCH = "alarm_switch" # Alarm switch
ALARM_TIME = "alarm_time" # Alarm time
ALARM_VOLUME = "alarm_volume" # Alarm volume
Expand Down
5 changes: 5 additions & 0 deletions homeassistant/components/tuya/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@
),
),
DeviceCategory.SGBJ: (
SelectEntityDescription(
key=DPCode.ALARM_STATE,
translation_key="siren_mode",
entity_category=EntityCategory.CONFIG,
),
SelectEntityDescription(
key=DPCode.ALARM_VOLUME,
translation_key="volume",
Expand Down
9 changes: 9 additions & 0 deletions homeassistant/components/tuya/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,15 @@
"power_on": "[%key:common::state::on%]"
}
},
"siren_mode": {
"name": "Siren mode",
"state": {
"alarm_light": "Light",
"alarm_sound": "Sound",
"alarm_sound_light": "Sound & light",
"normal": "[%key:common::state::normal%]"
}
},
"target_humidity": {
"name": "Target humidity"
},
Expand Down
26 changes: 1 addition & 25 deletions homeassistant/components/xbox/browse_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import NamedTuple

from pythonxbox.api.client import XboxLiveClient
from pythonxbox.api.provider.catalog.const import HOME_APP_IDS, SYSTEM_PFN_ID_MAP
from pythonxbox.api.provider.catalog.const import HOME_APP_IDS
from pythonxbox.api.provider.catalog.models import (
AlternateIdType,
CatalogResponse,
Expand Down Expand Up @@ -42,7 +42,6 @@ class MediaTypeDetails(NamedTuple):
async def build_item_response(
client: XboxLiveClient,
device_id: str,
tv_configured: bool,
media_content_type: str,
media_content_id: str,
) -> BrowseMedia | None:
Expand Down Expand Up @@ -83,29 +82,6 @@ async def build_item_response(
)
)

# Add TV if configured
if tv_configured:
tv_catalog: CatalogResponse = (
await client.catalog.get_product_from_alternate_id(
SYSTEM_PFN_ID_MAP["Microsoft.Xbox.LiveTV_8wekyb3d8bbwe"][id_type],
id_type,
)
)
tv_thumb = _find_media_image(
tv_catalog.products[0].localized_properties[0].images
)
children.append(
BrowseMedia(
media_class=MediaClass.APP,
media_content_id="TV",
media_content_type=MediaType.APP,
title="Live TV",
can_play=True,
can_expand=False,
thumbnail=None if tv_thumb is None else tv_thumb.uri,
)
)

content_types = sorted(
{app.content_type for app in apps.result if app.content_type in TYPE_MAP}
)
Expand Down
7 changes: 2 additions & 5 deletions homeassistant/components/xbox/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ async def async_browse_media(
return await build_item_response(
self.client,
self._console.id,
self.data.status.is_tv_configured,
media_content_type or "",
media_content_id or "",
) # type: ignore[return-value]
Expand All @@ -187,10 +186,8 @@ async def async_play_media(
"""Launch an app on the Xbox."""
if media_id == "Home":
await self.client.smartglass.go_home(self._console.id)
elif media_id == "TV":
await self.client.smartglass.show_tv_guide(self._console.id)
else:
await self.client.smartglass.launch_app(self._console.id, media_id)

await self.client.smartglass.launch_app(self._console.id, media_id)


def _find_media_image(images: list[Image]) -> Image | None:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/package_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ certifi>=2021.5.30
ciso8601==2.3.3
cronsim==2.7
cryptography==46.0.2
dbus-fast==2.45.0
dbus-fast==2.45.1
file-read-backwards==2.0.0
fnv-hash-fast==1.6.0
go2rtc-client==0.2.1
Expand Down
4 changes: 2 additions & 2 deletions requirements_all.txt

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

4 changes: 2 additions & 2 deletions requirements_test_all.txt

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

9 changes: 7 additions & 2 deletions tests/components/miele/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Tests for the Miele integration."""

from collections.abc import Awaitable, Callable
from typing import Any
from unittest.mock import AsyncMock

from homeassistant.core import HomeAssistant
Expand All @@ -16,11 +17,15 @@ async def setup_integration(hass: HomeAssistant, config_entry: MockConfigEntry)
await hass.async_block_till_done()


def get_data_callback(mock: AsyncMock) -> Callable[[int], Awaitable[None]]:
def get_data_callback(
mock: AsyncMock,
) -> Callable[[dict[str, Any]], Awaitable[None]]:
"""Get registered callback for api data push."""
return mock.listen_events.call_args_list[0].kwargs.get("data_callback")


def get_actions_callback(mock: AsyncMock) -> Callable[[int], Awaitable[None]]:
def get_actions_callback(
mock: AsyncMock,
) -> Callable[[dict[str, Any]], Awaitable[None]]:
"""Get registered callback for api data push."""
return mock.listen_events.call_args_list[0].kwargs.get("actions_callback")
37 changes: 37 additions & 0 deletions tests/components/saunum/snapshots/test_diagnostics.ambr
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# serializer version: 1
# name: test_entry_diagnostics
dict({
'active_alarms': list([
]),
'client_info': dict({
'connected': True,
}),
'config': dict({
'host': '**REDACTED**',
}),
'coordinator_data': dict({
'alarm_door_open': False,
'alarm_door_sensor': False,
'alarm_internal_temp': False,
'alarm_temp_sensor_open': False,
'alarm_temp_sensor_short': False,
'alarm_thermal_cutoff': False,
'current_temperature': 75.0,
'door_open': False,
'fan_duration': 10,
'fan_speed': 2,
'heater_elements_active': 0,
'light_on': False,
'on_time': 3600,
'sauna_duration': 120,
'sauna_type': 0,
'session_active': False,
'target_temperature': 80,
}),
'coordinator_info': dict({
'last_exception': None,
'last_update_success': True,
'update_interval': '0:01:00',
}),
})
# ---
22 changes: 22 additions & 0 deletions tests/components/saunum/test_diagnostics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""Test Saunum Leil Sauna diagnostics."""

from syrupy.assertion import SnapshotAssertion

from homeassistant.core import HomeAssistant

from tests.common import MockConfigEntry
from tests.components.diagnostics import get_diagnostics_for_config_entry
from tests.typing import ClientSessionGenerator


async def test_entry_diagnostics(
hass: HomeAssistant,
hass_client: ClientSessionGenerator,
init_integration: MockConfigEntry,
snapshot: SnapshotAssertion,
) -> None:
"""Test config entry diagnostics."""
assert (
await get_diagnostics_for_config_entry(hass, hass_client, init_integration)
== snapshot
)
4 changes: 2 additions & 2 deletions tests/components/senz/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from collections.abc import Generator
import time
from typing import Any
from unittest.mock import MagicMock, patch
from unittest.mock import MagicMock, Mock, patch

from aiosenz import Account, Thermostat
import pytest
Expand Down Expand Up @@ -92,7 +92,7 @@ def mock_senz_client(account_fixture, device_fixture) -> Generator[MagicMock]:

client.get_account.return_value = Account(account_fixture)
client.get_thermostats.return_value = [
Thermostat(device, None) for device in device_fixture
Thermostat(device, Mock()) for device in device_fixture
]

yield client
Expand Down
Loading
Loading