More cool color updates : #307

This commit is contained in:
ccostan 2018-02-03 10:37:19 -05:00
parent 5929a79000
commit 63b3edf433
1 changed files with 12 additions and 8 deletions

View File

@ -42,20 +42,24 @@ automation:
{% endif %} {% endif %}
action: action:
- service: script.notify_engine - service_template: >
data_template: {% if states.sensor.bear_stone.state|int == 0 %}
value1: "There are {{states.sensor.bear_stone.state}} Minecraft users online: {{ states.sensor.bear_stone.attributes.users_online }}" light.turn_on
who: 'carlo' {% else %}
light.turn_off
- service: light.turn_on {% endif %}
entity_id: entity_id:
- light.justin_go - light.justin_go
data_template: data_template:
color_name: > color_name: >
{% if states.sensor.bear_stone.state|int == 1 %} {% if states.sensor.bear_stone.state|int == 1 %}
gold gold
{% else %} {% elif states.sensor.bear_stone.state|int == 2 %}
green green
{% elif states.sensor.bear_stone.state|int == 3 %}
blue
{% else %}
red
{% endif %} {% endif %}
- service: light.turn_on - service: light.turn_on
@ -63,5 +67,5 @@ automation:
- light.justin_go - light.justin_go
data: data:
flash: long flash: long
- service: script.flash_notify - service: script.flash_notify