mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Update Switcher temperature sensor device class and state class (#143722)
* Update Switcher temperature sensor device class and state class * Remove temperature translation key * Remove icon
This commit is contained in:
parent
03bacd747e
commit
d8cb7c475b
@ -20,9 +20,6 @@
|
||||
},
|
||||
"auto_shutdown": {
|
||||
"default": "mdi:progress-clock"
|
||||
},
|
||||
"temperature": {
|
||||
"default": "mdi:thermometer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -21,7 +21,7 @@ from homeassistant.components.sensor import (
|
||||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import UnitOfElectricCurrent, UnitOfPower
|
||||
from homeassistant.const import UnitOfElectricCurrent, UnitOfPower, UnitOfTemperature
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
||||
@ -71,7 +71,9 @@ TIME_SENSORS: list[SwitcherSensorEntityDescription] = [
|
||||
TEMPERATURE_SENSORS: list[SwitcherSensorEntityDescription] = [
|
||||
SwitcherSensorEntityDescription(
|
||||
key="temperature",
|
||||
translation_key="temperature",
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
value_fn=lambda data: cast(SwitcherThermostatBase, data).temperature,
|
||||
),
|
||||
]
|
||||
|
@ -67,9 +67,6 @@
|
||||
},
|
||||
"auto_shutdown": {
|
||||
"name": "Auto shutdown"
|
||||
},
|
||||
"temperature": {
|
||||
"name": "Current temperature"
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
|
@ -32,7 +32,7 @@ DEVICE_SENSORS_TUPLE = (
|
||||
(
|
||||
DUMMY_THERMOSTAT_DEVICE,
|
||||
[
|
||||
("current_temperature", "temperature"),
|
||||
("temperature", "temperature"),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user