mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Use device class naming for sfr box (#96092)
This commit is contained in:
parent
e9f76ed3d3
commit
fe6402ef73
@ -67,7 +67,6 @@ BUTTON_TYPES: tuple[SFRBoxButtonEntityDescription, ...] = (
|
|||||||
device_class=ButtonDeviceClass.RESTART,
|
device_class=ButtonDeviceClass.RESTART,
|
||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
key="system_reboot",
|
key="system_reboot",
|
||||||
translation_key="reboot",
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -180,7 +180,6 @@ SYSTEM_SENSOR_TYPES: tuple[SFRBoxSensorEntityDescription[SystemInfo], ...] = (
|
|||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
native_unit_of_measurement=UnitOfElectricPotential.MILLIVOLT,
|
native_unit_of_measurement=UnitOfElectricPotential.MILLIVOLT,
|
||||||
translation_key="voltage",
|
|
||||||
value_fn=lambda x: x.alimvoltage,
|
value_fn=lambda x: x.alimvoltage,
|
||||||
),
|
),
|
||||||
SFRBoxSensorEntityDescription[SystemInfo](
|
SFRBoxSensorEntityDescription[SystemInfo](
|
||||||
@ -189,7 +188,6 @@ SYSTEM_SENSOR_TYPES: tuple[SFRBoxSensorEntityDescription[SystemInfo], ...] = (
|
|||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||||
translation_key="temperature",
|
|
||||||
value_fn=lambda x: x.temperature / 1000,
|
value_fn=lambda x: x.temperature / 1000,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -42,11 +42,6 @@
|
|||||||
"name": "WAN status"
|
"name": "WAN status"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"button": {
|
|
||||||
"reboot": {
|
|
||||||
"name": "[%key:component::button::entity_component::restart::name%]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sensor": {
|
"sensor": {
|
||||||
"dsl_attenuation_down": {
|
"dsl_attenuation_down": {
|
||||||
"name": "DSL attenuation down"
|
"name": "DSL attenuation down"
|
||||||
@ -110,12 +105,6 @@
|
|||||||
"unknown": "Unknown"
|
"unknown": "Unknown"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"temperature": {
|
|
||||||
"name": "[%key:component::sensor::entity_component::temperature::name%]"
|
|
||||||
},
|
|
||||||
"voltage": {
|
|
||||||
"name": "[%key:component::sensor::entity_component::voltage::name%]"
|
|
||||||
},
|
|
||||||
"wan_mode": {
|
"wan_mode": {
|
||||||
"name": "WAN mode",
|
"name": "WAN mode",
|
||||||
"state": {
|
"state": {
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
'original_name': 'Restart',
|
'original_name': 'Restart',
|
||||||
'platform': 'sfr_box',
|
'platform': 'sfr_box',
|
||||||
'supported_features': 0,
|
'supported_features': 0,
|
||||||
'translation_key': 'reboot',
|
'translation_key': None,
|
||||||
'unique_id': 'e4:5d:51:00:11:22_system_reboot',
|
'unique_id': 'e4:5d:51:00:11:22_system_reboot',
|
||||||
'unit_of_measurement': None,
|
'unit_of_measurement': None,
|
||||||
}),
|
}),
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
'original_name': 'Voltage',
|
'original_name': 'Voltage',
|
||||||
'platform': 'sfr_box',
|
'platform': 'sfr_box',
|
||||||
'supported_features': 0,
|
'supported_features': 0,
|
||||||
'translation_key': 'voltage',
|
'translation_key': None,
|
||||||
'unique_id': 'e4:5d:51:00:11:22_system_alimvoltage',
|
'unique_id': 'e4:5d:51:00:11:22_system_alimvoltage',
|
||||||
'unit_of_measurement': <UnitOfElectricPotential.MILLIVOLT: 'mV'>,
|
'unit_of_measurement': <UnitOfElectricPotential.MILLIVOLT: 'mV'>,
|
||||||
}),
|
}),
|
||||||
@ -117,7 +117,7 @@
|
|||||||
'original_name': 'Temperature',
|
'original_name': 'Temperature',
|
||||||
'platform': 'sfr_box',
|
'platform': 'sfr_box',
|
||||||
'supported_features': 0,
|
'supported_features': 0,
|
||||||
'translation_key': 'temperature',
|
'translation_key': None,
|
||||||
'unique_id': 'e4:5d:51:00:11:22_system_temperature',
|
'unique_id': 'e4:5d:51:00:11:22_system_temperature',
|
||||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||||
}),
|
}),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user