Skip to content

Commit

Permalink
Drop icon entirely
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed May 9, 2024
1 parent 315dc30 commit f1aa97d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
3 changes: 0 additions & 3 deletions zha/application/platforms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ class BaseEntity(LogMixin, EventBase):
_unique_id_suffix: str | None = None

_attr_name: str | None
_attr_icon: str | None
_attr_translation_key: str | None
_attr_entity_category: EntityCategory | None

Expand All @@ -138,8 +137,6 @@ def name(self) -> str | None:
@property
def icon(self) -> str | None:
"""Return the entity icon."""
if hasattr(self, "_attr_icon"):
return self._attr_icon
return None

@property
Expand Down
5 changes: 0 additions & 5 deletions zha/application/platforms/number/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,6 @@ def native_step(self) -> float | None:
"""Return the value step."""
return self._attr_native_step

@functools.cached_property
def icon(self) -> str | None:
"""Return the icon to be used for this entity."""
return self._attr_icon

@functools.cached_property
def native_unit_of_measurement(self) -> str | None:
"""Return the unit the value is expressed in."""
Expand Down
6 changes: 0 additions & 6 deletions zha/application/platforms/sensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,6 @@ class TimeLeft(Sensor):
_attribute_name = "timer_time_left"
_unique_id_suffix = "time_left"
_attr_device_class: SensorDeviceClass = SensorDeviceClass.DURATION
_attr_icon = "mdi:timer"
_attr_translation_key: str = "timer_time_left"
_attr_native_unit_of_measurement = UnitOfTime.MINUTES

Expand All @@ -1398,7 +1397,6 @@ class IkeaDeviceRunTime(Sensor):
_attribute_name = "device_run_time"
_unique_id_suffix = "device_run_time"
_attr_device_class: SensorDeviceClass = SensorDeviceClass.DURATION
_attr_icon = "mdi:timer"
_attr_translation_key: str = "device_run_time"
_attr_native_unit_of_measurement = UnitOfTime.MINUTES
_attr_entity_category: EntityCategory = EntityCategory.DIAGNOSTIC
Expand All @@ -1411,7 +1409,6 @@ class IkeaFilterRunTime(Sensor):
_attribute_name = "filter_run_time"
_unique_id_suffix = "filter_run_time"
_attr_device_class: SensorDeviceClass = SensorDeviceClass.DURATION
_attr_icon = "mdi:timer"
_attr_translation_key: str = "filter_run_time"
_attr_native_unit_of_measurement = UnitOfTime.MINUTES
_attr_entity_category: EntityCategory = EntityCategory.DIAGNOSTIC
Expand All @@ -1431,7 +1428,6 @@ class AqaraPetFeederLastFeedingSource(EnumSensor):
_attribute_name = "last_feeding_source"
_unique_id_suffix = "last_feeding_source"
_attr_translation_key: str = "last_feeding_source"
_attr_icon = "mdi:devices"
_enum = AqaraFeedingSource


Expand Down Expand Up @@ -1541,7 +1537,6 @@ class WindowCoveringTypeSensor(EnumSensor):
_unique_id_suffix: str = WindowCovering.AttributeDefs.window_covering_type.name
_attr_translation_key: str = WindowCovering.AttributeDefs.window_covering_type.name
_attr_entity_category = EntityCategory.DIAGNOSTIC
_attr_icon = "mdi:curtains"


@CONFIG_DIAGNOSTIC_MATCH(
Expand All @@ -1555,7 +1550,6 @@ class AqaraCurtainMotorPowerSourceSensor(EnumSensor):
_unique_id_suffix: str = Basic.AttributeDefs.power_source.name
_attr_translation_key: str = Basic.AttributeDefs.power_source.name
_attr_entity_category = EntityCategory.DIAGNOSTIC
_attr_icon = "mdi:battery-positive"


class AqaraE1HookState(types.enum8):
Expand Down

0 comments on commit f1aa97d

Please sign in to comment.