Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.nut.PyNUTData Class Reference

Public Member Functions

None __init__ (self, str host, int port, str|None alias, str|None username, str|None password, bool persistent=True)
 
set[str]|None async_list_commands (self)
 
None async_run_command (self, str command_name)
 
None async_shutdown (self, Event|None _=None)
 
dict[str, str] async_update (self)
 
NUTDeviceInfo device_info (self)
 
str name (self)
 
dict[str, str]|None status (self)
 

Public Attributes

 ups_list
 

Private Member Functions

str|None _async_get_alias (self)
 
dict[str, str] _async_get_status (self)
 
NUTDeviceInfo|None _get_device_info (self)
 

Private Attributes

 _alias
 
 _client
 
 _device_info
 
 _host
 
 _status
 

Detailed Description

Stores the data retrieved from NUT.

For each entity to use, acts as the single point responsible for fetching
updates from the server.

Definition at line 220 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.nut.PyNUTData.__init__ (   self,
str  host,
int  port,
str | None  alias,
str | None  username,
str | None  password,
bool   persistent = True 
)
Initialize the data object.

Definition at line 227 of file __init__.py.

Member Function Documentation

◆ _async_get_alias()

str | None homeassistant.components.nut.PyNUTData._async_get_alias (   self)
private
Get the ups alias from NUT.

Definition at line 261 of file __init__.py.

◆ _async_get_status()

dict[str, str] homeassistant.components.nut.PyNUTData._async_get_status (   self)
private
Get the ups status from NUT.

Definition at line 284 of file __init__.py.

◆ _get_device_info()

NUTDeviceInfo | None homeassistant.components.nut.PyNUTData._get_device_info (   self)
private
Get the ups device info from NUT.

Definition at line 269 of file __init__.py.

◆ async_list_commands()

set[str] | None homeassistant.components.nut.PyNUTData.async_list_commands (   self)
Fetch the list of supported commands.

Definition at line 311 of file __init__.py.

◆ async_run_command()

None homeassistant.components.nut.PyNUTData.async_run_command (   self,
str  command_name 
)
Invoke instant command in UPS.

Definition at line 299 of file __init__.py.

◆ async_shutdown()

None homeassistant.components.nut.PyNUTData.async_shutdown (   self,
Event | None   _ = None 
)
Shutdown the client connection.

Definition at line 323 of file __init__.py.

◆ async_update()

dict[str, str] homeassistant.components.nut.PyNUTData.async_update (   self)
Fetch the latest status from NUT.

Definition at line 292 of file __init__.py.

◆ device_info()

NUTDeviceInfo homeassistant.components.nut.PyNUTData.device_info (   self)
Return the device info for the ups.

Definition at line 257 of file __init__.py.

◆ name()

str homeassistant.components.nut.PyNUTData.name (   self)
Return the name of the ups.

Definition at line 252 of file __init__.py.

◆ status()

dict[str, str] | None homeassistant.components.nut.PyNUTData.status (   self)
Get latest update if throttle allows. Return status.

Definition at line 247 of file __init__.py.

Member Data Documentation

◆ _alias

homeassistant.components.nut.PyNUTData._alias
private

Definition at line 239 of file __init__.py.

◆ _client

homeassistant.components.nut.PyNUTData._client
private

Definition at line 241 of file __init__.py.

◆ _device_info

homeassistant.components.nut.PyNUTData._device_info
private

Definition at line 296 of file __init__.py.

◆ _host

homeassistant.components.nut.PyNUTData._host
private

Definition at line 238 of file __init__.py.

◆ _status

homeassistant.components.nut.PyNUTData._status
private

Definition at line 294 of file __init__.py.

◆ ups_list

homeassistant.components.nut.PyNUTData.ups_list

Definition at line 266 of file __init__.py.


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