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
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: Report an issue with Home Assistant Core
description: Report an issue with Home Assistant Core.
type: Bug
body:
- type: markdown
attributes:
value: |
This issue form is for reporting bugs only!

If you have a feature or enhancement request, please use the [feature request][fr] section of our [Community Forum][fr].
If you have a feature or enhancement request, please [request them here instead][fr].

[fr]: https://community.home-assistant.io/c/feature-requests
[fr]: https://github.com/orgs/home-assistant/discussions
- type: textarea
validations:
required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ contact_links:
url: https://www.home-assistant.io/help
about: We use GitHub for tracking bugs, check our website for resources on getting help.
- name: Feature Request
url: https://community.home-assistant.io/c/feature-requests
about: Please use our Community Forum for making feature requests.
url: https://github.com/orgs/home-assistant/discussions
about: Please use this link to request new features or enhancements to existing features.
- name: I'm unsure where to go
url: https://www.home-assistant.io/join-chat
about: If you are unsure where to go, then joining our chat is recommended; Just ask!
2 changes: 1 addition & 1 deletion homeassistant/components/homee/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: HomeeConfigEntry) -> boo
entry.runtime_data = homee
entry.async_on_unload(homee.disconnect)

def _connection_update_callback(connected: bool) -> None:
async def _connection_update_callback(connected: bool) -> None:
"""Call when the device is notified of changes."""
if connected:
_LOGGER.warning("Reconnected to Homee at %s", entry.data[CONF_HOST])
Expand Down
5 changes: 3 additions & 2 deletions homeassistant/components/homee/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(self, attribute: HomeeAttribute, entry: HomeeConfigEntry) -> None:
self._entry = entry
node = entry.runtime_data.get_node_by_id(attribute.node_id)
# Homee hub itself has node-id -1
assert node is not None
if node.id == -1:
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, entry.runtime_data.settings.uid)},
Expand Down Expand Up @@ -79,7 +80,7 @@ async def async_update(self) -> None:
def _on_node_updated(self, attribute: HomeeAttribute) -> None:
self.schedule_update_ha_state()

def _on_connection_changed(self, connected: bool) -> None:
async def _on_connection_changed(self, connected: bool) -> None:
self._host_connected = connected
self.schedule_update_ha_state()

Expand Down Expand Up @@ -166,6 +167,6 @@ async def async_set_homee_value(
def _on_node_updated(self, node: HomeeNode) -> None:
self.schedule_update_ha_state()

def _on_connection_changed(self, connected: bool) -> None:
async def _on_connection_changed(self, connected: bool) -> None:
self._host_connected = connected
self.schedule_update_ha_state()
8 changes: 6 additions & 2 deletions homeassistant/components/homee/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,13 @@ def changed_by(self) -> str:
AttributeChangedBy, self._attribute.changed_by
)
if self._attribute.changed_by == AttributeChangedBy.USER:
changed_id = self._entry.runtime_data.get_user_by_id(
user = self._entry.runtime_data.get_user_by_id(
self._attribute.changed_by_id
).username
)
if user is not None:
changed_id = user.username
else:
changed_id = "Unknown"

return f"{changed_by_name}-{changed_id}"

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/homee/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"iot_class": "local_push",
"loggers": ["homee"],
"quality_scale": "bronze",
"requirements": ["pyHomee==1.2.8"]
"requirements": ["pyHomee==1.2.9"]
}
1 change: 1 addition & 0 deletions homeassistant/components/homee/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def get_device_class(
) -> SwitchDeviceClass:
"""Check device class of Switch according to node profile."""
node = config_entry.runtime_data.get_node_by_id(attribute.node_id)
assert node is not None
if node.profile in [
NodeProfile.ON_OFF_PLUG,
NodeProfile.METERING_PLUG,
Expand Down
8 changes: 5 additions & 3 deletions homeassistant/components/http/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,12 +511,14 @@ def register_static_path(
) -> None:
"""Register a folder or file to serve as a static path."""
frame.report_usage(
"calls hass.http.register_static_path which is deprecated because "
"it does blocking I/O in the event loop, instead "
"calls hass.http.register_static_path which "
"does blocking I/O in the event loop, instead "
"call `await hass.http.async_register_static_paths("
f'[StaticPathConfig("{url_path}", "{path}", {cache_headers})])`',
exclude_integrations={"http"},
core_behavior=frame.ReportBehavior.LOG,
core_behavior=frame.ReportBehavior.ERROR,
core_integration_behavior=frame.ReportBehavior.ERROR,
custom_integration_behavior=frame.ReportBehavior.ERROR,
breaks_in_ha_version="2025.7",
)
configs = [StaticPathConfig(url_path, path, cache_headers)]
Expand Down
3 changes: 2 additions & 1 deletion homeassistant/components/lg_thinq/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from enum import StrEnum
import logging
from typing import Any

from thinqconnect import DeviceType
from thinqconnect.integration import ExtendedProperty
Expand Down Expand Up @@ -154,7 +155,7 @@ async def async_pause(self, **kwargs) -> None:
)
)

async def async_return_to_base(self, **kwargs) -> None:
async def async_return_to_base(self, **kwargs: Any) -> None:
"""Return device to dock."""
_LOGGER.debug(
"[%s:%s] async_return_to_base",
Expand Down
6 changes: 3 additions & 3 deletions homeassistant/components/zha/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@
"group_members_assume_state": "Group members assume state of group",
"enable_identify_on_join": "Enable identify effect when devices join the network",
"default_light_transition": "Default light transition time (seconds)",
"consider_unavailable_mains": "Consider mains powered devices unavailable after (seconds)",
"enable_mains_startup_polling": "Refresh state for mains powered devices on startup",
"consider_unavailable_battery": "Consider battery powered devices unavailable after (seconds)"
"consider_unavailable_mains": "Consider mains-powered devices unavailable after (seconds)",
"enable_mains_startup_polling": "Refresh state for mains-powered devices on startup",
"consider_unavailable_battery": "Consider battery-powered devices unavailable after (seconds)"
},
"zha_alarm_options": {
"title": "Alarm control panel options",
Expand Down
6 changes: 6 additions & 0 deletions homeassistant/helpers/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,12 @@ def __init__(
self._domain = domain
self._action = action
self.name = f"{domain}.{action}"
# Note: _get_cached_action_parameters only works for services which
# add their description directly to the service description cache.
# This is not the case for most services, but it is for scripts.
# If we want to use `ActionTool` for services other than scripts, we
# need to add a coroutine function to fetch the non-cached description
# and schema.
self.description, self.parameters = _get_cached_action_parameters(
hass, domain, action
)
Expand Down
18 changes: 11 additions & 7 deletions homeassistant/util/yaml/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os
from typing import TextIO

from annotatedyaml import YAMLException, YamlTypeError
import annotatedyaml
from annotatedyaml.loader import (
HAS_C_LOADER,
JSON_TYPE,
Expand Down Expand Up @@ -35,6 +35,10 @@
]


class YamlTypeError(HomeAssistantError):
"""Raised by load_yaml_dict if top level data is not a dict."""


def load_yaml(
fname: str | os.PathLike[str], secrets: Secrets | None = None
) -> JSON_TYPE | None:
Expand All @@ -45,7 +49,7 @@ def load_yaml(
"""
try:
return load_annotated_yaml(fname, secrets)
except YAMLException as exc:
except annotatedyaml.YAMLException as exc:
raise HomeAssistantError(str(exc)) from exc


Expand All @@ -59,9 +63,9 @@ def load_yaml_dict(
"""
try:
return load_annotated_yaml_dict(fname, secrets)
except YamlTypeError:
raise
except YAMLException as exc:
except annotatedyaml.YamlTypeError as exc:
raise YamlTypeError(str(exc)) from exc
except annotatedyaml.YAMLException as exc:
raise HomeAssistantError(str(exc)) from exc


Expand All @@ -71,13 +75,13 @@ def parse_yaml(
"""Parse YAML with the fastest available loader."""
try:
return parse_annotated_yaml(content, secrets)
except YAMLException as exc:
except annotatedyaml.YAMLException as exc:
raise HomeAssistantError(str(exc)) from exc


def secret_yaml(loader: LoaderType, node: yaml.nodes.Node) -> JSON_TYPE:
"""Load secrets and embed it into the configuration YAML."""
try:
return annotated_secret_yaml(loader, node)
except YAMLException as exc:
except annotatedyaml.YAMLException as exc:
raise HomeAssistantError(str(exc)) from exc
2 changes: 1 addition & 1 deletion pylint/plugins/hass_enforce_class_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"todo": {"TodoListEntity"},
"tts": {"TextToSpeechEntity"},
"update": {"UpdateEntity", "UpdateEntityDescription"},
"vacuum": {"StateVacuumEntity", "VacuumEntity", "VacuumEntityDescription"},
"vacuum": {"StateVacuumEntity", "VacuumEntityDescription"},
"wake_word": {"WakeWordDetectionEntity"},
"water_heater": {"WaterHeaterEntity"},
"weather": {
Expand Down
77 changes: 15 additions & 62 deletions pylint/plugins/hass_enforce_type_hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -2789,12 +2789,12 @@ class ClassTypeHintMatch:
matches=_RESTORE_ENTITY_MATCH,
),
ClassTypeHintMatch(
base_class="ToggleEntity",
matches=_TOGGLE_ENTITY_MATCH,
),
ClassTypeHintMatch(
base_class="_BaseVacuum",
base_class="StateVacuumEntity",
matches=[
TypeHintMatch(
function_name="state",
return_type=["str", None],
),
TypeHintMatch(
function_name="battery_level",
return_type=["int", None],
Expand All @@ -2821,6 +2821,16 @@ class ClassTypeHintMatch:
return_type=None,
has_async_counterpart=True,
),
TypeHintMatch(
function_name="start",
return_type=None,
has_async_counterpart=True,
),
TypeHintMatch(
function_name="pause",
return_type=None,
has_async_counterpart=True,
),
TypeHintMatch(
function_name="return_to_base",
kwargs_type="Any",
Expand Down Expand Up @@ -2860,63 +2870,6 @@ class ClassTypeHintMatch:
),
],
),
ClassTypeHintMatch(
base_class="VacuumEntity",
matches=[
TypeHintMatch(
function_name="status",
return_type=["str", None],
),
TypeHintMatch(
function_name="start_pause",
kwargs_type="Any",
return_type=None,
has_async_counterpart=True,
),
TypeHintMatch(
function_name="async_pause",
return_type=None,
),
TypeHintMatch(
function_name="async_start",
return_type=None,
),
],
),
ClassTypeHintMatch(
base_class="StateVacuumEntity",
matches=[
TypeHintMatch(
function_name="state",
return_type=["str", None],
),
TypeHintMatch(
function_name="start",
return_type=None,
has_async_counterpart=True,
),
TypeHintMatch(
function_name="pause",
return_type=None,
has_async_counterpart=True,
),
TypeHintMatch(
function_name="async_turn_on",
kwargs_type="Any",
return_type=None,
),
TypeHintMatch(
function_name="async_turn_off",
kwargs_type="Any",
return_type=None,
),
TypeHintMatch(
function_name="async_toggle",
kwargs_type="Any",
return_type=None,
),
],
),
],
"water_heater": [
ClassTypeHintMatch(
Expand Down
Loading
Loading