Much better adaptation of the py file. #307
This commit is contained in:
parent
69744121e3
commit
2de447876a
|
@ -31,10 +31,18 @@ automation:
|
|||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.bear_stone
|
||||
to: '1/10'
|
||||
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{% if states.sensor.bear_stone.state|int == 0 %}
|
||||
false
|
||||
{% else %}
|
||||
true
|
||||
{% endif %}
|
||||
|
||||
action:
|
||||
- service: script.notify_engine
|
||||
data_template:
|
||||
value1: "The following users are online: {{ states.sensor.bear_stone.attributes.users_online }}"
|
||||
value1: "There are {{states.sensor.bear_stone.state}} Minecraft users online: {{ states.sensor.bear_stone.attributes.users_online }}"
|
||||
who: 'carlo'
|
||||
|
|
Loading…
Reference in New Issue