Use device class naming for sfr box (#96092)

This commit is contained in:
Joost Lekkerkerker 2023-07-11 20:19:04 +02:00 committed by GitHub
parent e9f76ed3d3
commit fe6402ef73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 17 deletions

View file

@ -67,7 +67,6 @@ BUTTON_TYPES: tuple[SFRBoxButtonEntityDescription, ...] = (
device_class=ButtonDeviceClass.RESTART,
entity_category=EntityCategory.CONFIG,
key="system_reboot",
translation_key="reboot",
),
)

View file

@ -180,7 +180,6 @@ SYSTEM_SENSOR_TYPES: tuple[SFRBoxSensorEntityDescription[SystemInfo], ...] = (
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
native_unit_of_measurement=UnitOfElectricPotential.MILLIVOLT,
translation_key="voltage",
value_fn=lambda x: x.alimvoltage,
),
SFRBoxSensorEntityDescription[SystemInfo](
@ -189,7 +188,6 @@ SYSTEM_SENSOR_TYPES: tuple[SFRBoxSensorEntityDescription[SystemInfo], ...] = (
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
translation_key="temperature",
value_fn=lambda x: x.temperature / 1000,
),
)

View file

@ -42,11 +42,6 @@
"name": "WAN status"
}
},
"button": {
"reboot": {
"name": "[%key:component::button::entity_component::restart::name%]"
}
},
"sensor": {
"dsl_attenuation_down": {
"name": "DSL attenuation down"
@ -110,12 +105,6 @@
"unknown": "Unknown"
}
},
"temperature": {
"name": "[%key:component::sensor::entity_component::temperature::name%]"
},
"voltage": {
"name": "[%key:component::sensor::entity_component::voltage::name%]"
},
"wan_mode": {
"name": "WAN mode",
"state": {

View file

@ -54,7 +54,7 @@
'original_name': 'Restart',
'platform': 'sfr_box',
'supported_features': 0,
'translation_key': 'reboot',
'translation_key': None,
'unique_id': 'e4:5d:51:00:11:22_system_reboot',
'unit_of_measurement': None,
}),

View file

@ -89,7 +89,7 @@
'original_name': 'Voltage',
'platform': 'sfr_box',
'supported_features': 0,
'translation_key': 'voltage',
'translation_key': None,
'unique_id': 'e4:5d:51:00:11:22_system_alimvoltage',
'unit_of_measurement': <UnitOfElectricPotential.MILLIVOLT: 'mV'>,
}),
@ -117,7 +117,7 @@
'original_name': 'Temperature',
'platform': 'sfr_box',
'supported_features': 0,
'translation_key': 'temperature',
'translation_key': None,
'unique_id': 'e4:5d:51:00:11:22_system_temperature',
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
}),