diff --git a/homeassistant/components/hydrawise/binary_sensor.py b/homeassistant/components/hydrawise/binary_sensor.py index 8a5d6fe2f83..1c40b16926d 100644 --- a/homeassistant/components/hydrawise/binary_sensor.py +++ b/homeassistant/components/hydrawise/binary_sensor.py @@ -23,14 +23,13 @@ from .entity import HydrawiseEntity BINARY_SENSOR_STATUS = BinarySensorEntityDescription( key="status", - name="Status", device_class=BinarySensorDeviceClass.CONNECTIVITY, ) BINARY_SENSOR_TYPES: tuple[BinarySensorEntityDescription, ...] = ( BinarySensorEntityDescription( key="is_watering", - name="Watering", + translation_key="watering", device_class=BinarySensorDeviceClass.MOISTURE, ), ) diff --git a/homeassistant/components/hydrawise/entity.py b/homeassistant/components/hydrawise/entity.py index db07faef6d0..c3f295e1c4d 100644 --- a/homeassistant/components/hydrawise/entity.py +++ b/homeassistant/components/hydrawise/entity.py @@ -15,6 +15,7 @@ class HydrawiseEntity(CoordinatorEntity[HydrawiseDataUpdateCoordinator]): """Entity class for Hydrawise devices.""" _attr_attribution = "Data provided by hydrawise.com" + _attr_has_entity_name = True def __init__( self, diff --git a/homeassistant/components/hydrawise/sensor.py b/homeassistant/components/hydrawise/sensor.py index bcf178744c8..a5bd9251a33 100644 --- a/homeassistant/components/hydrawise/sensor.py +++ b/homeassistant/components/hydrawise/sensor.py @@ -24,12 +24,12 @@ from .entity import HydrawiseEntity SENSOR_TYPES: tuple[SensorEntityDescription, ...] = ( SensorEntityDescription( key="next_cycle", - name="Next Cycle", + translation_key="next_cycle", device_class=SensorDeviceClass.TIMESTAMP, ), SensorEntityDescription( key="watering_time", - name="Watering Time", + translation_key="watering_time", icon="mdi:water-pump", native_unit_of_measurement=UnitOfTime.MINUTES, ), diff --git a/homeassistant/components/hydrawise/strings.json b/homeassistant/components/hydrawise/strings.json index 50d3fbaf4c3..8f079abcc7d 100644 --- a/homeassistant/components/hydrawise/strings.json +++ b/homeassistant/components/hydrawise/strings.json @@ -21,5 +21,28 @@ "title": "The Hydrawise YAML configuration import failed", "description": "Configuring Hydrawise using YAML is being removed but there was an {error_type} error importing your YAML configuration.\n\nEnsure connection to Hydrawise works and restart Home Assistant to try again or remove the Hydrawise YAML configuration from your configuration.yaml file and continue to [set up the integration]({url}) manually." } + }, + "entity": { + "binary_sensor": { + "watering": { + "name": "Watering" + } + }, + "sensor": { + "next_cycle": { + "name": "Next cycle" + }, + "watering_time": { + "name": "Watering time" + } + }, + "switch": { + "auto_watering": { + "name": "Automatic watering" + }, + "manual_watering": { + "name": "Manual watering" + } + } } } diff --git a/homeassistant/components/hydrawise/switch.py b/homeassistant/components/hydrawise/switch.py index 88112d8e27a..8cdb5b67561 100644 --- a/homeassistant/components/hydrawise/switch.py +++ b/homeassistant/components/hydrawise/switch.py @@ -31,12 +31,12 @@ from .entity import HydrawiseEntity SWITCH_TYPES: tuple[SwitchEntityDescription, ...] = ( SwitchEntityDescription( key="auto_watering", - name="Automatic Watering", + translation_key="auto_watering", device_class=SwitchDeviceClass.SWITCH, ), SwitchEntityDescription( key="manual_watering", - name="Manual Watering", + translation_key="manual_watering", device_class=SwitchDeviceClass.SWITCH, ), )