A event handler class for Azure Event Hub.
Definition at line 132 of file __init__.py.
◆ __init__()
◆ _parse_event()
| tuple[EventData | None, int] homeassistant.components.azure_event_hub.AzureEventHub._parse_event |
( |
|
self, |
|
|
datetime |
time_fired, |
|
|
State | None |
state, |
|
|
int
|
dropped |
|
) |
| |
|
private |
Parse event by checking if it needs to be sent, and format it.
Definition at line 246 of file __init__.py.
◆ _schedule_next_send()
| None homeassistant.components.azure_event_hub.AzureEventHub._schedule_next_send |
( |
|
self | ) |
|
|
private |
◆ async_listen()
| None homeassistant.components.azure_event_hub.AzureEventHub.async_listen |
( |
|
self, |
|
|
Event |
event |
|
) |
| |
Listen for new messages on the bus and queue them for AEH.
Definition at line 197 of file __init__.py.
◆ async_send()
| None homeassistant.components.azure_event_hub.AzureEventHub.async_send |
( |
|
self, |
|
|
|
_ |
|
) |
| |
Write preprocessed events to eventhub, with retry.
Definition at line 202 of file __init__.py.
◆ async_start()
| None homeassistant.components.azure_event_hub.AzureEventHub.async_start |
( |
|
self | ) |
|
Start the hub.
This suppresses logging and register the listener and
schedules the first send.
Suppress the INFO and below logging on the underlying packages,
they are very verbose, even at INFO.
Definition at line 157 of file __init__.py.
◆ async_stop()
| None homeassistant.components.azure_event_hub.AzureEventHub.async_stop |
( |
|
self | ) |
|
Shut down the AEH by queueing None, calling send, join queue.
Definition at line 172 of file __init__.py.
◆ async_test_connection()
| None homeassistant.components.azure_event_hub.AzureEventHub.async_test_connection |
( |
|
self | ) |
|
Test the connection to the event hub.
Definition at line 186 of file __init__.py.
◆ fill_batch()
| EventDataBatch homeassistant.components.azure_event_hub.AzureEventHub.fill_batch |
( |
|
self, |
|
|
EventHubProducerClient |
client |
|
) |
| |
Return a batch of events formatted for sending to Event Hub.
Uses get_nowait instead of await get, because the functions batches and
doesn't wait for each single event.
Throws ValueError on add to batch when the EventDataBatch object reaches
max_size. Put the item back in the queue and the next batch will include
it.
Definition at line 214 of file __init__.py.
◆ update_options()
| None homeassistant.components.azure_event_hub.AzureEventHub.update_options |
( |
|
self, |
|
|
MappingProxyType[str, Any] |
new_options |
|
) |
| |
◆ _client
| homeassistant.components.azure_event_hub.AzureEventHub._client |
|
private |
◆ _entities_filter
| homeassistant.components.azure_event_hub.AzureEventHub._entities_filter |
|
private |
◆ _entry
| homeassistant.components.azure_event_hub.AzureEventHub._entry |
|
private |
◆ _listener_remover
| homeassistant.components.azure_event_hub.AzureEventHub._listener_remover |
|
private |
◆ _max_delay
| homeassistant.components.azure_event_hub.AzureEventHub._max_delay |
|
private |
◆ _next_send_remover
| homeassistant.components.azure_event_hub.AzureEventHub._next_send_remover |
|
private |
◆ _send_interval
| homeassistant.components.azure_event_hub.AzureEventHub._send_interval |
|
private |
◆ _shutdown
| homeassistant.components.azure_event_hub.AzureEventHub._shutdown |
|
private |
◆ hass
| homeassistant.components.azure_event_hub.AzureEventHub.hass |
The documentation for this class was generated from the following file:
- core/homeassistant/components/azure_event_hub/__init__.py