full code =============================================================
views:
title: Home
theme: kibibit-dark-cards
badges: []
cards:
type: vertical-stack
cards:
type: custom:mushroom-title-card
title: Master Room
alignment: justify
subtitle: |-
{% set total = 0 %}
{% if is_state('light.sonoff_100157c44f_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c1f6_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157cd36_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157cd36_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157cd36_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b3de_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b3de_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157a8f8', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c44f_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c44f_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c479_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c479_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c479_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c887_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c887_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c887_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
Currently ({{total}}) lights are turned ON
title_tap_action:
action: navigate
navigation_path: /dashboard-livingroom/master-room
type: entity
entity: input_boolean.motioninmasterroom
icon_color: blue
icon: mdi:motion-sensor
name: Master Toilet
use_entity_picture: true
content_info: name
type: template
icon: |-
{% if is_state('binary_sensor.terrace_door', 'off') %}
mdi:door-closed
{% else %}
mdi:door-open
{% endif %}
content: |-
{% if is_state('binary_sensor.terrace_door', 'off') %}
Closed
{% else %}
Open change this to door TTlock
{% endif %}
icon_color: |-
{% if is_state('binary_sensor.terrace_door', 'off') %}
green
{% else %}
red
{% endif %}
tap_action:
action: more-info
entity: binary_sensor.terrace_door
alignment: start
type: horizontal-stack
cards:
type: custom:mushroom-light-card
entity: light.master
layout: vertical
name: close all lights
fill_container: true
type: vertical-stack
cards:
type: custom:mushroom-title-card
title: Living Room
alignment: justify
subtitle: |-
{% set total = 0 %}
{% if is_state('light.sonoff_100157b3ad_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b2a8_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b2a8_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b3ad_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
Currently ({{total}}) lights are turned ON
title_tap_action:
action: navigate
navigation_path: /dashboard-livingroom/living-room
type: template
icon: |-
{% if is_state('binary_sensor.terrace_door', 'off') %}
mdi:door-closed
{% else %}
mdi:door-open
{% endif %}
content: |-
{% if is_state('binary_sensor.terrace_door', 'off') %}
Closed
{% else %}
Open change this to door TTlock
{% endif %}
icon_color: |-
{% if is_state('binary_sensor.terrace_door', 'off') %}
green
{% else %}
red
{% endif %}
tap_action:
action: more-info
entity: binary_sensor.terrace_door
alignment: start
type: horizontal-stack
cards:
type: custom:mushroom-light-card
entity: light.sonoff_100157b3ad_1
name: Close all lights
layout: vertical
type: vertical-stack
cards:
type: custom:mushroom-title-card
title: Lamar Room
alignment: justify
subtitle: |-
{% set total = 0 %}
{% if is_state('light.sonoff_100157c7b4_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b866_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b866_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c7b4_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157bd23_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157bd23_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157bd23_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
Currently ({{total}}) lights are turned ON
title_tap_action:
action: navigate
navigation_path: /dashboard-livingroom/lamar-room
type: custom:mushroom-title-card
title: NaderRoom
alignment: justify
subtitle: |-
{% set total = 0 %}
{% if is_state('light.sonoff_100157b9da_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b9da_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157be03_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c066_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157be03_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157be03_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c066_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c066_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157af45', 'on') %}
{% set total = total + 1 %}
{% endif %}
Currently ({{total}}) lights are turned ON
title_tap_action:
action: navigate
navigation_path: /dashboard-livingroom/nader-room
type: custom:mushroom-title-card
title: Master Room
alignment: justify
subtitle: |-
{% set total = 0 %}
{% if is_state('light.sonoff_100157c44f_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c1f6_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157cd36_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157cd36_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157cd36_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b3de_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b3de_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157a8f8', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c44f_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c44f_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c479_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c479_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c479_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c887_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c887_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c887_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
type: custom:mushroom-title-card
title: Lamar Room
alignment: justify
subtitle: |-
{% set total = 0 %}
{% if is_state('light.sonoff_100157c7b4_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b866_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b866_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c7b4_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157bd23_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157bd23_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157bd23_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
Currently ({{total}}) lights are turned ON
title: Living room
path: living-room
theme: kibibit
badges: []
cards:
type: vertical-stack
cards:
type: custom:mushroom-title-card
title: Living Room
alignment: justify
subtitle: |-
{% set total = 0 %}
{% if is_state('light.sonoff_100157b3ad_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b2a8_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b2a8_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b3ad_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
Currently ({{total}}) lights are turned ON
type: custom:mushroom-title-card
title: NaderRoom
alignment: justify
subtitle: |-
{% set total = 0 %}
{% if is_state('light.sonoff_100157b9da_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157b9da_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157be03_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c066_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157be03_1', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157be03_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c066_2', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157c066_3', 'on') %}
{% set total = total + 1 %}
{% endif %}
{% if is_state('light.sonoff_100157af45', 'on') %}
{% set total = total + 1 %}
{% endif %}
Currently ({{total}}) lights are turned ON
lovelace: resources:
Example add Template switch called
->>> add those to HACS Custom cards: Search Card: https://github.com/postlund/search-card Banner Card: https://github.com/nervetattoo/banner... Mini Media Player: https://github.com/kalkih/mini-media-... Vertical Stack in Card: https://github.com/ofekashery/vertica... Paper Buttons Row: https://github.com/jcwillox/lovelace-... Kibibit Theme: https://github.com/Kibibit/hass-kibib...
full code =============================================================
views:
title: Home theme: kibibit-dark-cards badges: [] cards:
type: vertical-stack cards:
type: custom:mushroom-title-card title: Master Room alignment: justify subtitle: |- {% set total = 0 %} {% if is_state('light.sonoff_100157c44f_2', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c1f6_3', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157cd36_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157cd36_2', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157cd36_3', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157b3de_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157b3de_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157a8f8', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c44f_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c44f_3', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c479_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c479_2', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c479_3', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c887_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c887_2', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c887_3', 'on') %} {% set total = total + 1 %} {% endif %}
Currently ({{total}}) lights are turned ON title_tap_action: action: navigate navigation_path: /dashboard-livingroom/master-room
type: vertical-stack cards:
type: custom:mushroom-title-card title: NaderRoom alignment: justify subtitle: |- {% set total = 0 %} {% if is_state('light.sonoff_100157b9da_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157b9da_2', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157be03_2', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c066_1', 'on') %} {% set total = total + 1 %} {% endif %}
{% if is_state('light.sonoff_100157be03_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157be03_3', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c066_2', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c066_3', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157af45', 'on') %} {% set total = total + 1 %} {% endif %} Currently ({{total}}) lights are turned ON title_tap_action: action: navigate navigation_path: /dashboard-livingroom/nader-room
title: Master room path: master-room theme: kibibit-dark-cards badges: [] cards:
type: vertical-stack cards:
type: custom:mushroom-title-card title: Master Room alignment: justify subtitle: |- {% set total = 0 %} {% if is_state('light.sonoff_100157c44f_2', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c1f6_3', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157cd36_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157cd36_2', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157cd36_3', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157b3de_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157b3de_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157a8f8', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c44f_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c44f_3', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c479_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c479_2', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c479_3', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c887_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c887_2', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c887_3', 'on') %} {% set total = total + 1 %} {% endif %}
Currently ({{total}}) lights are turned ON
title: Nader room path: nader-room theme: kibibit-dark-cards badges: [] cards:
type: vertical-stack cards:
type: custom:mushroom-title-card title: NaderRoom alignment: justify subtitle: |- {% set total = 0 %} {% if is_state('light.sonoff_100157b9da_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157b9da_2', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157be03_2', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c066_1', 'on') %} {% set total = total + 1 %} {% endif %}
{% if is_state('light.sonoff_100157be03_1', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157be03_3', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c066_2', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157c066_3', 'on') %} {% set total = total + 1 %} {% endif %} {% if is_state('light.sonoff_100157af45', 'on') %} {% set total = total + 1 %} {% endif %} Currently ({{total}}) lights are turned ON