Turn on light at sunset

I’d make them completely different t

Good point. I picked that at random. Unfortunately it was one of my early automations. However I do the opposite and always make them the same now for precisely that reason.

- id: mains_power_fail_alert
  alias: 'Mains Power Fail Alert'
  initial_state: true
  trigger:

One day when I have some spare time I may delete all the automation ids.

1 Like

Using quotes…I now get it. Where is that in the docs? I tried searching for ‘using quotes’, etc. and could not find it.

ID’s, good to know I can name it, not just present a number. Probably a good thing to use it in case the UI editor becomes more robust someday.

Thanks @SteveDinn, makes sense.

Where is that in the docs?

I’ve never seen it. I think it is assumed knowledge that strings are quoted numbers aren’t. Could be in the YAML specification (i.e. not just for home assistant but everything that uses YAML).

Scott this is “your” thread we appear to have hi-jacked, the discussion seems to be relevant to you so that’s great, but it is we who should be appologising to you (not enough that we’ll stop though :cough: :rofl: )

1 Like

All good; wanted to make sure this shouldn’t be a new thread as this has gone off-subject.

Automation IDs…if I create my own within the configurator, the UI editor does not recognize that it can be edited. So unless you create the automation in the editor, I guess adding such in the configurator doesn’t matter. As you said, time to get rid of the those IDs :slight_smile:

1 Like

Well there you go. I’ve never tested it and learned something today. I am wasting my time with automation ids.

Tom, noticed while editing (with just the home assistant addon) that when you add a space it lets you, but when you backspace it takes out two (a tad inconsistent but I suppose that’s to allow normal writting, both for comments AND for just mid normal code … I would hope that rainbow allows the same … :thinking: )
… off now to download rainbow and have a play with that.
From the discussion (Tom & Taras) I’m assuming that using multiple addon’s simultaneously is permitted ? So Home Assistant + Rainbow + Config Helper ??? (where do I find that ?)
Cheers

P.S. I don’t think you have saved me any time at all, I think I will now spend ages going through all my files (obviously with currently valid yaml) making all the spacing 100% consistent. Damn my OCD ! :man_facepalming:

I would hope that rainbow allows the same

Yep.

I’m assuming that using multiple addon’s simultaneously is permitted ?

Yes again. (except they’re called ‘extensions’)

where do I find that

there’s a search field in the Extension menu. Or Google.

I noticed there are a couple different ways to express turning on/off the device/light, which I have noted below. Is there a ‘best’ way to present this, either or?

      entity_id: light.living_room_shelf_lamp
    service: light.turn_on
  - service: homeassistant.turn_on
    entity_id: light.living_room_shelf_lamp

Tom came from … THE DARK SIDE !!! :ominous music: :imp:

1 Like

People who hand code prefer the latter as it’s easier to read and is othen shorter (no data: )
People who don’t hand code … don’t know any better :rofl:

You could use the home assistant service everywhere if you wanted to.

I tend to use platform specific services when available, no real reason. It just feels right. Sometimes it catches me out (e.g. groups with more than one platform in them).

I prefer the second.

  • What am I doing?
  • What am I doing it to?
  • What are the parameters?
1 Like

So, that concludes todays lesson on how to turn on a light at sunset. :smiley:

See, this is why it takes soooo long to bring technology to market :upside_down_face:

How do I turn a light on at sunrise though? … in someone else’s house … if they are not listed on Shodan? :japanese_goblin:

Doh. replied to the wrong person.

I usually just use the switch …
Unless I’m there unbeknownst to the owner … then I just sneak around in the dark :rofl:
As quiet as possible … except for when I stub my toe cos I don’t know the layout, or if their kid left lego on the floor … :sob:

Oooooooh !!! … I just found the “indent one space” extension … nifty !
Space - Indents the block and Shift-Space Outdents it ! Sexy ! :star_struck: :smiling_face_with_three_hearts: