repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/table_managers/__init__.py
homeassistant/components/recorder/table_managers/__init__.py
"""Managers for each table.""" from __future__ import annotations from typing import TYPE_CHECKING, Any from lru import LRU from homeassistant.util.event_type import EventType if TYPE_CHECKING: from ..core import Recorder class BaseTableManager[_DataT]: """Base class for table managers.""" _id_map: ...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/table_managers/statistics_meta.py
homeassistant/components/recorder/table_managers/statistics_meta.py
"""Support managing StatesMeta.""" from __future__ import annotations import logging import threading from typing import TYPE_CHECKING, Any, Final, Literal from lru import LRU from sqlalchemy import lambda_stmt, select from sqlalchemy.orm import InstrumentedAttribute from sqlalchemy.orm.session import Session from s...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/models/event.py
homeassistant/components/recorder/models/event.py
"""Models events in for Recorder.""" from __future__ import annotations from typing import Any from homeassistant.util.event_type import EventType def extract_event_type_ids( event_type_to_event_type_id: dict[EventType[Any] | str, int | None], ) -> list[int]: """Extract event_type ids from event_type_to_ev...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/models/state_attributes.py
homeassistant/components/recorder/models/state_attributes.py
"""State attributes models.""" from __future__ import annotations import logging from typing import Any from homeassistant.util.json import json_loads_object EMPTY_JSON_OBJECT = "{}" _LOGGER = logging.getLogger(__name__) def decode_attributes_from_source( source: Any, attr_cache: dict[str, dict[str, Any]] ) -...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/models/state.py
homeassistant/components/recorder/models/state.py
"""Models states in for Recorder.""" from __future__ import annotations from datetime import datetime import logging from typing import TYPE_CHECKING, Any from propcache.api import cached_property from sqlalchemy.engine.row import Row from homeassistant.const import ( COMPRESSED_STATE_ATTRIBUTES, COMPRESSED...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/models/statistics.py
homeassistant/components/recorder/models/statistics.py
"""Models for statistics in the Recorder.""" from __future__ import annotations from datetime import datetime, timedelta from enum import IntEnum from typing import Literal, NotRequired, TypedDict class StatisticResult(TypedDict): """Statistic result data class. Allows multiple datapoints for the same stat...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/models/time.py
homeassistant/components/recorder/models/time.py
"""Models for Recorder.""" from __future__ import annotations from datetime import datetime import logging from typing import overload from homeassistant.util import dt as dt_util _LOGGER = logging.getLogger(__name__) DB_TIMEZONE = "+00:00" EMPTY_JSON_OBJECT = "{}" @overload def process_timestamp(ts: None) -> N...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/models/database.py
homeassistant/components/recorder/models/database.py
"""Models for the database in the Recorder.""" from __future__ import annotations from dataclasses import dataclass from awesomeversion import AwesomeVersion from ..const import SupportedDialect class UnsupportedDialect(Exception): """The dialect or its version is not supported.""" @dataclass class Database...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/models/__init__.py
homeassistant/components/recorder/models/__init__.py
"""Models for Recorder.""" from __future__ import annotations from .context import ( bytes_to_ulid_or_none, bytes_to_uuid_hex_or_none, ulid_to_bytes_or_none, uuid_hex_to_bytes_or_none, ) from .database import DatabaseEngine, DatabaseOptimizer, UnsupportedDialect from .event import extract_event_type_i...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/models/context.py
homeassistant/components/recorder/models/context.py
"""Models for Recorder.""" from __future__ import annotations from contextlib import suppress from functools import lru_cache import logging from uuid import UUID from homeassistant.util.ulid import ( # noqa: F401 bytes_to_ulid, bytes_to_ulid_or_none, ulid_to_bytes, ulid_to_bytes_or_none, ) _LOGGER...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/system_health/sqlite.py
homeassistant/components/recorder/system_health/sqlite.py
"""Provide info to system health for sqlite.""" from __future__ import annotations from sqlalchemy import text from sqlalchemy.orm.session import Session def db_size_bytes(session: Session, database_name: str) -> float | None: """Get the mysql database size.""" size = session.execute( text( ...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/system_health/postgresql.py
homeassistant/components/recorder/system_health/postgresql.py
"""Provide info to system health for postgresql.""" from __future__ import annotations from sqlalchemy import text from sqlalchemy.orm.session import Session def db_size_bytes(session: Session, database_name: str) -> float | None: """Get the mysql database size.""" size = session.execute( text("sele...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/system_health/mysql.py
homeassistant/components/recorder/system_health/mysql.py
"""Provide info to system health for mysql.""" from __future__ import annotations from sqlalchemy import text from sqlalchemy.orm.session import Session def db_size_bytes(session: Session, database_name: str) -> float | None: """Get the mysql database size.""" size = session.execute( text( ...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/system_health/__init__.py
homeassistant/components/recorder/system_health/__init__.py
"""Provide info to system health.""" from __future__ import annotations from typing import Any from urllib.parse import urlparse from homeassistant.components import system_health from homeassistant.core import HomeAssistant, callback from .. import get_instance from ..const import SupportedDialect from ..core impo...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/history/const.py
homeassistant/components/recorder/history/const.py
"""Constants for history.""" STATE_KEY = "state" LAST_CHANGED_KEY = "last_changed" SIGNIFICANT_DOMAINS = { "climate", "device_tracker", "humidifier", "thermostat", "water_heater", } SIGNIFICANT_DOMAINS_ENTITY_ID_LIKE = [f"{domain}.%" for domain in SIGNIFICANT_DOMAINS] IGNORE_DOMAINS = {"zone", "sc...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/recorder/history/__init__.py
homeassistant/components/recorder/history/__init__.py
"""Provide pre-made queries on top of the recorder component.""" from __future__ import annotations from collections.abc import Callable, Iterable, Iterator from datetime import datetime from itertools import groupby from operator import itemgetter from typing import TYPE_CHECKING, Any, cast from sqlalchemy import (...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/transport_nsw/sensor.py
homeassistant/components/transport_nsw/sensor.py
"""Support for Transport NSW (AU) to query next leave event.""" from __future__ import annotations from datetime import timedelta from typing import Any from TransportNSW import TransportNSW import voluptuous as vol from homeassistant.components.sensor import ( PLATFORM_SCHEMA as SENSOR_PLATFORM_SCHEMA, Sen...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/transport_nsw/__init__.py
homeassistant/components/transport_nsw/__init__.py
"""The transport_nsw component."""
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/balay/__init__.py
homeassistant/components/balay/__init__.py
"""Balay virtual integration."""
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/trafikverket_ferry/util.py
homeassistant/components/trafikverket_ferry/util.py
"""Utils for trafikverket_ferry.""" from __future__ import annotations from datetime import time def create_unique_id( ferry_from: str, ferry_to: str, ferry_time: time | str | None, weekdays: list[str] ) -> str: """Create unique id.""" return ( f"{ferry_from.casefold().replace(' ', '')}-{ferry_t...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/trafikverket_ferry/const.py
homeassistant/components/trafikverket_ferry/const.py
"""Adds constants for Trafikverket Ferry integration.""" from homeassistant.const import Platform DOMAIN = "trafikverket_ferry" PLATFORMS = [Platform.SENSOR] ATTRIBUTION = "Data provided by Trafikverket" CONF_TRAINS = "trains" CONF_FROM = "from" CONF_TO = "to" CONF_TIME = "time"
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/trafikverket_ferry/coordinator.py
homeassistant/components/trafikverket_ferry/coordinator.py
"""DataUpdateCoordinator for the Trafikverket Ferry integration.""" from __future__ import annotations from datetime import date, datetime, time, timedelta import logging from typing import TYPE_CHECKING, Any from pytrafikverket import TrafikverketFerry from pytrafikverket.exceptions import InvalidAuthentication, No...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/trafikverket_ferry/sensor.py
homeassistant/components/trafikverket_ferry/sensor.py
"""Ferry information for departures, provided by Trafikverket.""" from __future__ import annotations from collections.abc import Callable from dataclasses import dataclass from datetime import datetime, timedelta from typing import Any, cast from homeassistant.components.sensor import ( SensorDeviceClass, Se...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/trafikverket_ferry/__init__.py
homeassistant/components/trafikverket_ferry/__init__.py
"""The trafikverket_ferry component.""" from __future__ import annotations from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from .const import PLATFORMS from .coordinator import TVDataUpdateCoordinator TVFerryConfigEntry = ConfigEntry[TVDataUpdateCoordinator] async...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/trafikverket_ferry/config_flow.py
homeassistant/components/trafikverket_ferry/config_flow.py
"""Adds config flow for Trafikverket Ferry integration.""" from __future__ import annotations from collections.abc import Mapping import logging from typing import Any from pytrafikverket import TrafikverketFerry from pytrafikverket.exceptions import InvalidAuthentication, NoFerryFound import voluptuous as vol from...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/eight_sleep/__init__.py
homeassistant/components/eight_sleep/__init__.py
"""The Eight Sleep integration.""" from __future__ import annotations from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers import issue_registry as ir DOMAIN = "eight_sleep" async def async_setup_entry(hass: HomeAssistant, _: ConfigEntry) -> b...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/eight_sleep/config_flow.py
homeassistant/components/eight_sleep/config_flow.py
"""The Eight Sleep integration config flow.""" from homeassistant.config_entries import ConfigFlow from . import DOMAIN class EightSleepConfigFlow(ConfigFlow, domain=DOMAIN): """Handle a config flow for Eight Sleep.""" VERSION = 1
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/hardware/models.py
homeassistant/components/hardware/models.py
"""Models for Hardware.""" from __future__ import annotations from dataclasses import dataclass from typing import Protocol import psutil_home_assistant as ha_psutil from homeassistant.components import websocket_api from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback @dataclass class HardwareDa...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/hardware/websocket_api.py
homeassistant/components/hardware/websocket_api.py
"""The Hardware websocket API.""" from __future__ import annotations import contextlib from dataclasses import asdict from datetime import datetime, timedelta from typing import Any import voluptuous as vol from homeassistant.components import websocket_api from homeassistant.core import HomeAssistant, callback fro...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/hardware/const.py
homeassistant/components/hardware/const.py
"""Constants for the Hardware integration.""" from __future__ import annotations from typing import TYPE_CHECKING from homeassistant.util.hass_dict import HassKey if TYPE_CHECKING: from .models import HardwareData DOMAIN = "hardware" DATA_HARDWARE: HassKey[HardwareData] = HassKey(DOMAIN)
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/hardware/hardware.py
homeassistant/components/hardware/hardware.py
"""The Hardware integration.""" from __future__ import annotations from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers.integration_platform import ( async_process_integration_platforms, ) from .const import DATA_HARDWARE, DOMAI...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/hardware/__init__.py
homeassistant/components/hardware/__init__.py
"""The Hardware integration.""" from __future__ import annotations import psutil_home_assistant as ha_psutil from homeassistant.core import HomeAssistant from homeassistant.helpers import config_validation as cv from homeassistant.helpers.typing import ConfigType from . import websocket_api from .const import DATA_...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/schemas.py
homeassistant/components/mqtt/schemas.py
"""Shared schemas for MQTT discovery and YAML config items.""" from __future__ import annotations from typing import Any import voluptuous as vol from homeassistant.const import ( CONF_DEVICE, CONF_ENTITY_CATEGORY, CONF_ICON, CONF_MODEL, CONF_MODEL_ID, CONF_NAME, CONF_PLATFORM, CONF_...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/client.py
homeassistant/components/mqtt/client.py
"""Support for MQTT message handling.""" from __future__ import annotations import asyncio from collections import defaultdict from collections.abc import AsyncGenerator, Callable, Coroutine, Iterable import contextlib from dataclasses import dataclass from functools import lru_cache, partial from itertools import ch...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
true
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/image.py
homeassistant/components/mqtt/image.py
"""Support for MQTT images.""" from __future__ import annotations from base64 import b64decode import binascii from collections.abc import Callable import logging from typing import TYPE_CHECKING, Any import httpx import voluptuous as vol from homeassistant.components import image from homeassistant.components.imag...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/event.py
homeassistant/components/mqtt/event.py
"""Support for MQTT events.""" from __future__ import annotations from collections.abc import Callable import logging from typing import Any import voluptuous as vol from homeassistant.components import event from homeassistant.components.event import ( ENTITY_ID_FORMAT, EventDeviceClass, EventEntity, )...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/device_trigger.py
homeassistant/components/mqtt/device_trigger.py
"""Provides device automations for MQTT.""" from __future__ import annotations from collections.abc import Callable from dataclasses import dataclass, field import logging from typing import TYPE_CHECKING, Any import voluptuous as vol from homeassistant.components.device_automation import DEVICE_TRIGGER_BASE_SCHEMA...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/diagnostics.py
homeassistant/components/mqtt/diagnostics.py
"""Diagnostics support for MQTT.""" from __future__ import annotations from typing import Any from homeassistant.components import device_tracker from homeassistant.components.diagnostics import async_redact_data from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( ATTR_LATITUDE...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/subscription.py
homeassistant/components/mqtt/subscription.py
"""Helper to handle a set of topics to subscribe to.""" from __future__ import annotations from collections.abc import Callable from dataclasses import dataclass from functools import partial from typing import TYPE_CHECKING, Any from homeassistant.core import HassJobType, HomeAssistant, callback from . import debu...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/repairs.py
homeassistant/components/mqtt/repairs.py
"""Repairs for MQTT.""" from __future__ import annotations from typing import TYPE_CHECKING import voluptuous as vol from homeassistant import data_entry_flow from homeassistant.components.repairs import RepairsFlow from homeassistant.core import HomeAssistant from homeassistant.helpers import device_registry as dr...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/device_tracker.py
homeassistant/components/mqtt/device_tracker.py
"""Support for tracking MQTT enabled devices identified.""" from __future__ import annotations from collections.abc import Callable import logging from typing import TYPE_CHECKING, Any import voluptuous as vol from homeassistant.components import device_tracker from homeassistant.components.device_tracker import So...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/discovery.py
homeassistant/components/mqtt/discovery.py
"""Support for MQTT discovery.""" from __future__ import annotations import asyncio from collections import deque from dataclasses import dataclass import functools from itertools import chain import logging import re import time from typing import TYPE_CHECKING, Any import voluptuous as vol from homeassistant.conf...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/abbreviations.py
homeassistant/components/mqtt/abbreviations.py
"""Abbreviations supported by MQTT discovery.""" ABBREVIATIONS = { "act_t": "action_topic", "act_tpl": "action_template", "act_stat_t": "activity_state_topic", "act_val_tpl": "activity_value_template", "atype": "automation_type", "av_tones": "available_tones", "avty": "availability", "a...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/util.py
homeassistant/components/mqtt/util.py
"""Utility functions for the MQTT integration.""" from __future__ import annotations import asyncio from collections.abc import Callable, Coroutine from functools import lru_cache import logging import os from pathlib import Path import tempfile from typing import Any import voluptuous as vol from homeassistant.con...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/vacuum.py
homeassistant/components/mqtt/vacuum.py
"""Support for MQTT vacuums.""" from __future__ import annotations import logging from typing import Any, cast import voluptuous as vol from homeassistant.components import vacuum from homeassistant.components.vacuum import ( ENTITY_ID_FORMAT, StateVacuumEntity, VacuumActivity, VacuumEntityFeature, ...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/cover.py
homeassistant/components/mqtt/cover.py
"""Support for MQTT cover devices.""" from __future__ import annotations from contextlib import suppress import logging from typing import Any import voluptuous as vol from homeassistant.components import cover from homeassistant.components.cover import ( ATTR_POSITION, ATTR_TILT_POSITION, DEVICE_CLASSE...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/models.py
homeassistant/components/mqtt/models.py
"""Models used by multiple MQTT modules.""" from __future__ import annotations from ast import literal_eval import asyncio from collections import deque from collections.abc import Callable from dataclasses import dataclass, field from enum import StrEnum import logging from typing import TYPE_CHECKING, Any, TypedDic...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/valve.py
homeassistant/components/mqtt/valve.py
"""Support for MQTT valve devices.""" from __future__ import annotations from contextlib import suppress import logging from typing import Any import voluptuous as vol from homeassistant.components import valve from homeassistant.components.valve import ( DEVICE_CLASSES_SCHEMA, ValveEntity, ValveEntityF...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/switch.py
homeassistant/components/mqtt/switch.py
"""Support for MQTT switches.""" from __future__ import annotations from collections.abc import Callable from typing import Any import voluptuous as vol from homeassistant.components import switch from homeassistant.components.switch import DEVICE_CLASSES_SCHEMA, SwitchEntity from homeassistant.config_entries impor...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/number.py
homeassistant/components/mqtt/number.py
"""Configure number in a device through MQTT topic.""" from __future__ import annotations from collections.abc import Callable import logging import voluptuous as vol from homeassistant.components import number from homeassistant.components.number import ( DEFAULT_MAX_VALUE, DEFAULT_MIN_VALUE, DEFAULT_S...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/tag.py
homeassistant/components/mqtt/tag.py
"""Provides tag scanning for MQTT.""" from __future__ import annotations from collections.abc import Callable import functools import logging import voluptuous as vol from homeassistant.components import tag from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_DEVICE, CONF_VALUE...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/addon.py
homeassistant/components/mqtt/addon.py
"""Provide MQTT add-on management. Currently only supports the official mosquitto add-on. """ from __future__ import annotations from homeassistant.components.hassio import AddonManager from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.singleton import singleton from .const import DO...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/async_client.py
homeassistant/components/mqtt/async_client.py
"""Async wrappings for mqtt client.""" from __future__ import annotations from functools import lru_cache from types import TracebackType from typing import Self from paho.mqtt.client import ( CallbackOnConnect_v2, CallbackOnDisconnect_v2, CallbackOnPublish_v2, CallbackOnSubscribe_v2, CallbackOnU...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/config_integration.py
homeassistant/components/mqtt/config_integration.py
"""Support for MQTT platform config setup.""" from __future__ import annotations import voluptuous as vol from homeassistant.const import ( CONF_CLIENT_ID, CONF_DISCOVERY, CONF_PASSWORD, CONF_PORT, CONF_PROTOCOL, CONF_USERNAME, Platform, ) from homeassistant.helpers import config_validati...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/binary_sensor.py
homeassistant/components/mqtt/binary_sensor.py
"""Support for MQTT binary sensors.""" from __future__ import annotations from datetime import datetime, timedelta import logging from typing import Any import voluptuous as vol from homeassistant.components import binary_sensor from homeassistant.components.binary_sensor import ( DEVICE_CLASSES_SCHEMA, Bin...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/lock.py
homeassistant/components/mqtt/lock.py
"""Support for MQTT locks.""" from __future__ import annotations from collections.abc import Callable import logging import re from typing import Any import voluptuous as vol from homeassistant.components import lock from homeassistant.components.lock import LockEntity, LockEntityFeature from homeassistant.config_e...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/camera.py
homeassistant/components/mqtt/camera.py
"""Camera that loads a picture from an MQTT topic.""" from __future__ import annotations from base64 import b64decode import logging from typing import TYPE_CHECKING import voluptuous as vol from homeassistant.components import camera from homeassistant.components.camera import Camera from homeassistant.config_entr...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/const.py
homeassistant/components/mqtt/const.py
"""Constants used by multiple MQTT modules.""" import logging import jinja2 from homeassistant.components.alarm_control_panel import AlarmControlPanelEntityFeature from homeassistant.const import CONF_DISCOVERY, CONF_PAYLOAD, Platform from homeassistant.exceptions import TemplateError ATTR_DISCOVERY_HASH = "discove...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/update.py
homeassistant/components/mqtt/update.py
"""Configure update platform in a device through MQTT topic.""" from __future__ import annotations import logging from typing import Any import voluptuous as vol from homeassistant.components import update from homeassistant.components.update import ( DEVICE_CLASSES_SCHEMA, UpdateEntity, UpdateEntityFea...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/debug_info.py
homeassistant/components/mqtt/debug_info.py
"""Helper to handle a set of topics to subscribe to.""" from __future__ import annotations from collections import deque from dataclasses import dataclass import datetime as dt import time from typing import TYPE_CHECKING, Any from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_regi...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/fan.py
homeassistant/components/mqtt/fan.py
"""Support for MQTT fans.""" from __future__ import annotations from collections.abc import Callable import logging import math from typing import Any import voluptuous as vol from homeassistant.components import fan from homeassistant.components.fan import ( ATTR_DIRECTION, ATTR_OSCILLATING, ATTR_PERCE...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/siren.py
homeassistant/components/mqtt/siren.py
"""Support for MQTT sirens.""" from __future__ import annotations from collections.abc import Callable import logging from typing import Any, cast import voluptuous as vol from homeassistant.components import siren from homeassistant.components.siren import ( ATTR_AVAILABLE_TONES, ATTR_DURATION, ATTR_TO...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/sensor.py
homeassistant/components/mqtt/sensor.py
"""Support for MQTT sensors.""" from __future__ import annotations from collections.abc import Callable from datetime import datetime, timedelta import logging import voluptuous as vol from homeassistant.components import sensor from homeassistant.components.sensor import ( AMBIGUOUS_UNITS, CONF_STATE_CLASS...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/config.py
homeassistant/components/mqtt/config.py
"""Support for MQTT message handling.""" from __future__ import annotations import voluptuous as vol from homeassistant.const import CONF_OPTIMISTIC, CONF_VALUE_TEMPLATE from homeassistant.helpers import config_validation as cv from .const import ( CONF_COMMAND_TOPIC, CONF_ENCODING, CONF_QOS, CONF_R...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/device_automation.py
homeassistant/components/mqtt/device_automation.py
"""Provides device automations for MQTT.""" from __future__ import annotations import functools import voluptuous as vol from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType from . import device_trig...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/__init__.py
homeassistant/components/mqtt/__init__.py
"""Support for MQTT message handling.""" from __future__ import annotations import asyncio from collections.abc import Callable from datetime import datetime import logging from typing import Any, cast import voluptuous as vol from homeassistant import config as conf_util from homeassistant.components import websoc...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/humidifier.py
homeassistant/components/mqtt/humidifier.py
"""Support for MQTT humidifiers.""" from __future__ import annotations from collections.abc import Callable import logging from typing import Any import voluptuous as vol from homeassistant.components import humidifier from homeassistant.components.humidifier import ( ATTR_ACTION, ATTR_CURRENT_HUMIDITY, ...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/entity.py
homeassistant/components/mqtt/entity.py
"""MQTT (entity) component mixins and helpers.""" from __future__ import annotations from abc import ABC, abstractmethod from collections.abc import Callable, Coroutine from functools import partial import logging from typing import TYPE_CHECKING, Any, Protocol, cast, final import voluptuous as vol from homeassista...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
true
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/button.py
homeassistant/components/mqtt/button.py
"""Support for MQTT buttons.""" from __future__ import annotations import voluptuous as vol from homeassistant.components import button from homeassistant.components.button import DEVICE_CLASSES_SCHEMA, ButtonEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_DEVICE_CLAS...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/trigger.py
homeassistant/components/mqtt/trigger.py
"""Offer MQTT listening automation rules.""" from __future__ import annotations from collections.abc import Callable from contextlib import suppress import logging from typing import Any import voluptuous as vol from homeassistant.const import CONF_PAYLOAD, CONF_PLATFORM, CONF_VALUE_TEMPLATE from homeassistant.core...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/lawn_mower.py
homeassistant/components/mqtt/lawn_mower.py
"""Support for MQTT lawn mowers.""" from __future__ import annotations from collections.abc import Callable import contextlib import logging import voluptuous as vol from homeassistant.components import lawn_mower from homeassistant.components.lawn_mower import ( ENTITY_ID_FORMAT, LawnMowerActivity, Law...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/scene.py
homeassistant/components/mqtt/scene.py
"""Support for MQTT scenes.""" from __future__ import annotations from typing import Any import voluptuous as vol from homeassistant.components import scene from homeassistant.components.scene import Scene from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_NAME, CONF_PAYLOAD_O...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/text.py
homeassistant/components/mqtt/text.py
"""Support for MQTT text platform.""" from __future__ import annotations from collections.abc import Callable import logging import re from typing import Any import voluptuous as vol from homeassistant.components import text from homeassistant.components.text import TextEntity from homeassistant.config_entries impo...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/alarm_control_panel.py
homeassistant/components/mqtt/alarm_control_panel.py
"""Control a MQTT alarm.""" from __future__ import annotations import logging import voluptuous as vol from homeassistant.components import alarm_control_panel as alarm from homeassistant.components.alarm_control_panel import AlarmControlPanelState from homeassistant.config_entries import ConfigEntry from homeassis...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/water_heater.py
homeassistant/components/mqtt/water_heater.py
"""Support for MQTT water heater devices.""" from __future__ import annotations import logging from typing import TYPE_CHECKING, Any import voluptuous as vol from homeassistant.components import water_heater from homeassistant.components.water_heater import ( ATTR_OPERATION_MODE, DEFAULT_MIN_TEMP, STATE...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/select.py
homeassistant/components/mqtt/select.py
"""Configure select in a device through MQTT topic.""" from __future__ import annotations from collections.abc import Callable import logging import voluptuous as vol from homeassistant.components import select from homeassistant.components.select import SelectEntity from homeassistant.config_entries import ConfigE...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/climate.py
homeassistant/components/mqtt/climate.py
"""Support for MQTT climate devices.""" from __future__ import annotations from abc import ABC, abstractmethod from collections.abc import Callable from functools import partial import logging from typing import Any import voluptuous as vol from homeassistant.components import climate from homeassistant.components....
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
true
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/notify.py
homeassistant/components/mqtt/notify.py
"""Support for MQTT notify.""" from __future__ import annotations import voluptuous as vol from homeassistant.components import notify from homeassistant.components.notify import NotifyEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_NAME from homeassistant.core import...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/config_flow.py
homeassistant/components/mqtt/config_flow.py
"""Config flow for MQTT.""" from __future__ import annotations import asyncio from collections import OrderedDict from collections.abc import Callable, Mapping from copy import deepcopy from dataclasses import dataclass from enum import IntEnum import json import logging import queue from ssl import PROTOCOL_TLS_CLIE...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
true
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/light/schema_json.py
homeassistant/components/mqtt/light/schema_json.py
"""Support for MQTT JSON lights.""" from __future__ import annotations from contextlib import suppress import logging from typing import TYPE_CHECKING, Any, cast import voluptuous as vol from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_MODE, ATTR_COLOR_TEMP_KELVIN, ATTR_EFFEC...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/light/schema.py
homeassistant/components/mqtt/light/schema.py
"""Shared schema code.""" import voluptuous as vol from ..const import CONF_SCHEMA MQTT_LIGHT_SCHEMA_SCHEMA = vol.Schema( { vol.Optional(CONF_SCHEMA, default="basic"): vol.All( vol.Lower, vol.Any("basic", "json", "template") ) } )
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/light/schema_template.py
homeassistant/components/mqtt/light/schema_template.py
"""Support for MQTT Template lights.""" from __future__ import annotations from collections.abc import Callable import logging from typing import Any import voluptuous as vol from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP_KELVIN, ATTR_EFFECT, ATTR_FLASH, ATTR_HS_CO...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/light/schema_basic.py
homeassistant/components/mqtt/light/schema_basic.py
"""Support for MQTT lights.""" from __future__ import annotations from collections.abc import Callable import logging from typing import Any, cast import voluptuous as vol from homeassistant.components.light import ( _DEPRECATED_ATTR_COLOR_TEMP, _DEPRECATED_ATTR_MAX_MIREDS, _DEPRECATED_ATTR_MIN_MIREDS, ...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
true
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/mqtt/light/__init__.py
homeassistant/components/mqtt/light/__init__.py
"""Support for MQTT lights.""" from __future__ import annotations from typing import Any import voluptuous as vol from homeassistant.components import light from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddConfigEn...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/bluesound/media_player.py
homeassistant/components/bluesound/media_player.py
"""Support for Bluesound devices.""" from __future__ import annotations from asyncio import Task from datetime import datetime, timedelta import logging from typing import TYPE_CHECKING, Any from pyblu import Input, Player, Preset, Status, SyncStatus from homeassistant.components import media_source from homeassist...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/bluesound/const.py
homeassistant/components/bluesound/const.py
"""Constants for the Bluesound HiFi wireless speakers and audio integrations component.""" DOMAIN = "bluesound" INTEGRATION_TITLE = "Bluesound" ATTR_BLUESOUND_GROUP = "bluesound_group" ATTR_MASTER = "master" SERVICE_CLEAR_TIMER = "clear_sleep_timer" SERVICE_JOIN = "join" SERVICE_SET_TIMER = "set_sleep_timer" SERVICE_...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/bluesound/coordinator.py
homeassistant/components/bluesound/coordinator.py
"""Define a base coordinator for Bluesound entities.""" from __future__ import annotations import asyncio from collections.abc import Callable, Coroutine import contextlib from dataclasses import dataclass, replace from datetime import timedelta import logging from pyblu import Input, Player, Preset, Status, SyncSta...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/bluesound/utils.py
homeassistant/components/bluesound/utils.py
"""Utility functions for the Bluesound component.""" from pyblu import PairedPlayer from homeassistant.helpers.device_registry import format_mac def format_unique_id(mac: str, port: int) -> str: """Generate a unique ID based on the MAC address and port number.""" return f"{format_mac(mac)}-{port}" def dis...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/bluesound/__init__.py
homeassistant/components/bluesound/__init__.py
"""The bluesound component.""" from pyblu import Player from pyblu.errors import PlayerUnreachableError import voluptuous as vol from homeassistant.components.media_player import DOMAIN as MEDIA_PLAYER_DOMAIN from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_HOST, CONF_PORT, Pl...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/bluesound/button.py
homeassistant/components/bluesound/button.py
"""Button entities for Bluesound.""" from __future__ import annotations from collections.abc import Awaitable, Callable from dataclasses import dataclass from typing import TYPE_CHECKING from pyblu import Player from homeassistant.components.button import ButtonEntity, ButtonEntityDescription from homeassistant.con...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/bluesound/config_flow.py
homeassistant/components/bluesound/config_flow.py
"""Config flow for bluesound.""" import logging from typing import Any from pyblu import Player, SyncStatus from pyblu.errors import PlayerUnreachableError import voluptuous as vol from homeassistant.config_entries import ConfigFlow, ConfigFlowResult from homeassistant.const import CONF_HOST, CONF_PORT from homeassi...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/ffmpeg/services.py
homeassistant/components/ffmpeg/services.py
"""Support for FFmpeg.""" from __future__ import annotations import voluptuous as vol from homeassistant.const import ATTR_ENTITY_ID from homeassistant.core import HomeAssistant, ServiceCall, callback from homeassistant.helpers import config_validation as cv from homeassistant.helpers.dispatcher import async_dispatc...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/ffmpeg/camera.py
homeassistant/components/ffmpeg/camera.py
"""Support for Cameras with FFmpeg as decoder.""" from __future__ import annotations from typing import Any from aiohttp import web from haffmpeg.camera import CameraMjpeg from haffmpeg.tools import IMAGE_JPEG import voluptuous as vol from homeassistant.components.camera import ( PLATFORM_SCHEMA as CAMERA_PLATF...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/ffmpeg/const.py
homeassistant/components/ffmpeg/const.py
"""Support for FFmpeg.""" from homeassistant.util.signal_type import SignalType DOMAIN = "ffmpeg" SIGNAL_FFMPEG_START = SignalType[list[str] | None]("ffmpeg.start") SIGNAL_FFMPEG_STOP = SignalType[list[str] | None]("ffmpeg.stop") SIGNAL_FFMPEG_RESTART = SignalType[list[str] | None]("ffmpeg.restart")
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/ffmpeg/__init__.py
homeassistant/components/ffmpeg/__init__.py
"""Support for FFmpeg.""" from __future__ import annotations import asyncio import re from haffmpeg.core import HAFFmpeg from haffmpeg.tools import IMAGE_JPEG, FFVersion, ImageFrame from propcache.api import cached_property import voluptuous as vol from homeassistant.const import ( CONTENT_TYPE_MULTIPART, E...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/iskra/const.py
homeassistant/components/iskra/const.py
"""Constants for the iskra integration.""" DOMAIN = "iskra" MANUFACTURER = "Iskra d.o.o" # POWER ATTR_TOTAL_APPARENT_POWER = "total_apparent_power" ATTR_TOTAL_REACTIVE_POWER = "total_reactive_power" ATTR_TOTAL_ACTIVE_POWER = "total_active_power" ATTR_PHASE1_POWER = "phase1_power" ATTR_PHASE2_POWER = "phase2_power" AT...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/iskra/coordinator.py
homeassistant/components/iskra/coordinator.py
"""Coordinator for Iskra integration.""" from datetime import timedelta import logging from pyiskra.devices import Device from pyiskra.exceptions import ( DeviceConnectionError, DeviceTimeoutError, InvalidResponseCode, NotAuthorised, ) from homeassistant.config_entries import ConfigEntry from homeass...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/iskra/sensor.py
homeassistant/components/iskra/sensor.py
"""Support for Iskra.""" from __future__ import annotations from collections.abc import Callable from dataclasses import dataclass, replace from pyiskra.devices import Device from pyiskra.helper import Counter, CounterType from homeassistant.components.sensor import ( SensorDeviceClass, SensorEntity, Se...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/iskra/__init__.py
homeassistant/components/iskra/__init__.py
"""The iskra integration.""" from __future__ import annotations from pyiskra.adapters import Modbus, RestAPI from pyiskra.devices import Device from pyiskra.exceptions import DeviceConnectionError, DeviceNotSupported, NotAuthorised from homeassistant.const import ( CONF_ADDRESS, CONF_HOST, CONF_PASSWORD,...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false
home-assistant/core
https://github.com/home-assistant/core/blob/6cae1821fb77e785a8aebb48dfc72ea5081b8975/homeassistant/components/iskra/entity.py
homeassistant/components/iskra/entity.py
"""Base entity for Iskra devices.""" from homeassistant.helpers.device_registry import DeviceInfo from homeassistant.helpers.update_coordinator import CoordinatorEntity from .const import DOMAIN, MANUFACTURER from .coordinator import IskraDataUpdateCoordinator class IskraEntity(CoordinatorEntity[IskraDataUpdateCoor...
python
Apache-2.0
6cae1821fb77e785a8aebb48dfc72ea5081b8975
2026-01-04T14:38:15.504802Z
false