mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-04-28 23:37:35 +00:00
1.0 KiB
1.0 KiB
layout | title | description | date | sidebar | comments | sharing | footer |
---|---|---|---|---|---|---|---|
page | Automation example using time interval and input boolean | Automation example using time interval and input boolean. | 2016-02-07 22:35 | false | false | true | true |
{% linkable_title Change Hue light on interval to random color based on state of a input boolean %}
Note, Philips Hue is currently the only light platform that support the random effect.
input_boolean:
loop_livingcolors:
name: Loop LivingColors
initial: off
icon: mdi:spotlight
automation:
# Changes Hue light every two minutes to random color if input boolean is set to on
- alias: 'Set LivingColors to random color'
trigger:
- platform: time
minutes: '/2'
seconds: 0
condition:
- platform: input_boolean
entity_id: input_boolean.loop_livingcolors
state: on
action:
service: light.turn_on
entity_id:
- light.woonkamer_livingcolors
data:
effect: random
transition: 5
brightness: 255