Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.ads.hub.AdsHub Class Reference

Public Member Functions

def __init__ (self, ads_client)
 
def add_device_notification (self, name, plc_datatype, callback)
 
def read_by_name (self, name, plc_datatype)
 
def register_device (self, device)
 
def shutdown (self, *args, **kwargs)
 
def write_by_name (self, name, value, plc_datatype)
 

Private Member Functions

def _device_notification_callback (self, notification, name)
 

Private Attributes

 _client
 
 _devices
 
 _lock
 
 _notification_items
 

Detailed Description

Representation of an ADS connection.

Definition at line 19 of file hub.py.

Constructor & Destructor Documentation

◆ __init__()

def homeassistant.components.ads.hub.AdsHub.__init__ (   self,
  ads_client 
)
Initialize the ADS hub.

Definition at line 22 of file hub.py.

Member Function Documentation

◆ _device_notification_callback()

def homeassistant.components.ads.hub.AdsHub._device_notification_callback (   self,
  notification,
  name 
)
private
Handle device notifications.

Definition at line 97 of file hub.py.

◆ add_device_notification()

def homeassistant.components.ads.hub.AdsHub.add_device_notification (   self,
  name,
  plc_datatype,
  callback 
)
Add a notification to the ADS devices.

Definition at line 75 of file hub.py.

◆ read_by_name()

def homeassistant.components.ads.hub.AdsHub.read_by_name (   self,
  name,
  plc_datatype 
)
Read a value from the device.

Definition at line 66 of file hub.py.

◆ register_device()

def homeassistant.components.ads.hub.AdsHub.register_device (   self,
  device 
)
Register a new device.

Definition at line 53 of file hub.py.

◆ shutdown()

def homeassistant.components.ads.hub.AdsHub.shutdown (   self,
args,
**  kwargs 
)
Shutdown ADS connection.

Definition at line 32 of file hub.py.

◆ write_by_name()

def homeassistant.components.ads.hub.AdsHub.write_by_name (   self,
  name,
  value,
  plc_datatype 
)
Write a value to the device.

Definition at line 57 of file hub.py.

Member Data Documentation

◆ _client

homeassistant.components.ads.hub.AdsHub._client
private

Definition at line 24 of file hub.py.

◆ _devices

homeassistant.components.ads.hub.AdsHub._devices
private

Definition at line 28 of file hub.py.

◆ _lock

homeassistant.components.ads.hub.AdsHub._lock
private

Definition at line 30 of file hub.py.

◆ _notification_items

homeassistant.components.ads.hub.AdsHub._notification_items
private

Definition at line 29 of file hub.py.


The documentation for this class was generated from the following file: