Skip to content

Instantly share code, notes, and snippets.

@alex3305
Last active December 20, 2022 22:27
Show Gist options
  • Save alex3305/d50186a947b3b92479c0f8148cf1f21c to your computer and use it in GitHub Desktop.
Save alex3305/d50186a947b3b92479c0f8148cf1f21c to your computer and use it in GitHub Desktop.
Home Assistant Climate Subview v4 (partial)
views:
- theme: Backend-selected
title: Klimaat
path: climate
type: custom:horizontal-layout
icon: mdi:thermometer
subview: true
badges: []
cards:
- type: vertical-stack
cards:
- type: custom:state-switch
entity: mediaquery
states:
'(max-width: 600px)':
type: custom:mushroom-chips-card
chips:
- type: menu
- type: back
alignment: start
card_mod:
style: |
ha-card {
padding-top: 8px;
--chip-background: trasnaprent;
--chip-box-shadow: none;
--chip-border-width: 0px;
}
- type: horizontal-stack
cards:
- type: custom:mod-card
card:
type: custom:mushroom-title-card
title: Klimaat
subtitle: '{{ states(''input_select.thermostat_mode'') }}'
alignment: begin
card_mod:
style:
.: |
:host {--ha-card-border-width: 0px;}
mushroom-title-card$: |
.header {--title-padding: 10px 0px 12px 4px;}
.title {--title-spacing: 6px;}
.subtitle {--subtitle-font-weight: 300;}
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: input_select.thermostat_mode
icon: mdi:pencil
content_info: none
alignment: end
card_mod:
style: |
ha-card {
padding-top: 8px;
padding-right: 0px;
--chip-background: trasnaprent;
--chip-box-shadow: none;
--chip-border-width: 0px;
}
- type: custom:state-switch
entity: mediaquery
states:
'(min-width: 600px)':
type: custom:mod-card
card:
type: custom:mushroom-title-card
title: ' '
subtitle: ' '
alignment: begin
card_mod:
style:
.: |
:host {--ha-card-border-width: 0px;}
mushroom-title-card$: |
.header {--title-padding: 10px 0px 10px 4px;}
- type: custom:state-switch
entity: mediaquery
states:
'(min-width: 1000px)':
type: custom:mod-card
card:
type: custom:mushroom-title-card
title: ' '
subtitle: ' '
alignment: begin
card_mod:
style:
.: |
:host {--ha-card-border-width: 0px;}
mushroom-title-card$: |
.header {--title-padding: 10px 0px 10px 4px;}
- type: custom:layout-break
- type: vertical-stack
cards:
- type: custom:decluttering-card
template: room_header_temperature_humidity_template
variables:
- title: Badkamer
- temperature_entity: sensor.temperature_bathroom
- humidity_entity: sensor.bathroom_multi_sensor_humidity
- room_path: /evolution-v4/bathroom
- square: false
columns: 2
type: grid
cards:
- type: custom:decluttering-card
template: thermostat_mode_template
variables:
- entity: input_select.thermostat_mode_bathroom
- type: custom:decluttering-card
template: climate_template
variables:
- entity: climate.bathroom
- type: custom:mushroom-entity-card
entity: binary_sensor.bathroom_window_sensor_contact
name: Bovenlicht
icon_color: teal
- type: custom:mushroom-fan-card
entity: fan.bathroom
name: Ventilator
icon_animation: true
secondary_info: none
show_percentage_control: false
fill_container: true
tap_action:
action: more-info
- type: custom:gap-card
height: 10
- type: vertical-stack
cards:
- type: custom:decluttering-card
template: room_header_temperature_humidity_template
variables:
- title: Balkons
- temperature_entity: sensor.temperature_balcony
- humidity_entity: sensor.humidity_balcony
- room_path: /evolution-v4/balcony
- square: false
columns: 2
type: grid
cards:
- type: custom:simple-weather-card
entity: weather.buienradar
primary_info: null
secondary_info: null
name: (Buienradar)
- type: custom:simple-weather-card
entity: weather.home
primary_info: null
secondary_info: null
name: (met.no)
- type: custom:simple-weather-card
entity: weather.meteo_france
primary_info: null
secondary_info: null
name: (Meteo France)
- type: custom:simple-weather-card
entity: weather.open_meteo
primary_info: null
secondary_info: null
name: (Open Meteo)
- type: custom:simple-weather-card
entity: weather.openweathermap
primary_info: null
secondary_info: null
name: (OpenWeathrMap)
- type: custom:gap-card
height: 10
- type: vertical-stack
cards:
- type: custom:decluttering-card
template: room_header_temperature_humidity_template
variables:
- title: Hal
- temperature_entity: sensor.hallway_multi_sensor_temperature
- humidity_entity: sensor.hallway_multi_sensor_humidity
- room_path: /evolution-v4/hallway
- square: false
columns: 2
type: grid
cards:
- type: custom:mushroom-entity-card
entity: binary_sensor.front_door_sensor_contact
name: Voordeur
icon_color: teal
- type: custom:gap-card
height: 10
- type: custom:layout-break
- type: vertical-stack
cards:
- type: custom:decluttering-card
template: room_header_temperature_template
variables:
- title: Inloopkast
- temperature_entity: sensor.temperature_closet
- room_path: /evolution-v4/closet
- square: false
columns: 2
type: grid
cards:
- type: custom:decluttering-card
template: thermostat_mode_template
variables:
- entity: input_select.thermostat_mode_closet
- type: custom:decluttering-card
template: climate_template
variables:
- entity: climate.closet
- type: custom:mushroom-entity-card
entity: binary_sensor.closet_window_sensor_contact
name: Raam
icon_color: teal
- type: custom:gap-card
height: 10
- type: vertical-stack
cards:
- type: custom:decluttering-card
template: room_header_temperature_template
variables:
- title: Kantoor
- temperature_entity: sensor.temperature_office
- room_path: /evolution-v4/office
- square: false
columns: 2
type: grid
cards:
- type: custom:decluttering-card
template: thermostat_mode_template
variables:
- entity: input_select.thermostat_mode_office
- type: custom:decluttering-card
template: climate_template
variables:
- entity: climate.office
- type: custom:gap-card
height: 10
- type: vertical-stack
cards:
- type: custom:decluttering-card
template: room_header_temperature_template
variables:
- title: Keuken
- temperature_entity: sensor.temperature_kitchen
- room_path: /evolution-v4/kitchen
- square: false
columns: 2
type: grid
cards:
- type: custom:decluttering-card
template: thermostat_mode_template
variables:
- entity: input_select.thermostat_mode_kitchen
- type: custom:decluttering-card
template: climate_template
variables:
- entity: climate.kitchen
- title: Keuken
- type: custom:decluttering-card
template: climate_template
variables:
- entity: climate.scullery
- title: Bijkeuken
- type: custom:gap-card
height: 10
- type: custom:layout-break
- type: vertical-stack
cards:
- type: custom:decluttering-card
template: room_header_temperature_humidity_template
variables:
- title: Slaapkamer
- temperature_entity: sensor.temperature_bedroom
- humidity_entity: sensor.bedroom_multi_sensor_humidity
- room_path: /evolution-v4/bedroom
- square: false
columns: 2
type: grid
cards:
- type: custom:decluttering-card
template: thermostat_mode_template
variables:
- entity: input_select.thermostat_mode_bedroom
- type: custom:decluttering-card
template: climate_template
variables:
- entity: climate.bedroom_east
- title: Oost
- type: custom:decluttering-card
template: climate_template
variables:
- entity: climate.bedroom_south
- title: Zuid
- type: custom:mushroom-entity-card
entity: binary_sensor.bedroom_window_sensor_contact
name: Raam
icon_color: teal
- type: custom:mushroom-fan-card
entity: fan.ventilator
secondary_info: none
fill_container: true
icon_animation: true
tap_action:
action: more-info
- type: custom:gap-card
height: 10
- type: vertical-stack
cards:
- type: custom:decluttering-card
template: room_header_temperature_humidity_template
variables:
- title: Toilet
- temperature_entity: sensor.toilet_multi_sensor_temperature
- humidity_entity: sensor.toilet_multi_sensor_humidity
- room_path: /evolution-v4/toilet
- square: false
columns: 2
type: grid
cards:
- type: custom:mushroom-entity-card
entity: binary_sensor.toilet_door_sensor_contact
name: Deur
icon_color: teal
- type: custom:mushroom-fan-card
entity: fan.toilet_fan
secondary_info: none
fill_container: true
icon_animation: true
tap_action:
action: more-info
name: Ventilatie
- type: custom:gap-card
height: 10
- type: vertical-stack
cards:
- type: custom:decluttering-card
template: room_header_temperature_humidity_template
variables:
- title: Woonkamer
- temperature_entity: sensor.temperature_livingroom
- humidity_entity: sensor.livingroom_multi_sensor_humidity
- room_path: /evolution-v4/livingroom
- square: false
columns: 2
type: grid
cards:
- type: custom:decluttering-card
template: thermostat_mode_template
variables:
- entity: input_select.thermostat_mode_livingroom
- type: custom:decluttering-card
template: climate_template
variables:
- entity: climate.livingroom_north
- title: Noord
- type: custom:decluttering-card
template: climate_template
variables:
- entity: climate.livingroom_east
- title: Oost
- type: custom:decluttering-card
template: climate_template
variables:
- entity: climate.livingroom_south
- title: Zuid
- type: custom:mushroom-entity-card
entity: binary_sensor.living_room_window_sensor_contact
name: Raam
icon_color: teal
- type: custom:gap-card
height: 10
- type: custom:layout-break
decluttering_templates:
climate_template:
default:
- entity: climate.bathroom
- title: Radiator
card:
type: custom:mushroom-template-card
primary: '[[title]]'
secondary: |-
{% set current = state_attr(entity, 'current_temperature') | float(0) %}
{% set setpoint = state_attr(entity, 'temperature') | float(0) %}
{% if is_state(entity, 'off') %}
disabled
{% elif (setpoint - current) > 0.5 %}
{{ current }}° ➡ {{ setpoint }}°
{% else %}
{{ current }}° ({{ setpoint }}°)
{% endif %}
icon: mdi:thermostat
entity: '[[entity]]'
icon_color: |-
{% set current = state_attr(entity, 'current_temperature') | float(0) %}
{% set setpoint = state_attr(entity, 'temperature') | float(0) %}
{% if is_state(entity, 'off') %}
disabled
{% elif (setpoint - current) > 0.5 %}
deep-orange
{% else %}
indigo
{% endif %}
tap_action:
action: more-info
room_header_template:
default:
- title: My Room
card:
type: custom:mod-card
card:
type: custom:mushroom-title-card
subtitle: '[[title]]'
alignment: begin
card_mod:
style:
.: |
:host {--ha-card-border-width: 0px;}
mushroom-title-card$: |
@media (max-width: 600px) {
.header { --title-padding: 4px 0px 4px 4px; }
}
@media (min-width: 600px) {
.header { --title-padding: 8px 0px 4px 4px; }
}
.header { --secondary-text-color: var(--primary-text-color); }
.subtitle { --subtitle-font-weight: 400; }
room_header_temperature_template:
default:
- title: My Room
- temperature_entity: ' '
- room_path: /
card:
type: custom:layout-card
layout_type: custom:grid-layout
cards:
- type: custom:decluttering-card
template: room_header_template
variables:
- title: '[[title]]'
- type: custom:mushroom-chips-card
chips:
- type: template
entity: '[[temperature_entity]]'
content: '{{ states(entity) | round(1) }}°'
icon_color: deep-orange
icon: mdi:thermometer
double_tap_action:
action: none
tap_action:
action: more-info
hold_action:
action: none
- type: entity
entity: input_button.dummy
double_tap_action:
action: none
content_info: none
icon: mdi:chevron-right
tap_action:
action: navigate
navigation_path: '[[room_path]]'
hold_action:
action: none
alignment: end
card_mod:
style: |
ha-card {
--chip-background: trasnaprent;
--chip-box-shadow: none;
--chip-border-width: 0px;
--chip-spacing: 0px;
--chip-font-weight: 400;
margin-left: -4px;
}
layout:
grid-template-columns: auto 1fr
grid-column-gap: 12px
grid-template-areas: |
". ."
margin: 0 -4px
padding: 0
card_margin: 0
room_header_temperature_humidity_template:
default:
- title: My Room
- temperature_entity: ' '
- humidity_entity: ' '
- room_path: /
card:
type: custom:layout-card
layout_type: custom:grid-layout
cards:
- type: custom:decluttering-card
template: room_header_template
variables:
- title: '[[title]]'
- type: custom:mushroom-chips-card
chips:
- type: template
entity: '[[temperature_entity]]'
content: '{{ states(entity) | round(1) }}°'
icon_color: deep-orange
icon: mdi:thermometer
double_tap_action:
action: none
tap_action:
action: more-info
hold_action:
action: none
- type: template
entity: '[[humidity_entity]]'
content: '{{ states(entity) | round(0) }}%'
icon_color: blue
icon: mdi:water
double_tap_action:
action: none
tap_action:
action: more-info
hold_action:
action: none
- type: entity
entity: input_button.dummy
double_tap_action:
action: none
content_info: none
icon: mdi:chevron-right
tap_action:
action: navigate
navigation_path: '[[room_path]]'
hold_action:
action: none
alignment: end
card_mod:
style: |
ha-card {
--chip-background: trasnaprent;
--chip-box-shadow: none;
--chip-border-width: 0px;
--chip-spacing: 0px;
--chip-font-weight: 400;
margin-left: -4px;
}
layout:
grid-template-columns: auto 1fr
grid-column-gap: 12px
grid-template-areas: |
". ."
margin: 0 -4px
padding: 0
card_margin: 0
thermostat_mode_template:
default:
- entity: input_select.thermostat_mode
card:
type: custom:mushroom-template-card
primary: Thermostat
secondary: '{{ states(entity) }}'
icon: mdi:form-dropdown
entity: '[[entity]]'
icon_color: |-
{% if states(entity) == 'Afwezig' %}
purple
{% elif states(entity) == 'Nacht' %}
indigo
{% elif states(entity) == 'Thuis' %}
green
{% elif states(entity) == 'Eco' %}
amber
{% elif states(entity) == 'Comfort' %}
deep-orange
{% else %}
disabled
{% endif %}
tap_action:
action: more-info
hold_action:
action: none
double_tap_action:
action: none
fill_container: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment