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 | |
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.
| 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.
|
private |
Get the ups alias from NUT.
Definition at line 261 of file __init__.py.
|
private |
Get the ups status from NUT.
Definition at line 284 of file __init__.py.
|
private |
Get the ups device info from NUT.
Definition at line 269 of file __init__.py.
| 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.
| 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.
| None homeassistant.components.nut.PyNUTData.async_shutdown | ( | self, | |
| Event | None | _ = None |
||
| ) |
Shutdown the client connection.
Definition at line 323 of file __init__.py.
| dict[str, str] homeassistant.components.nut.PyNUTData.async_update | ( | self | ) |
Fetch the latest status from NUT.
Definition at line 292 of file __init__.py.
| NUTDeviceInfo homeassistant.components.nut.PyNUTData.device_info | ( | self | ) |
Return the device info for the ups.
Definition at line 257 of file __init__.py.
| str homeassistant.components.nut.PyNUTData.name | ( | self | ) |
Return the name of the ups.
Definition at line 252 of file __init__.py.
| 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.
|
private |
Definition at line 239 of file __init__.py.
|
private |
Definition at line 241 of file __init__.py.
|
private |
Definition at line 296 of file __init__.py.
|
private |
Definition at line 238 of file __init__.py.
|
private |
Definition at line 294 of file __init__.py.
| homeassistant.components.nut.PyNUTData.ups_list |
Definition at line 266 of file __init__.py.