More properties added

More sock properties added as sensors
This commit is contained in:
RyanClark123
2023-05-11 17:05:57 +01:00
parent a5a8336006
commit 84aa88ae01
2 changed files with 21 additions and 2 deletions
+2 -2
View File
@@ -10,7 +10,7 @@
"homekit": {},
"iot_class": "cloud_polling",
"requirements": [
"pyowletapi==2023.5.17"
"pyowletapi==2023.5.18"
],
"version":"1.2.0"
"version":"1.3.0"
}
+19
View File
@@ -15,6 +15,7 @@ from homeassistant.const import (
PERCENTAGE,
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
UnitOfTime,
UnitOfTemperature,
)
from .const import DOMAIN
@@ -53,6 +54,14 @@ SENSORS: tuple[OwletSensorEntityDescription, ...] = (
element="oxygen_saturation",
icon="mdi:leaf",
),
OwletSensorEntityDescription(
key="oxygensaturation10a",
name="O2 Saturation 10 Minute Average",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
element="oxygen_10_av",
icon="mdi:leaf",
),
OwletSensorEntityDescription(
key="heartrate",
name="Heart rate",
@@ -77,6 +86,14 @@ SENSORS: tuple[OwletSensorEntityDescription, ...] = (
state_class=SensorStateClass.MEASUREMENT,
element="signal_strength",
),
OwletSensorEntityDescription(
key="skintemp",
name="Skin Temperature",
native_unit_of_measurement=UnitOfTemperature.CELCIUS,
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
element="skin_temperature",
),
)
@@ -119,6 +136,8 @@ class OwletSensor(OwletBaseEntity, SensorEntity):
"heart_rate",
"battery_minutes",
"oxygen_saturation",
"skin_temperature",
"oxygen_10_av"
]
and self.sock.properties["charging"]
):