Updates to #307 - turn the light on when someone logs into minecraft.

This commit is contained in:
ccostan
2018-02-03 10:25:20 -05:00
parent 2de447876a
commit d02cfe1bab
2 changed files with 12 additions and 0 deletions

View File

@@ -46,3 +46,14 @@ automation:
data_template:
value1: "There are {{states.sensor.bear_stone.state}} Minecraft users online: {{ states.sensor.bear_stone.attributes.users_online }}"
who: 'carlo'
- service: light.turn_on
entity_id:
- light.justin_go
data_template:
color_name: >
{% if states.sensor.bear_stone.state|int == 1 %}
gold
{% else %}
green
{% endif %}