Data entity field on Lovelace Card / Sprinkler Controller

So my Google-fu must be off because I’m sure there’s a way to do this, but I’m not finding it.

What I’m doing:
I am putting together a sprinkler controller based off an 8266 and an 8 relay board. Super simple stuff.

I’ve got a great script set up that runs through each station for a few minutes, and I have that script called from an automation.

I have a nice Lovelace card that shows the toggle buttons for each station, a button to run the script, and a button to enable / disable the scheduled runs.

What I need help with:

  • I need is a data field on the card that is the entry point for the length of time that each station runs without having to dive down into the script and change the time for each station.

  • I need a toggle button to enable or disable the particular station manually without going in and editing the script. i.e. manual override in case one zone doesn’t need water one cycle.

  • I need the syntax that the LovelaceUI frontend needs to add a ‘day’ (ex: ‘Tuesday’) to the condition so that the script / automation only runs on one or two days of the week (we’re limited to watering on Tues / Thurs here). I’ve gathered that the Conditions>Condition Type should be ‘Template’ but that’s as far as I’ve been able to get.

    • One step further down, is there a way to set up another card that has a toggle for each of the days and I simply choose the days I want it to run from there?

Thanks for the help!

Thanks Tom, looks like a cool setup. I’m still trying to get some info regarding the original request though as I have several projects now lined up that I want to use this info for.


Answered in the thread linked to.

Answered in the thread linked to.

Answe… you get the idea.

See the config for this card and it’s associated automations all posted in that thread:


@tom_l Sorry about that… I clicked the git hub link, not the thread link.

1 Like

Ah, I see. Easy mistake to make with the preview. I should have just embedded the URL I meant, like this and said to read the whole thread. Apologies.

1 Like

OK, sort of following along with most of this now; the learning curve is steep!

What I’m finding though is that I’m having to put code in a ton of different places for this to work. For example, the lovelace card information is in one place, the sensor information is in a sensors.yaml file, the input_booleans are in the config file… etc.

How does one consolidate all of this into a folder (ex: custom_components/sprinkler) so that it’s A) a bit more siloedto just this project and B) easier to implement into someone else’s HA instance?

Try this:

1 Like

Pffft. Packages are for the weak minded.

What’s your better suggestion?

Learn to track multiple complicated things in multiple locations in your mind over long periods of time.

And though this is actually how I do it, the previous statement was actually a joke (I should have used a smilie face). Markus’s advice is good.

1 Like