Advertisement
Guest User

conditional mushroom

a guest
Aug 25th, 2024
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.24 KB | None | 0 0
  1. type: custom:mushroom-chips-card
  2. chips:
  3. - type: conditional
  4. conditions:
  5. - condition: or
  6. conditions:
  7. - condition: state
  8. entity: sensor.garbage_day
  9. state: Tomorrow
  10. - condition: state
  11. entity: sensor.garbage_day
  12. state: Today
  13. chip:
  14. type: entity
  15. entity: sensor.garbage_day
  16. icon_color: red
  17. tap_action:
  18. action: none
  19. icon: mdi:delete
  20. - type: conditional
  21. conditions:
  22. - condition: or
  23. conditions:
  24. - condition: state
  25. entity: sensor.recycle_day
  26. state: Tomorrow
  27. - condition: state
  28. entity: sensor.recycle_day
  29. state: Today
  30. chip:
  31. type: entity
  32. entity: sensor.recycle_day
  33. icon_color: green
  34. tap_action:
  35. action: none
  36. icon: mdi:recycle
  37. - type: conditional
  38. conditions:
  39. - condition: state
  40. entity: switch.all_light_switches
  41. state: 'on'
  42. chip:
  43. type: template
  44. icon: mdi:lightbulb-group
  45. content: >-
  46. {{ expand(states.switch.all_light_switches) | selectattr( 'state', 'eq',
  47. 'on') | list | count }}
  48. entity: light.all_lights
  49. icon_color: '#FAE29C'
  50. tap_action:
  51. action: navigate
  52. navigation_path: '#alllightswitches'
  53. - type: conditional
  54. conditions:
  55. - condition: state
  56. entity: switch.all_switches
  57. state: 'on'
  58. chip:
  59. type: template
  60. icon: mdi:light-switch
  61. content: >-
  62. {{ expand(states.switch.all_switches) | selectattr( 'state', 'eq', 'on')
  63. | list | count }}
  64. entity: switch.all_switches
  65. icon_color: blue
  66. tap_action:
  67. action: navigate
  68. navigation_path: '#allswitches'
  69. - type: conditional
  70. conditions:
  71. - condition: state
  72. entity: binary_sensor.all_motion_sensors_occupancy
  73. state: 'on'
  74. chip:
  75. type: template
  76. icon: mdi:motion-sensor
  77. content: >-
  78. {{ expand(states.binary_sensor.all_motion_sensors_occupancy) |
  79. selectattr( 'state', 'eq', 'on') | list | count }}
  80. entity: binary_sensor.all_motion_sensors_occupancy
  81. icon_color: green
  82. tap_action:
  83. action: navigate
  84. navigation_path: '#Allmotionsensors'
  85. - type: conditional
  86. conditions:
  87. - condition: state
  88. entity: binary_sensor.garage_door_status
  89. state: 'on'
  90. chip:
  91. type: template
  92. icon: mdi:garage
  93. content: >-
  94. {{ expand(states.binary_sensor.garage_door_status) | selectattr(
  95. 'state', 'eq', 'on') | list | count }}
  96. entity: binary_sensor.garage_door_status
  97. icon_color: pink
  98. tap_action:
  99. action: navigate
  100. navigation_path: '#security'
  101. - type: conditional
  102. conditions:
  103. - condition: state
  104. entity: binary_sensor.all_doors
  105. state: 'on'
  106. chip:
  107. type: template
  108. icon: mdi:door-sliding
  109. content: >-
  110. {{ expand(states.binary_sensor.all_doors) | selectattr( 'state', 'eq',
  111. 'on') | list | count }}
  112. entity: binary_sensor.all_doors
  113. icon_color: red
  114. tap_action:
  115. action: navigate
  116. navigation_path: '#Alldoors'
  117. - type: conditional
  118. conditions:
  119. - condition: state
  120. entity: binary_sensor.binary_kitchenblind
  121. state: 'on'
  122. chip:
  123. type: template
  124. icon: mdi:blinds-horizontal
  125. content: >-
  126. {{ expand(states.binary_sensor.binary_kitchenblind) | selectattr(
  127. 'state', 'eq', 'on') | list | count }}
  128. entity: binary_sensor.binary_kitchenblind
  129. icon_color: purple
  130. tap_action:
  131. action: navigate
  132. navigation_path: '#Alldoors'
  133. - type: conditional
  134. conditions:
  135. - condition: state
  136. entity: binary_sensor.all_low_battery
  137. state: 'on'
  138. chip:
  139. type: template
  140. tap_action:
  141. action: navigate
  142. navigation_path: '#allbattery'
  143. icon_color: red
  144. content: >-
  145. {{ expand(states.binary_sensor.all_low_battery) | selectattr( 'state',
  146. 'eq', 'on') | list | count }}
  147. icon: mdi:battery-alert
  148. entity: binary_sensor.all_low_battery
  149.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement