diff --git a/homeassistant/components/myuplink/icons.json b/homeassistant/components/myuplink/icons.json index 580b83b1b15..4b96a1a3381 100644 --- a/homeassistant/components/myuplink/icons.json +++ b/homeassistant/components/myuplink/icons.json @@ -26,6 +26,9 @@ "priority": { "default": "mdi:priority-high" }, + "rpm": { + "default": "mdi:rotate-right" + }, "status_compressor": { "default": "mdi:heat-pump-outline" } diff --git a/homeassistant/components/myuplink/sensor.py b/homeassistant/components/myuplink/sensor.py index 45a4590a843..9d23584f389 100644 --- a/homeassistant/components/myuplink/sensor.py +++ b/homeassistant/components/myuplink/sensor.py @@ -10,6 +10,7 @@ from homeassistant.components.sensor import ( ) from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( + REVOLUTIONS_PER_MINUTE, Platform, UnitOfElectricCurrent, UnitOfEnergy, @@ -54,6 +55,13 @@ DEVICE_POINT_UNIT_DESCRIPTIONS: dict[str, SensorEntityDescription] = { state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfPressure.BAR, ), + "days": SensorEntityDescription( + key="days", + device_class=SensorDeviceClass.DURATION, + state_class=SensorStateClass.MEASUREMENT, + native_unit_of_measurement=UnitOfTime.DAYS, + suggested_display_precision=0, + ), "h": SensorEntityDescription( key="hours", device_class=SensorDeviceClass.DURATION, @@ -61,6 +69,13 @@ DEVICE_POINT_UNIT_DESCRIPTIONS: dict[str, SensorEntityDescription] = { native_unit_of_measurement=UnitOfTime.HOURS, suggested_display_precision=1, ), + "hrs": SensorEntityDescription( + key="hours_hrs", + device_class=SensorDeviceClass.DURATION, + state_class=SensorStateClass.MEASUREMENT, + native_unit_of_measurement=UnitOfTime.HOURS, + suggested_display_precision=1, + ), "Hz": SensorEntityDescription( key="hertz", device_class=SensorDeviceClass.FREQUENCY, @@ -86,6 +101,27 @@ DEVICE_POINT_UNIT_DESCRIPTIONS: dict[str, SensorEntityDescription] = { state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR, ), + "min": SensorEntityDescription( + key="minutes", + device_class=SensorDeviceClass.DURATION, + state_class=SensorStateClass.MEASUREMENT, + native_unit_of_measurement=UnitOfTime.MINUTES, + suggested_display_precision=0, + ), + "Pa": SensorEntityDescription( + key="pressure_pa", + device_class=SensorDeviceClass.PRESSURE, + state_class=SensorStateClass.MEASUREMENT, + native_unit_of_measurement=UnitOfPressure.PA, + suggested_display_precision=0, + ), + "rpm": SensorEntityDescription( + key="rpm", + translation_key="rpm", + state_class=SensorStateClass.MEASUREMENT, + native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, + suggested_display_precision=0, + ), "s": SensorEntityDescription( key="seconds", device_class=SensorDeviceClass.DURATION, @@ -93,6 +129,13 @@ DEVICE_POINT_UNIT_DESCRIPTIONS: dict[str, SensorEntityDescription] = { native_unit_of_measurement=UnitOfTime.SECONDS, suggested_display_precision=0, ), + "sec": SensorEntityDescription( + key="seconds_sec", + device_class=SensorDeviceClass.DURATION, + state_class=SensorStateClass.MEASUREMENT, + native_unit_of_measurement=UnitOfTime.SECONDS, + suggested_display_precision=0, + ), } MARKER_FOR_UNKNOWN_VALUE = -32768