diff --git a/homeassistant/components/lastfm/icons.json b/homeassistant/components/lastfm/icons.json new file mode 100644 index 00000000000..fe453dc53c2 --- /dev/null +++ b/homeassistant/components/lastfm/icons.json @@ -0,0 +1,9 @@ +{ + "entity": { + "sensor": { + "lastfm": { + "default": "mdi:radio-fm" + } + } + } +} diff --git a/homeassistant/components/lastfm/sensor.py b/homeassistant/components/lastfm/sensor.py index 2b022a00107..045fac0c727 100644 --- a/homeassistant/components/lastfm/sensor.py +++ b/homeassistant/components/lastfm/sensor.py @@ -43,7 +43,7 @@ class LastFmSensor(CoordinatorEntity[LastFMDataUpdateCoordinator], SensorEntity) """A class for the Last.fm account.""" _attr_attribution = "Data provided by Last.fm" - _attr_icon = "mdi:radio-fm" + _attr_translation_key = "lastfm" _attr_has_entity_name = True _attr_name = None diff --git a/tests/components/lastfm/snapshots/test_sensor.ambr b/tests/components/lastfm/snapshots/test_sensor.ambr index 30ad40df428..33f9b7a56fa 100644 --- a/tests/components/lastfm/snapshots/test_sensor.ambr +++ b/tests/components/lastfm/snapshots/test_sensor.ambr @@ -5,7 +5,6 @@ 'attribution': 'Data provided by Last.fm', 'entity_picture': 'image', 'friendly_name': 'LastFM testaccount1', - 'icon': 'mdi:radio-fm', 'last_played': 'artist - title', 'play_count': 1, 'top_played': 'artist - title', @@ -23,7 +22,6 @@ 'attribution': 'Data provided by Last.fm', 'entity_picture': 'image', 'friendly_name': 'LastFM testaccount1', - 'icon': 'mdi:radio-fm', 'last_played': None, 'play_count': 0, 'top_played': None,