Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: custom:stack-in-card
- mode: vertical
- cards:
- - type: custom:mushroom-template-card
- primary: Master Bedroom
- secondary: >-
- {{(states('sensor.master_bedroom_temperature')) }} °C | {{
- (states('sensor.master_bedroom_humidity')) }} %
- icon: mdi:bed
- layout: horizontal
- multiline_secondary: false
- tap_action:
- action: navigate
- navigation_path: mb
- icon_color: deep-purple
- hold_action:
- action: none
- double_tap_action:
- action: none
- 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: binary_sensor.master_bedroom_motion
- icon: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- mdi:motion-sensor
- {% elif state=='off' %}
- mdi:motion-sensor-off
- {% else %}
- mdi:motion-sensor-off
- {% endif %}
- tap_action:
- action: more-info
- icon_color: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- red
- {% elif state=='off' %}
- green
- {% else %}
- gray
- {% endif %}
- style: |
- ha-card {
- {% if states('binary_sensor.master_bedroom_motion') == 'on' %}
- animation: blink 0.9s linear infinite;
- }
- @keyframes blink {
- 50% {opacity: 0;}
- }
- {%- else -%}
- box-shadow: 0px 0px;
- {%- endif %}
- ha-card {
- box-shadow: 0px 0px;
- - type: template
- entity: light.master_bedroom_light
- icon: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- mdi:lightbulb-on-outline
- {% elif state=='off' %}
- mdi:lightbulb-off-outline
- {% else %}
- mdi-lightbulb-outline
- {% endif %}
- tap_action:
- action: toggle
- hold_action:
- action: more-info
- icon_color: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- yellow
- {% elif state=='off' %}
- white
- {% else %}
- gray
- {% endif %}
- style: |
- ha-card {
- {% if states('light.master_bedroom_light') == 'on' %}
- animation: blink 0.9s linear infinite;
- }
- @keyframes blink {
- 50% {opacity: 0;}
- }
- {%- else -%}
- box-shadow: 0px 0px;
- {%- endif %}
- ha-card {
- box-shadow: 0px 0px;
- - type: template
- entity: light.master_bedroom_bedlamps
- icon: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- mdi:lamp
- {% elif state=='off' %}
- mdi:lamp
- {% else %}
- mdi:lamp
- {% endif %}
- tap_action:
- action: call-service
- service: script.popup_master_bedroom_bed_lights
- hold_action:
- action: more-info
- icon_color: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- pink
- {% elif state=='off' %}
- white
- {% else %}
- gray
- {% endif %}
- style: |
- ha-card {
- {% if states('light.master_bedroom_bedlamps') == 'on' %}
- animation: blink 0.9s linear infinite;
- }
- @keyframes blink {
- 50% {opacity: 0;}
- }
- {%- else -%}
- box-shadow: 0px 0px;
- {%- endif %}
- ha-card {
- box-shadow: 0px 0px;
- - type: template
- entity: fan.master_bedroom_fan
- icon: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- mdi:fan
- {% elif state=='off' %}
- mdi:fan
- {% else %}
- mdi:fan-alert
- {% endif %}
- tap_action:
- action: more-info
- icon_color: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- blue
- {% elif state=='off' %}
- white
- {% else %}
- gray
- {% endif %}
- style: |
- @keyframes rotation {
- 0% {
- transform: rotate(0deg);
- }
- 100% {
- transform: rotate(360deg);
- }
- }
- ha-card {
- box-shadow: 0px 0px;
- animation: rotation linear infinite;
- {% if states('fan.master_bedroom_fan') == 'on' %}
- animation-duration: 3s;
- {%- else -%}
- {%- endif %}
- template
- - type: template
- entity: switch.master_bedroom_tv_hisense
- icon: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- mdi:television-classic
- {% elif state=='off' %}
- mdi:television-classic-off
- {% else %}
- mdi:tv
- {% endif %}
- tap_action:
- action: more-info
- icon_color: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- purple
- {% elif state=='off' %}
- white
- {% else %}
- gray
- {% endif %}
- - type: template
- entity: media_player.master_bedroom_speaker
- icon: |-
- {% set state=states(entity) %}
- {% if state=='playing' %}
- mdi:google-home
- {% elif state=='off' %}
- mdi:google-home
- {% else %}
- mdi:google-home
- {% endif %}
- tap_action:
- action: more-info
- icon_color: |-
- {% set state=states(entity) %}
- {% if state=='playing' %}
- purple
- {% elif state=='off' %}
- white
- {% else %}
- gray
- {% endif %}
- - type: template
- entity: switch.basic
- icon: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- mdi:toothbrush-electric
- {% elif state=='off' %}
- mdi:toothbrush-electric
- {% else %}
- mdi:toothbrush-electric
- {% endif %}
- tap_action:
- action: more-info
- icon_color: |-
- {% set state=states(entity) %}
- {% if state=='on' %}
- purple
- {% elif state=='off' %}
- white
- {% else %}
- gray
- {% endif %}
- style: |
- ha-card {
- height: 102px;
- {% if is_state('light.master_bedroom_light', 'on') %}
- background: rgba(255, 152, 0, 0.1);
- {% endif %}
- {% if is_state('light.master_bedroom_bedlamps', 'on') %}
- background: rgba(255, 152, 0, 0.1);
- {% endif %}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement