#Automation YAML is being changed after saving, exitting and coming back. whats going on?

16 messages · Page 1 of 1 (latest)

trim wadi
#

My current action yaml is the following:

metadata: {}
data:
  is_mow: true
  is_dump: false
  is_edge: false
  job_mode: 0
  speed: 0.3
  ultra_wave: 1
  channel_mode: 0
  channel_width: 25
  rain_tactics: 1
  toward_included_angle: {input_number.yuka_angle_helper}
  toward_mode: 0
  border_mode: 2
  obstacle_laps: 1
  start_progress: 0
target:
  entity_id: lawn_mower.yuka

When i safe that above yaml, save, and come back, it has changed to the following:

metadata: {}
data:
  is_mow: true
  is_dump: false
  is_edge: false
  job_mode: 0
  speed: 0.3
  ultra_wave: 1
  channel_mode: 0
  channel_width: 25
  rain_tactics: 1
  toward_included_angle:
    input_number.yuka_angle_helper: null
  toward_mode: 0
  border_mode: 2
  obstacle_laps: 1
  start_progress: 0
target:
  entity_id: lawn_mower.yuka

Am i doing something wrong?

cobalt wigeon
#

what did you want to get from:

#

toward_included_angle: {input_number.yuka_angle_helper}

trim wadi
#

the number of that input number helper.

cobalt wigeon
#

then you need to use actual Jinja syntax

trim wadi
#

changed it to "toward_included_angle: {{ states('input_number.yuka_angle_helper') }}"
But then it changes to:

    "[object Object]": null```
bronze flame
#

toward_included_angle: "{{ states('input_number.yuka_angle_helper') }}"

#

don't include the data you are trying to set in the outer quotes

trim wadi
#
  toward_included_angle: {{ states('input_number.yuka_angle_helper') }}```
#

changes to:

#
  toward_included_angle:
    "[object Object]": null```
bronze flame
#

yes, you need outer quotes around the template

trim wadi
#

thanks, that seem to have worked as i can no longer switch to visual editor.