Automation with dropdown input

Hi there,

I dont succeed in an automation, that switches on a light, depending in the chosen value from a dropdown.
The dropdown works in the dashboard, but I dont geht the light illuminating when the current time is identically to the chosen time from the dropdown.

Does anybody have something compareable and can please paste the yaml Code for the automation?

The values in the dropdown are:
4 PM
5 PM
6 PM
Sundown
1 hour after sundown

What are you using as a trigger in the automation? Perhaps we could see your code?

I have tried several triggers but I never got it working.
Thats why I dont have any code.

I have no idea how to geht this working. I tried some codes, I found online and changed it but IT was successless.

What dashboard card are you using for the dropdown?

I am using this code wirth standard cards:

type: vertical-stack
cards:
  - square: false
    type: grid
    cards:
      - type: entities
        entities:
          - entity: input_boolean.office-light_activation
            name: " "
        theme: kibibit-dark-cards
        title: Office light
      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.office-light_activation
            state: "on"
        card:
          type: entities
          entities:
            - entity: input_select.office-light_time_on
              name: close
            - entity: input_select.office-light_time_on
              name: open
    columns: 1

I have added the three entities by myself (all helpers):
input_boolean.office-light_activation
This is a boolean input. On and off are the values. It is a simple switch, that shows the options for the times (switching on and off).
input_select.office-light_time_on
input_select.office-light_time_off
This are two dropdown menus for choosing the time, for switching the light on and switching it of.

My idea is to use the entity “input_boolean.office-light_activation” as a trigger for the automation. If it is off, the automation shall not run.

description: ""
mode: single
triggers:
  - trigger: state
    entity_id:
      - input_boolean.office-light_activation
    to: "on"
conditions: []
actions: []

I am unsure, if this is the best or right way.

What you have pasted into your post looks OK, but I can’t see anything about times - that part seems to be missing.