The above code did validate without issues on esphome but the trouble is that I do not know how to turn on the light with the flicker effect and to also set a custom brightness to it.
In node-red I would just call the turn_on service and give it the following parameter:
{“effect”:“flicker”,“brightness”:178}
I googled but I could not find relevant hits how to integrate this flicker and brightness parameter to esphome.
I’ve not used light controll inside ESPHome jet (why not in HA?). Are you sure, the esp has the correct current time set? You should be able to verify in the log.
If not, specify a time reference, for example home assistant, with
Thanks Sean. Yes I did have all the automations previously defined in node-red and it is working well. I then realized that esphome has built in automations, so I am just keen to try this out. It looks like this is a lot more complex than I initially thought.
I have got compile errors while setting the sntp time-zone and/or setting the time to homeassistant.
so I am giving up now and reverting back to automations using node-red.