Air-Conditioning, Door, Home and Away Status. Conditional, Mushroom Template & Big Number

I thought I would share part of my dashboard that visually shows the status of the following.

This makes for easy diagnosis of why the air-conditioner is off and everyone is at home (especially for the spouse).

My Air-Conditioning is controlled with a flow in NodeRED, and performs the following functions.

  • Turns OFF Air-Conditioning when no one is home
  • Turns OFF Air-Conditioning when a door or window is open for 2 minutes
  • NodeRED flow adjusts the mode of the air conditioner pending multiple variables.
  • NodeRED flow makes voice announcements i.e “A door or window has been open for 2 minutes, the air-conditioner has been turned off”.

HOME MODE - AC ON

  • Someone in the household is home

AWAY MODE - AC OFF

  • Everyone is away from the household

DOOR OR WINDOW OPEN MORE THAN 2 MINS - AC OFF

  • Door and Window Status only shows on the home screen if someone is home and the air-conditioning is OFF.
  • Display reverts to HOME MODE when doors and windows are closed.

WHOLE DASHBOARD

  • Setup on a 15.6 Uperfect Vertical 1080p Monitor in the lounge room.
  • Connected to a Raspbery Pi400 running in kiosk mode.
  • Text large enough to see from the couch.

MUSHROOM TEMPLATE CARD CODE

image

                    - type: conditional
                      conditions:
                        - condition: state
                          entity: binary_sensor.middle_floor_sensor_group
                          state: 'on'
                        - condition: state
                          entity: binary_sensor.front_door_sensor_group
                          state: 'on'
                      card:
                        type: horizontal-stack
                        cards:
                          - type: custom:mushroom-template-card
                            entity: binary_sensor.door_red_contact_contact
                            primary: >
                              {%- if
                              is_state("binary_sensor.door_red_contact_contact",
                              'on') %}
                                OPEN
                              {%- elif
                              is_state("binary_sensor.door_red_contact_contact",
                              'off') %}
                                CLOSED
                              {%- endif -%}
                            secondary: Red Door
                            icon: >
                              {% set
                              door_state=states("binary_sensor.door_red_contact_contact")
                              %} {% if door_state=='on'%}
                                mdi:door-open
                              {% elif door_state=='off'%}
                                mdi:door
                              {% endif %}
                            icon_color: >-
                              {% set
                              door_state=states("binary_sensor.door_red_contact_contact")
                              %}

                              {% if door_state=='on'%}
                                red
                              {% elif door_state=='off'%}
                                green
                              {% endif %}
                            badge_icon: >
                              {% set
                              door_state=states("binary_sensor.door_red_contact_contact")
                              %} {% if door_state=='on'%}
                                mdi:weather-windy
                              {% elif door_state=='off'%}
                                mdi:lock
                              {% endif %}
                            badge_color: >
                              {% set
                              door_state=states("binary_sensor.door_red_contact_contact")
                              %} {% if door_state=='on'%}
                                blue
                              {% elif door_state=='off'%}
                                transparent
                              {% endif %}
                            layout: horizontal
                            fill_container: false
                          - type: custom:mushroom-template-card
                            entity: binary_sensor.door_kitchen_contact_contact
                            primary: >
                              {%- if
                              is_state('binary_sensor.door_kitchen_contact_contact',
                              'on') %}
                                OPEN
                              {%- elif
                              is_state('binary_sensor.door_kitchen_contact_contact',
                              'off') %}
                                CLOSED
                              {%- endif -%}
                            secondary: Kitchen Door
                            icon: >
                              {% set
                              door_state=states("binary_sensor.door_kitchen_contact_contact")
                              %} {% if door_state=='on'%}
                                mdi:door-open
                              {% elif door_state=='off'%}
                                mdi:door
                              {% endif %}
                            icon_color: >
                              {% set
                              door_state=states("binary_sensor.door_kitchen_contact_contact")
                              %} {% if door_state=='on'%}
                                red
                              {% elif door_state=='off'%}
                                green
                              {% endif %}
                            badge_icon: >
                              {% set
                              door_state=states("binary_sensor.door_kitchen_contact_contact")
                              %} {% if door_state=='on'%}
                                mdi:weather-windy
                              {% elif door_state=='off'%}
                                mdi:lock
                              {% endif %}
                            badge_color: >
                              {% set
                              door_state=states("binary_sensor.door_kitchen_contact_contact")
                              %} {% if door_state=='on'%}
                                blue
                              {% elif door_state=='off'%}
                                transparent
                              {% endif %}
                            layout: horizontal
                            fill_container: false
                    - type: conditional
                      conditions:
                        - condition: state
                          entity: binary_sensor.middle_floor_sensor_group
                          state: 'on'
                        - condition: state
                          entity: binary_sensor.front_door_sensor_group
                          state: 'on'
                      card:
                        type: horizontal-stack
                        cards:
                          - type: custom:mushroom-template-card
                            entity: binary_sensor.door_main_deck_contact_contact
                            primary: >
                              {%- if
                              is_state('binary_sensor.door_main_deck_contact_contact',
                              'on') %}
                                OPEN
                              {%- elif
                              is_state('binary_sensor.door_main_deck_contact_contact',
                              'off') %}
                                CLOSED
                              {%- endif -%}
                            secondary: Main Deck
                            icon: >
                              {% set
                              door_state=states("binary_sensor.door_main_deck_contact_contact")
                              %} {% if door_state=='on'%}
                                mdi:door-sliding-open
                              {% elif door_state=='off'%}
                                mdi:door-sliding
                              {% endif %}
                            icon_color: >
                              {% set
                              door_state=states("binary_sensor.door_main_deck_contact_contact")
                              %} {% if door_state=='on'%}
                                red
                              {% elif door_state=='off'%}
                                green
                              {% endif %}
                            badge_icon: >
                              {% set
                              door_state=states("binary_sensor.door_main_deck_contact_contact")
                              %} {% if door_state=='on'%}
                                mdi:weather-windy
                              {% elif door_state=='off'%}
                                mdi:lock
                              {% endif %}
                            badge_color: >
                              {% set
                              door_state=states("binary_sensor.door_main_deck_contact_contact")
                              %} {% if door_state=='on'%}
                                blue
                              {% elif door_state=='off'%}
                                transparent
                              {% endif %}
                            layout: horizontal
                            fill_container: false
                          - type: custom:mushroom-template-card
                            entity: binary_sensor.door_side_deck_contact_contact
                            primary: >
                              {%- if
                              is_state('binary_sensor.door_side_deck_contact_contact',
                              'on') %}
                                OPEN
                              {%- elif
                              is_state('binary_sensor.door_side_deck_contact_contact',
                              'off') %}
                                CLOSED
                              {%- endif -%}
                            secondary: Side Deck
                            icon: >
                              {% set
                              door_state=states("binary_sensor.door_side_deck_contact_contact")
                              %} {% if door_state=='on'%}
                                mdi:door-sliding-open
                              {% elif door_state=='off'%}
                                mdi:door-sliding
                              {% endif %}
                            icon_color: >
                              {% set
                              door_state=states("binary_sensor.door_side_deck_contact_contact")
                              %} {% if door_state=='on'%}
                                red
                              {% elif door_state=='off'%}
                                green
                              {% endif %}
                            badge_icon: >
                              {% set
                              door_state=states("binary_sensor.door_side_deck_contact_contact")
                              %} {% if door_state=='on'%}
                                mdi:weather-windy
                              {% elif door_state=='off'%}
                                mdi:lock
                              {% endif %}
                            badge_color: >
                              {% set
                              door_state=states("binary_sensor.door_side_deck_contact_contact")
                              %} {% if door_state=='on'%}
                                blue
                              {% elif door_state=='off'%}
                                transparent
                              {% endif %}
                            layout: horizontal
                            fill_container: false
                    - type: conditional
                      conditions:
                        - condition: state
                          entity: binary_sensor.middle_floor_sensor_group
                          state: 'on'
                        - condition: state
                          entity: binary_sensor.front_door_sensor_group
                          state: 'on'
                      card:
                        type: horizontal-stack
                        cards:
                          - type: custom:mushroom-template-card
                            entity: binary_sensor.window_roof_1_contact_contact
                            primary: >
                              {%- if
                              is_state('binary_sensor.window_roof_1_contact_contact',
                              'on') %}
                                OPEN
                              {%- elif
                              is_state('binary_sensor.window_roof_1_contact_contact',
                              'off') %}
                                CLOSED
                              {%- endif -%}
                            secondary: Top Window 1
                            icon: >
                              {% set
                              door_state=states("binary_sensor.window_roof_1_contact_contact")
                              %} {% if door_state=='on'%}
                                mdi:window-open-variant
                              {% elif door_state=='off'%}
                                mdi:window-closed-variant
                              {% endif %}
                            icon_color: >
                              {% set
                              door_state=states("binary_sensor.window_roof_1_contact_contact")
                              %} {% if door_state=='on'%}
                                red
                              {% elif door_state=='off'%}
                                green
                              {% endif %}
                            badge_icon: >
                              {% set
                              door_state=states("binary_sensor.window_roof_1_contact_contact")
                              %} {% if door_state=='on'%}
                                mdi:weather-windy
                              {% elif door_state=='off'%}
                                mdi:lock
                              {% endif %}
                            badge_color: >
                              {% set
                              door_state=states("binary_sensor.window_roof_1_contact_contact")
                              %} {% if door_state=='on'%}
                                blue
                              {% elif door_state=='off'%}
                                transparent
                              {% endif %}
                            layout: horizontal
                            fill_container: false
                          - type: custom:mushroom-template-card
                            entity: binary_sensor.window_roof_2_contact
                            primary: >
                              {%- if
                              is_state('binary_sensor.window_roof_2_contact',
                              'on') %}
                                OPEN
                              {%- elif
                              is_state('binary_sensor.window_roof_2_contact',
                              'off') %}
                                CLOSED
                              {%- endif -%}
                            secondary: Top Window 2
                            icon: >
                              {% set
                              door_state=states("binary_sensor.window_roof_2_contact")
                              %} {% if door_state=='on'%}
                                mdi:window-open-variant
                              {% elif door_state=='off'%}
                                mdi:window-closed-variant
                              {% endif %}
                            icon_color: >
                              {% set
                              door_state=states("binary_sensor.window_roof_2_contact")
                              %} {% if door_state=='on'%}
                                red
                              {% elif door_state=='off'%}
                                green
                              {% endif %}
                            badge_icon: >
                              {% set
                              door_state=states("binary_sensor.window_roof_2_contact")
                              %} {% if door_state=='on'%}
                                mdi:weather-windy
                              {% elif door_state=='off'%}
                                mdi:lock
                              {% endif %}
                            badge_color: >
                              {% set
                              door_state=states("binary_sensor.window_roof_2_contact")
                              %} {% if door_state=='on'%}
                                blue
                              {% elif door_state=='off'%}
                                transparent
                              {% endif %}
                            layout: horizontal
                            fill_container: false

MUSHROOM PERSON CARD CODE

image

                    - type: horizontal-stack
                      cards:
                        - type: custom:mushroom-person-card
                          entity: person.andrew_hunter
                          layout: vertical
                          fill_container: true
                          name: Hunter
                          icon_type: entity-picture
                          primary_info: none
                          secondary_info: none
                          tap_action:
                            action: none
                          hold_action:
                            action: none
                          double_tap_action:
                            action: none
                        - type: custom:mushroom-person-card
                          entity: person.alli_wells
                          layout: vertical
                          fill_container: true
                          name: Alli
                          icon_type: entity-picture
                          primary_info: none
                          secondary_info: none
                          tap_action:
                            action: none
                          double_tap_action:
                            action: none
                          hold_action:
                            action: none
                        - type: custom:mushroom-person-card
                          entity: person.lillian_smith
                          layout: vertical
                          fill_container: true
                          name: Lilly
                          icon_type: entity-picture
                          primary_info: none
                          secondary_info: none
                          tap_action:
                            action: none
                          double_tap_action:
                            action: none
                          hold_action:
                            action: none
                        - type: custom:mushroom-person-card
                          entity: person.maverick_hunter
                          layout: vertical
                          fill_container: true
                          icon_type: entity-picture
                          name: Mav
                          secondary_info: none
                          primary_info: none
                          tap_action:
                            action: none
                          hold_action:
                            action: none
                          double_tap_action:
                            action: none
                        - type: custom:mushroom-person-card
                          entity: person.rhiannon_wells
                          layout: vertical
                          fill_container: true
                          icon_type: entity-picture
                          name: Rhi
                          secondary_info: none
                          primary_info: none
                          tap_action:
                            action: none
                          hold_action:
                            action: none
                          double_tap_action:
                            action: none

BIG NUMBER CARD CODE

                    - type: custom:bignumber-card
                      scale: 40px
                      entity: sensor.nad_t785_volume
                      card_mod:
                        style: |
                          ha-card {
                            background: var(--ha-card-background) !important;
                            }
                    - type: custom:bignumber-card
                      scale: 40px
                      entity: sensor.home_tado_mode
                      card_mod:
                        style: |
                          ha-card {
                            background: var(--ha-card-background) !important;
                            }

NODE RED FLOW

I hope this gives you some food for thought, in your own HA setup.