Trigger with condition time and a varible set

Folks,
I wanna build a automation with a trigger which only should fire the time between 9 and 15 and when a variable is set to off. My Idea is to create input_boolean for quite:zone, dark_zone and when set I wanna keep a trigger from beeing fired.

What I did but it does not work was:

  condition:
     condition: and
     conditions:
       - condition: time
         after: '8:00:00'
         before: '23:55:00'
       - condition: state
         entity_id: input_boolean.quite_mode
         state: 'off'

seems not to work for my automation and the action never got fired ???
Here the whole action. Ignore the # as I just documented it out

#- alias: "Switch on Wohnzimmer Media Player if Motion is detected during day"
#  trigger:
#     platform: state
#     entity_id: sensor.fibaro_system_fgms001_motion_sensor_burglar_6_10
#     from: '0'
#     to: '8'
#  condition:
#     condition: and
#     conditions:
#       - condition: time
#         after: '8:00:00'
#         before: '23:55:00'
#       - condition: state
#         entity_id: input_boolean.quite_mode
#         state: 'off'
#  action:
#    service: media_player.turn_on
#    entity_id: media_player.bad
#     service: script.turn_on
#     entity_id: script.sonos_wz_timer

What is that? can not post formated code any longer
indent preformatted text by 4 spaces

you don’t need an “and” because conditions all have to be met before an action is fired anyways.

condition:
  - condition: time
    after: '8:00:00'
    before: '23:55:00'
  - condition: state
    entity_id: input_boolean.quite_mode
    state: 'off'

Thanks. That solved my problem and it’s working as expected