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

Classes

class  TOTPSensor
 

Functions

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

Variables

 PLATFORM_SCHEMA
 
int TIME_STEP = 30
 

Detailed Description

Support for One-Time Password (OTP).

Function Documentation

◆ async_setup_entry()

None homeassistant.components.otp.sensor.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry,
AddEntitiesCallback   async_add_entities 
)
Set up the OTP sensor.

Definition at line 61 of file sensor.py.

◆ async_setup_platform()

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

Definition at line 36 of file sensor.py.

Variable Documentation

◆ PLATFORM_SCHEMA

homeassistant.components.otp.sensor.PLATFORM_SCHEMA
Initial value:
1 = SENSOR_PLATFORM_SCHEMA.extend(
2  {
3  vol.Required(CONF_TOKEN): cv.string,
4  vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
5  }
6 )

Definition at line 28 of file sensor.py.

◆ TIME_STEP

int homeassistant.components.otp.sensor.TIME_STEP = 30

Definition at line 25 of file sensor.py.