Skip to content

Commit

Permalink
Drop all simple icons, HA already uses icon translations
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed May 9, 2024
1 parent 08408fc commit 315dc30
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 50 deletions.
1 change: 0 additions & 1 deletion zha/application/platforms/binary_sensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,5 +381,4 @@ class AqaraE1CurtainMotorOpenedByHandBinarySensor(BinarySensor):
_unique_id_suffix = "hand_open"
_attribute_name = "hand_open"
_attr_translation_key = "hand_open"
_attr_icon = "mdi:hand-wave"
_attr_entity_category = EntityCategory.DIAGNOSTIC
29 changes: 0 additions & 29 deletions zha/application/platforms/number/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ class NumberConfigurationEntity(PlatformEntity):
_attr_native_step: float = 1.0
_attr_multiplier: float = 1
_attribute_name: str
_attr_icon: str | None = None
_attr_mode: NumberMode = NumberMode.AUTO

@classmethod
Expand Down Expand Up @@ -473,7 +472,6 @@ class TimerDurationMinutes(NumberConfigurationEntity):

_unique_id_suffix = "timer_duration"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[14]
_attr_native_min_value: float = 0x00
_attr_native_max_value: float = 0x257
_attr_native_unit_of_measurement: str | None = UNITS[72]
Expand All @@ -487,7 +485,6 @@ class FilterLifeTime(NumberConfigurationEntity):

_unique_id_suffix = "filter_life_time"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[14]
_attr_native_min_value: float = 0x00
_attr_native_max_value: float = 0xFFFFFFFF
_attr_native_unit_of_measurement: str | None = UNITS[72]
Expand Down Expand Up @@ -516,7 +513,6 @@ class InovelliRemoteDimmingUpSpeed(NumberConfigurationEntity):

_unique_id_suffix = "dimming_speed_up_remote"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[3]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 126
_attribute_name = "dimming_speed_up_remote"
Expand All @@ -529,7 +525,6 @@ class InovelliButtonDelay(NumberConfigurationEntity):

_unique_id_suffix = "button_delay"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[3]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 9
_attribute_name = "button_delay"
Expand All @@ -542,7 +537,6 @@ class InovelliLocalDimmingUpSpeed(NumberConfigurationEntity):

_unique_id_suffix = "dimming_speed_up_local"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[3]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 127
_attribute_name = "dimming_speed_up_local"
Expand All @@ -555,7 +549,6 @@ class InovelliLocalRampRateOffToOn(NumberConfigurationEntity):

_unique_id_suffix = "ramp_rate_off_to_on_local"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[3]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 127
_attribute_name = "ramp_rate_off_to_on_local"
Expand All @@ -568,7 +561,6 @@ class InovelliRemoteDimmingSpeedOffToOn(NumberConfigurationEntity):

_unique_id_suffix = "ramp_rate_off_to_on_remote"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[3]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 127
_attribute_name = "ramp_rate_off_to_on_remote"
Expand All @@ -581,7 +573,6 @@ class InovelliRemoteDimmingDownSpeed(NumberConfigurationEntity):

_unique_id_suffix = "dimming_speed_down_remote"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[3]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 127
_attribute_name = "dimming_speed_down_remote"
Expand All @@ -594,7 +585,6 @@ class InovelliLocalDimmingDownSpeed(NumberConfigurationEntity):

_unique_id_suffix = "dimming_speed_down_local"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[3]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 127
_attribute_name = "dimming_speed_down_local"
Expand All @@ -607,7 +597,6 @@ class InovelliLocalRampRateOnToOff(NumberConfigurationEntity):

_unique_id_suffix = "ramp_rate_on_to_off_local"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[3]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 127
_attribute_name = "ramp_rate_on_to_off_local"
Expand All @@ -620,7 +609,6 @@ class InovelliRemoteDimmingSpeedOnToOff(NumberConfigurationEntity):

_unique_id_suffix = "ramp_rate_on_to_off_remote"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[3]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 127
_attribute_name = "ramp_rate_on_to_off_remote"
Expand All @@ -633,7 +621,6 @@ class InovelliMinimumLoadDimmingLevel(NumberConfigurationEntity):

_unique_id_suffix = "minimum_level"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[16]
_attr_native_min_value: float = 1
_attr_native_max_value: float = 254
_attribute_name = "minimum_level"
Expand All @@ -646,7 +633,6 @@ class InovelliMaximumLoadDimmingLevel(NumberConfigurationEntity):

_unique_id_suffix = "maximum_level"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[16]
_attr_native_min_value: float = 2
_attr_native_max_value: float = 255
_attribute_name = "maximum_level"
Expand All @@ -659,7 +645,6 @@ class InovelliAutoShutoffTimer(NumberConfigurationEntity):

_unique_id_suffix = "auto_off_timer"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[14]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 32767
_attribute_name = "auto_off_timer"
Expand All @@ -674,7 +659,6 @@ class InovelliQuickStartTime(NumberConfigurationEntity):

_unique_id_suffix = "quick_start_time"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[3]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 10
_attribute_name = "quick_start_time"
Expand All @@ -687,7 +671,6 @@ class InovelliLoadLevelIndicatorTimeout(NumberConfigurationEntity):

_unique_id_suffix = "load_level_indicator_timeout"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[14]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 11
_attribute_name = "load_level_indicator_timeout"
Expand All @@ -700,7 +683,6 @@ class InovelliDefaultAllLEDOnColor(NumberConfigurationEntity):

_unique_id_suffix = "led_color_when_on"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[15]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 255
_attribute_name = "led_color_when_on"
Expand All @@ -713,7 +695,6 @@ class InovelliDefaultAllLEDOffColor(NumberConfigurationEntity):

_unique_id_suffix = "led_color_when_off"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[15]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 255
_attribute_name = "led_color_when_off"
Expand All @@ -726,7 +707,6 @@ class InovelliDefaultAllLEDOnIntensity(NumberConfigurationEntity):

_unique_id_suffix = "led_intensity_when_on"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[16]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 100
_attribute_name = "led_intensity_when_on"
Expand All @@ -739,7 +719,6 @@ class InovelliDefaultAllLEDOffIntensity(NumberConfigurationEntity):

_unique_id_suffix = "led_intensity_when_off"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[16]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 100
_attribute_name = "led_intensity_when_off"
Expand All @@ -752,7 +731,6 @@ class InovelliDoubleTapUpLevel(NumberConfigurationEntity):

_unique_id_suffix = "double_tap_up_level"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[16]
_attr_native_min_value: float = 2
_attr_native_max_value: float = 254
_attribute_name = "double_tap_up_level"
Expand All @@ -765,7 +743,6 @@ class InovelliDoubleTapDownLevel(NumberConfigurationEntity):

_unique_id_suffix = "double_tap_down_level"
_attr_entity_category = EntityCategory.CONFIG
_attr_icon: str = ICONS[16]
_attr_native_min_value: float = 0
_attr_native_max_value: float = 254
_attribute_name = "double_tap_down_level"
Expand All @@ -786,7 +763,6 @@ class AqaraPetFeederServingSize(NumberConfigurationEntity):
_attr_translation_key: str = "serving_size"

_attr_mode: NumberMode = NumberMode.BOX
_attr_icon: str = "mdi:counter"


@CONFIG_DIAGNOSTIC_MATCH(
Expand All @@ -804,7 +780,6 @@ class AqaraPetFeederPortionWeight(NumberConfigurationEntity):

_attr_mode: NumberMode = NumberMode.BOX
_attr_native_unit_of_measurement: str = UnitOfMass.GRAMS
_attr_icon: str = "mdi:weight-gram"


@CONFIG_DIAGNOSTIC_MATCH(
Expand All @@ -823,7 +798,6 @@ class AqaraThermostatAwayTemp(NumberConfigurationEntity):

_attr_mode: NumberMode = NumberMode.SLIDER
_attr_native_unit_of_measurement: str = UnitOfTemperature.CELSIUS
_attr_icon: str = ICONS[0]


@CONFIG_DIAGNOSTIC_MATCH(
Expand All @@ -843,7 +817,6 @@ class ThermostatLocalTempCalibration(NumberConfigurationEntity):

_attr_mode: NumberMode = NumberMode.SLIDER
_attr_native_unit_of_measurement: str = UnitOfTemperature.CELSIUS
_attr_icon: str = ICONS[0]


@CONFIG_DIAGNOSTIC_MATCH(
Expand Down Expand Up @@ -873,7 +846,6 @@ class SonoffPresenceSenorTimeout(NumberConfigurationEntity):
_attr_translation_key: str = "presence_detection_timeout"

_attr_mode: NumberMode = NumberMode.BOX
_attr_icon: str = "mdi:timer-edit"


class ZCLTemperatureEntity(NumberConfigurationEntity):
Expand All @@ -888,7 +860,6 @@ class ZCLTemperatureEntity(NumberConfigurationEntity):
class ZCLHeatSetpointLimitEntity(ZCLTemperatureEntity):
"""Min or max heat setpoint setting on thermostats."""

_attr_icon: str = "mdi:thermostat"
_attr_native_step: float = 0.5

_min_source = Thermostat.AttributeDefs.abs_min_heat_setpoint_limit.name
Expand Down
2 changes: 0 additions & 2 deletions zha/application/platforms/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,6 @@ class AqaraPetFeederMode(ZCLEnumSelectEntity):
_attribute_name = "feeding_mode"
_enum = AqaraFeedingMode
_attr_translation_key: str = "feeding_mode"
_attr_icon: str = "mdi:wrench-clock"


class AqaraThermostatPresetMode(types.enum8):
Expand Down Expand Up @@ -698,4 +697,3 @@ class KeypadLockout(ZCLEnumSelectEntity):
_attribute_name: str = "keypad_lockout"
_enum = KeypadLockoutEnum
_attr_translation_key: str = "keypad_lockout"
_attr_icon: str = "mdi:lock"
8 changes: 0 additions & 8 deletions zha/application/platforms/sensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,6 @@ class AqaraPetFeederLastFeedingSize(Sensor):
_attribute_name = "last_feeding_size"
_unique_id_suffix = "last_feeding_size"
_attr_translation_key: str = "last_feeding_size"
_attr_icon: str = "mdi:counter"


@MULTI_MATCH(cluster_handler_names="opple_cluster", models={"aqara.feeder.acn001"})
Expand All @@ -1453,7 +1452,6 @@ class AqaraPetFeederPortionsDispensed(Sensor):
_unique_id_suffix = "portions_dispensed"
_attr_translation_key: str = "portions_dispensed_today"
_attr_state_class: SensorStateClass = SensorStateClass.TOTAL_INCREASING
_attr_icon: str = "mdi:counter"


@MULTI_MATCH(cluster_handler_names="opple_cluster", models={"aqara.feeder.acn001"})
Expand All @@ -1465,7 +1463,6 @@ class AqaraPetFeederWeightDispensed(Sensor):
_attr_translation_key: str = "weight_dispensed_today"
_attr_native_unit_of_measurement = UnitOfMass.GRAMS
_attr_state_class: SensorStateClass = SensorStateClass.TOTAL_INCREASING
_attr_icon: str = "mdi:weight-gram"


@MULTI_MATCH(cluster_handler_names="opple_cluster", models={"lumi.sensor_smoke.acn03"})
Expand All @@ -1477,7 +1474,6 @@ class AqaraSmokeDensityDbm(Sensor):
_attr_translation_key: str = "smoke_density"
_attr_native_unit_of_measurement = "dB/m"
_attr_state_class: SensorStateClass = SensorStateClass.MEASUREMENT
_attr_icon: str = "mdi:google-circles-communities"
_attr_suggested_display_precision: int = 3


Expand All @@ -1495,7 +1491,6 @@ class SonoffPresenceSenorIlluminationStatus(EnumSensor):
_attribute_name = "last_illumination_state"
_unique_id_suffix = "last_illumination"
_attr_translation_key: str = "last_illumination_state"
_attr_icon: str = "mdi:theme-light-dark"
_enum = SonoffIlluminationStates


Expand All @@ -1509,7 +1504,6 @@ class PiHeatingDemand(Sensor):
_unique_id_suffix = "pi_heating_demand"
_attribute_name = "pi_heating_demand"
_attr_translation_key: str = "pi_heating_demand"
_attr_icon: str = "mdi:radiator"
_attr_native_unit_of_measurement = PERCENTAGE
_decimals = 0
_attr_state_class: SensorStateClass = SensorStateClass.MEASUREMENT
Expand All @@ -1534,7 +1528,6 @@ class SetpointChangeSource(EnumSensor):
_unique_id_suffix = "setpoint_change_source"
_attribute_name = "setpoint_change_source"
_attr_translation_key: str = "setpoint_change_source"
_attr_icon: str = "mdi:thermostat"
_attr_entity_category = EntityCategory.DIAGNOSTIC
_enum = SetpointChangeSourceEnum

Expand Down Expand Up @@ -1584,5 +1577,4 @@ class AqaraCurtainHookStateSensor(EnumSensor):
_enum = AqaraE1HookState
_unique_id_suffix = "hooks_state"
_attr_translation_key: str = "hooks_state"
_attr_icon: str = "mdi:hook"
_attr_entity_category = EntityCategory.DIAGNOSTIC
10 changes: 0 additions & 10 deletions zha/application/platforms/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ class AqaraPetFeederLEDIndicator(SwitchConfigurationEntity):
_attribute_name = "disable_led_indicator"
_attr_translation_key = "led_indicator"
_force_inverted = True
_attr_icon: str = "mdi:led-on"


@CONFIG_DIAGNOSTIC_MATCH(
Expand All @@ -579,7 +578,6 @@ class AqaraPetFeederChildLock(SwitchConfigurationEntity):
_unique_id_suffix = "child_lock"
_attribute_name = "child_lock"
_attr_translation_key = "child_lock"
_attr_icon: str = "mdi:account-lock"


@CONFIG_DIAGNOSTIC_MATCH(
Expand All @@ -591,7 +589,6 @@ class TuyaChildLockSwitch(SwitchConfigurationEntity):
_unique_id_suffix = "child_lock"
_attribute_name = "child_lock"
_attr_translation_key = "child_lock"
_attr_icon: str = "mdi:account-lock"


@CONFIG_DIAGNOSTIC_MATCH(
Expand Down Expand Up @@ -625,7 +622,6 @@ class AqaraThermostatChildLock(SwitchConfigurationEntity):
_unique_id_suffix = "child_lock"
_attribute_name = "child_lock"
_attr_translation_key = "child_lock"
_attr_icon: str = "mdi:account-lock"


@CONFIG_DIAGNOSTIC_MATCH(
Expand All @@ -637,7 +633,6 @@ class AqaraHeartbeatIndicator(SwitchConfigurationEntity):
_unique_id_suffix = "heartbeat_indicator"
_attribute_name = "heartbeat_indicator"
_attr_translation_key = "heartbeat_indicator"
_attr_icon: str = "mdi:heart-flash"


@CONFIG_DIAGNOSTIC_MATCH(
Expand All @@ -649,7 +644,6 @@ class AqaraLinkageAlarm(SwitchConfigurationEntity):
_unique_id_suffix = "linkage_alarm"
_attribute_name = "linkage_alarm"
_attr_translation_key = "linkage_alarm"
_attr_icon: str = "mdi:shield-link-variant"


@CONFIG_DIAGNOSTIC_MATCH(
Expand All @@ -661,7 +655,6 @@ class AqaraBuzzerManualMute(SwitchConfigurationEntity):
_unique_id_suffix = "buzzer_manual_mute"
_attribute_name = "buzzer_manual_mute"
_attr_translation_key = "buzzer_manual_mute"
_attr_icon: str = "mdi:volume-off"


@CONFIG_DIAGNOSTIC_MATCH(
Expand All @@ -673,7 +666,6 @@ class AqaraBuzzerManualAlarm(SwitchConfigurationEntity):
_unique_id_suffix = "buzzer_manual_alarm"
_attribute_name = "buzzer_manual_alarm"
_attr_translation_key = "buzzer_manual_alarm"
_attr_icon: str = "mdi:bullhorn"


@CONFIG_DIAGNOSTIC_MATCH(cluster_handler_names=CLUSTER_HANDLER_COVER)
Expand All @@ -686,7 +678,6 @@ class WindowCoveringInversionSwitch(SwitchConfigurationEntity):
_unique_id_suffix = "inverted"
_attribute_name = WindowCovering.AttributeDefs.config_status.name
_attr_translation_key = "inverted"
_attr_icon: str = "mdi:arrow-up-down"

@classmethod
def create_platform_entity(
Expand Down Expand Up @@ -781,4 +772,3 @@ class AqaraE1CurtainMotorHooksLockedSwitch(SwitchConfigurationEntity):
_unique_id_suffix = "hooks_lock"
_attribute_name = "hooks_lock"
_attr_translation_key = "hooks_locked"
_attr_icon: str = "mdi:lock"

0 comments on commit 315dc30

Please sign in to comment.