Conditional Card for seasonal lights

I would like certain dashboard “buttons” to only appear in December & January; looking through previous threads I have come up with the following code for a Conditional Card, but it returns a “Configuration error: Conditions need to be an array” message. Any suggestions as to where I am going wrong, as I am not sure what an array is or how to create one !?!?

Many thanks!

type: conditional
conditions: "{{ now().month in [1, 12] }}"
card:
  type: entity
  entity: switch.tek_05_bridge_xmas_lights

You have one condition that is text not, as the error says, an array. I think you need to format it like this:

conditions:
    - "{{ now().month in [1, 12] }}"

If not that, that’s where you need to be headed. Someone who is more of a YAML expert than I might chime in if I didn’t get it right.

There are no templates supported in a conditional card.

Make a template binary sensor and condition your card on that instead.

Thanks @karwosts ; I am at the edge of my knowledge here, but I have created a Template binary sensor (see below), but it always shows as “off”, even after waiting for several minutes. I have run the script through the Developers tools and it works correctly in there, so I am obviously doing something wrong - but not sure what.

The Conditional card never appear on my Dashboard, which is what I am trying to acheive.

type: conditional
conditions:
  - condition: state
    entity: binary_sensor.oct2
    state: "on"
card:
  type: entities
  entities:
    - entity: switch.tek_04_tree_garland_socket_1
      name: Tree & Garland
      icon: mdi:pine-tree
    - entity: light.garland_lights
      name: Dining Room Garland
      icon: mdi:string-lights
  state_color: true
  title: Christmas
  show_header_toggle: false

The status always shows “Off” on the Template binary sensor page below, whether or not I change the months to be “[1, 10]” or “[1, 11]”, but if I run `“{{ now().month in [1, 10] }}” ’ through the Template checker it returns True when [1, 10] is used.

Get rid of the quotation marks in the state template selector, they don’t belong there.

Fab-u-lous - thank you so much!!!

Works perfectly!