diff --git a/homeassistant/components/wiz/binary_sensor.py b/homeassistant/components/wiz/binary_sensor.py index 1ecb3125215..538bd3a741d 100644 --- a/homeassistant/components/wiz/binary_sensor.py +++ b/homeassistant/components/wiz/binary_sensor.py @@ -66,12 +66,12 @@ class WizOccupancyEntity(WizEntity, BinarySensorEntity): """Representation of WiZ Occupancy sensor.""" _attr_device_class = BinarySensorDeviceClass.OCCUPANCY + _attr_name = "Occupancy" def __init__(self, wiz_data: WizData, name: str) -> None: """Initialize an WiZ device.""" super().__init__(wiz_data, name) self._attr_unique_id = OCCUPANCY_UNIQUE_ID.format(self._device.mac) - self._attr_name = f"{name} Occupancy" self._async_update_attrs() @callback diff --git a/homeassistant/components/wiz/entity.py b/homeassistant/components/wiz/entity.py index c78f3e3b37b..633fb71f165 100644 --- a/homeassistant/components/wiz/entity.py +++ b/homeassistant/components/wiz/entity.py @@ -21,13 +21,14 @@ from .models import WizData class WizEntity(CoordinatorEntity[DataUpdateCoordinator[Optional[float]]], Entity): """Representation of WiZ entity.""" + _attr_has_entity_name = True + def __init__(self, wiz_data: WizData, name: str) -> None: """Initialize a WiZ entity.""" super().__init__(wiz_data.coordinator) self._device = wiz_data.bulb bulb_type: BulbType = self._device.bulbtype self._attr_unique_id = self._device.mac - self._attr_name = name self._attr_device_info = DeviceInfo( connections={(CONNECTION_NETWORK_MAC, self._device.mac)}, name=name, diff --git a/homeassistant/components/wiz/number.py b/homeassistant/components/wiz/number.py index d2f68fcf7c3..9fd700f8f9c 100644 --- a/homeassistant/components/wiz/number.py +++ b/homeassistant/components/wiz/number.py @@ -52,7 +52,7 @@ NUMBERS: tuple[WizNumberEntityDescription, ...] = ( native_max_value=200, native_step=1, icon="mdi:speedometer", - name="Effect Speed", + name="Effect speed", value_fn=lambda device: cast(Optional[int], device.state.get_speed()), set_value_fn=_async_set_speed, required_feature="effect", @@ -63,7 +63,7 @@ NUMBERS: tuple[WizNumberEntityDescription, ...] = ( native_max_value=100, native_step=1, icon="mdi:floor-lamp-dual", - name="Dual Head Ratio", + name="Dual head ratio", value_fn=lambda device: cast(Optional[int], device.state.get_ratio()), set_value_fn=_async_set_ratio, required_feature="dual_head", @@ -98,7 +98,6 @@ class WizSpeedNumber(WizEntity, NumberEntity): super().__init__(wiz_data, name) self.entity_description = description self._attr_unique_id = f"{self._device.mac}_{description.key}" - self._attr_name = f"{name} {description.name}" self._async_update_attrs() @property diff --git a/homeassistant/components/wiz/sensor.py b/homeassistant/components/wiz/sensor.py index 11f3933fd16..d2042d6ea9c 100644 --- a/homeassistant/components/wiz/sensor.py +++ b/homeassistant/components/wiz/sensor.py @@ -20,7 +20,7 @@ from .models import WizData SENSORS: tuple[SensorEntityDescription, ...] = ( SensorEntityDescription( key="rssi", - name="Signal Strength", + name="Signal strength", entity_registry_enabled_default=False, state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.SIGNAL_STRENGTH, @@ -33,7 +33,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = ( POWER_SENSORS: tuple[SensorEntityDescription, ...] = ( SensorEntityDescription( key="power", - name="Current Power", + name="Current power", state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.POWER, native_unit_of_measurement=POWER_WATT, @@ -73,7 +73,6 @@ class WizSensor(WizEntity, SensorEntity): super().__init__(wiz_data, name) self.entity_description = description self._attr_unique_id = f"{self._device.mac}_{description.key}" - self._attr_name = f"{name} {description.name}" self._async_update_attrs() @callback