Step 1: Set up an Input Number to use as a place to store the state of your Template number. For purposes of the rest of this example I will use input_number.max_watt_save
. When you set up your helper, set the min
and max
to the widest acceptable limits that you would ever use. Remember, this is just a storage helper.
Step 2: Set up your Template number in your configuration.yaml
or templates.yaml
file.
template:
- number:
- name: Max Watt Use
state: "{{ states('input_number.max_watt_save') }}"
set_value:
- service: input_number.set_value
data:
value: "{{ value }}"
target:
entity_id: input_number.max_watt_save
step: 1
min: 0
max: "{{ states('input_number.input_watt_house') | int * 0.9 }}"
availability: "{{ states('input_number.input_watt_house') | is_number }}"