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": {}, "homekit": {},
"iot_class": "cloud_polling", "iot_class": "cloud_polling",
"requirements": [ "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, PERCENTAGE,
SIGNAL_STRENGTH_DECIBELS_MILLIWATT, SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
UnitOfTime, UnitOfTime,
UnitOfTemperature,
) )
from .const import DOMAIN from .const import DOMAIN
@@ -53,6 +54,14 @@ SENSORS: tuple[OwletSensorEntityDescription, ...] = (
element="oxygen_saturation", element="oxygen_saturation",
icon="mdi:leaf", 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( OwletSensorEntityDescription(
key="heartrate", key="heartrate",
name="Heart rate", name="Heart rate",
@@ -77,6 +86,14 @@ SENSORS: tuple[OwletSensorEntityDescription, ...] = (
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
element="signal_strength", 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", "heart_rate",
"battery_minutes", "battery_minutes",
"oxygen_saturation", "oxygen_saturation",
"skin_temperature",
"oxygen_10_av"
] ]
and self.sock.properties["charging"] and self.sock.properties["charging"]
): ):