Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
57a8f1e
Use correctly formatted MAC in rehlko tests (#147864)
epenet Jul 1, 2025
30a85c4
Move async_reload on updates in async_setup_entry in Ollama (#147861)
balloob Jul 1, 2025
7fcea17
Move async_reload on updates in async_setup_entry in OpenAI Conversat…
balloob Jul 1, 2025
659cd42
Move async_reload on updates in async_setup_entry in Anthropic (#147862)
balloob Jul 1, 2025
12e2493
Capitalize "version" in Tesla fleet strings (#146501)
parkerbxyz Jul 1, 2025
5a3aa78
Use correctly formatted MAC in airthings tests (#147817)
epenet Jul 1, 2025
61a29db
fix state_class for water used today sensor (#147787)
bob-laz Jul 1, 2025
8fa0160
Bump github/codeql-action from 3.29.1 to 3.29.2 (#147867)
dependabot[bot] Jul 1, 2025
5fea491
Use (new) common state "Empty" in `litterrobot` (#147835)
NoRi2909 Jul 1, 2025
c92873b
Change default slave id from 0 to 1 in modbus actions (#142865)
crug80 Jul 1, 2025
871296d
Use correctly formatted MAC in lamarzocco tests (#147874)
epenet Jul 1, 2025
2cb80e0
Initialize EsphomeEntity._has_state (#147877)
emontnemery Jul 1, 2025
c5873c6
Use correctly formatted MAC in dlink tests (#147871)
epenet Jul 1, 2025
4ebffa8
Use correctly formatted MAC in palazzetti tests (#147875)
epenet Jul 1, 2025
b47f989
Use correctly formatted MAC in wmspro tests (#147876)
epenet Jul 1, 2025
3f9590b
Use correctly formatted MAC in gogogate2 tests (#147872)
epenet Jul 1, 2025
073a467
Use correctly formatted MAC in bond tests (#147870)
epenet Jul 1, 2025
7deca35
Add multiple LLM API support for MCP Server (#147785)
Shulyaka Jul 1, 2025
651162b
Fix error in last online sensor of PlayStation integration (#147844)
tr4nt0r Jul 1, 2025
6364a9a
Update pillow to 11.3.0 (#147869)
cdce8p Jul 1, 2025
52c86f8
Update frontend to 20250701.0 (#147879)
piitaya Jul 1, 2025
11c9aa9
Bump Nettigo Air Monitor backend library to version 5.0.0 (#147812)
bieniu Jul 1, 2025
e38eac9
Include chat ID in Telegram bot subentry title (#147643)
hanwg Jul 1, 2025
e10b581
Fix Meteo france Ciel clair condition mapping (#146965)
piitaya Jul 1, 2025
9227205
fix: Create new aiohttp session with DummyCookieJar (#147827)
micha91 Jul 1, 2025
510e397
Add water_level sensor to Tuya pet fountain cwysj (#146602)
FredrikM97 Jul 1, 2025
59bf39f
Bump VoIP utils to 0.3.3 (#147880)
jaminh Jul 1, 2025
655f009
Fix station name sensor for metoffice (#145500)
avee87 Jul 1, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
uses: actions/[email protected]

- name: Initialize CodeQL
uses: github/codeql-action/[email protected].1
uses: github/codeql-action/[email protected].2
with:
languages: python

- name: Perform CodeQL Analysis
uses: github/codeql-action/[email protected].1
uses: github/codeql-action/[email protected].2
with:
category: "/language:python"
9 changes: 9 additions & 0 deletions homeassistant/components/anthropic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: AnthropicConfigEntry) ->

await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

entry.async_on_unload(entry.add_update_listener(async_update_options))

return True


Expand All @@ -69,6 +71,13 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)


async def async_update_options(
hass: HomeAssistant, entry: AnthropicConfigEntry
) -> None:
"""Update options."""
await hass.config_entries.async_reload(entry.entry_id)


async def async_migrate_integration(hass: HomeAssistant) -> None:
"""Migrate integration entry structure."""

Expand Down
16 changes: 1 addition & 15 deletions homeassistant/components/anthropic/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Literal

from homeassistant.components import conversation
from homeassistant.config_entries import ConfigEntry, ConfigSubentry
from homeassistant.config_entries import ConfigSubentry
from homeassistant.const import CONF_LLM_HASS_API, MATCH_ALL
from homeassistant.core import HomeAssistant
from homeassistant.helpers import intent
Expand Down Expand Up @@ -52,13 +52,6 @@ def supported_languages(self) -> list[str] | Literal["*"]:
"""Return a list of supported languages."""
return MATCH_ALL

async def async_added_to_hass(self) -> None:
"""When entity is added to Home Assistant."""
await super().async_added_to_hass()
self.entry.async_on_unload(
self.entry.add_update_listener(self._async_entry_update_listener)
)

async def _async_handle_message(
self,
user_input: conversation.ConversationInput,
Expand Down Expand Up @@ -89,10 +82,3 @@ async def _async_handle_message(
conversation_id=chat_log.conversation_id,
continue_conversation=chat_log.continue_conversation,
)

async def _async_entry_update_listener(
self, hass: HomeAssistant, entry: ConfigEntry
) -> None:
"""Handle options update."""
# Reload as we update device info + entity name + supported features
await hass.config_entries.async_reload(entry.entry_id)
2 changes: 1 addition & 1 deletion homeassistant/components/doods/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"iot_class": "local_polling",
"loggers": ["pydoods"],
"quality_scale": "legacy",
"requirements": ["pydoods==1.0.2", "Pillow==11.2.1"]
"requirements": ["pydoods==1.0.2", "Pillow==11.3.0"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/drop_connect/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class DROPSensorEntityDescription(SensorEntityDescription):
native_unit_of_measurement=UnitOfVolume.GALLONS,
suggested_display_precision=1,
value_fn=lambda device: device.drop_api.water_used_today(),
state_class=SensorStateClass.TOTAL,
state_class=SensorStateClass.TOTAL_INCREASING,
),
DROPSensorEntityDescription(
key=AVERAGE_WATER_USED,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/esphome/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ class EsphomeEntity(EsphomeBaseEntity, Generic[_InfoT, _StateT]):

_static_info: _InfoT
_state: _StateT
_has_state: bool
_has_state: bool = False
unique_id: str

def __init__(
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==20250627.0"]
"requirements": ["home-assistant-frontend==20250701.0"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/generic/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"documentation": "https://www.home-assistant.io/integrations/generic",
"integration_type": "device",
"iot_class": "local_push",
"requirements": ["av==13.1.0", "Pillow==11.2.1"]
"requirements": ["av==13.1.0", "Pillow==11.3.0"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/image_upload/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"documentation": "https://www.home-assistant.io/integrations/image_upload",
"integration_type": "system",
"quality_scale": "internal",
"requirements": ["Pillow==11.2.1"]
"requirements": ["Pillow==11.3.0"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/litterrobot/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"motor_fault_short": "Motor shorted",
"motor_ot_amps": "Motor overtorqued",
"motor_disconnected": "Motor disconnected",
"empty": "Empty"
"empty": "[%key:common::state::empty%]"
}
},
"last_seen": {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/matrix/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"iot_class": "cloud_push",
"loggers": ["matrix_client"],
"quality_scale": "legacy",
"requirements": ["matrix-nio==0.25.2", "Pillow==11.2.1"]
"requirements": ["matrix-nio==0.25.2", "Pillow==11.3.0"]
}
19 changes: 14 additions & 5 deletions homeassistant/components/mcp_server/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,26 @@ async def async_step_user(
self, user_input: dict[str, Any] | None = None
) -> ConfigFlowResult:
"""Handle the initial step."""
errors: dict[str, str] = {}
llm_apis = {api.id: api.name for api in llm.async_get_apis(self.hass)}
if user_input is not None:
return self.async_create_entry(
title=llm_apis[user_input[CONF_LLM_HASS_API]], data=user_input
)
if not user_input[CONF_LLM_HASS_API]:
errors[CONF_LLM_HASS_API] = "llm_api_required"
else:
return self.async_create_entry(
title=", ".join(
llm_apis[api_id] for api_id in user_input[CONF_LLM_HASS_API]
),
data=user_input,
)

return self.async_show_form(
step_id="user",
data_schema=vol.Schema(
{
vol.Optional(
CONF_LLM_HASS_API,
default=llm.LLM_API_ASSIST,
default=[llm.LLM_API_ASSIST],
): SelectSelector(
SelectSelectorConfig(
options=[
Expand All @@ -53,10 +60,12 @@ async def async_step_user(
value=llm_api_id,
)
for llm_api_id, name in llm_apis.items()
]
],
multiple=True,
)
),
}
),
description_placeholders={"more_info_url": MORE_INFO_URL},
errors=errors,
)
2 changes: 1 addition & 1 deletion homeassistant/components/mcp_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _format_tool(


async def create_server(
hass: HomeAssistant, llm_api_id: str, llm_context: llm.LLMContext
hass: HomeAssistant, llm_api_id: str | list[str], llm_context: llm.LLMContext
) -> Server:
"""Create a new Model Context Protocol Server.

Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/mcp_server/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
}
}
},
"error": {
"llm_api_required": "At least one LLM API must be configured."
},
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
}
Expand Down
12 changes: 9 additions & 3 deletions homeassistant/components/meteo_france/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from meteofrance_api.model.forecast import Forecast as MeteoFranceForecast

from homeassistant.components.weather import (
ATTR_CONDITION_CLEAR_NIGHT,
ATTR_CONDITION_SUNNY,
ATTR_FORECAST_CONDITION,
ATTR_FORECAST_HUMIDITY,
ATTR_FORECAST_NATIVE_PRECIPITATION,
Expand Down Expand Up @@ -49,9 +51,13 @@
_LOGGER = logging.getLogger(__name__)


def format_condition(condition: str):
def format_condition(condition: str, force_day: bool = False) -> str:
"""Return condition from dict CONDITION_MAP."""
return CONDITION_MAP.get(condition, condition)
mapped_condition = CONDITION_MAP.get(condition, condition)
if force_day and mapped_condition == ATTR_CONDITION_CLEAR_NIGHT:
# Meteo-France can return clear night condition instead of sunny for daily weather, so we map it to sunny
return ATTR_CONDITION_SUNNY
return mapped_condition


async def async_setup_entry(
Expand Down Expand Up @@ -212,7 +218,7 @@ def _forecast(self, mode: str) -> list[Forecast]:
forecast["dt"]
).isoformat(),
ATTR_FORECAST_CONDITION: format_condition(
forecast["weather12H"]["desc"]
forecast["weather12H"]["desc"], force_day=True
),
ATTR_FORECAST_HUMIDITY: forecast["humidity"]["max"],
ATTR_FORECAST_NATIVE_TEMP: forecast["T"]["max"],
Expand Down
15 changes: 8 additions & 7 deletions homeassistant/components/metoffice/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from homeassistant.components.sensor import (
DOMAIN as SENSOR_DOMAIN,
EntityCategory,
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
Expand Down Expand Up @@ -59,6 +60,7 @@ class MetOfficeSensorEntityDescription(SensorEntityDescription):
native_attr_name="name",
name="Station name",
icon="mdi:label-outline",
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
MetOfficeSensorEntityDescription(
Expand Down Expand Up @@ -235,14 +237,13 @@ def __init__(
@property
def native_value(self) -> StateType:
"""Return the state of the sensor."""
value = get_attribute(
self.coordinator.data.now(), self.entity_description.native_attr_name
)
native_attr = self.entity_description.native_attr_name

if (
self.entity_description.native_attr_name == "significantWeatherCode"
and value is not None
):
if native_attr == "name":
return str(self.coordinator.data.name)

value = get_attribute(self.coordinator.data.now(), native_attr)
if native_attr == "significantWeatherCode" and value is not None:
value = CONDITION_MAP.get(value)

return value
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/modbus/modbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ async def async_stop_modbus(event: Event) -> None:

async def async_write_register(service: ServiceCall) -> None:
"""Write Modbus registers."""
slave = 0
slave = 1
if ATTR_UNIT in service.data:
slave = int(float(service.data[ATTR_UNIT]))

Expand All @@ -195,7 +195,7 @@ async def async_write_register(service: ServiceCall) -> None:

async def async_write_coil(service: ServiceCall) -> None:
"""Write Modbus coil."""
slave = 0
slave = 1
if ATTR_UNIT in service.data:
slave = int(float(service.data[ATTR_UNIT]))
if ATTR_SLAVE in service.data:
Expand Down
9 changes: 0 additions & 9 deletions homeassistant/components/nam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: NAMConfigEntry) -> bool:
translation_key="device_communication_error",
translation_placeholders={"device": entry.title},
) from err

try:
await nam.async_check_credentials()
except (ApiError, ClientError) as err:
raise ConfigEntryNotReady(
translation_domain=DOMAIN,
translation_key="device_communication_error",
translation_placeholders={"device": entry.title},
) from err
except AuthFailedError as err:
raise ConfigEntryAuthFailed(
translation_domain=DOMAIN,
Expand Down
Loading
Loading