Skip to content

Commit 6d0b87f

Browse files
authored
Merge branch 'dev' into add_gateway_device
2 parents 977a2d7 + 7d65b4c commit 6d0b87f

File tree

188 files changed

+10328
-855
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+10328
-855
lines changed

.github/workflows/builder.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ jobs:
8888
fail-fast: false
8989
matrix:
9090
arch: ${{ fromJson(needs.init.outputs.architectures) }}
91+
exclude:
92+
- arch: armv7
93+
- arch: armhf
94+
- arch: i386
9195
steps:
9296
- name: Checkout the repository
9397
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

build.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
image: ghcr.io/home-assistant/{arch}-homeassistant
22
build_from:
33
aarch64: ghcr.io/home-assistant/aarch64-homeassistant-base:2025.10.1
4+
armhf: ghcr.io/home-assistant/armhf-homeassistant-base:2025.10.1
5+
armv7: ghcr.io/home-assistant/armv7-homeassistant-base:2025.10.1
46
amd64: ghcr.io/home-assistant/amd64-homeassistant-base:2025.10.1
7+
i386: ghcr.io/home-assistant/i386-homeassistant-base:2025.10.1
58
cosign:
69
base_identity: https://github.com/home-assistant/docker/.*
710
identity: https://github.com/home-assistant/core/.*

homeassistant/components/ai_task/services.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ generate_data:
3030
media:
3131
accept:
3232
- "*"
33+
multiple: true
3334
generate_image:
3435
fields:
3536
task_name:
@@ -57,3 +58,4 @@ generate_image:
5758
media:
5859
accept:
5960
- "*"
61+
multiple: true

homeassistant/components/alexa/handlers.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@
5858
from homeassistant.helpers import network
5959
from homeassistant.util import color as color_util, dt as dt_util
6060
from homeassistant.util.decorator import Registry
61-
from homeassistant.util.unit_conversion import TemperatureConverter
61+
from homeassistant.util.unit_conversion import (
62+
TemperatureConverter,
63+
TemperatureDeltaConverter,
64+
)
6265

6366
from .config import AbstractConfig
6467
from .const import (
@@ -844,7 +847,7 @@ def temperature_from_object(
844847
temp -= 273.15
845848

846849
if interval:
847-
return TemperatureConverter.convert_interval(temp, from_unit, to_unit)
850+
return TemperatureDeltaConverter.convert(temp, from_unit, to_unit)
848851
return TemperatureConverter.convert(temp, from_unit, to_unit)
849852

850853

homeassistant/components/ambient_network/sensor.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
translation_key="daily_rain",
107107
native_unit_of_measurement=UnitOfPrecipitationDepth.INCHES,
108108
device_class=SensorDeviceClass.PRECIPITATION,
109-
state_class=SensorStateClass.TOTAL,
109+
state_class=SensorStateClass.TOTAL_INCREASING,
110110
suggested_display_precision=2,
111111
),
112112
SensorEntityDescription(
@@ -150,7 +150,7 @@
150150
key=TYPE_LIGHTNING_PER_DAY,
151151
translation_key="lightning_strikes_per_day",
152152
native_unit_of_measurement="strikes",
153-
state_class=SensorStateClass.TOTAL,
153+
state_class=SensorStateClass.TOTAL_INCREASING,
154154
entity_registry_enabled_default=False,
155155
),
156156
SensorEntityDescription(
@@ -182,7 +182,7 @@
182182
translation_key="monthly_rain",
183183
native_unit_of_measurement=UnitOfPrecipitationDepth.INCHES,
184184
device_class=SensorDeviceClass.PRECIPITATION,
185-
state_class=SensorStateClass.TOTAL,
185+
state_class=SensorStateClass.TOTAL_INCREASING,
186186
suggested_display_precision=2,
187187
entity_registry_enabled_default=False,
188188
),
@@ -229,7 +229,7 @@
229229
translation_key="weekly_rain",
230230
native_unit_of_measurement=UnitOfPrecipitationDepth.INCHES,
231231
device_class=SensorDeviceClass.PRECIPITATION,
232-
state_class=SensorStateClass.TOTAL,
232+
state_class=SensorStateClass.TOTAL_INCREASING,
233233
suggested_display_precision=2,
234234
entity_registry_enabled_default=False,
235235
),
@@ -262,7 +262,7 @@
262262
translation_key="yearly_rain",
263263
native_unit_of_measurement=UnitOfPrecipitationDepth.INCHES,
264264
device_class=SensorDeviceClass.PRECIPITATION,
265-
state_class=SensorStateClass.TOTAL,
265+
state_class=SensorStateClass.TOTAL_INCREASING,
266266
suggested_display_precision=2,
267267
entity_registry_enabled_default=False,
268268
),

homeassistant/components/androidtv/config_flow.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939
CONF_TURN_OFF_COMMAND,
4040
CONF_TURN_ON_COMMAND,
4141
DEFAULT_ADB_SERVER_PORT,
42-
DEFAULT_DEVICE_CLASS,
4342
DEFAULT_EXCLUDE_UNNAMED_APPS,
4443
DEFAULT_GET_SOURCES,
4544
DEFAULT_PORT,
4645
DEFAULT_SCREENCAP_INTERVAL,
46+
DEVICE_AUTO,
4747
DEVICE_CLASSES,
4848
DOMAIN,
4949
PROP_ETHMAC,
@@ -89,8 +89,14 @@ def _show_setup_form(
8989
data_schema = vol.Schema(
9090
{
9191
vol.Required(CONF_HOST, default=host): str,
92-
vol.Required(CONF_DEVICE_CLASS, default=DEFAULT_DEVICE_CLASS): vol.In(
93-
DEVICE_CLASSES
92+
vol.Required(CONF_DEVICE_CLASS, default=DEVICE_AUTO): SelectSelector(
93+
SelectSelectorConfig(
94+
options=[
95+
SelectOptionDict(value=k, label=v)
96+
for k, v in DEVICE_CLASSES.items()
97+
],
98+
translation_key="device_class",
99+
)
94100
),
95101
vol.Required(CONF_PORT, default=DEFAULT_PORT): cv.port,
96102
},

homeassistant/components/androidtv/const.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,19 @@
1515
CONF_TURN_ON_COMMAND = "turn_on_command"
1616

1717
DEFAULT_ADB_SERVER_PORT = 5037
18-
DEFAULT_DEVICE_CLASS = "auto"
1918
DEFAULT_EXCLUDE_UNNAMED_APPS = False
2019
DEFAULT_GET_SOURCES = True
2120
DEFAULT_PORT = 5555
2221
DEFAULT_SCREENCAP_INTERVAL = 5
2322

23+
DEVICE_AUTO = "auto"
2424
DEVICE_ANDROIDTV = "androidtv"
2525
DEVICE_FIRETV = "firetv"
26-
DEVICE_CLASSES = [DEFAULT_DEVICE_CLASS, DEVICE_ANDROIDTV, DEVICE_FIRETV]
26+
DEVICE_CLASSES = {
27+
DEVICE_AUTO: "auto",
28+
DEVICE_ANDROIDTV: "Android TV",
29+
DEVICE_FIRETV: "Fire TV",
30+
}
2731

2832
PROP_ETHMAC = "ethmac"
2933
PROP_SERIALNO = "serialno"

homeassistant/components/androidtv/strings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@
6565
}
6666
}
6767
},
68+
"selector": {
69+
"device_class": {
70+
"options": {
71+
"auto": "Auto-detect device type"
72+
}
73+
}
74+
},
6875
"services": {
6976
"adb_command": {
7077
"description": "Sends an ADB command to an Android / Fire TV device.",

homeassistant/components/brother/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from homeassistant.components.snmp import async_get_snmp_engine
1010
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_TYPE, Platform
1111
from homeassistant.core import HomeAssistant
12-
from homeassistant.exceptions import ConfigEntryNotReady
12+
from homeassistant.exceptions import ConfigEntryError, ConfigEntryNotReady
1313

1414
from .const import (
1515
CONF_COMMUNITY,
@@ -50,6 +50,15 @@ async def async_setup_entry(hass: HomeAssistant, entry: BrotherConfigEntry) -> b
5050
coordinator = BrotherDataUpdateCoordinator(hass, entry, brother)
5151
await coordinator.async_config_entry_first_refresh()
5252

53+
if brother.serial.lower() != entry.unique_id:
54+
raise ConfigEntryError(
55+
translation_domain=DOMAIN,
56+
translation_key="serial_mismatch",
57+
translation_placeholders={
58+
"device": entry.title,
59+
},
60+
)
61+
5362
entry.runtime_data = coordinator
5463

5564
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""Define the Brother entity."""
2+
3+
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC, DeviceInfo
4+
from homeassistant.helpers.update_coordinator import CoordinatorEntity
5+
6+
from .const import DOMAIN
7+
from .coordinator import BrotherDataUpdateCoordinator
8+
9+
10+
class BrotherPrinterEntity(CoordinatorEntity[BrotherDataUpdateCoordinator]):
11+
"""Define a Brother Printer entity."""
12+
13+
_attr_has_entity_name = True
14+
15+
def __init__(
16+
self,
17+
coordinator: BrotherDataUpdateCoordinator,
18+
) -> None:
19+
"""Initialize."""
20+
super().__init__(coordinator)
21+
self._attr_device_info = DeviceInfo(
22+
configuration_url=f"http://{coordinator.brother.host}/",
23+
identifiers={(DOMAIN, coordinator.brother.serial)},
24+
connections={(CONNECTION_NETWORK_MAC, coordinator.brother.mac)},
25+
serial_number=coordinator.brother.serial,
26+
manufacturer="Brother",
27+
model=coordinator.brother.model,
28+
name=coordinator.brother.model,
29+
sw_version=coordinator.brother.firmware,
30+
)

0 commit comments

Comments
 (0)