Add icons to One-Time Password (OTP) (#120066)
parent
d2a5683fa0
commit
818750dfd1
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"token": {
|
||||
"default": "mdi:lock-clock"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -69,7 +69,7 @@ async def async_setup_entry(
|
|||
class TOTPSensor(SensorEntity):
|
||||
"""Representation of a TOTP sensor."""
|
||||
|
||||
_attr_icon = "mdi:update"
|
||||
_attr_translation_key = "token"
|
||||
_attr_should_poll = False
|
||||
_attr_native_value: StateType = None
|
||||
_next_expiration: float | None = None
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'OTP Sensor',
|
||||
'icon': 'mdi:update',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.otp_sensor',
|
||||
|
|
Loading…
Reference in New Issue