mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Bump bthome to 2.12.0 (#94822)
This commit is contained in:
parent
5834d70037
commit
13a217ad89
@ -20,5 +20,5 @@
|
|||||||
"dependencies": ["bluetooth_adapters"],
|
"dependencies": ["bluetooth_adapters"],
|
||||||
"documentation": "https://www.home-assistant.io/integrations/bthome",
|
"documentation": "https://www.home-assistant.io/integrations/bthome",
|
||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"requirements": ["bthome-ble==2.11.3"]
|
"requirements": ["bthome-ble==2.12.0"]
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,15 @@ from .coordinator import (
|
|||||||
from .device import device_key_to_bluetooth_entity_key
|
from .device import device_key_to_bluetooth_entity_key
|
||||||
|
|
||||||
SENSOR_DESCRIPTIONS = {
|
SENSOR_DESCRIPTIONS = {
|
||||||
|
# Acceleration (m/s²)
|
||||||
|
(
|
||||||
|
BTHomeSensorDeviceClass.ACCELERATION,
|
||||||
|
Units.ACCELERATION_METERS_PER_SQUARE_SECOND,
|
||||||
|
): SensorEntityDescription(
|
||||||
|
key=f"{BTHomeSensorDeviceClass.ACCELERATION}_{Units.ACCELERATION_METERS_PER_SQUARE_SECOND}",
|
||||||
|
native_unit_of_measurement=Units.ACCELERATION_METERS_PER_SQUARE_SECOND,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
),
|
||||||
# Battery (percent)
|
# Battery (percent)
|
||||||
(BTHomeSensorDeviceClass.BATTERY, Units.PERCENTAGE): SensorEntityDescription(
|
(BTHomeSensorDeviceClass.BATTERY, Units.PERCENTAGE): SensorEntityDescription(
|
||||||
key=f"{BTHomeSensorDeviceClass.BATTERY}_{Units.PERCENTAGE}",
|
key=f"{BTHomeSensorDeviceClass.BATTERY}_{Units.PERCENTAGE}",
|
||||||
@ -131,6 +140,15 @@ SENSOR_DESCRIPTIONS = {
|
|||||||
native_unit_of_measurement=UnitOfVolume.CUBIC_METERS,
|
native_unit_of_measurement=UnitOfVolume.CUBIC_METERS,
|
||||||
state_class=SensorStateClass.TOTAL,
|
state_class=SensorStateClass.TOTAL,
|
||||||
),
|
),
|
||||||
|
# Gyroscope (°/s)
|
||||||
|
(
|
||||||
|
BTHomeSensorDeviceClass.GYROSCOPE,
|
||||||
|
Units.GYROSCOPE_DEGREES_PER_SECOND,
|
||||||
|
): SensorEntityDescription(
|
||||||
|
key=f"{BTHomeSensorDeviceClass.GYROSCOPE}_{Units.GYROSCOPE_DEGREES_PER_SECOND}",
|
||||||
|
native_unit_of_measurement=Units.GYROSCOPE_DEGREES_PER_SECOND,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
),
|
||||||
# Humidity in (percent)
|
# Humidity in (percent)
|
||||||
(BTHomeSensorDeviceClass.HUMIDITY, Units.PERCENTAGE): SensorEntityDescription(
|
(BTHomeSensorDeviceClass.HUMIDITY, Units.PERCENTAGE): SensorEntityDescription(
|
||||||
key=f"{BTHomeSensorDeviceClass.HUMIDITY}_{Units.PERCENTAGE}",
|
key=f"{BTHomeSensorDeviceClass.HUMIDITY}_{Units.PERCENTAGE}",
|
||||||
@ -242,6 +260,15 @@ SENSOR_DESCRIPTIONS = {
|
|||||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
|
# Timestamp (datetime object)
|
||||||
|
(
|
||||||
|
BTHomeSensorDeviceClass.TIMESTAMP,
|
||||||
|
None,
|
||||||
|
): SensorEntityDescription(
|
||||||
|
key=f"{BTHomeSensorDeviceClass.TIMESTAMP}",
|
||||||
|
device_class=SensorDeviceClass.TIMESTAMP,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
),
|
||||||
# UV index (-)
|
# UV index (-)
|
||||||
(
|
(
|
||||||
BTHomeSensorDeviceClass.UV_INDEX,
|
BTHomeSensorDeviceClass.UV_INDEX,
|
||||||
|
@ -568,7 +568,7 @@ brunt==1.2.0
|
|||||||
bt-proximity==0.2.1
|
bt-proximity==0.2.1
|
||||||
|
|
||||||
# homeassistant.components.bthome
|
# homeassistant.components.bthome
|
||||||
bthome-ble==2.11.3
|
bthome-ble==2.12.0
|
||||||
|
|
||||||
# homeassistant.components.bt_home_hub_5
|
# homeassistant.components.bt_home_hub_5
|
||||||
bthomehub5-devicelist==0.1.1
|
bthomehub5-devicelist==0.1.1
|
||||||
|
@ -472,7 +472,7 @@ brottsplatskartan==0.0.1
|
|||||||
brunt==1.2.0
|
brunt==1.2.0
|
||||||
|
|
||||||
# homeassistant.components.bthome
|
# homeassistant.components.bthome
|
||||||
bthome-ble==2.11.3
|
bthome-ble==2.12.0
|
||||||
|
|
||||||
# homeassistant.components.buienradar
|
# homeassistant.components.buienradar
|
||||||
buienradar==1.0.5
|
buienradar==1.0.5
|
||||||
|
@ -858,6 +858,57 @@ async def test_v1_sensors(
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
"A4:C1:38:8D:18:B2",
|
||||||
|
make_bthome_v2_adv(
|
||||||
|
"A4:C1:38:8D:18:B2",
|
||||||
|
b"\x44\x50\x5D\x39\x61\x64",
|
||||||
|
),
|
||||||
|
None,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"sensor_entity": "sensor.test_device_18b2_timestamp",
|
||||||
|
"friendly_name": "Test Device 18B2 Timestamp",
|
||||||
|
"unit_of_measurement": "s",
|
||||||
|
"state_class": "measurement",
|
||||||
|
"expected_state": "2023-05-14T19:41:17+00:00",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"A4:C1:38:8D:18:B2",
|
||||||
|
make_bthome_v2_adv(
|
||||||
|
"A4:C1:38:8D:18:B2",
|
||||||
|
b"\x44\x51\x87\x56",
|
||||||
|
),
|
||||||
|
None,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"sensor_entity": "sensor.test_device_18b2_acceleration",
|
||||||
|
"friendly_name": "Test Device 18B2 Acceleration",
|
||||||
|
"unit_of_measurement": "m/s²",
|
||||||
|
"state_class": "measurement",
|
||||||
|
"expected_state": "22.151",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"A4:C1:38:8D:18:B2",
|
||||||
|
make_bthome_v2_adv(
|
||||||
|
"A4:C1:38:8D:18:B2",
|
||||||
|
b"\x44\x52\x87\x56",
|
||||||
|
),
|
||||||
|
None,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"sensor_entity": "sensor.test_device_18b2_gyroscope",
|
||||||
|
"friendly_name": "Test Device 18B2 Gyroscope",
|
||||||
|
"unit_of_measurement": "°/s",
|
||||||
|
"state_class": "measurement",
|
||||||
|
"expected_state": "22.151",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
),
|
||||||
(
|
(
|
||||||
"A4:C1:38:8D:18:B2",
|
"A4:C1:38:8D:18:B2",
|
||||||
make_bthome_v2_adv(
|
make_bthome_v2_adv(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user