Use device class naming for Switchbot (#96187)

This commit is contained in:
Joost Lekkerkerker 2023-07-16 00:36:13 +02:00 committed by GitHub
parent 30e05ab85e
commit 5d3039f21e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 16 deletions

View File

@ -41,7 +41,6 @@ BINARY_SENSOR_TYPES: dict[str, BinarySensorEntityDescription] = {
), ),
"is_light": BinarySensorEntityDescription( "is_light": BinarySensorEntityDescription(
key="is_light", key="is_light",
translation_key="light",
device_class=BinarySensorDeviceClass.LIGHT, device_class=BinarySensorDeviceClass.LIGHT,
), ),
"door_open": BinarySensorEntityDescription( "door_open": BinarySensorEntityDescription(

View File

@ -46,7 +46,6 @@ SENSOR_TYPES: dict[str, SensorEntityDescription] = {
), ),
"battery": SensorEntityDescription( "battery": SensorEntityDescription(
key="battery", key="battery",
translation_key="battery",
native_unit_of_measurement=PERCENTAGE, native_unit_of_measurement=PERCENTAGE,
device_class=SensorDeviceClass.BATTERY, device_class=SensorDeviceClass.BATTERY,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
@ -60,7 +59,6 @@ SENSOR_TYPES: dict[str, SensorEntityDescription] = {
), ),
"humidity": SensorEntityDescription( "humidity": SensorEntityDescription(
key="humidity", key="humidity",
translation_key="humidity",
native_unit_of_measurement=PERCENTAGE, native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.HUMIDITY, device_class=SensorDeviceClass.HUMIDITY,
@ -74,7 +72,6 @@ SENSOR_TYPES: dict[str, SensorEntityDescription] = {
), ),
"power": SensorEntityDescription( "power": SensorEntityDescription(
key="power", key="power",
translation_key="power",
native_unit_of_measurement=UnitOfPower.WATT, native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER, device_class=SensorDeviceClass.POWER,

View File

@ -67,9 +67,6 @@
"door_timeout": { "door_timeout": {
"name": "Timeout" "name": "Timeout"
}, },
"light": {
"name": "[%key:component::binary_sensor::entity_component::light::name%]"
},
"door_unclosed_alarm": { "door_unclosed_alarm": {
"name": "Unclosed alarm" "name": "Unclosed alarm"
}, },
@ -87,17 +84,8 @@
"wifi_signal": { "wifi_signal": {
"name": "Wi-Fi signal" "name": "Wi-Fi signal"
}, },
"battery": {
"name": "[%key:component::sensor::entity_component::battery::name%]"
},
"light_level": { "light_level": {
"name": "Light level" "name": "Light level"
},
"humidity": {
"name": "[%key:component::sensor::entity_component::humidity::name%]"
},
"power": {
"name": "[%key:component::sensor::entity_component::power::name%]"
} }
}, },
"cover": { "cover": {