Add frequency sensors to Nibe (#89072)

* added frequency (for compressors etc)

---------

Co-authored-by: Joakim Plate <elupus@ecce.se>
This commit is contained in:
janmolemans 2023-07-31 22:23:32 +02:00 committed by GitHub
parent a8a3b6778e
commit f0640fc057
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,7 @@ from homeassistant.const import (
UnitOfElectricCurrent, UnitOfElectricCurrent,
UnitOfElectricPotential, UnitOfElectricPotential,
UnitOfEnergy, UnitOfEnergy,
UnitOfFrequency,
UnitOfPower, UnitOfPower,
UnitOfTemperature, UnitOfTemperature,
UnitOfTime, UnitOfTime,
@ -110,6 +111,13 @@ UNIT_DESCRIPTIONS = {
state_class=SensorStateClass.TOTAL_INCREASING, state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfTime.HOURS, native_unit_of_measurement=UnitOfTime.HOURS,
), ),
"Hz": SensorEntityDescription(
key="Hz",
entity_category=EntityCategory.DIAGNOSTIC,
device_class=SensorDeviceClass.FREQUENCY,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UnitOfFrequency.HERTZ,
),
} }