mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Add icons to One-Time Password (OTP) (#120066)
This commit is contained in:
parent
d2a5683fa0
commit
818750dfd1
9
homeassistant/components/otp/icons.json
Normal file
9
homeassistant/components/otp/icons.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"token": {
|
||||||
|
"default": "mdi:lock-clock"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -69,7 +69,7 @@ async def async_setup_entry(
|
|||||||
class TOTPSensor(SensorEntity):
|
class TOTPSensor(SensorEntity):
|
||||||
"""Representation of a TOTP sensor."""
|
"""Representation of a TOTP sensor."""
|
||||||
|
|
||||||
_attr_icon = "mdi:update"
|
_attr_translation_key = "token"
|
||||||
_attr_should_poll = False
|
_attr_should_poll = False
|
||||||
_attr_native_value: StateType = None
|
_attr_native_value: StateType = None
|
||||||
_next_expiration: float | None = None
|
_next_expiration: float | None = None
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
StateSnapshot({
|
StateSnapshot({
|
||||||
'attributes': ReadOnlyDict({
|
'attributes': ReadOnlyDict({
|
||||||
'friendly_name': 'OTP Sensor',
|
'friendly_name': 'OTP Sensor',
|
||||||
'icon': 'mdi:update',
|
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
'entity_id': 'sensor.otp_sensor',
|
'entity_id': 'sensor.otp_sensor',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user