Day of the week picker for automation on dashboard

I’m currently using a condition in an automation to only run the automation on Mon, Wed, and Fri.

condition:
  - condition: time
    before: '23:59:59'
    weekday:
    - mon
    - wed
    - fri
    after: 00:00:00

I’d prefer an option to pick the days of the week the automation runs that isn’t hard coded. Is there a way to add a day of the week picker on the dashboard that I can use as a condition in an automation?

Input booleans and the custom button card:

Screenshot 2022-06-21 at 14-46-11 Overview – Home Assistant

Thanks!

I’m having trouble figuring out how you are using the input booleans. Presumably, those day of the week buttons on the bottom turn on/off the boolean, correct? If so, how are those used in the automation? Do you have an automation for each day of the week and those day buttons are turning on/off the automations?

My input booleans are named like this:

input_boolean.zone_1_mon
input_boolean.zone_1_tue
input_boolean.zone_1_wed
input_boolean.zone_1_thu
input_boolean.zone_1_fri
input_boolean.zone_1_sat
input_boolean.zone_1_sun

For use with a template condition like this:

condition: template
value_template: >
  {% set day = strptime(states('sensor.date'), '%Y-%m-%d').strftime('%a')|lower %}
  {{ is_state('input_boolean.zone_1_' ~ day, 'on') }}

If you are going to be using this in lots of places it makes sense to create a day sensor (and tomorrow sensor if you wish) sensor:

template:
  - sensor:
      - name: "Day Today"
        state: "{{ strptime(states('sensor.date'), '%Y-%m-%d').strftime('%a')|lower }}"

      - name: "Day Tomorrow"
        state: "{{ (strptime(states('sensor.date'), '%Y-%m-%d') + timedelta(days=1)).strftime('%a')|lower }}"

So you can simplify the condition template to:

condition: template
value_template: >
    {% set day = states('sensor.day_today') %}
    {{ is_state('input_boolean.zone_1_' ~ day, 'on') }}

For some reason I cant get it working. Anyone can help ,me?
``yalm


Can you explain me how to introduce this correctly in the yalm?

My input booleans:
input_boolean.zone_remanso_day