Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion homeassistant/components/rainbird/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

RAIN_SENSOR_ENTITY_DESCRIPTION = BinarySensorEntityDescription(
key="rainsensor",
name="Rainsensor",
translation_key="rainsensor",
icon="mdi:water",
)

Expand All @@ -38,6 +38,8 @@ async def async_setup_entry(
class RainBirdSensor(CoordinatorEntity[RainbirdUpdateCoordinator], BinarySensorEntity):
"""A sensor implementation for Rain Bird device."""

_attr_has_entity_name = True

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@allenporter Can you verify if this is a wished change or not?


def __init__(
self,
coordinator: RainbirdUpdateCoordinator,
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/rainbird/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ async def async_setup_entry(


class RainDelayNumber(CoordinatorEntity[RainbirdUpdateCoordinator], NumberEntity):
"""A number implemnetaiton for the rain delay."""
"""A number implementation for the rain delay."""

_attr_native_min_value = 0
_attr_native_max_value = 14
_attr_native_step = 1
_attr_native_unit_of_measurement = UnitOfTime.DAYS
_attr_icon = "mdi:water-off"
_attr_name = "Rain delay"
_attr_translation_key = "rain_delay"
_attr_has_entity_name = True

def __init__(
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/rainbird/sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Support for Rain Bird Irrigation system LNK WiFi Module."""
"""Support for Rain Bird Irrigation system LNK Wi-Fi Module."""
from __future__ import annotations

import logging
Expand All @@ -18,7 +18,7 @@

RAIN_DELAY_ENTITY_DESCRIPTION = SensorEntityDescription(
key="raindelay",
name="Raindelay",
translation_key="raindelay",
icon="mdi:water-off",
)

Expand Down
17 changes: 17 additions & 0 deletions homeassistant/components/rainbird/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,22 @@
}
}
}
},
"entity": {
"binary_sensor": {
"rainsensor": {
"name": "Rainsensor"
}
},
"number": {
"rain_delay": {
"name": "Rain delay"
}
},
"sensor": {
"raindelay": {
"name": "Raindelay"
}
}
}
}
2 changes: 1 addition & 1 deletion homeassistant/components/rainbird/switch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Support for Rain Bird Irrigation system LNK WiFi Module."""
"""Support for Rain Bird Irrigation system LNK Wi-Fi Module."""
from __future__ import annotations

import logging
Expand Down