diff --git a/homeassistant/components/season/icons.json b/homeassistant/components/season/icons.json new file mode 100644 index 00000000000..160ab257338 --- /dev/null +++ b/homeassistant/components/season/icons.json @@ -0,0 +1,15 @@ +{ + "entity": { + "sensor": { + "season": { + "default": "mdi:cloud", + "state": { + "spring": "mdi:flower", + "summer": "mdi:sunglasses", + "autumn": "mdi:leaf", + "winter": "mdi:snowflake" + } + } + } + } +} diff --git a/homeassistant/components/season/sensor.py b/homeassistant/components/season/sensor.py index cfca3c1f9ea..aa0f6c80b19 100644 --- a/homeassistant/components/season/sensor.py +++ b/homeassistant/components/season/sensor.py @@ -32,13 +32,6 @@ HEMISPHERE_SEASON_SWAP = { STATE_SUMMER: STATE_WINTER, } -SEASON_ICONS = { - STATE_SPRING: "mdi:flower", - STATE_SUMMER: "mdi:sunglasses", - STATE_AUTUMN: "mdi:leaf", - STATE_WINTER: "mdi:snowflake", -} - async def async_setup_entry( hass: HomeAssistant, @@ -113,7 +106,3 @@ class SeasonSensorEntity(SensorEntity): self._attr_native_value = get_season( utcnow().replace(tzinfo=None), self.hemisphere, self.type ) - - self._attr_icon = "mdi:cloud" - if self._attr_native_value: - self._attr_icon = SEASON_ICONS[self._attr_native_value]