[WIP] Visual Automation Builder

Hey,

since generating new automations always requires restarting the whole system, i considered implementing a visual assistant right into the frontend.

Something similar to: https://www.athom.com/en/homey/flow/

(Well the first step would be to reload the config on the fly or do something like save to config but only reload the automation part)

Let me know what you think! :wink:

TheRealLink

2 Likes

I was just about to post something similar, and I actually need something now to create schedules! I would give $100 if a basic time scheduler could be implemented by tomorrow. I don’t need it to be updated on the fly, though it is definitely a good thing to have.
I would document it and work with you if that would help.
I already made a basic mockup for what I need.

2 Likes

I am definitely a fan of a real gui, it would make it much easier for non developers to work with HA.
The truth is that it has to be done properly though, as was the rest of the software. (Kudos to @balloob, all devs, and all helpers!)

2 Likes

If you are serious about creating an automation, stick to the bare minimum and start working from there.

Our automations are based on three things:

  • One or more trigger that will initiate the automation
  • 0 or more conditions that have to be met for the automation to continue execution
  • action that calls a service

The bare minimum would be:
1 form that allows configuring a state trigger: entitiy_id, from (state), to (state)
1 form that allows specifying which service to call and with which entity id (optional)
Whenever an option changes, update a textarea with how the YAML would look

Things to add afterwards:

  • allow picking trigger platforms and add those forms
  • allow adding multiple triggers
  • allow picking condition platforms and add those forms
  • allow adding multiple conditions
  • allow setting condition type to OR or AND
  • allow pasting in YAML that will update the form ??
  • create an API to either update configuration.yaml or have it live in a standalone file that will get included.

As there are three things that would work chronologically, I would expect the UI to be 3 columns in wide mode: trigger, condition, action.

At first, this wouldn’t even need to be in the Home Assistant app. This could be hosted on your own website which would allow you to iterate faster. Only if we would offer an API does it need to be added to the app.

2 Likes

What about using something like Blockly (https://developers.google.com/blockly/) which is also used by Zipato and Domoticz for building rules. Looks like it could be a good way of using an existing system to enhance HA pretty rapidly.

6 Likes

I am also really interested in seeing something like blockly, zipato, or habmin’s visual rule editor.

Why take all the time to build when it could be faster to port and implement.

Any update on that ?

+1 for Google Blockly!
I think that a visual editor for automations is the only big feature, today, that is missing comparing with others systens.
My suggestions:
A left menu “Automations” (or rules, scenes) with a CRUD list.
When editing an item we could Enable/Disable, pick the Groups to show, and edit the Triggers (cron based, location based, etc) and Conditions/Actions (handled by Blocky)

Great news on that https://twitter.com/balloob/status/862142327459938304

4 Likes

This is indeed the best news I had after all other best news :). Looking forward testing this awesome stuff

Will there be an on the fly solution for new added components or sensors etc for not being needed to restart Hass?