Skip to content

Commit

Permalink
2024.2.4 (#111441)
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob committed Feb 26, 2024
2 parents 1ee3927 + 367aaf9 commit aabaa30
Show file tree
Hide file tree
Showing 17 changed files with 151 additions and 38 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/caldav/manifest.json
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/caldav",
"iot_class": "cloud_polling",
"loggers": ["caldav", "vobject"],
"requirements": ["caldav==1.3.8"]
"requirements": ["caldav==1.3.9"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/enigma2/manifest.json
Expand Up @@ -5,5 +5,5 @@
"documentation": "https://www.home-assistant.io/integrations/enigma2",
"iot_class": "local_polling",
"loggers": ["openwebif"],
"requirements": ["openwebifpy==4.2.1"]
"requirements": ["openwebifpy==4.2.4"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/enigma2/media_player.py
Expand Up @@ -107,7 +107,7 @@ async def async_setup_platform(

device = OpenWebIfDevice(
host=session,
turn_off_to_deep=config.get(CONF_DEEP_STANDBY),
turn_off_to_deep=config.get(CONF_DEEP_STANDBY, False),
source_bouquet=config.get(CONF_SOURCE_BOUQUET),
)

Expand Down
38 changes: 25 additions & 13 deletions homeassistant/components/group/sensor.py
Expand Up @@ -396,7 +396,7 @@ def async_update_group_state(self) -> None:
self._state_incorrect.add(entity_id)
_LOGGER.warning(
"Unable to use state. Only entities with correct unit of measurement"
" is supported when having a device class,"
" is supported,"
" entity %s, value %s with device class %s"
" and unit of measurement %s excluded from calculation in %s",
entity_id,
Expand Down Expand Up @@ -548,19 +548,28 @@ def _calculate_unit_of_measurement(

# Ensure only valid unit of measurements for the specific device class can be used
if (
# Test if uom's in device class is convertible
(device_class := self.device_class) in UNIT_CONVERTERS
and all(
uom in UNIT_CONVERTERS[device_class].VALID_UNITS
for uom in unit_of_measurements
(
# Test if uom's in device class is convertible
(device_class := self.device_class) in UNIT_CONVERTERS
and all(
uom in UNIT_CONVERTERS[device_class].VALID_UNITS
for uom in unit_of_measurements
)
)
) or (
# Test if uom's in device class is not convertible
device_class
and device_class not in UNIT_CONVERTERS
and device_class in DEVICE_CLASS_UNITS
and all(
uom in DEVICE_CLASS_UNITS[device_class] for uom in unit_of_measurements
or (
# Test if uom's in device class is not convertible
device_class
and device_class not in UNIT_CONVERTERS
and device_class in DEVICE_CLASS_UNITS
and all(
uom in DEVICE_CLASS_UNITS[device_class]
for uom in unit_of_measurements
)
)
or (
# Test no device class and all uom's are same
device_class is None
and all(x == unit_of_measurements[0] for x in unit_of_measurements)
)
):
async_delete_issue(
Expand Down Expand Up @@ -608,6 +617,7 @@ def _get_valid_units(self) -> set[str | None]:
"""Return valid units.
If device class is set and compatible unit of measurements.
If device class is not set, use one unit of measurement.
"""
if (
device_class := self.device_class
Expand All @@ -621,4 +631,6 @@ def _get_valid_units(self) -> set[str | None]:
):
valid_uoms: set = DEVICE_CLASS_UNITS[device_class]
return valid_uoms
if device_class is None and self.native_unit_of_measurement:
return {self.native_unit_of_measurement}
return set()
2 changes: 1 addition & 1 deletion homeassistant/components/group/strings.json
Expand Up @@ -257,7 +257,7 @@
},
"uoms_not_matching_no_device_class": {
"title": "Unit of measurements is not correct",
"description": "Unit of measurements `{uoms}` of input sensors `{source_entities}` are not compatible using no device class of sensor group `{entity_id}`.\n\nPlease correct the unit of measurements on the source entities or set a proper device class on the sensor group and reload the group sensor to fix this issue."
"description": "Unit of measurements `{uoms}` of input sensors `{source_entities}` are not compatible when not using a device class on sensor group `{entity_id}`.\n\nPlease correct the unit of measurements on the source entities or set a proper device class on the sensor group and reload the group sensor to fix this issue."
},
"device_classes_not_matching": {
"title": "Device classes is not correct",
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/lutron/switch.py
Expand Up @@ -43,6 +43,7 @@ class LutronSwitch(LutronDevice, SwitchEntity):
"""Representation of a Lutron Switch."""

_lutron_device: Output
_attr_name = None

def turn_on(self, **kwargs: Any) -> None:
"""Turn the switch on."""
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/opower/manifest.json
Expand Up @@ -7,5 +7,5 @@
"documentation": "https://www.home-assistant.io/integrations/opower",
"iot_class": "cloud_polling",
"loggers": ["opower"],
"requirements": ["opower==0.2.0"]
"requirements": ["opower==0.3.1"]
}
6 changes: 5 additions & 1 deletion homeassistant/components/profiler/manifest.json
Expand Up @@ -5,5 +5,9 @@
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/profiler",
"quality_scale": "internal",
"requirements": ["pyprof2calltree==1.4.5", "guppy3==3.1.4", "objgraph==3.5.0"]
"requirements": [
"pyprof2calltree==1.4.5",
"guppy3==3.1.4.post1",
"objgraph==3.5.0"
]
}
2 changes: 1 addition & 1 deletion homeassistant/components/roomba/manifest.json
Expand Up @@ -24,7 +24,7 @@
"documentation": "https://www.home-assistant.io/integrations/roomba",
"iot_class": "local_push",
"loggers": ["paho_mqtt", "roombapy"],
"requirements": ["roombapy==1.6.12"],
"requirements": ["roombapy==1.6.13"],
"zeroconf": [
{
"type": "_amzn-alexa._tcp.local.",
Expand Down
5 changes: 3 additions & 2 deletions homeassistant/components/wyoming/config_flow.py
Expand Up @@ -15,7 +15,7 @@
from .const import DOMAIN
from .data import WyomingService

_LOGGER = logging.getLogger()
_LOGGER = logging.getLogger(__name__)

STEP_USER_DATA_SCHEMA = vol.Schema(
{
Expand Down Expand Up @@ -64,6 +64,7 @@ async def async_step_hassio(
self, discovery_info: hassio.HassioServiceInfo
) -> FlowResult:
"""Handle Supervisor add-on discovery."""
_LOGGER.debug("Supervisor discovery info: %s", discovery_info)
await self.async_set_unique_id(discovery_info.uuid)
self._abort_if_unique_id_configured()

Expand Down Expand Up @@ -105,7 +106,7 @@ async def async_step_zeroconf(
self, discovery_info: zeroconf.ZeroconfServiceInfo
) -> FlowResult:
"""Handle zeroconf discovery."""
_LOGGER.debug("Discovery info: %s", discovery_info)
_LOGGER.debug("Zeroconf discovery info: %s", discovery_info)
if discovery_info.port is None:
return self.async_abort(reason="no_port")

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/const.py
Expand Up @@ -16,7 +16,7 @@
APPLICATION_NAME: Final = "HomeAssistant"
MAJOR_VERSION: Final = 2024
MINOR_VERSION: Final = 2
PATCH_VERSION: Final = "3"
PATCH_VERSION: Final = "4"
__short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}"
__version__: Final = f"{__short_version__}.{PATCH_VERSION}"
REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 11, 0)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/package_constraints.txt
Expand Up @@ -36,7 +36,7 @@ janus==1.0.0
Jinja2==3.1.3
lru-dict==1.3.0
mutagen==1.47.0
orjson==3.9.14
orjson==3.9.15
packaging>=23.1
paho-mqtt==1.6.1
Pillow==10.2.0
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "homeassistant"
version = "2024.2.3"
version = "2024.2.4"
license = {text = "Apache-2.0"}
description = "Open-source home automation platform running on Python 3."
readme = "README.rst"
Expand Down Expand Up @@ -46,7 +46,7 @@ dependencies = [
"cryptography==42.0.2",
# pyOpenSSL 23.2.0 is required to work with cryptography 41+
"pyOpenSSL==24.0.0",
"orjson==3.9.14",
"orjson==3.9.15",
"packaging>=23.1",
"pip>=21.3.1",
"python-slugify==8.0.1",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -22,7 +22,7 @@ lru-dict==1.3.0
PyJWT==2.8.0
cryptography==42.0.2
pyOpenSSL==24.0.0
orjson==3.9.14
orjson==3.9.15
packaging>=23.1
pip>=21.3.1
python-slugify==8.0.1
Expand Down
10 changes: 5 additions & 5 deletions requirements_all.txt
Expand Up @@ -624,7 +624,7 @@ buienradar==1.0.5
cached_ipaddress==0.3.0

# homeassistant.components.caldav
caldav==1.3.8
caldav==1.3.9

# homeassistant.components.circuit
circuit-webhook==1.0.1
Expand Down Expand Up @@ -997,7 +997,7 @@ gspread==5.5.0
gstreamer-player==1.1.2

# homeassistant.components.profiler
guppy3==3.1.4
guppy3==3.1.4.post1

# homeassistant.components.iaqualink
h2==4.1.0
Expand Down Expand Up @@ -1459,7 +1459,7 @@ openhomedevice==2.2.0
opensensemap-api==0.2.0

# homeassistant.components.enigma2
openwebifpy==4.2.1
openwebifpy==4.2.4

# homeassistant.components.luci
openwrt-luci-rpc==1.1.16
Expand All @@ -1468,7 +1468,7 @@ openwrt-luci-rpc==1.1.16
openwrt-ubus-rpc==0.0.2

# homeassistant.components.opower
opower==0.2.0
opower==0.3.1

# homeassistant.components.oralb
oralb-ble==0.17.6
Expand Down Expand Up @@ -2450,7 +2450,7 @@ rokuecp==0.19.1
romy==0.0.7

# homeassistant.components.roomba
roombapy==1.6.12
roombapy==1.6.13

# homeassistant.components.roon
roonapi==0.1.6
Expand Down
8 changes: 4 additions & 4 deletions requirements_test_all.txt
Expand Up @@ -523,7 +523,7 @@ buienradar==1.0.5
cached_ipaddress==0.3.0

# homeassistant.components.caldav
caldav==1.3.8
caldav==1.3.9

# homeassistant.components.coinbase
coinbase==2.1.0
Expand Down Expand Up @@ -805,7 +805,7 @@ growattServer==1.3.0
gspread==5.5.0

# homeassistant.components.profiler
guppy3==3.1.4
guppy3==3.1.4.post1

# homeassistant.components.iaqualink
h2==4.1.0
Expand Down Expand Up @@ -1156,7 +1156,7 @@ openerz-api==0.3.0
openhomedevice==2.2.0

# homeassistant.components.opower
opower==0.2.0
opower==0.3.1

# homeassistant.components.oralb
oralb-ble==0.17.6
Expand Down Expand Up @@ -1872,7 +1872,7 @@ rokuecp==0.19.1
romy==0.0.7

# homeassistant.components.roomba
roombapy==1.6.12
roombapy==1.6.13

# homeassistant.components.roon
roonapi==0.1.6
Expand Down

0 comments on commit aabaa30

Please sign in to comment.