mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Merge pull request #74926 from home-assistant/rc
This commit is contained in:
commit
4418e6c4b6
@ -3,7 +3,7 @@
|
|||||||
"name": "deCONZ",
|
"name": "deCONZ",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/deconz",
|
"documentation": "https://www.home-assistant.io/integrations/deconz",
|
||||||
"requirements": ["pydeconz==97"],
|
"requirements": ["pydeconz==98"],
|
||||||
"ssdp": [
|
"ssdp": [
|
||||||
{
|
{
|
||||||
"manufacturer": "Royal Philips Electronics",
|
"manufacturer": "Royal Philips Electronics",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"domain": "edl21",
|
"domain": "edl21",
|
||||||
"name": "EDL21",
|
"name": "EDL21",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/edl21",
|
"documentation": "https://www.home-assistant.io/integrations/edl21",
|
||||||
"requirements": ["pysml==0.0.7"],
|
"requirements": ["pysml==0.0.8"],
|
||||||
"codeowners": ["@mtdcr"],
|
"codeowners": ["@mtdcr"],
|
||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"loggers": ["sml"]
|
"loggers": ["sml"]
|
||||||
|
@ -17,6 +17,7 @@ from homeassistant.components.sensor import (
|
|||||||
)
|
)
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_NAME,
|
CONF_NAME,
|
||||||
|
DEGREE,
|
||||||
ELECTRIC_CURRENT_AMPERE,
|
ELECTRIC_CURRENT_AMPERE,
|
||||||
ELECTRIC_POTENTIAL_VOLT,
|
ELECTRIC_POTENTIAL_VOLT,
|
||||||
ENERGY_KILO_WATT_HOUR,
|
ENERGY_KILO_WATT_HOUR,
|
||||||
@ -250,6 +251,7 @@ SENSOR_UNIT_MAPPING = {
|
|||||||
"W": POWER_WATT,
|
"W": POWER_WATT,
|
||||||
"A": ELECTRIC_CURRENT_AMPERE,
|
"A": ELECTRIC_CURRENT_AMPERE,
|
||||||
"V": ELECTRIC_POTENTIAL_VOLT,
|
"V": ELECTRIC_POTENTIAL_VOLT,
|
||||||
|
"°": DEGREE,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -449,7 +451,7 @@ class EDL21Entity(SensorEntity):
|
|||||||
@property
|
@property
|
||||||
def native_unit_of_measurement(self):
|
def native_unit_of_measurement(self):
|
||||||
"""Return the unit of measurement."""
|
"""Return the unit of measurement."""
|
||||||
if (unit := self._telegram.get("unit")) is None:
|
if (unit := self._telegram.get("unit")) is None or unit == 0:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return SENSOR_UNIT_MAPPING[unit]
|
return SENSOR_UNIT_MAPPING[unit]
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/ezviz",
|
"documentation": "https://www.home-assistant.io/integrations/ezviz",
|
||||||
"dependencies": ["ffmpeg"],
|
"dependencies": ["ffmpeg"],
|
||||||
"codeowners": ["@RenierM26", "@baqs"],
|
"codeowners": ["@RenierM26", "@baqs"],
|
||||||
"requirements": ["pyezviz==0.2.0.8"],
|
"requirements": ["pyezviz==0.2.0.9"],
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"iot_class": "cloud_polling",
|
"iot_class": "cloud_polling",
|
||||||
"loggers": ["paho_mqtt", "pyezviz"]
|
"loggers": ["paho_mqtt", "pyezviz"]
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"domain": "frontier_silicon",
|
"domain": "frontier_silicon",
|
||||||
"name": "Frontier Silicon",
|
"name": "Frontier Silicon",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/frontier_silicon",
|
"documentation": "https://www.home-assistant.io/integrations/frontier_silicon",
|
||||||
"requirements": ["afsapi==0.2.4"],
|
"requirements": ["afsapi==0.2.5"],
|
||||||
"codeowners": ["@wlcrs"],
|
"codeowners": ["@wlcrs"],
|
||||||
"iot_class": "local_polling"
|
"iot_class": "local_polling"
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"domain": "hdmi_cec",
|
"domain": "hdmi_cec",
|
||||||
"name": "HDMI-CEC",
|
"name": "HDMI-CEC",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/hdmi_cec",
|
"documentation": "https://www.home-assistant.io/integrations/hdmi_cec",
|
||||||
"requirements": ["pyCEC==0.5.1"],
|
"requirements": ["pyCEC==0.5.2"],
|
||||||
"codeowners": [],
|
"codeowners": [],
|
||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"loggers": ["pycec"]
|
"loggers": ["pycec"]
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "Mazda Connected Services",
|
"name": "Mazda Connected Services",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/mazda",
|
"documentation": "https://www.home-assistant.io/integrations/mazda",
|
||||||
"requirements": ["pymazda==0.3.3"],
|
"requirements": ["pymazda==0.3.6"],
|
||||||
"codeowners": ["@bdr99"],
|
"codeowners": ["@bdr99"],
|
||||||
"quality_scale": "platinum",
|
"quality_scale": "platinum",
|
||||||
"iot_class": "cloud_polling",
|
"iot_class": "cloud_polling",
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "QNAP QSW",
|
"name": "QNAP QSW",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/qnap_qsw",
|
"documentation": "https://www.home-assistant.io/integrations/qnap_qsw",
|
||||||
"requirements": ["aioqsw==0.1.0"],
|
"requirements": ["aioqsw==0.1.1"],
|
||||||
"codeowners": ["@Noltari"],
|
"codeowners": ["@Noltari"],
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"loggers": ["aioqsw"],
|
"loggers": ["aioqsw"],
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "RainMachine",
|
"name": "RainMachine",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/rainmachine",
|
"documentation": "https://www.home-assistant.io/integrations/rainmachine",
|
||||||
"requirements": ["regenmaschine==2022.07.0"],
|
"requirements": ["regenmaschine==2022.07.1"],
|
||||||
"codeowners": ["@bachya"],
|
"codeowners": ["@bachya"],
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"homekit": {
|
"homekit": {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"domain": "roku",
|
"domain": "roku",
|
||||||
"name": "Roku",
|
"name": "Roku",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/roku",
|
"documentation": "https://www.home-assistant.io/integrations/roku",
|
||||||
"requirements": ["rokuecp==0.16.0"],
|
"requirements": ["rokuecp==0.17.0"],
|
||||||
"homekit": {
|
"homekit": {
|
||||||
"models": ["3820X", "3810X", "4660X", "7820X", "C105X", "C135X"]
|
"models": ["3820X", "3810X", "4660X", "7820X", "C105X", "C135X"]
|
||||||
},
|
},
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "SMS notifications via GSM-modem",
|
"name": "SMS notifications via GSM-modem",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/sms",
|
"documentation": "https://www.home-assistant.io/integrations/sms",
|
||||||
"requirements": ["python-gammu==3.2.3"],
|
"requirements": ["python-gammu==3.2.4"],
|
||||||
"codeowners": ["@ocalvo"],
|
"codeowners": ["@ocalvo"],
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"loggers": ["gammu"]
|
"loggers": ["gammu"]
|
||||||
|
@ -93,7 +93,7 @@ class SystemBridgeDataUpdateCoordinator(
|
|||||||
if not self.websocket_client.connected:
|
if not self.websocket_client.connected:
|
||||||
await self._setup_websocket()
|
await self._setup_websocket()
|
||||||
|
|
||||||
await self.websocket_client.get_data(modules)
|
self.hass.async_create_task(self.websocket_client.get_data(modules))
|
||||||
|
|
||||||
async def async_handle_module(
|
async def async_handle_module(
|
||||||
self,
|
self,
|
||||||
@ -107,9 +107,7 @@ class SystemBridgeDataUpdateCoordinator(
|
|||||||
|
|
||||||
async def _listen_for_data(self) -> None:
|
async def _listen_for_data(self) -> None:
|
||||||
"""Listen for events from the WebSocket."""
|
"""Listen for events from the WebSocket."""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await self.websocket_client.register_data_listener(MODULES)
|
|
||||||
await self.websocket_client.listen(callback=self.async_handle_module)
|
await self.websocket_client.listen(callback=self.async_handle_module)
|
||||||
except AuthenticationException as exception:
|
except AuthenticationException as exception:
|
||||||
self.last_update_success = False
|
self.last_update_success = False
|
||||||
@ -175,6 +173,9 @@ class SystemBridgeDataUpdateCoordinator(
|
|||||||
self.async_update_listeners()
|
self.async_update_listeners()
|
||||||
|
|
||||||
self.hass.async_create_task(self._listen_for_data())
|
self.hass.async_create_task(self._listen_for_data())
|
||||||
|
|
||||||
|
await self.websocket_client.register_data_listener(MODULES)
|
||||||
|
|
||||||
self.last_update_success = True
|
self.last_update_success = True
|
||||||
self.async_update_listeners()
|
self.async_update_listeners()
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "System Bridge",
|
"name": "System Bridge",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/system_bridge",
|
"documentation": "https://www.home-assistant.io/integrations/system_bridge",
|
||||||
"requirements": ["systembridgeconnector==3.1.5"],
|
"requirements": ["systembridgeconnector==3.3.2"],
|
||||||
"codeowners": ["@timmo001"],
|
"codeowners": ["@timmo001"],
|
||||||
"zeroconf": ["_system-bridge._tcp.local."],
|
"zeroconf": ["_system-bridge._tcp.local."],
|
||||||
"after_dependencies": ["zeroconf"],
|
"after_dependencies": ["zeroconf"],
|
||||||
|
@ -83,13 +83,12 @@ SENSORS: tuple[VeSyncSensorEntityDescription, ...] = (
|
|||||||
native_unit_of_measurement=PERCENTAGE,
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
value_fn=lambda device: device.details["filter_life"],
|
value_fn=lambda device: device.filter_life,
|
||||||
exists_fn=lambda device: sku_supported(device, FILTER_LIFE_SUPPORTED),
|
exists_fn=lambda device: sku_supported(device, FILTER_LIFE_SUPPORTED),
|
||||||
),
|
),
|
||||||
VeSyncSensorEntityDescription(
|
VeSyncSensorEntityDescription(
|
||||||
key="air-quality",
|
key="air-quality",
|
||||||
name="Air Quality",
|
name="Air Quality",
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
|
||||||
value_fn=lambda device: device.details["air_quality"],
|
value_fn=lambda device: device.details["air_quality"],
|
||||||
exists_fn=lambda device: sku_supported(device, AIR_QUALITY_SUPPORTED),
|
exists_fn=lambda device: sku_supported(device, AIR_QUALITY_SUPPORTED),
|
||||||
),
|
),
|
||||||
|
@ -94,20 +94,23 @@ def get_device_entities(
|
|||||||
# If the value ID returns as None, we don't need to include this entity
|
# If the value ID returns as None, we don't need to include this entity
|
||||||
if (value_id := get_value_id_from_unique_id(entry.unique_id)) is None:
|
if (value_id := get_value_id_from_unique_id(entry.unique_id)) is None:
|
||||||
continue
|
continue
|
||||||
state_key = get_state_key_from_unique_id(entry.unique_id)
|
|
||||||
|
|
||||||
zwave_value = node.values[value_id]
|
primary_value_data = None
|
||||||
primary_value_data = {
|
if (zwave_value := node.values.get(value_id)) is not None:
|
||||||
"command_class": zwave_value.command_class,
|
primary_value_data = {
|
||||||
"command_class_name": zwave_value.command_class_name,
|
"command_class": zwave_value.command_class,
|
||||||
"endpoint": zwave_value.endpoint,
|
"command_class_name": zwave_value.command_class_name,
|
||||||
"property": zwave_value.property_,
|
"endpoint": zwave_value.endpoint,
|
||||||
"property_name": zwave_value.property_name,
|
"property": zwave_value.property_,
|
||||||
"property_key": zwave_value.property_key,
|
"property_name": zwave_value.property_name,
|
||||||
"property_key_name": zwave_value.property_key_name,
|
"property_key": zwave_value.property_key,
|
||||||
}
|
"property_key_name": zwave_value.property_key_name,
|
||||||
if state_key is not None:
|
}
|
||||||
primary_value_data["state_key"] = state_key
|
|
||||||
|
state_key = get_state_key_from_unique_id(entry.unique_id)
|
||||||
|
if state_key is not None:
|
||||||
|
primary_value_data["state_key"] = state_key
|
||||||
|
|
||||||
entity = {
|
entity = {
|
||||||
"domain": entry.domain,
|
"domain": entry.domain,
|
||||||
"entity_id": entry.entity_id,
|
"entity_id": entry.entity_id,
|
||||||
|
@ -7,7 +7,7 @@ from .backports.enum import StrEnum
|
|||||||
|
|
||||||
MAJOR_VERSION: Final = 2022
|
MAJOR_VERSION: Final = 2022
|
||||||
MINOR_VERSION: Final = 7
|
MINOR_VERSION: Final = 7
|
||||||
PATCH_VERSION: Final = "2"
|
PATCH_VERSION: Final = "3"
|
||||||
__short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
__short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
||||||
__version__: Final = f"{__short_version__}.{PATCH_VERSION}"
|
__version__: Final = f"{__short_version__}.{PATCH_VERSION}"
|
||||||
REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 9, 0)
|
REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 9, 0)
|
||||||
|
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "homeassistant"
|
name = "homeassistant"
|
||||||
version = "2022.7.2"
|
version = "2022.7.3"
|
||||||
license = {text = "Apache-2.0"}
|
license = {text = "Apache-2.0"}
|
||||||
description = "Open-source home automation platform running on Python 3."
|
description = "Open-source home automation platform running on Python 3."
|
||||||
readme = "README.rst"
|
readme = "README.rst"
|
||||||
|
@ -89,7 +89,7 @@ adguardhome==0.5.1
|
|||||||
advantage_air==0.3.1
|
advantage_air==0.3.1
|
||||||
|
|
||||||
# homeassistant.components.frontier_silicon
|
# homeassistant.components.frontier_silicon
|
||||||
afsapi==0.2.4
|
afsapi==0.2.5
|
||||||
|
|
||||||
# homeassistant.components.agent_dvr
|
# homeassistant.components.agent_dvr
|
||||||
agent-py==0.0.23
|
agent-py==0.0.23
|
||||||
@ -229,7 +229,7 @@ aiopvpc==3.0.0
|
|||||||
aiopyarr==22.6.0
|
aiopyarr==22.6.0
|
||||||
|
|
||||||
# homeassistant.components.qnap_qsw
|
# homeassistant.components.qnap_qsw
|
||||||
aioqsw==0.1.0
|
aioqsw==0.1.1
|
||||||
|
|
||||||
# homeassistant.components.recollect_waste
|
# homeassistant.components.recollect_waste
|
||||||
aiorecollect==1.0.8
|
aiorecollect==1.0.8
|
||||||
@ -1323,7 +1323,7 @@ py-zabbix==1.1.7
|
|||||||
py17track==2021.12.2
|
py17track==2021.12.2
|
||||||
|
|
||||||
# homeassistant.components.hdmi_cec
|
# homeassistant.components.hdmi_cec
|
||||||
pyCEC==0.5.1
|
pyCEC==0.5.2
|
||||||
|
|
||||||
# homeassistant.components.control4
|
# homeassistant.components.control4
|
||||||
pyControl4==0.0.6
|
pyControl4==0.0.6
|
||||||
@ -1444,7 +1444,7 @@ pydaikin==2.7.0
|
|||||||
pydanfossair==0.1.0
|
pydanfossair==0.1.0
|
||||||
|
|
||||||
# homeassistant.components.deconz
|
# homeassistant.components.deconz
|
||||||
pydeconz==97
|
pydeconz==98
|
||||||
|
|
||||||
# homeassistant.components.delijn
|
# homeassistant.components.delijn
|
||||||
pydelijn==1.0.0
|
pydelijn==1.0.0
|
||||||
@ -1489,7 +1489,7 @@ pyeverlights==0.1.0
|
|||||||
pyevilgenius==2.0.0
|
pyevilgenius==2.0.0
|
||||||
|
|
||||||
# homeassistant.components.ezviz
|
# homeassistant.components.ezviz
|
||||||
pyezviz==0.2.0.8
|
pyezviz==0.2.0.9
|
||||||
|
|
||||||
# homeassistant.components.fido
|
# homeassistant.components.fido
|
||||||
pyfido==2.1.1
|
pyfido==2.1.1
|
||||||
@ -1640,7 +1640,7 @@ pymailgunner==1.4
|
|||||||
pymata-express==1.19
|
pymata-express==1.19
|
||||||
|
|
||||||
# homeassistant.components.mazda
|
# homeassistant.components.mazda
|
||||||
pymazda==0.3.3
|
pymazda==0.3.6
|
||||||
|
|
||||||
# homeassistant.components.mediaroom
|
# homeassistant.components.mediaroom
|
||||||
pymediaroom==0.6.5.4
|
pymediaroom==0.6.5.4
|
||||||
@ -1835,7 +1835,7 @@ pysmartthings==0.7.6
|
|||||||
pysmarty==0.8
|
pysmarty==0.8
|
||||||
|
|
||||||
# homeassistant.components.edl21
|
# homeassistant.components.edl21
|
||||||
pysml==0.0.7
|
pysml==0.0.8
|
||||||
|
|
||||||
# homeassistant.components.snmp
|
# homeassistant.components.snmp
|
||||||
pysnmplib==5.0.15
|
pysnmplib==5.0.15
|
||||||
@ -1895,7 +1895,7 @@ python-family-hub-local==0.0.2
|
|||||||
python-forecastio==1.4.0
|
python-forecastio==1.4.0
|
||||||
|
|
||||||
# homeassistant.components.sms
|
# homeassistant.components.sms
|
||||||
# python-gammu==3.2.3
|
# python-gammu==3.2.4
|
||||||
|
|
||||||
# homeassistant.components.gc100
|
# homeassistant.components.gc100
|
||||||
python-gc100==1.0.3a0
|
python-gc100==1.0.3a0
|
||||||
@ -2065,7 +2065,7 @@ raincloudy==0.0.7
|
|||||||
raspyrfm-client==1.2.8
|
raspyrfm-client==1.2.8
|
||||||
|
|
||||||
# homeassistant.components.rainmachine
|
# homeassistant.components.rainmachine
|
||||||
regenmaschine==2022.07.0
|
regenmaschine==2022.07.1
|
||||||
|
|
||||||
# homeassistant.components.renault
|
# homeassistant.components.renault
|
||||||
renault-api==0.1.11
|
renault-api==0.1.11
|
||||||
@ -2092,7 +2092,7 @@ rjpl==0.3.6
|
|||||||
rocketchat-API==0.6.1
|
rocketchat-API==0.6.1
|
||||||
|
|
||||||
# homeassistant.components.roku
|
# homeassistant.components.roku
|
||||||
rokuecp==0.16.0
|
rokuecp==0.17.0
|
||||||
|
|
||||||
# homeassistant.components.roomba
|
# homeassistant.components.roomba
|
||||||
roombapy==1.6.5
|
roombapy==1.6.5
|
||||||
@ -2268,7 +2268,7 @@ swisshydrodata==0.1.0
|
|||||||
synology-srm==0.2.0
|
synology-srm==0.2.0
|
||||||
|
|
||||||
# homeassistant.components.system_bridge
|
# homeassistant.components.system_bridge
|
||||||
systembridgeconnector==3.1.5
|
systembridgeconnector==3.3.2
|
||||||
|
|
||||||
# homeassistant.components.tailscale
|
# homeassistant.components.tailscale
|
||||||
tailscale==0.2.0
|
tailscale==0.2.0
|
||||||
|
@ -198,7 +198,7 @@ aiopvpc==3.0.0
|
|||||||
aiopyarr==22.6.0
|
aiopyarr==22.6.0
|
||||||
|
|
||||||
# homeassistant.components.qnap_qsw
|
# homeassistant.components.qnap_qsw
|
||||||
aioqsw==0.1.0
|
aioqsw==0.1.1
|
||||||
|
|
||||||
# homeassistant.components.recollect_waste
|
# homeassistant.components.recollect_waste
|
||||||
aiorecollect==1.0.8
|
aiorecollect==1.0.8
|
||||||
@ -974,7 +974,7 @@ pycoolmasternet-async==0.1.2
|
|||||||
pydaikin==2.7.0
|
pydaikin==2.7.0
|
||||||
|
|
||||||
# homeassistant.components.deconz
|
# homeassistant.components.deconz
|
||||||
pydeconz==97
|
pydeconz==98
|
||||||
|
|
||||||
# homeassistant.components.dexcom
|
# homeassistant.components.dexcom
|
||||||
pydexcom==0.2.3
|
pydexcom==0.2.3
|
||||||
@ -995,7 +995,7 @@ pyeverlights==0.1.0
|
|||||||
pyevilgenius==2.0.0
|
pyevilgenius==2.0.0
|
||||||
|
|
||||||
# homeassistant.components.ezviz
|
# homeassistant.components.ezviz
|
||||||
pyezviz==0.2.0.8
|
pyezviz==0.2.0.9
|
||||||
|
|
||||||
# homeassistant.components.fido
|
# homeassistant.components.fido
|
||||||
pyfido==2.1.1
|
pyfido==2.1.1
|
||||||
@ -1113,7 +1113,7 @@ pymailgunner==1.4
|
|||||||
pymata-express==1.19
|
pymata-express==1.19
|
||||||
|
|
||||||
# homeassistant.components.mazda
|
# homeassistant.components.mazda
|
||||||
pymazda==0.3.3
|
pymazda==0.3.6
|
||||||
|
|
||||||
# homeassistant.components.melcloud
|
# homeassistant.components.melcloud
|
||||||
pymelcloud==2.5.6
|
pymelcloud==2.5.6
|
||||||
@ -1376,7 +1376,7 @@ radios==0.1.1
|
|||||||
radiotherm==2.1.0
|
radiotherm==2.1.0
|
||||||
|
|
||||||
# homeassistant.components.rainmachine
|
# homeassistant.components.rainmachine
|
||||||
regenmaschine==2022.07.0
|
regenmaschine==2022.07.1
|
||||||
|
|
||||||
# homeassistant.components.renault
|
# homeassistant.components.renault
|
||||||
renault-api==0.1.11
|
renault-api==0.1.11
|
||||||
@ -1391,7 +1391,7 @@ rflink==0.0.63
|
|||||||
ring_doorbell==0.7.2
|
ring_doorbell==0.7.2
|
||||||
|
|
||||||
# homeassistant.components.roku
|
# homeassistant.components.roku
|
||||||
rokuecp==0.16.0
|
rokuecp==0.17.0
|
||||||
|
|
||||||
# homeassistant.components.roomba
|
# homeassistant.components.roomba
|
||||||
roombapy==1.6.5
|
roombapy==1.6.5
|
||||||
@ -1513,7 +1513,7 @@ sunwatcher==0.2.1
|
|||||||
surepy==0.7.2
|
surepy==0.7.2
|
||||||
|
|
||||||
# homeassistant.components.system_bridge
|
# homeassistant.components.system_bridge
|
||||||
systembridgeconnector==3.1.5
|
systembridgeconnector==3.3.2
|
||||||
|
|
||||||
# homeassistant.components.tailscale
|
# homeassistant.components.tailscale
|
||||||
tailscale==0.2.0
|
tailscale==0.2.0
|
||||||
|
@ -10,8 +10,12 @@ from homeassistant.components.zwave_js.diagnostics import (
|
|||||||
async_get_device_diagnostics,
|
async_get_device_diagnostics,
|
||||||
)
|
)
|
||||||
from homeassistant.components.zwave_js.discovery import async_discover_node_values
|
from homeassistant.components.zwave_js.discovery import async_discover_node_values
|
||||||
from homeassistant.components.zwave_js.helpers import get_device_id
|
from homeassistant.components.zwave_js.helpers import (
|
||||||
from homeassistant.helpers.device_registry import async_get
|
get_device_id,
|
||||||
|
get_value_id_from_unique_id,
|
||||||
|
)
|
||||||
|
from homeassistant.helpers.device_registry import async_get as async_get_dev_reg
|
||||||
|
from homeassistant.helpers.entity_registry import async_get as async_get_ent_reg
|
||||||
|
|
||||||
from .common import PROPERTY_ULTRAVIOLET
|
from .common import PROPERTY_ULTRAVIOLET
|
||||||
|
|
||||||
@ -53,7 +57,7 @@ async def test_device_diagnostics(
|
|||||||
version_state,
|
version_state,
|
||||||
):
|
):
|
||||||
"""Test the device level diagnostics data dump."""
|
"""Test the device level diagnostics data dump."""
|
||||||
dev_reg = async_get(hass)
|
dev_reg = async_get_dev_reg(hass)
|
||||||
device = dev_reg.async_get_device({get_device_id(client.driver, multisensor_6)})
|
device = dev_reg.async_get_device({get_device_id(client.driver, multisensor_6)})
|
||||||
assert device
|
assert device
|
||||||
|
|
||||||
@ -106,7 +110,7 @@ async def test_device_diagnostics(
|
|||||||
|
|
||||||
async def test_device_diagnostics_error(hass, integration):
|
async def test_device_diagnostics_error(hass, integration):
|
||||||
"""Test the device diagnostics raises exception when an invalid device is used."""
|
"""Test the device diagnostics raises exception when an invalid device is used."""
|
||||||
dev_reg = async_get(hass)
|
dev_reg = async_get_dev_reg(hass)
|
||||||
device = dev_reg.async_get_or_create(
|
device = dev_reg.async_get_or_create(
|
||||||
config_entry_id=integration.entry_id, identifiers={("test", "test")}
|
config_entry_id=integration.entry_id, identifiers={("test", "test")}
|
||||||
)
|
)
|
||||||
@ -118,3 +122,71 @@ async def test_empty_zwave_value_matcher():
|
|||||||
"""Test empty ZwaveValueMatcher is invalid."""
|
"""Test empty ZwaveValueMatcher is invalid."""
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
ZwaveValueMatcher()
|
ZwaveValueMatcher()
|
||||||
|
|
||||||
|
|
||||||
|
async def test_device_diagnostics_missing_primary_value(
|
||||||
|
hass,
|
||||||
|
client,
|
||||||
|
multisensor_6,
|
||||||
|
integration,
|
||||||
|
hass_client,
|
||||||
|
):
|
||||||
|
"""Test that the device diagnostics handles an entity with a missing primary value."""
|
||||||
|
dev_reg = async_get_dev_reg(hass)
|
||||||
|
device = dev_reg.async_get_device({get_device_id(client.driver, multisensor_6)})
|
||||||
|
assert device
|
||||||
|
|
||||||
|
entity_id = "sensor.multisensor_6_air_temperature"
|
||||||
|
ent_reg = async_get_ent_reg(hass)
|
||||||
|
entry = ent_reg.async_get(entity_id)
|
||||||
|
|
||||||
|
# check that the primary value for the entity exists in the diagnostics
|
||||||
|
diagnostics_data = await get_diagnostics_for_device(
|
||||||
|
hass, hass_client, integration, device
|
||||||
|
)
|
||||||
|
|
||||||
|
value = multisensor_6.values.get(get_value_id_from_unique_id(entry.unique_id))
|
||||||
|
assert value
|
||||||
|
|
||||||
|
air_entity = next(
|
||||||
|
x for x in diagnostics_data["entities"] if x["entity_id"] == entity_id
|
||||||
|
)
|
||||||
|
|
||||||
|
assert air_entity["primary_value"] == {
|
||||||
|
"command_class": value.command_class,
|
||||||
|
"command_class_name": value.command_class_name,
|
||||||
|
"endpoint": value.endpoint,
|
||||||
|
"property": value.property_,
|
||||||
|
"property_name": value.property_name,
|
||||||
|
"property_key": value.property_key,
|
||||||
|
"property_key_name": value.property_key_name,
|
||||||
|
}
|
||||||
|
|
||||||
|
# make the entity's primary value go missing
|
||||||
|
event = Event(
|
||||||
|
type="value removed",
|
||||||
|
data={
|
||||||
|
"source": "node",
|
||||||
|
"event": "value removed",
|
||||||
|
"nodeId": multisensor_6.node_id,
|
||||||
|
"args": {
|
||||||
|
"commandClassName": value.command_class_name,
|
||||||
|
"commandClass": value.command_class,
|
||||||
|
"endpoint": value.endpoint,
|
||||||
|
"property": value.property_,
|
||||||
|
"prevValue": 0,
|
||||||
|
"propertyName": value.property_name,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
)
|
||||||
|
multisensor_6.receive_event(event)
|
||||||
|
|
||||||
|
diagnostics_data = await get_diagnostics_for_device(
|
||||||
|
hass, hass_client, integration, device
|
||||||
|
)
|
||||||
|
|
||||||
|
air_entity = next(
|
||||||
|
x for x in diagnostics_data["entities"] if x["entity_id"] == entity_id
|
||||||
|
)
|
||||||
|
|
||||||
|
assert air_entity["primary_value"] is None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user