mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Fix incorrect signal strength device class usage in Rituals Genie (#84376)
Fix incorrect signal strength device class usage in Rituals Perfume Genie
This commit is contained in:
parent
df58b5d9bd
commit
2bd1a68559
@ -106,7 +106,6 @@ class DiffuserBatterySensor(DiffuserEntity, SensorEntity):
|
||||
class DiffuserWifiSensor(DiffuserEntity, SensorEntity):
|
||||
"""Representation of a diffuser wifi sensor."""
|
||||
|
||||
_attr_device_class = SensorDeviceClass.SIGNAL_STRENGTH
|
||||
_attr_native_unit_of_measurement = PERCENTAGE
|
||||
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
||||
|
||||
|
@ -64,7 +64,7 @@ async def test_sensors_diffuser_v1_battery_cartridge(hass: HomeAssistant) -> Non
|
||||
state = hass.states.get("sensor.genie_wifi")
|
||||
assert state
|
||||
assert state.state == str(diffuser.wifi_percentage)
|
||||
assert state.attributes.get(ATTR_DEVICE_CLASS) == SensorDeviceClass.SIGNAL_STRENGTH
|
||||
assert state.attributes.get(ATTR_DEVICE_CLASS) is None
|
||||
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == PERCENTAGE
|
||||
|
||||
entry = registry.async_get("sensor.genie_wifi")
|
||||
|
Loading…
x
Reference in New Issue
Block a user