mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-04-30 00:07:35 +00:00
998 B
998 B
layout | title | description | date | sidebar | comments | sharing | footer | logo | ha_category | ha_iot_class | ha_release |
---|---|---|---|---|---|---|---|---|---|---|---|
page | Random Binary Sensor | Instructions how to integrate random state sensors into Home Assistant. | 2017-10-27 08:00 | true | false | true | true | home-assistant.png | Sensor | Local Polling | 0.57 |
The random
binary sensor platform is creating random states (True
, 1, on
or False
, 0, off
). This can be useful if you want to test automation rules. It generates a new state every time it is polled.
To enable the random binary sensor, add the following lines to your configuration.yaml
:
# Example configuration.yaml entry
binary_sensor:
- platform: random
{% configuration %} name: description: Name to use in the frontend. required: false type: string {% endconfiguration %}
See the entity component options to control how often the main component polls the random binary sensor. The default is 30 seconds.