I have this automation working but cannot use the value in a utility meter to calculate cumulative usage, do I need to template the value or can it be done within the automation?
alias: Get heat pump power
description: ""
trigger:
- platform: state
entity_id:
- sensor.myenergi_2gm_home_consumption
condition: []
action:
- variables:
target_charge: >-
{{ states('sensor.heatpump_power') | float -
states('sensor.myenergi_2gm_power_charging') | float }}
- service: input_number.set_value
data:
value: "{{ target_charge }}"
target:
entity_id: input_number.daikin_watts
mode: single