Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/button/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"services": {
"press": {
"name": "Press",
"description": "Press the button entity."
"description": "Presses a button entity."
}
}
}
5 changes: 4 additions & 1 deletion homeassistant/components/enigma2/coordinator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Data update coordinator for the Enigma2 integration."""

import asyncio
import logging

from openwebif.api import OpenWebIfDevice, OpenWebIfStatus
Expand Down Expand Up @@ -30,6 +31,8 @@

LOGGER = logging.getLogger(__package__)

SETUP_TIMEOUT = 10

type Enigma2ConfigEntry = ConfigEntry[Enigma2UpdateCoordinator]


Expand Down Expand Up @@ -79,7 +82,7 @@ def __init__(self, hass: HomeAssistant, config_entry: Enigma2ConfigEntry) -> Non
async def _async_setup(self) -> None:
"""Provide needed data to the device info."""

about = await self.device.get_about()
about = await asyncio.wait_for(self.device.get_about(), timeout=SETUP_TIMEOUT)
self.device.mac_address = about["info"]["ifaces"][0]["mac"]
self.device_info["model"] = about["info"]["model"]
self.device_info["manufacturer"] = about["info"]["brand"]
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/imgw_pib/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/imgw_pib",
"iot_class": "cloud_polling",
"quality_scale": "silver",
"requirements": ["imgw_pib==1.5.2"]
"requirements": ["imgw_pib==1.5.3"]
}
4 changes: 1 addition & 3 deletions homeassistant/components/modbus/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations

import logging
from typing import Any

from homeassistant.components.binary_sensor import BinarySensorEntity
Expand All @@ -24,6 +23,7 @@

from . import get_hub
from .const import (
_LOGGER,
CALL_TYPE_COIL,
CALL_TYPE_DISCRETE,
CONF_SLAVE_COUNT,
Expand All @@ -32,8 +32,6 @@
from .entity import BasePlatform
from .modbus import ModbusHub

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 1


Expand Down
4 changes: 1 addition & 3 deletions homeassistant/components/modbus/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations

import logging
import struct
from typing import Any, cast

Expand Down Expand Up @@ -44,6 +43,7 @@

from . import get_hub
from .const import (
_LOGGER,
CALL_TYPE_COIL,
CALL_TYPE_REGISTER_HOLDING,
CALL_TYPE_WRITE_COIL,
Expand Down Expand Up @@ -104,8 +104,6 @@
from .entity import BaseStructPlatform
from .modbus import ModbusHub

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 1

HVACMODE_TO_TARG_TEMP_REG_INDEX_ARRAY = {
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/modbus/const.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Constants used in modbus integration."""

from enum import Enum
import logging

from homeassistant.const import (
CONF_ADDRESS,
Expand Down Expand Up @@ -177,3 +178,5 @@ class DataType(str, Enum):
LIGHT_MODBUS_SCALE_MIN = 0
LIGHT_MODBUS_SCALE_MAX = 100
LIGHT_MODBUS_INVALID_VALUE = 0xFFFF

_LOGGER = logging.getLogger(__package__)
4 changes: 1 addition & 3 deletions homeassistant/components/modbus/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import asyncio
from collections.abc import Callable
from datetime import datetime, timedelta
import logging
import struct
from typing import Any, cast

Expand All @@ -33,6 +32,7 @@
from homeassistant.helpers.restore_state import RestoreEntity

from .const import (
_LOGGER,
CALL_TYPE_COIL,
CALL_TYPE_DISCRETE,
CALL_TYPE_REGISTER_HOLDING,
Expand Down Expand Up @@ -68,8 +68,6 @@
)
from .modbus import ModbusHub

_LOGGER = logging.getLogger(__name__)


class BasePlatform(Entity):
"""Base for readonly platforms."""
Expand Down
2 changes: 0 additions & 2 deletions homeassistant/components/modbus/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations

import logging
from typing import Any

from homeassistant.components.light import (
Expand Down Expand Up @@ -35,7 +34,6 @@
from .modbus import ModbusHub

PARALLEL_UPDATES = 1
_LOGGER = logging.getLogger(__name__)


async def async_setup_platform(
Expand Down
3 changes: 1 addition & 2 deletions homeassistant/components/modbus/modbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import asyncio
from collections import namedtuple
from collections.abc import Callable
import logging
from typing import Any

from pymodbus.client import (
Expand Down Expand Up @@ -38,6 +37,7 @@
from homeassistant.util.hass_dict import HassKey

from .const import (
_LOGGER,
ATTR_ADDRESS,
ATTR_HUB,
ATTR_SLAVE,
Expand Down Expand Up @@ -70,7 +70,6 @@
)
from .validators import check_config

_LOGGER = logging.getLogger(__name__)
DATA_MODBUS_HUBS: HassKey[dict[str, ModbusHub]] = HassKey(DOMAIN)


Expand Down
5 changes: 1 addition & 4 deletions homeassistant/components/modbus/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations

import logging
from typing import Any

from homeassistant.components.sensor import (
Expand All @@ -26,12 +25,10 @@
)

from . import get_hub
from .const import CONF_SLAVE_COUNT, CONF_VIRTUAL_COUNT
from .const import _LOGGER, CONF_SLAVE_COUNT, CONF_VIRTUAL_COUNT
from .entity import BaseStructPlatform
from .modbus import ModbusHub

_LOGGER = logging.getLogger(__name__)

PARALLEL_UPDATES = 1


Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/tuya/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ class TuyaSensorEntityDescription(SensorEntityDescription):
),
TuyaSensorEntityDescription(
key=DPCode.REVERSE_ENERGY_TOTAL,
translation_key="total_energy",
translation_key="total_production",
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
),
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt

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

2 changes: 1 addition & 1 deletion requirements_test_all.txt

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

39 changes: 35 additions & 4 deletions tests/components/tuya/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@
# https://github.com/home-assistant/core/pull/148646
Platform.CLIMATE,
],
"ldcg_9kbbfeho": [
# https://github.com/orgs/home-assistant/discussions/482
Platform.SENSOR,
],
"mal_gyitctrjj1kefxp2": [
# Alarm Host support
Platform.ALARM_CONTROL_PANEL,
Expand Down Expand Up @@ -358,6 +362,11 @@
Platform.SELECT,
Platform.SIREN,
],
"sj_tgvtvdoc": [
# https://github.com/orgs/home-assistant/discussions/482
Platform.BINARY_SENSOR,
Platform.SENSOR,
],
"sp_drezasavompxpcgm": [
# https://github.com/home-assistant/core/issues/149704
Platform.CAMERA,
Expand Down Expand Up @@ -419,22 +428,39 @@
"wfcon_b25mh8sxawsgndck": [
# https://github.com/home-assistant/core/issues/149704
],
"wg2_nwxr8qcu4seltoro": [
# https://github.com/orgs/home-assistant/discussions/430
Platform.BINARY_SENSOR,
],
"wk_6kijc7nd": [
# https://github.com/home-assistant/core/issues/136513
Platform.CLIMATE,
Platform.NUMBER,
Platform.SWITCH,
],
"wk_aqoouq7x": [
# https://github.com/home-assistant/core/issues/146263
Platform.CLIMATE,
Platform.SWITCH,
],
"wg2_nwxr8qcu4seltoro": [
# https://github.com/orgs/home-assistant/discussions/430
Platform.BINARY_SENSOR,
],
"wk_fi6dne5tu4t1nm6j": [
# https://github.com/orgs/home-assistant/discussions/243
Platform.CLIMATE,
Platform.NUMBER,
Platform.SENSOR,
Platform.SWITCH,
],
"wk_gogb05wrtredz3bs": [
# https://github.com/home-assistant/core/issues/136337
Platform.CLIMATE,
Platform.NUMBER,
Platform.SWITCH,
],
"wk_y5obtqhuztqsf2mj": [
# https://github.com/home-assistant/core/issues/139735
Platform.CLIMATE,
Platform.SWITCH,
],
"wsdcg_g2y6z3p3ja2qhyav": [
# https://github.com/home-assistant/core/issues/102769
Platform.SENSOR,
Expand Down Expand Up @@ -463,6 +489,11 @@
Platform.NUMBER,
Platform.SENSOR,
],
"zndb_4ggkyflayu1h1ho9": [
# https://github.com/home-assistant/core/pull/149317
Platform.SENSOR,
Platform.SWITCH,
],
"zndb_ze8faryrxr0glqnn": [
# https://github.com/home-assistant/core/issues/138372
Platform.SENSOR,
Expand Down
47 changes: 47 additions & 0 deletions tests/components/tuya/fixtures/ldcg_9kbbfeho.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"endpoint": "https://apigw.tuyaeu.com",
"terminal_id": "REDACTED",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"id": "bfbc8a692eaeeef455fkct",
"name": "Luminosité",
"category": "ldcg",
"product_id": "9kbbfeho",
"product_name": "Luminance sensor",
"online": true,
"sub": true,
"time_zone": "+02:00",
"active_time": "2025-07-25T16:37:21+00:00",
"create_time": "2025-07-25T16:37:21+00:00",
"update_time": "2025-07-25T16:37:21+00:00",
"function": {},
"status_range": {
"bright_value": {
"type": "Integer",
"value": {
"unit": "lux",
"min": 0,
"max": 1000,
"scale": 0,
"step": 1
}
},
"battery_percentage": {
"type": "Integer",
"value": {
"unit": "%",
"min": 0,
"max": 100,
"scale": 0,
"step": 1
}
}
},
"status": {
"bright_value": 16,
"battery_percentage": 91
},
"set_up": true,
"support_local": true
}
43 changes: 43 additions & 0 deletions tests/components/tuya/fixtures/sj_tgvtvdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"endpoint": "https://apigw.tuyaeu.com",
"terminal_id": "REDACTED",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"id": "bf58e095fd2d86d592tveh",
"name": "Tournesol",
"category": "sj",
"product_id": "tgvtvdoc",
"product_name": "Rain sensor",
"online": true,
"sub": true,
"time_zone": "+02:00",
"active_time": "2025-07-30T04:51:12+00:00",
"create_time": "2025-07-30T04:51:12+00:00",
"update_time": "2025-07-30T04:51:12+00:00",
"function": {},
"status_range": {
"watersensor_state": {
"type": "Enum",
"value": {
"range": ["alarm", "normal"]
}
},
"battery_percentage": {
"type": "Integer",
"value": {
"unit": "%",
"min": 0,
"max": 100,
"scale": 0,
"step": 1
}
}
},
"status": {
"watersensor_state": "normal",
"battery_percentage": 98
},
"set_up": true,
"support_local": true
}
Loading
Loading