2019-05-08 08:42:41 +02:00

2.1 KiB

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category, ha_iot_class, ha_release, ha_qa_scale, redirect_from
layout title description date sidebar comments sharing footer logo ha_category ha_iot_class ha_release ha_qa_scale redirect_from
page Random Instructions on how to integrate random numbers into Home Assistant. 2016-10-30 12:10 true false true true home-assistant.png
Utility
Sensor
Binary Sensor
Local Polling 0.32 internal
/components/sensor.random/
/components/binary_sensor.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.

{% linkable_title Binary Sensor %}

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

{% linkable_title 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 %} name: description: Name to use in the frontend. required: false type: string default: Random Binary Sensor {% endconfiguration %}

{% linkable_title 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.

{% linkable_title Configuration %}

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

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

{% configuration %} name: description: Name to use in the frontend. required: false type: string default: Random Sensor minimum: description: Lower limit for the values. required: false type: string default: 0 maximum: description: Upper limit for the values. required: false type: integer default: 20 unit_of_measurement: description: Defines the units of measurement of the sensor, if any. required: false type: string {% endconfiguration %}