WTH,Unable to get input_number.set_value ,automation and templates help
like this
alias: tesla P
description: ""
trigger:
- platform: state
entity_id:
- sensor.tesla_shift_state
to: P
condition: []
action:
- service: input_number.set_value
data_template:
entity_id: input_number.tesla_odo_since_last_p_base
value: "{{states('sensor.tesla_odometer') | float }}"
mode: single
template:
- sensor:
- name: tesla odo since last p base
unique_id: "tesla_odo_since_last_p_base"
icon: mdi:thermometer
unit_of_measurement: "km"
state: >-
{{ (states('input_number.tesla_odo_since_last_p_base') }}