mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Add OSO Energy temperature sensors (#119301)
This commit is contained in:
parent
8d3e3faf02
commit
53d5a65f2c
@ -13,7 +13,12 @@ from homeassistant.components.sensor import (
|
||||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import UnitOfEnergy, UnitOfPower, UnitOfVolume
|
||||
from homeassistant.const import (
|
||||
UnitOfEnergy,
|
||||
UnitOfPower,
|
||||
UnitOfTemperature,
|
||||
UnitOfVolume,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.typing import StateType
|
||||
@ -101,6 +106,34 @@ SENSOR_TYPES: dict[str, OSOEnergySensorEntityDescription] = {
|
||||
native_unit_of_measurement=UnitOfVolume.LITERS,
|
||||
value_fn=lambda entity_data: entity_data.state,
|
||||
),
|
||||
"temperature_top": OSOEnergySensorEntityDescription(
|
||||
key="temperature_top",
|
||||
translation_key="temperature_top",
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
value_fn=lambda entity_data: entity_data.state,
|
||||
),
|
||||
"temperature_mid": OSOEnergySensorEntityDescription(
|
||||
key="temperature_mid",
|
||||
translation_key="temperature_mid",
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
value_fn=lambda entity_data: entity_data.state,
|
||||
),
|
||||
"temperature_low": OSOEnergySensorEntityDescription(
|
||||
key="temperature_low",
|
||||
translation_key="temperature_low",
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
value_fn=lambda entity_data: entity_data.state,
|
||||
),
|
||||
"temperature_one": OSOEnergySensorEntityDescription(
|
||||
key="temperature_one",
|
||||
translation_key="temperature_one",
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
value_fn=lambda entity_data: entity_data.state,
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
@ -77,6 +77,18 @@
|
||||
},
|
||||
"profile": {
|
||||
"name": "Profile local"
|
||||
},
|
||||
"temperature_top": {
|
||||
"name": "Temperature top"
|
||||
},
|
||||
"temperature_mid": {
|
||||
"name": "Temperature middle"
|
||||
},
|
||||
"temperature_low": {
|
||||
"name": "Temperature bottom"
|
||||
},
|
||||
"temperature_one": {
|
||||
"name": "Temperature one"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user