1 """Support for Melnor RainCloud sprinkler water timer."""
6 from .const
import SIGNAL_UPDATE_RAINCLOUD
9 "auto_watering":
"Automatic Watering",
11 "is_watering":
"Watering",
12 "manual_watering":
"Manual Watering",
13 "next_cycle":
"Next Cycle",
14 "rain_delay":
"Rain Delay",
16 "watering_time":
"Remaining Watering Time",
20 "auto_watering":
"mdi:autorenew",
23 "manual_watering":
"mdi:water-pump",
24 "next_cycle":
"mdi:calendar-clock",
25 "rain_delay":
"mdi:weather-rainy",
27 "watering_time":
"mdi:water-pump",
32 """Entity class for RainCloud devices."""
34 _attr_attribution =
"Data provided by Melnor Aquatimer.com"
37 """Initialize the RainCloud entity."""
40 self.
_name_name = f
"{self.data.name} {KEY_MAP.get(self._sensor_type)}"
45 """Return the name of the sensor."""
46 return self.
_name_name
49 """Register callbacks."""
57 """Call update method."""
62 """Return the state attributes."""
63 return {
"identifier": self.
datadata.serial}
67 """Return the icon to use in the frontend, if any."""
def _update_callback(self)
def async_added_to_hass(self)
def extra_state_attributes(self)
def __init__(self, data, sensor_type)
None async_on_remove(self, CALLBACK_TYPE func)
None schedule_update_ha_state(self, bool force_refresh=False)
Callable[[], None] async_dispatcher_connect(HomeAssistant hass, str signal, Callable[..., Any] target)