Untitled
Anonymous
yaml
11/10/2022 4:30 PM
552 B
15
Indexable
trigger:
- platform: state
entity_id: sensor.battery
variables:
diff: "{{ trigger.to_state.state | float(-1000) - trigger.from_state.state | float(1000) }}"
condition:
- "{{ diff > 0 }}"
action:
- service: input_number.set_value
data:
value: "{{ states('input_number.total') | float + diff / 100 }}"
target:
entity_id: input_number.total
mode: queued
max: 10Editor is loading...