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

Classes

class  SimulatedSensor
 

Functions

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

Variables

string CONF_AMP = "amplitude"
 
string CONF_FWHM = "spread"
 
string CONF_MEAN = "mean"
 
string CONF_PERIOD = "period"
 
string CONF_PHASE = "phase"
 
string CONF_RELATIVE_TO_EPOCH = "relative_to_epoch"
 
string CONF_SEED = "seed"
 
string CONF_UNIT = "unit"
 
int DEFAULT_AMP = 1
 
int DEFAULT_FWHM = 0
 
int DEFAULT_MEAN = 0
 
string DEFAULT_NAME = "simulated"
 
int DEFAULT_PERIOD = 60
 
int DEFAULT_PHASE = 0
 
bool DEFAULT_RELATIVE_TO_EPOCH = True
 
int DEFAULT_SEED = 999
 
string DEFAULT_UNIT = "value"
 
string DOMAIN = "simulated"
 
 PLATFORM_SCHEMA
 

Detailed Description

Adds a simulated sensor.

Function Documentation

◆ async_setup_platform()

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

Definition at line 61 of file sensor.py.

Variable Documentation

◆ CONF_AMP

string homeassistant.components.simulated.sensor.CONF_AMP = "amplitude"

Definition at line 23 of file sensor.py.

◆ CONF_FWHM

string homeassistant.components.simulated.sensor.CONF_FWHM = "spread"

Definition at line 24 of file sensor.py.

◆ CONF_MEAN

string homeassistant.components.simulated.sensor.CONF_MEAN = "mean"

Definition at line 25 of file sensor.py.

◆ CONF_PERIOD

string homeassistant.components.simulated.sensor.CONF_PERIOD = "period"

Definition at line 26 of file sensor.py.

◆ CONF_PHASE

string homeassistant.components.simulated.sensor.CONF_PHASE = "phase"

Definition at line 27 of file sensor.py.

◆ CONF_RELATIVE_TO_EPOCH

string homeassistant.components.simulated.sensor.CONF_RELATIVE_TO_EPOCH = "relative_to_epoch"

Definition at line 30 of file sensor.py.

◆ CONF_SEED

string homeassistant.components.simulated.sensor.CONF_SEED = "seed"

Definition at line 28 of file sensor.py.

◆ CONF_UNIT

string homeassistant.components.simulated.sensor.CONF_UNIT = "unit"

Definition at line 29 of file sensor.py.

◆ DEFAULT_AMP

int homeassistant.components.simulated.sensor.DEFAULT_AMP = 1

Definition at line 32 of file sensor.py.

◆ DEFAULT_FWHM

int homeassistant.components.simulated.sensor.DEFAULT_FWHM = 0

Definition at line 33 of file sensor.py.

◆ DEFAULT_MEAN

int homeassistant.components.simulated.sensor.DEFAULT_MEAN = 0

Definition at line 34 of file sensor.py.

◆ DEFAULT_NAME

string homeassistant.components.simulated.sensor.DEFAULT_NAME = "simulated"

Definition at line 35 of file sensor.py.

◆ DEFAULT_PERIOD

int homeassistant.components.simulated.sensor.DEFAULT_PERIOD = 60

Definition at line 36 of file sensor.py.

◆ DEFAULT_PHASE

int homeassistant.components.simulated.sensor.DEFAULT_PHASE = 0

Definition at line 37 of file sensor.py.

◆ DEFAULT_RELATIVE_TO_EPOCH

bool homeassistant.components.simulated.sensor.DEFAULT_RELATIVE_TO_EPOCH = True

Definition at line 40 of file sensor.py.

◆ DEFAULT_SEED

int homeassistant.components.simulated.sensor.DEFAULT_SEED = 999

Definition at line 38 of file sensor.py.

◆ DEFAULT_UNIT

string homeassistant.components.simulated.sensor.DEFAULT_UNIT = "value"

Definition at line 39 of file sensor.py.

◆ DOMAIN

string homeassistant.components.simulated.sensor.DOMAIN = "simulated"

Definition at line 42 of file sensor.py.

◆ PLATFORM_SCHEMA

homeassistant.components.simulated.sensor.PLATFORM_SCHEMA
Initial value:
1 = SENSOR_PLATFORM_SCHEMA.extend(
2  {
3  vol.Optional(CONF_AMP, default=DEFAULT_AMP): vol.Coerce(float),
4  vol.Optional(CONF_FWHM, default=DEFAULT_FWHM): vol.Coerce(float),
5  vol.Optional(CONF_MEAN, default=DEFAULT_MEAN): vol.Coerce(float),
6  vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
7  vol.Optional(CONF_PERIOD, default=DEFAULT_PERIOD): cv.positive_int,
8  vol.Optional(CONF_PHASE, default=DEFAULT_PHASE): vol.Coerce(float),
9  vol.Optional(CONF_SEED, default=DEFAULT_SEED): cv.positive_int,
10  vol.Optional(CONF_UNIT, default=DEFAULT_UNIT): cv.string,
11  vol.Optional(
12  CONF_RELATIVE_TO_EPOCH, default=DEFAULT_RELATIVE_TO_EPOCH
13  ): cv.boolean,
14  }
15 )

Definition at line 44 of file sensor.py.