Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.upnp.device Namespace Reference

Classes

class  Device
 

Functions

Device async_create_device (HomeAssistant hass, str location, bool force_poll)
 
str|None async_get_mac_address_from_host (HomeAssistant hass, str host)
 
str get_preferred_location (set[str] locations)
 

Variables

dictionary TYPE_STATE_ITEM_MAPPING
 

Detailed Description

Home Assistant representation of an UPnP/IGD.

Function Documentation

◆ async_create_device()

Device homeassistant.components.upnp.device.async_create_device ( HomeAssistant  hass,
str  location,
bool   force_poll 
)
Create UPnP/IGD device.

Definition at line 86 of file device.py.

◆ async_get_mac_address_from_host()

str | None homeassistant.components.upnp.device.async_get_mac_address_from_host ( HomeAssistant  hass,
str  host 
)
Get mac address from host.

Definition at line 72 of file device.py.

◆ get_preferred_location()

str homeassistant.components.upnp.device.get_preferred_location ( set[str]  locations)
Get the preferred location (an IPv4 location) from a set of locations.

Definition at line 56 of file device.py.

Variable Documentation

◆ TYPE_STATE_ITEM_MAPPING

dictionary homeassistant.components.upnp.device.TYPE_STATE_ITEM_MAPPING
Initial value:
1 = {
2  BYTES_RECEIVED: IgdStateItem.BYTES_RECEIVED,
3  BYTES_SENT: IgdStateItem.BYTES_SENT,
4  KIBIBYTES_PER_SEC_RECEIVED: IgdStateItem.KIBIBYTES_PER_SEC_RECEIVED,
5  KIBIBYTES_PER_SEC_SENT: IgdStateItem.KIBIBYTES_PER_SEC_SENT,
6  PACKETS_PER_SEC_RECEIVED: IgdStateItem.PACKETS_PER_SEC_RECEIVED,
7  PACKETS_PER_SEC_SENT: IgdStateItem.PACKETS_PER_SEC_SENT,
8  PACKETS_RECEIVED: IgdStateItem.PACKETS_RECEIVED,
9  PACKETS_SENT: IgdStateItem.PACKETS_SENT,
10  ROUTER_IP: IgdStateItem.EXTERNAL_IP_ADDRESS,
11  ROUTER_UPTIME: IgdStateItem.UPTIME,
12  WAN_STATUS: IgdStateItem.CONNECTION_STATUS,
13  PORT_MAPPING_NUMBER_OF_ENTRIES_IPV4: IgdStateItem.PORT_MAPPING_NUMBER_OF_ENTRIES,
14 }

Definition at line 40 of file device.py.