Thought this would be rather simple, but have not managed to find out how. Would like to take a value from one entity (eg weight registered in garmin) and transfer that value to another entity (eg color temp for a hue bulb). Tried to get a value from an entity into an input number and then from the input number into another entity, but without success.
You can, if you get the syntax right. Hereβs my max power recorder automation that copies the power sensor value to an input_number for long-term storage:
- alias: Energy - max power recorder
description: Updates the maximum power recorder whenever prior maximum is exceeded
id: 1fef4933-5115-4055-91d2-48d5d3a051b7
trigger:
- platform: template
value_template: "{{ (states('sensor.power_meter_house')|float > states('input_number.max_power')|float) }}"
action:
- service: input_number.set_value
data:
entity_id: input_number.max_power
value: "{{ states('sensor.power_meter_house')|float }}"