Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.netio.switch Namespace Reference

Classes

class  NetioApiView
 
class  NetioSwitch
 

Functions

def dispose (event)
 
None setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback add_entities, DiscoveryInfoType|None discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string ATTR_START_DATE = "start_date"
 
string ATTR_TOTAL_CONSUMPTION_KWH = "total_energy_kwh"
 
string CONF_OUTLETS = "outlets"
 
int DEFAULT_PORT = 1234
 
string DEFAULT_USERNAME = "admin"
 
 Device = namedtuple("Device", ["netio", "entities"])
 
 MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)
 
 PLATFORM_SCHEMA
 
list REQ_CONF = [CONF_HOST, CONF_OUTLETS]
 
string URL_API_NETIO_EP = "/api/netio/{host}"
 

Detailed Description

The Netio switch component.

Function Documentation

◆ dispose()

def homeassistant.components.netio.switch.dispose (   event)
Close connections to Netio Devices.

Definition at line 93 of file switch.py.

◆ setup_platform()

None homeassistant.components.netio.switch.setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the Netio platform.

Definition at line 61 of file switch.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.netio.switch._LOGGER = logging.getLogger(__name__)
private

Definition at line 32 of file switch.py.

◆ ATTR_START_DATE

string homeassistant.components.netio.switch.ATTR_START_DATE = "start_date"

Definition at line 34 of file switch.py.

◆ ATTR_TOTAL_CONSUMPTION_KWH

string homeassistant.components.netio.switch.ATTR_TOTAL_CONSUMPTION_KWH = "total_energy_kwh"

Definition at line 35 of file switch.py.

◆ CONF_OUTLETS

string homeassistant.components.netio.switch.CONF_OUTLETS = "outlets"

Definition at line 37 of file switch.py.

◆ DEFAULT_PORT

int homeassistant.components.netio.switch.DEFAULT_PORT = 1234

Definition at line 39 of file switch.py.

◆ DEFAULT_USERNAME

string homeassistant.components.netio.switch.DEFAULT_USERNAME = "admin"

Definition at line 40 of file switch.py.

◆ Device

homeassistant.components.netio.switch.Device = namedtuple("Device", ["netio", "entities"])

Definition at line 41 of file switch.py.

◆ MIN_TIME_BETWEEN_SCANS

homeassistant.components.netio.switch.MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)

Definition at line 44 of file switch.py.

◆ PLATFORM_SCHEMA

homeassistant.components.netio.switch.PLATFORM_SCHEMA
Initial value:
1 = SWITCH_PLATFORM_SCHEMA.extend(
2  {
3  vol.Required(CONF_HOST): cv.string,
4  vol.Required(CONF_PORT, default=DEFAULT_PORT): cv.port,
5  vol.Required(CONF_USERNAME, default=DEFAULT_USERNAME): cv.string,
6  vol.Required(CONF_PASSWORD): cv.string,
7  vol.Optional(CONF_OUTLETS): {cv.string: cv.string},
8  }
9 )

Definition at line 50 of file switch.py.

◆ REQ_CONF

list homeassistant.components.netio.switch.REQ_CONF = [CONF_HOST, CONF_OUTLETS]

Definition at line 46 of file switch.py.

◆ URL_API_NETIO_EP

string homeassistant.components.netio.switch.URL_API_NETIO_EP = "/api/netio/{host}"

Definition at line 48 of file switch.py.