#Conditional within conditional

1 messages ยท Page 1 of 1 (latest)

indigo osprey
#

I have this list of chores as booleans to help my kids be focused and remember the tasks they have in the morning, all things are conditional dependant on the day, and time of day, so there are different lists in the morning afternoon, and some items only appear on specific days, i would like to make a conditional within a condition, is that at all possible, without creating a new card within a card?

below is an excerpt from the morning file, it only has monday, otherwise the message becomes too long



type: vertical-stack
cards:
  - type: conditional
    conditions:
      - entity: sensor.day_of_week
        state: Mandag
      - entity: sensor.is_before_09am
        state: 'true'
    card:
      type: entities
      title: Mandag
      show_header_toggle: false
      state_color: true
      entities:
        - entity: input_boolean.v_spise_morgenmad
        - entity: input_boolean.v_borste_taender
        - entity: input_boolean.v_tag_toej_paa
        - entity: input_boolean.v_pakke_skoletaske
        ## i would like the line below to be conditional on a sensor##
        - entity: input_boolean.v_solcreme
        ## the rest should be normal##
        - entity: input_boolean.v_husk_biblioteksboeger
        - entity: input_boolean.v_pakke_handboldtoej
        - entity: input_boolean.v_skema
.....

layout_options:
  grid_columns: 4
  grid_rows: auto```

is this at all possible?
worthy river
indigo osprey
#

the whole thing is already conditional on a weekday, and a sensor, but i can't figure out how to make just a single row conditional, and i really don't do well without an example ๐Ÿ˜ฆ

i feel like the link you shared only will do a full card conditional?

remote ginkgo
#

You can do conditions on every row independently

#

So that always shows most of the sensors, and then displays the spare bedroom only if the guest heating is turned on (or off as i changed it to for this demo)

indigo osprey
#

that is excellent, i just could not figure out the syntax for this! thank you, i am not very familiar with .yaml ๐Ÿ˜„

remote ginkgo
#

tbh i think i cheated and stole the conditions from a conditional card and then just changed things around a bit until it worked ๐Ÿ˜›