diff --git a/homeassistant/components/otp/icons.json b/homeassistant/components/otp/icons.json new file mode 100644 index 00000000000..1cab872e8f8 --- /dev/null +++ b/homeassistant/components/otp/icons.json @@ -0,0 +1,9 @@ +{ + "entity": { + "sensor": { + "token": { + "default": "mdi:lock-clock" + } + } + } +} diff --git a/homeassistant/components/otp/sensor.py b/homeassistant/components/otp/sensor.py index 0c87afb86b7..466fc994cdb 100644 --- a/homeassistant/components/otp/sensor.py +++ b/homeassistant/components/otp/sensor.py @@ -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 diff --git a/tests/components/otp/snapshots/test_sensor.ambr b/tests/components/otp/snapshots/test_sensor.ambr index fbd8741b8b5..5329b03ad9e 100644 --- a/tests/components/otp/snapshots/test_sensor.ambr +++ b/tests/components/otp/snapshots/test_sensor.ambr @@ -3,7 +3,6 @@ StateSnapshot({ 'attributes': ReadOnlyDict({ 'friendly_name': 'OTP Sensor', - 'icon': 'mdi:update', }), 'context': , 'entity_id': 'sensor.otp_sensor',