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

Namespaces

 binary_sensor
 
 config_flow
 
 const
 
 cover
 
 device_action
 
 device_trigger
 
 diagnostics
 
 entity
 
 event
 
 helpers
 
 light
 
 sensor
 
 siren
 
 switch
 

Classes

class  DeviceTuple
 

Functions

bytearray _bytearray_string (Any data)
 
rfxtrxmod.Connect _create_rfx (Mapping[str, Any] config, Callable[[rfxtrxmod.RFXtrxEvent], None] event_callback)
 
dict[DeviceTuple, dict[str, Any]] _get_device_lookup (dict[str, dict[str, Any]] devices)
 
bool async_remove_config_entry_device (HomeAssistant hass, ConfigEntry config_entry, dr.DeviceEntry device_entry)
 
bool async_setup_entry (HomeAssistant hass, ConfigEntry entry)
 
None async_setup_internal (HomeAssistant hass, ConfigEntry entry)
 
None async_setup_platform_entry (HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities, Callable[[rfxtrxmod.RFXtrxEvent], bool] supported, Callable[[rfxtrxmod.RFXtrxEvent, rfxtrxmod.RFXtrxEvent|None, DeviceTuple, dict[str, Any],], list[Entity],] constructor)
 
bool async_unload_entry (HomeAssistant hass, ConfigEntry entry)
 
str|None find_possible_pt2262_device (set[str] device_ids, str device_id)
 
int|None get_device_data_bits (rfxtrxmod.RFXtrxDevice device, dict[DeviceTuple, dict[str, Any]] devices)
 
DeviceTuple get_device_id (rfxtrxmod.RFXtrxDevice device, int|None data_bits=None)
 
DeviceTuple|None get_device_tuple_from_identifiers (set[tuple[str, str]] identifiers)
 
str|None get_pt2262_cmd (str device_id, int data_bits)
 
bytes|None get_pt2262_deviceid (str device_id, int|None nb_data_bits)
 
rfxtrxmod.RFXtrxEvent|None get_rfx_object (str packetid)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
float CONNECT_TIMEOUT = 30.0
 
float DEFAULT_OFF_DELAY = 2.0
 
list PLATFORMS
 
 SERVICE_SEND_SCHEMA = vol.Schema({ATTR_EVENT: _bytearray_string})
 

Detailed Description

Support for RFXtrx devices.

Function Documentation

◆ _bytearray_string()

bytearray homeassistant.components.rfxtrx._bytearray_string ( Any  data)
private

Definition at line 64 of file __init__.py.

◆ _create_rfx()

rfxtrxmod.Connect homeassistant.components.rfxtrx._create_rfx ( Mapping[str, Any]  config,
Callable[[rfxtrxmod.RFXtrxEvent], None]   event_callback 
)
private
Construct a rfx object based on config.

Definition at line 112 of file __init__.py.

◆ _get_device_lookup()

dict[DeviceTuple, dict[str, Any]] homeassistant.components.rfxtrx._get_device_lookup ( dict[str, dict[str, Any]]  devices)
private
Get a lookup structure for devices.

Definition at line 146 of file __init__.py.

◆ async_remove_config_entry_device()

bool homeassistant.components.rfxtrx.async_remove_config_entry_device ( HomeAssistant  hass,
ConfigEntry  config_entry,
dr.DeviceEntry   device_entry 
)
Remove config entry from a device.

The actual cleanup is done in the device registry event

Definition at line 459 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.rfxtrx.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Set up the RFXtrx component.

Definition at line 87 of file __init__.py.

◆ async_setup_internal()

None homeassistant.components.rfxtrx.async_setup_internal ( HomeAssistant  hass,
ConfigEntry  entry 
)
Set up the RFXtrx component.

Definition at line 161 of file __init__.py.

◆ async_setup_platform_entry()

None homeassistant.components.rfxtrx.async_setup_platform_entry ( HomeAssistant  hass,
ConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities,
Callable[[rfxtrxmod.RFXtrxEvent], bool]  supported,
Callable[ [ rfxtrxmod.RFXtrxEvent, rfxtrxmod.RFXtrxEvent | None, DeviceTuple, dict[str, Any], ], list[Entity], ]  constructor 
)
Set up config entry.

Definition at line 294 of file __init__.py.

◆ async_unload_entry()

bool homeassistant.components.rfxtrx.async_unload_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Unload RFXtrx component.

Definition at line 97 of file __init__.py.

◆ find_possible_pt2262_device()

str | None homeassistant.components.rfxtrx.find_possible_pt2262_device ( set[str]  device_ids,
str  device_id 
)
Look for the device which id matches the given device_id parameter.

Definition at line 403 of file __init__.py.

◆ get_device_data_bits()

int | None homeassistant.components.rfxtrx.get_device_data_bits ( rfxtrxmod.RFXtrxDevice  device,
dict[DeviceTuple, dict[str, Any]]   devices 
)
Deduce data bits for device based on a cache of device bits.

Definition at line 389 of file __init__.py.

◆ get_device_id()

DeviceTuple homeassistant.components.rfxtrx.get_device_id ( rfxtrxmod.RFXtrxDevice  device,
int | None   data_bits = None 
)
Calculate a device id for device.

Definition at line 432 of file __init__.py.

◆ get_device_tuple_from_identifiers()

DeviceTuple | None homeassistant.components.rfxtrx.get_device_tuple_from_identifiers ( set[tuple[str, str]]  identifiers)
Calculate the device tuple from a device entry.

Definition at line 447 of file __init__.py.

◆ get_pt2262_cmd()

str | None homeassistant.components.rfxtrx.get_pt2262_cmd ( str  device_id,
int  data_bits 
)
Extract and return the data bits from a Lighting4/PT2262 packet.

Definition at line 377 of file __init__.py.

◆ get_pt2262_deviceid()

bytes | None homeassistant.components.rfxtrx.get_pt2262_deviceid ( str  device_id,
int | None  nb_data_bits 
)
Extract and return the address bits from a Lighting4/PT2262 packet.

Definition at line 361 of file __init__.py.

◆ get_rfx_object()

rfxtrxmod.RFXtrxEvent | None homeassistant.components.rfxtrx.get_rfx_object ( str  packetid)
Return the RFXObject with the packetid.

Definition at line 352 of file __init__.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 53 of file __init__.py.

◆ CONNECT_TIMEOUT

float homeassistant.components.rfxtrx.CONNECT_TIMEOUT = 30.0

Definition at line 51 of file __init__.py.

◆ DEFAULT_OFF_DELAY

float homeassistant.components.rfxtrx.DEFAULT_OFF_DELAY = 2.0

Definition at line 49 of file __init__.py.

◆ PLATFORMS

list homeassistant.components.rfxtrx.PLATFORMS
Initial value:
1 = [
2  Platform.BINARY_SENSOR,
3  Platform.COVER,
4  Platform.EVENT,
5  Platform.LIGHT,
6  Platform.SENSOR,
7  Platform.SIREN,
8  Platform.SWITCH,
9 ]

Definition at line 76 of file __init__.py.

◆ SERVICE_SEND_SCHEMA

homeassistant.components.rfxtrx.SERVICE_SEND_SCHEMA = vol.Schema({ATTR_EVENT: _bytearray_string})

Definition at line 74 of file __init__.py.