Set lights to simulate sunrise and sunset

Check your indentation, make sure you follow 123 YAML spaces/indentation. The “sequence” part is missing a space, also check other lines.

1 Like

ardysusilo is correct; move sequence to the right by one space.

1 Like

Thanks for your reply, But i must be stupid or something (sorry about that)
But i cant wrap my head around it.
I have tried to change the space and also change alot of other variables, but 6 problems is the lowest count i get.

No, you’re not stupid. I made two stupid mistakes in the example I posted. Sorry about that.

I have already corrected them and now the example (posted above) should work.

Here are the two corrections:

  1. Replace this:
  - variables:
      step_time: 10
      step_pct: 10

with this:

  variables:
    step_time: 10
    step_pct: 10
  1. Replace this:
      count: '{{ (100 / step_pct) | round(0, 'ceil') }}'

with this:

      count: "{{ (100 / step_pct) | round(0, 'ceil') }}"
1 Like

Hi again!
Now the code seems to work, Thanks :slight_smile:
But do i need to make one for on and one for off? Or is it one for both?
If i dont want 100% to be max, Do i change brightness_pct: to whatever i want to be max?

Yes.

Change the 100 in the following template to whatever value you want to be the maximum brightness.

      count: "{{ (100 / step_pct) | round(0, 'ceil') }}"