Random


The random integration simply creates random values or state. This can be useful if you want to test automation rules or run an interactive demo. It generates a new state every time it is polled.

Binary Sensor

The random binary sensor platform is creating random states (true, 1, on or false, 0, off).

Configuration

To enable the random binary sensor, add the following lines to your configuration.yaml file:

# Example configuration.yaml entry
binary_sensor:
  - platform: random

Configuration Variables

name string (Optional, default: Random Binary Sensor)

Name to use in the frontend.

Sensor

The random sensor platform is creating random sensor values (integers) out of a given range. Returned values form a discrete uniform distribution, meaning that each integer value in the range configured is equally likely to be drawn.

Configuration

To enable the random sensor, add the following lines to your configuration.yaml file:

# Example configuration.yaml entry
sensor:
  - platform: random

Configuration Variables

name string (Optional, default: Random Sensor)

Name to use in the frontend.

minimum string (Optional, default: 0)

Lower limit for the values.

maximum integer (Optional, default: 20)

Upper limit for the values.

unit_of_measurement string (Optional)

Defines the units of measurement of the sensor, if any.