Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Input_boolean for each day of the week:
- ----------------------------------------
- input_boolean.irrigation_monday
- input_boolean.irrigation_tuesday
- input_boolean.irrigation_wednesday
- input_boolean.irrigation_thursday
- input_boolean.irrigation_friday
- input_boolean.irrigation_saturday
- input_boolean.irrigation_sunday
- Binary_sensor to check if Input_booleans are on:
- ------------------------------------------------
- ####Irrigation Active Days####
- - platform: template
- sensors:
- irrigation_day_active:
- friendly_name: Irrigation Day Active
- value_template: >-
- {{ ( is_state('input_boolean.irrigation_monday', 'on') and now().weekday() == 0 )
- or ( is_state('input_boolean.irrigation_tuesday', 'on') and now().weekday() == 1 )
- or ( is_state('input_boolean.irrigation_wednesday', 'on') and now().weekday() == 2 )
- or ( is_state('input_boolean.irrigation_thursday', 'on') and now().weekday() == 3 )
- or ( is_state('input_boolean.irrigation_friday', 'on') and now().weekday() == 4 )
- or ( is_state('input_boolean.irrigation_saturday', 'on') and now().weekday() == 5 )
- or ( is_state('input_boolean.irrigation_sunday', 'on') and now().weekday() == 6 ) }}
- Card: Config
- ------------
- Cards Used:
- ----------
- custom:stack-in-card
- custom:mushroom-template-card
- custom:mushroom-chips-card
- Active Cycle Days Full config:
- ------------------------------
- type: custom:stack-in-card
- mode: vertical
- cards:
- - type: custom:mushroom-template-card
- primary: Cycle Active Days
- secondary: '{{ states(''binary_sensor.irrigation_day_active'') }}'
- icon: mdi:calendar-today-outline
- layout: horizontal
- multiline_secondary: false
- tap_action:
- action: null
- icon_color: green
- style: |
- :host([dark-mode]) {
- background: rgba(var(--rgb-primary-background-color), 0.2);
- }
- :host {
- background: rgba(var(--rgb-primary-text-color), 0.025);
- }
- - type: custom:mushroom-chips-card
- style: |
- ha-card {
- --chip-box-shadow: none;
- --chip-background: none;
- --chip-spacing: 0;
- }
- alignment: center
- chips:
- - type: template
- entity: input_boolean.irrigation_monday
- icon: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- mdi:alpha-m-circle-outline
- {% elif state=='off' %}
- mdi:alpha-m-circle-outline
- {% else %}
- mdi:alpha-m-circle-outline
- {% endif %}
- tap_action:
- action: toggle
- icon_color: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- blue
- {% elif state=='off' %}
- white
- {% else %}
- red
- {% endif %}
- - type: template
- entity: input_boolean.irrigation_tuesday
- icon: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- mdi:alpha-t-circle-outline
- {% elif state=='off' %}
- mdi:alpha-t-circle-outline
- {% else %}
- mdi:alpha-t-circle-outline
- {% endif %}
- tap_action:
- action: toggle
- icon_color: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- blue
- {% elif state=='off' %}
- white
- {% else %}
- red
- {% endif %}
- - type: template
- entity: input_boolean.irrigation_wednesday
- icon: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- mdi:alpha-w-circle-outline
- {% elif state=='off' %}
- mdi:alpha-w-circle-outline
- {% else %}
- mdi:alpha-w-circle-outline
- {% endif %}
- tap_action:
- action: toggle
- icon_color: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- blue
- {% elif state=='off' %}
- white
- {% else %}
- red
- {% endif %}
- - type: template
- entity: input_boolean.irrigation_thursday
- icon: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- mdi:alpha-t-circle-outline
- {% elif state=='off' %}
- mdi:alpha-t-circle-outline
- {% else %}
- mdi:alpha-t-circle-outline
- {% endif %}
- tap_action:
- action: toggle
- icon_color: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- blue
- {% elif state=='off' %}
- white
- {% else %}
- red
- {% endif %}
- - type: template
- entity: input_boolean.irrigation_friday
- icon: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- mdi:alpha-f-circle-outline
- {% elif state=='off' %}
- mdi:alpha-f-circle-outline
- {% else %}
- mdi:alpha-f-circle-outline
- {% endif %}
- tap_action:
- action: toggle
- icon_color: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- blue
- {% elif state=='off' %}
- white
- {% else %}
- red
- {% endif %}
- - type: template
- entity: input_boolean.irrigation_saturday
- icon: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- mdi:alpha-s-circle-outline
- {% elif state=='off' %}
- mdi:alpha-s-circle-outline
- {% else %}
- mdi:alpha-s-circle-outline
- {% endif %}
- tap_action:
- action: toggle
- icon_color: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- blue
- {% elif state=='off' %}
- white
- {% else %}
- red
- {% endif %}
- - type: template
- entity: input_boolean.irrigation_sunday
- icon: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- mdi:alpha-s-circle-outline
- {% elif state=='off' %}
- mdi:alpha-s-circle-outline
- {% else %}
- mdi:alpha-s-circle-outline
- {% endif %}
- tap_action:
- action: toggle
- icon_color: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- blue
- {% elif state=='off' %}
- white
- {% else %}
- red
- {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement