Advertisement
noam76

conditional with filters

Dec 2nd, 2019
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 5.34 KB | None | 0 0
  1. choice area from a list(kitchen,salon,room) display on a sub-list the appropriate timer(kitchen timer1, kitchen timer2, kitchen timer3, salon timer1, salon timer2, etc..)
  2. display the select timer card on the bottom.
  3.  
  4. type: 'custom:vertical-stack-in-card'
  5. title: Timers
  6. cards:
  7.   - type: entities
  8.     entities:
  9.       - input_select.living_room_preset
  10.   - type: conditional
  11.     conditions:
  12.       - entity: input_select.living_room_preset
  13.         state: Kitchen
  14.     card:
  15.       type: entities
  16.       entities:
  17.         - input_select.kitchen_timers_preset
  18.   - type: conditional
  19.     conditions:
  20.       - entity: input_select.living_room_preset
  21.         state: Salon
  22.     card:
  23.       type: entities
  24.       entities:
  25.         - input_select.salon_timers_preset
  26.   - type: conditional
  27.     conditions:
  28.       - entity: input_select.living_room_preset
  29.         state: Dining Room
  30.     card:
  31.       type: entities
  32.       entities:
  33.         - input_select.dining_room_timers_preset
  34.   - type: conditional
  35.     conditions:
  36.       - entity: input_select.living_room_preset
  37.         state: Kitchen
  38.       - entity: input_select.kitchen_timers_preset
  39.         state: Kitchen Timer1
  40.     card:
  41.       title: Timer Kitchen 1
  42.       show_header_toggle: false
  43.       type: entities
  44.       entities:
  45.         - entity: input_boolean.kitchen1_timer
  46.           name: Timer ON/OFF
  47.         - entity: input_datetime.kitchen1_timer_start
  48.         - entity: input_datetime.kitchen1_timer_end
  49.   - type: conditional
  50.     conditions:
  51.       - entity: input_select.living_room_preset
  52.         state: Kitchen
  53.       - entity: input_select.kitchen_timers_preset
  54.         state: Kitchen Timer2
  55.     card:
  56.       title: Timer Kitchen 2
  57.       show_header_toggle: false
  58.       type: entities
  59.       entities:
  60.         - entity: input_boolean.kitchen2_timer
  61.           name: Timer ON/OFF
  62.         - entity: input_datetime.kitchen2_timer_start
  63.         - entity: input_datetime.kitchen2_timer_end
  64.   - type: conditional
  65.     conditions:
  66.       - entity: input_select.living_room_preset
  67.         state: Kitchen
  68.       - entity: input_select.kitchen_timers_preset
  69.         state: Kitchen Timer3
  70.     card:
  71.       title: Timer Kitchen 3
  72.       show_header_toggle: false
  73.       type: entities
  74.       entities:
  75.         - entity: input_boolean.kitchen3_timer
  76.           name: Timer ON/OFF
  77.         - entity: input_datetime.kitchen3_timer_start
  78.         - entity: input_datetime.kitchen3_timer_end
  79.   - type: conditional
  80.     conditions:
  81.       - entity: input_select.living_room_preset
  82.         state: Salon
  83.       - entity: input_select.salon_timers_preset
  84.         state: Salon Timer1
  85.     card:
  86.       title: Timer Salon 1
  87.       show_header_toggle: false
  88.       type: entities
  89.       entities:
  90.         - entity: input_boolean.salon1_timer
  91.           name: Timer ON/OFF
  92.         - entity: input_datetime.salon1_timer_start
  93.         - entity: input_datetime.salon1_timer_end
  94.   - type: conditional
  95.     conditions:
  96.       - entity: input_select.living_room_preset
  97.         state: Salon
  98.       - entity: input_select.salon_timers_preset
  99.         state: Salon Timer2
  100.     card:
  101.       title: Timer Salon 2
  102.       show_header_toggle: false
  103.       type: entities
  104.       entities:
  105.         - entity: input_boolean.salon2_timer
  106.           name: Timer ON/OFF
  107.         - entity: input_datetime.salon2_timer_start
  108.         - entity: input_datetime.salon2_timer_end
  109.   - type: conditional
  110.     conditions:
  111.       - entity: input_select.living_room_preset
  112.         state: Salon
  113.       - entity: input_select.salon_timers_preset
  114.         state: Salon Timer3
  115.     card:
  116.       title: Timer Salon 3
  117.       show_header_toggle: false
  118.       type: entities
  119.       entities:
  120.         - entity: input_boolean.salon3_timer
  121.           name: Timer ON/OFF
  122.         - entity: input_datetime.salon3_timer_start
  123.         - entity: input_datetime.salon3_timer_end
  124.   - type: conditional
  125.     conditions:
  126.       - entity: input_select.living_room_preset
  127.         state: Dining Room
  128.       - entity: input_select.dining_room_timers_preset
  129.         state: Dining Room Timer1
  130.     card:
  131.       title: Dining Room Timer 1
  132.       show_header_toggle: false
  133.       type: entities
  134.       entities:
  135.         - entity: input_boolean.dining1_room
  136.           name: Timer ON/OFF
  137.         - entity: input_datetime.dining_room1_timer_start
  138.         - entity: input_datetime.dining_room1_timer_end
  139.   - type: conditional
  140.     conditions:
  141.       - entity: input_select.living_room_preset
  142.         state: Dining Room
  143.       - entity: input_select.dining_room_timers_preset
  144.         state: Dining Room Timer2
  145.     card:
  146.       title: Dining Room Timer 2
  147.       show_header_toggle: false
  148.       type: entities
  149.       entities:
  150.         - entity: input_boolean.dining2_room
  151.           name: Timer ON/OFF
  152.         - entity: input_datetime.dining_room2_timer_start
  153.         - entity: input_datetime.dining_room2_timer_end
  154.   - type: conditional
  155.     conditions:
  156.       - entity: input_select.living_room_preset
  157.         state: Dining Room
  158.       - entity: input_select.dining_room_timers_preset
  159.         state: Dining Room Timer3
  160.     card:
  161.       title: Dining Room Timer 3
  162.       show_header_toggle: false
  163.       type: entities
  164.       entities:
  165.         - entity: input_boolean.dining3_room
  166.           name: Timer ON/OFF
  167.         - entity: input_datetime.dining_room3_timer_start
  168.         - entity: input_datetime.dining_room3_timer_end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement