Skip to content

Add cookbook with automation example using time interval and input boolean #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 7, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
layout: page
title: "Automation example using time interval and input boolean"
description: "Automation example using time interval and input boolean."
date: 2016-02-07 22:35
sidebar: false
comments: false
sharing: true
footer: 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._

```yaml
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
```