Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.serial.sensor Namespace Reference

Classes

class  SerialSensor
 

Functions

None async_setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback async_add_entities, DiscoveryInfoType|None discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string CONF_BAUDRATE = "baudrate"
 
string CONF_BYTESIZE = "bytesize"
 
string CONF_DSRDTR = "dsrdtr"
 
string CONF_PARITY = "parity"
 
string CONF_RTSCTS = "rtscts"
 
string CONF_SERIAL_PORT = "serial_port"
 
string CONF_STOPBITS = "stopbits"
 
string CONF_XONXOFF = "xonxoff"
 
int DEFAULT_BAUDRATE = 9600
 
 DEFAULT_BYTESIZE = serial_asyncio.serial.EIGHTBITS
 
bool DEFAULT_DSRDTR = False
 
string DEFAULT_NAME = "Serial Sensor"
 
 DEFAULT_PARITY = serial_asyncio.serial.PARITY_NONE
 
bool DEFAULT_RTSCTS = False
 
 DEFAULT_STOPBITS = serial_asyncio.serial.STOPBITS_ONE
 
bool DEFAULT_XONXOFF = False
 
 PLATFORM_SCHEMA
 

Detailed Description

Support for reading data from a serial port.

Function Documentation

◆ async_setup_platform()

None homeassistant.components.serial.sensor.async_setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  async_add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the Serial sensor platform.

Definition at line 80 of file sensor.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.serial.sensor._LOGGER = logging.getLogger(__name__)
private

Definition at line 23 of file sensor.py.

◆ CONF_BAUDRATE

string homeassistant.components.serial.sensor.CONF_BAUDRATE = "baudrate"

Definition at line 26 of file sensor.py.

◆ CONF_BYTESIZE

string homeassistant.components.serial.sensor.CONF_BYTESIZE = "bytesize"

Definition at line 27 of file sensor.py.

◆ CONF_DSRDTR

string homeassistant.components.serial.sensor.CONF_DSRDTR = "dsrdtr"

Definition at line 32 of file sensor.py.

◆ CONF_PARITY

string homeassistant.components.serial.sensor.CONF_PARITY = "parity"

Definition at line 28 of file sensor.py.

◆ CONF_RTSCTS

string homeassistant.components.serial.sensor.CONF_RTSCTS = "rtscts"

Definition at line 31 of file sensor.py.

◆ CONF_SERIAL_PORT

string homeassistant.components.serial.sensor.CONF_SERIAL_PORT = "serial_port"

Definition at line 25 of file sensor.py.

◆ CONF_STOPBITS

string homeassistant.components.serial.sensor.CONF_STOPBITS = "stopbits"

Definition at line 29 of file sensor.py.

◆ CONF_XONXOFF

string homeassistant.components.serial.sensor.CONF_XONXOFF = "xonxoff"

Definition at line 30 of file sensor.py.

◆ DEFAULT_BAUDRATE

int homeassistant.components.serial.sensor.DEFAULT_BAUDRATE = 9600

Definition at line 35 of file sensor.py.

◆ DEFAULT_BYTESIZE

homeassistant.components.serial.sensor.DEFAULT_BYTESIZE = serial_asyncio.serial.EIGHTBITS

Definition at line 36 of file sensor.py.

◆ DEFAULT_DSRDTR

bool homeassistant.components.serial.sensor.DEFAULT_DSRDTR = False

Definition at line 41 of file sensor.py.

◆ DEFAULT_NAME

string homeassistant.components.serial.sensor.DEFAULT_NAME = "Serial Sensor"

Definition at line 34 of file sensor.py.

◆ DEFAULT_PARITY

homeassistant.components.serial.sensor.DEFAULT_PARITY = serial_asyncio.serial.PARITY_NONE

Definition at line 37 of file sensor.py.

◆ DEFAULT_RTSCTS

bool homeassistant.components.serial.sensor.DEFAULT_RTSCTS = False

Definition at line 40 of file sensor.py.

◆ DEFAULT_STOPBITS

homeassistant.components.serial.sensor.DEFAULT_STOPBITS = serial_asyncio.serial.STOPBITS_ONE

Definition at line 38 of file sensor.py.

◆ DEFAULT_XONXOFF

bool homeassistant.components.serial.sensor.DEFAULT_XONXOFF = False

Definition at line 39 of file sensor.py.

◆ PLATFORM_SCHEMA

homeassistant.components.serial.sensor.PLATFORM_SCHEMA

Definition at line 43 of file sensor.py.