Unwanted (default) values from blueprint in automations

Hi,

this is my blueprint:

Since some days i´ve got a problem which i can not fix.

At some time i added this input and everything worked as expected.

    elevation_check:
      name: Sun elevation check (Optional)
      description: This is the angle between the sun and the horizon. Negative values mean the sun is BELOW the horizon.
      default:
      selector:
        number:
          min: -90
          max: 90
          unit_of_measurement: degrees

So if a user do not want to use a elevation check he just do not touch this input and it is ignored. (by this code):

  - condition: template
    value_template: "{{ (elevation_check == none) or (state_attr('sun.sun','elevation') <= elevation_check | float) }}"

But now everytime i build an automation with this blueprint where i do not touch the elevation check an automation looks like this:

- id: '1609622504673'
  alias: 33Yet Another Motion Automation
  description: ''
  use_blueprint:
    path: networkingcat/yet_another_motion_automation.yaml
    input:
      elevation_check: '0'
      motion_entity: input_boolean.test_toggle
      light_target:
        device_id: f16602999d3a48e3a91ad4e7371cc14e
      no_motion_wait: '120'

The elevation check entry should not be there. And when i introduced this in this blueprint it wasnt.

Even more interesting sometimes (most of the time when i change something in the automation) i´ve got this also in the automation:

time_scene_night: 00:00:00

also not configured, it is just there as the elevation entry.

Also if you really configure a time it looks like this:

time_scene_ambient_start: '01:00:00'

so with the ’ and not without.

Deleting the line results in that they are getting back automatically.

What i am doing wrong?

I already updated to the newest version.
I completly deleted all automations from this bluerprints (and the blueprint) and rebuild them (also a different name does not help)
I restarted automation and the docker container several times.

so a little update.

I tried it once again with

    elevation_check:
      name: Sun elevation check (Optional)
      description: This is the angle between the sun and the horizon. Negative values mean the sun is BELOW the horizon.
      default: none
      selector:
        number:
          min: -90
          max: 90
          unit_of_measurement: degrees

so with a default of none.

Then this bug does not appear but my blueprint does not work correctly.
That was because

elevation_check | float

defaults to 0.0 if not possible and i did not know that.

now it is

elevation_check | float(90)

and seems to working fine.

However i still have the bug with the times added to the automations. Also i was able to find out that everytime you open the automation and saves it one time gets added. Always the bottom one in the GUI.

I do not think this is something i can change so i am guessing this is a bug.

So at some point you have this in your configuration, even no time is actively configured:


1alias: 01 Yet Another Motion Automation
description: ''
use_blueprint:
  path: test/ms2.yaml
  input:
    no_motion_wait: '1'
    motion_entity: input_boolean.test_toggle
    light_target:
      device_id: f16602999d3a48e3a91ad4e7371cc14e
    time_scene_night: '00:00:00'
    time_scene_evening: '00:00:00'
    time_scene_day: '00:00:00'
    time_scene_morning: '00:00:00'
    time_scene_ambient_end: '00:00:00'
    time_scene_ambient_start: '00:00:00'

Rmove the default: line entirely from elevation_check:. Having default: in an input means it’s a required input. I don’t know whether adding ‘none’ works. When you remove default: the ...== none check works.