Use device class naming for sfr box (#96092)
This commit is contained in:
parent
e9f76ed3d3
commit
fe6402ef73
5 changed files with 3 additions and 17 deletions
|
@ -67,7 +67,6 @@ BUTTON_TYPES: tuple[SFRBoxButtonEntityDescription, ...] = (
|
|||
device_class=ButtonDeviceClass.RESTART,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
key="system_reboot",
|
||||
translation_key="reboot",
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
@ -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,
|
||||
),
|
||||
)
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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,
|
||||
}),
|
||||
|
|
|
@ -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'>,
|
||||
}),
|
||||
|
|
Loading…
Add table
Reference in a new issue