Untitled
unknown
yaml
3 years ago
412 B
8
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...