Yaml Custom Automations

Bunch of questions I’m having trouble finding. I’m finally getting all of my devices off ST and on HA and need to start getting my custom automations going. It looks like I could probably do them with configuration/automations but I don’t want several automations and a bunch of helpers clogging up my main pages just for one of the automations that I need. I will be making them into blueprints so they are easier to implement when done with them.

  1. Is there a safe place on HA I can save the automations while I’m writing them before implementing so they don’t crash HA because they are not finished?

  2. Can a trigger be a NOT or AND or are triggers only ORs? If only OR’s can I have a blank trigger and just do conditions?

  3. Can I make helpers inside the code (ST atomicState) that stay inside the code or do I have to make them in Helpers to be able to use them?

  4. If the trigger that started a timer becomes FALSE does the timer STOP?

  5. Is there just an easy way to copy my groovy automations to yaml? Guess this one should of been first :slight_smile:

  6. Can I put something like log.debug in the code so when its running I can see how its running and where it is getting stuck at if there is a bug? Or will the default debugging page work?

  7. Can I make a long entity name = something short inside the code for easier use of it?

If curious the ST versions are on my github and here is a list of what I need to bring over.
HVAC dehumidifier
HVAC humidifier
HVAC fan speed control
HVAC fan circulate
HVAC smart vents (not mine)
Block heater cycle (for diesel truck)

  1. I save mine to a file called “scratch-pad.yaml” in /config. It gets backed up but not loaded into Home Assistant.
  2. If you place two triggers in the trigger section then repeat them as conditions they will behave as AND triggers. This does not work for event triggers.
  3. You can make helpers in YAML and not the UI, I don’t use the UI for this at all (force of habit).
  4. No.
  5. Maybe, I’m not that familiar with the UI editor but I believe there is a YAML view. You can copy your automations from there and paste in a file.
  6. Yes, see https://www.home-assistant.io/integrations/logbook/#custom-entries however it is much easier just to use the automation trace. The automation needs an id to use this feature.
  7. In some places yes, like in templates. It would be better if changed your entity ids in configuration / entities.

Thanks for the info