Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.rainbird Namespace Reference

Namespaces

 binary_sensor
 
 calendar
 
 config_flow
 
 const
 
 coordinator
 
 number
 
 sensor
 
 switch
 
 types
 

Functions

dr.DeviceEntry _async_device_entry_to_keep (dr.DeviceEntry old_entry, dr.DeviceEntry new_entry)
 
None _async_fix_device_id (HomeAssistant hass, dr.DeviceRegistry device_registry, str config_entry_id, str mac_address, str serial_number)
 
None _async_fix_entity_unique_id (HomeAssistant hass, er.EntityRegistry entity_registry, str config_entry_id, str mac_address, str serial_number)
 
bool _async_fix_unique_id (HomeAssistant hass, AsyncRainbirdController controller, ConfigEntry entry)
 
None _async_register_clientsession_shutdown (HomeAssistant hass, ConfigEntry entry, aiohttp.ClientSession clientsession)
 
bool async_setup_entry (HomeAssistant hass, RainbirdConfigEntry entry)
 
bool async_unload_entry (HomeAssistant hass, ConfigEntry entry)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string DOMAIN = "rainbird"
 
list PLATFORMS
 

Detailed Description

Support for Rain Bird Irrigation system LNK WiFi Module.

Function Documentation

◆ _async_device_entry_to_keep()

dr.DeviceEntry homeassistant.components.rainbird._async_device_entry_to_keep ( dr.DeviceEntry  old_entry,
dr.DeviceEntry   new_entry 
)
private
Determine which device entry to keep when there are duplicates.

As we transitioned to new unique ids, we did not update existing device entries
and as a result there are devices with both the old and new unique id format. We
have to pick which one to keep, and preferably this can repair things if the
user previously renamed devices.

Definition at line 196 of file __init__.py.

◆ _async_fix_device_id()

None homeassistant.components.rainbird._async_fix_device_id ( HomeAssistant  hass,
dr.DeviceRegistry  device_registry,
str  config_entry_id,
str  mac_address,
str  serial_number 
)
private
Migrate existing device identifiers to the new format.

This will rename any device ids that are prefixed with the serial number to be prefixed
with the mac address. This also cleans up from a bug that allowed devices to exist
in both the old and new format.

Definition at line 219 of file __init__.py.

◆ _async_fix_entity_unique_id()

None homeassistant.components.rainbird._async_fix_entity_unique_id ( HomeAssistant  hass,
er.EntityRegistry  entity_registry,
str  config_entry_id,
str  mac_address,
str  serial_number 
)
private
Migrate existing entity if current one can't be found and an old one exists.

Definition at line 175 of file __init__.py.

◆ _async_fix_unique_id()

bool homeassistant.components.rainbird._async_fix_unique_id ( HomeAssistant  hass,
AsyncRainbirdController  controller,
ConfigEntry   entry 
)
private
Update the config entry with a unique id based on the mac address.

Definition at line 130 of file __init__.py.

◆ _async_register_clientsession_shutdown()

None homeassistant.components.rainbird._async_register_clientsession_shutdown ( HomeAssistant  hass,
ConfigEntry  entry,
aiohttp.ClientSession  clientsession 
)
private
Register cleanup hooks for the clientsession.

Definition at line 47 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.rainbird.async_setup_entry ( HomeAssistant  hass,
RainbirdConfigEntry  entry 
)
Set up the config entry for Rain Bird.

Definition at line 65 of file __init__.py.

◆ async_unload_entry()

bool homeassistant.components.rainbird.async_unload_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Unload a config entry.

Definition at line 260 of file __init__.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.rainbird._LOGGER = logging.getLogger(__name__)
private

Definition at line 33 of file __init__.py.

◆ DOMAIN

string homeassistant.components.rainbird.DOMAIN = "rainbird"

Definition at line 44 of file __init__.py.

◆ PLATFORMS

list homeassistant.components.rainbird.PLATFORMS
Initial value:
1 = [
2  Platform.BINARY_SENSOR,
3  Platform.CALENDAR,
4  Platform.NUMBER,
5  Platform.SENSOR,
6  Platform.SWITCH,
7 ]

Definition at line 35 of file __init__.py.