Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- title: Quick
- icon: 'mdi:timer'
- path: default_view
- badges: []
- cards:
- - type: vertical-stack ## 1st Page Column
- cards:
- - type: vertical-stack ## Group 1 - Security Buttons/States
- cards:
- - type: custom:bubble-card
- card_type: separator
- name: Home
- icon: mdi:home
- - type: custom:stack-in-card
- mode: horizontal
- style:
- .: |
- ha-card {
- border-radius: 30px;
- margin: 0 auto;
- padding-top: 0px;
- }
- cards:
- - type: 'custom:button-card' # Alarm
- entity: alarm_control_panel.security
- template: 1_alarm
- show_state: true
- - type: 'custom:button-card' # Door Lock
- template: 1_lock
- entity: lock.front_door
- show_name: true
- name: Door Lock
- show_state: true
- - type: 'custom:button-card' # External Door Sensors
- template: 1_state_small
- entity: group.door_sensors_external
- name: External
- show_name: true
- show_state: false
- show_icon: true
- show_label: false
- show_last_changed: true
- custom_fields:
- msen: >
- [[[
- if (states['group.door_sensors_external'].state === 'off') return 'Off';
- if (states['binary_sensor.d_back'].state === 'on') var Bk = "Bk. "; else var Bk = '';
- if (states['binary_sensor.d_screen'].state === 'on') var S = "S. "; else var S = '';
- if (states['binary_sensor.d_laundry'].state === 'on') var F = "F. "; else var F = '';
- return (F + S + Bk);
- ]]]
- state:
- - color: var(--secondary-button-colour)
- icon: 'mdi:door-open'
- value: 'on'
- - color: var(--primary-button-colour)
- icon: 'mdi:door-closed'
- value: 'off'
- styles:
- grid:
- - grid-template-areas: ' "i" "n" "msen" "l" '
- - grid-template-columns: 1fr
- - grid-template-rows: 1fr min-content min-content min-content
- custom_fields:
- msen:
- - font-size: 13px
- - color: var(primary-text-color)
- - align-self: middle
- - justify-self: middle
- - type: 'custom:button-card' # Garage Door
- template: 1_garage_door
- show_state: true
- entity: cover.d_garage
- name: Garage
- - type: 'custom:button-card' #Motion Sensors
- template: 1_state_small
- entity: group.motion_sensors
- show_name: true
- show_state: false
- show_icon: true
- show_label: false
- show_last_changed: true
- name: Motion
- icon: 'mdi:help'
- custom_fields:
- msen: >
- [[[
- if (states['group.motion_sensors'].state === 'off') return 'Off';
- if (states['binary_sensor.ms_lounge'].state === 'on') var L = "L. "; else var L = '';
- if (states['binary_sensor.ms_kitchen'].state === 'on') var K = "K. "; else var K = '';
- if (states['binary_sensor.ms_bedroom'].state === 'on') var Bd = "Bd. "; else var Bd = '';
- if (states['binary_sensor.ms_laundry'].state === 'on') var C = "C. "; else var C = '';
- if (states['binary_sensor.ms_bathroom'].state === 'on') var Bt = "Bt. "; else var Bt = '';
- if (states['binary_sensor.ms_toilet'].state === 'on') var T = "T. "; else var T = '';
- if (states['binary_sensor.ms_garage'].state === 'on') var G = "G. "; else var G = '';
- return (L + K + Bd + C + Bt + T + G);
- ]]]
- state:
- - color: var(--secondary-button-colour)
- icon: 'mdi:run-fast'
- value: 'on'
- - color: var(--primary-button-colour)
- icon: 'mdi:walk'
- value: 'off'
- styles:
- grid:
- - grid-template-areas: ' "i" "n" "msen" "l" '
- - grid-template-columns: 1fr
- - grid-template-rows: 1fr min-content min-content min-content
- custom_fields:
- msen:
- - font-size: 13px
- - color: var(primary-text-color)
- - align-self: middle
- - justify-self: middle
- - type: vertical-stack ## Group 2 - Music
- cards:
- - type: custom:bubble-card #
- card_type: separator
- name: Music
- icon: mdi:music
- - type: custom:stack-in-card # Music Player
- mode: vertical
- cards:
- - type: custom:mini-media-player # Music Player
- entity: media_player.kbs_music
- icon: mdi:apple
- artwork: none
- show_source: true
- group: true
- show_progress: true
- # info: scroll
- hide:
- volume_level: false
- style: |
- :host {
- background-color: var(--secondary-background-color);
- border-top-left-radius: 35px;
- border-top-right-radius: 35px;
- }
- - type: horizontal-stack # Volume Buttons
- cards:
- - type: custom:button-card # Vol 3
- template: haptic
- entity: input_number.kbs_music_airplay_vol_cur
- show_name: true
- show_state: false
- show_icon: false
- show_label: false
- name: 3
- tap_action:
- action: call-service
- service: input_number.set_value
- service_data:
- entity_id: input_number.kbs_music_airplay_vol_new
- value: 4
- state:
- - operator: template
- value: '[[[ return entity.state <= 4; ]]]'
- styles:
- name:
- - color: var(--secondary-button-colour)
- - value: '[[[ return entity.state > 4; ]]]'
- styles:
- name:
- - color: var(--primary-button-color)
- - type: custom:button-card # Vol 5
- template: haptic
- entity: input_number.kbs_music_airplay_vol_cur
- show_name: true
- show_state: false
- show_icon: false
- show_label: false
- name: 5
- tap_action:
- action: call-service
- service: input_number.set_value
- service_data:
- entity_id: input_number.kbs_music_airplay_vol_new
- value: 5
- state:
- - operator: template
- value: '[[[ return entity.state <= 5 && entity.state > 3; ]]]'
- styles:
- name:
- - color: var(--secondary-button-colour)
- - value: '[[[ return entity.state < 3; ]]]'
- styles:
- name:
- - color: var(--primary-button-color)
- - value: '[[[ return entity.state > 5; ]]]'
- styles:
- name:
- - color: var(--primary-button-color)
- - type: custom:button-card # Vol 10
- template: haptic
- entity: input_number.kbs_music_airplay_vol_cur
- show_name: true
- show_state: false
- show_icon: false
- show_label: false
- name: 10
- tap_action:
- action: call-service
- service: input_number.set_value
- service_data:
- entity_id: input_number.kbs_music_airplay_vol_new
- value: 10
- state:
- - operator: template
- value: '[[[ return entity.state <= 10 && entity.state > 5; ]]]'
- styles:
- name:
- - color: var(--secondary-button-colour)
- - value: '[[[ return entity.state < 25; ]]]'
- styles:
- name:
- - color: var(--primary-button-color)
- - value: '[[[ return entity.state > 5; ]]]'
- styles:
- name:
- - color: var(--primary-button-color)
- - type: custom:button-card # Vol 15
- template: haptic
- entity: input_number.kbs_music_airplay_vol_cur
- show_name: true
- show_state: false
- show_icon: false
- show_label: false
- name: 15
- tap_action:
- action: call-service
- service: input_number.set_value
- service_data:
- entity_id: input_number.kbs_music_airplay_vol_new
- value: 15
- state:
- - operator: template
- value: '[[[ return entity.state <= 15 && entity.state > 10; ]]]'
- styles:
- name:
- - color: var(--secondary-button-colour)
- - value: '[[[ return entity.state < 10; ]]]'
- styles:
- name:
- - color: var(--primary-button-color)
- - value: '[[[ return entity.state > 15; ]]]'
- styles:
- name:
- - color: var(--primary-button-color)
- - type: custom:button-card # Vol 20
- template: haptic
- entity: input_number.kbs_music_airplay_vol_cur
- show_name: true
- show_state: false
- show_icon: false
- show_label: false
- name: 20
- tap_action:
- action: call-service
- service: input_number.set_value
- service_data:
- entity_id: input_number.kbs_music_airplay_vol_new
- value: 20
- state:
- - operator: template
- value: '[[[ return entity.state <= 20 && entity.state > 15; ]]]'
- styles:
- name:
- - color: var(--secondary-button-colour)
- - value: '[[[ return entity.state < 15; ]]]'
- styles:
- name:
- - color: var(--primary-button-color)
- - value: '[[[ return entity.state > 20; ]]]'
- styles:
- name:
- - color: var(--primary-button-color)
- - type: custom:button-card # Vol 25
- template: haptic
- entity: input_number.kbs_music_airplay_vol_cur
- show_name: true
- show_state: false
- show_icon: false
- show_label: false
- name: 25
- tap_action:
- action: call-service
- service: input_number.set_value
- service_data:
- entity_id: input_number.kbs_music_airplay_vol_new
- value: 25
- state:
- - operator: template
- value: '[[[ return entity.state <= 25 && entity.state > 20; ]]]'
- styles:
- name:
- - color: var(--secondary-button-colour)
- - value: '[[[ return entity.state < 20; ]]]'
- styles:
- name:
- - color: var(--primary-button-color)
- - value: '[[[ return entity.state > 25; ]]]'
- styles:
- name:
- - color: var(--primary-button-color)
- - type: custom:button-card # Vol 30
- template: haptic
- entity: input_number.kbs_music_airplay_vol_cur
- show_name: true
- show_state: false
- show_icon: false
- show_label: false
- name: 30
- tap_action:
- action: call-service
- service: input_number.set_value
- service_data:
- entity_id: input_number.kbs_music_airplay_vol_new
- value: 30
- state:
- - operator: template
- value: '[[[ return entity.state <= 30 && entity.state > 25; ]]]'
- styles:
- name:
- - color: var(--secondary-button-colour)
- - value: '[[[ return entity.state < 25; ]]]'
- styles:
- name:
- - color: var(--primary-button-color)
- - value: '[[[ return entity.state > 30; ]]]'
- styles:
- name:
- - color: red
- - type: vertical-stack ## Group 3 - Lights
- cards:
- - type: custom:bubble-card
- card_type: separator
- name: Lights
- icon: mdi:lightbulb-group
- - type: horizontal-stack # 1st Row Lights
- cards:
- - type: custom:bubble-card # Lounge Light
- card_type: button
- button_type: slider
- scrolling_effect: false
- show_last_changed: true
- show_attribute: false
- show_state: false
- show_name: false
- columns: 1
- card_layout: large-2-rows
- entity: light.lounge
- tap_action:
- action: toggle
- double_tap_action:
- action: more-info
- sub_button:
- - name: Mode
- entity: input_select.light_lounge_mode
- card_type: select
- button_type: state
- show_icon: true
- show_background: false
- show_state: true
- icon: mdi:lightbulb-group-outline
- - name: Temp
- entity: sensor.temp_lounge
- show_icon: true
- show_background: false
- show_state: true
- styles: |
- .bubble-name-container {
- margin-left: 0px;
- margin-right: 0px;
- font-size: 12px !important;
- }
- .bubble-icon-container {
- margin-left: 0px;
- margin-right: 1px;
- }
- .bubble-sub-button {
- margin-left: 0px;
- margin-right: -25px;
- background: none !important;
- border-radius: 0;
- font-size: 8px !important;
- }
- .bubble-state {
- font-size: 8px !important;
- }
- .bubble-sub-button-2 > ha-icon {
- color: ${hass.states['sensor.temp_lounge'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_lounge'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-2 {
- color: ${hass.states['sensor.temp_lounge'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_lounge'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-1 {
- color: ${hass.states['input_select.light_lounge_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_lounge_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_lounge_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_lounge_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_lounge_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-1 > ha-icon {
- color: ${hass.states['input_select.light_lounge_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_lounge_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_lounge_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_lounge_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_lounge_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- ${subButtonIcon[1].setAttribute("icon", hass.states['sensor.temp_lounge'].state <= 15 ? 'mdi:thermometer-chevron-down'
- : hass.states['sensor.temp_lounge'].state <= 25 ? 'mdi:thermometer'
- : 'mdi:thermometer-chevron-up')}
- - type: custom:bubble-card # Kitchen Light
- card_type: button
- button_type: slider
- scrolling_effect: false
- show_last_changed: true
- show_attribute: false
- show_state: false
- show_name: false
- columns: 1
- card_layout: large-2-rows
- entity: light.kitchen
- tap_action:
- action: toggle
- double_tap_action:
- action: more-info
- sub_button:
- - name: Mode
- entity: input_select.light_kitchen_mode
- show_icon: true
- icon:
- show_background: false
- show_state: true
- icon: mdi:lightbulb-group-outline
- - name: Temp
- entity: sensor.temp_kitchen
- show_icon: true
- show_background: false
- show_state: true
- styles: |
- .bubble-name-container {
- margin-left: 0px;
- margin-right: 0px;
- font-size: 12px !important;
- }
- .bubble-icon-container {
- margin-left: 0px;
- margin-right: 1px;
- }
- .bubble-sub-button {
- margin-left: 0px;
- margin-right: -25px;
- background: none !important;
- border-radius: 0;
- font-size: 8px !important;
- }
- .bubble-state {
- font-size: 8px !important;
- }
- .bubble-sub-button-2 > ha-icon {
- color: ${hass.states['sensor.temp_kitchen'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_kitchen'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-2 {
- color: ${hass.states['sensor.temp_kitchen'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_kitchen'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-1 {
- color: ${hass.states['input_select.light_kitchen_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_kitchen_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_kitchen_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_kitchen_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_kitchen_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-1 > ha-icon {
- color: ${hass.states['input_select.light_kitchen_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_kitchen_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_kitchen_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_kitchen_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_kitchen_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- ${subButtonIcon[1].setAttribute("icon", hass.states['sensor.temp_kitchen'].state <= 15 ? 'mdi:thermometer-chevron-down'
- : hass.states['sensor.temp_kitchen'].state <= 25 ? 'mdi:thermometer'
- : 'mdi:thermometer-chevron-up')}
- - type: horizontal-stack # 2nd Row Lights
- cards:
- - type: conditional # Bedroom Globe
- conditions:
- - entity: input_select.light_bedroom
- state: "Globe"
- card:
- type: custom:bubble-card
- card_type: button
- button_type: slider
- scrolling_effect: false
- show_last_changed: true
- show_attribute: false
- show_state: false
- show_name: false
- columns: 1
- card_layout: large-2-rows
- entity: light.bedroom_globe
- tap_action:
- action: toggle
- double_tap_action:
- action: more-info
- hold_action:
- action: call-service
- service: input_select.select_option
- data:
- entity_id: input_select.light_bedroom
- option: "Lamp"
- sub_button:
- - name: Mode
- entity: input_select.light_bedroom_globe_mode
- show_icon: true
- icon:
- show_background: false
- show_state: true
- icon: mdi:lightbulb-group-outline
- - name: Temp
- entity: sensor.temp_bedroom
- show_icon: true
- show_background: false
- show_state: true
- styles: |
- .bubble-name-container {
- margin-left: 0px;
- margin-right: 0px;
- font-size: 12px !important;
- }
- .bubble-icon-container {
- margin-left: 0px;
- margin-right: 1px;
- }
- .bubble-sub-button {
- margin-left: 0px;
- margin-right: -25px;
- background: none !important;
- border-radius: 0;
- font-size: 8px !important;
- }
- .bubble-state {
- font-size: 8px !important;
- }
- .bubble-sub-button-2 > ha-icon {
- color: ${hass.states['sensor.temp_bedroom'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_bedroom'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-2 {
- color: ${hass.states['sensor.temp_bedroom'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_bedroom'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-1 {
- color: ${hass.states['input_select.light_bedroom_globe_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_bedroom_globe_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_bedroom_globe_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_bedroom_globe_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_bedroom_globe_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-1 > ha-icon {
- color: ${hass.states['input_select.light_bedroom_globe_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_bedroom_globe_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_bedroom_globe_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_bedroom_globe_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_bedroom_globe_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- ${subButtonIcon[1].setAttribute("icon", hass.states['sensor.temp_bedroom'].state <= 15 ? 'mdi:thermometer-chevron-down'
- : hass.states['sensor.temp_bedroom'].state <= 25 ? 'mdi:thermometer'
- : 'mdi:thermometer-chevron-up')}
- - type: conditional # Bedroom Lamp
- conditions:
- - entity: input_select.light_bedroom
- state: "Lamp"
- card:
- type: custom:bubble-card
- card_type: button
- button_type: slider
- scrolling_effect: false
- show_last_changed: true
- show_attribute: false
- show_state: false
- show_name: false
- columns: 1
- card_layout: large-2-rows
- entity: light.bedroom_lamp
- tap_action:
- action: toggle
- double_tap_action:
- action: more-info
- hold_action:
- action: call-service
- service: input_select.select_option
- data:
- entity_id: input_select.light_bedroom
- option: "Globe"
- sub_button:
- - name: Mode
- entity: input_select.light_bedroom_lamp_mode
- show_icon: true
- icon:
- show_background: false
- show_state: true
- icon: mdi:lightbulb-group-outline
- - name: Temp
- entity: sensor.temp_bedroom
- show_icon: true
- show_background: false
- show_state: true
- styles: |
- .bubble-name-container {
- margin-left: 0px;
- margin-right: 0px;
- font-size: 12px !important;
- }
- .bubble-icon-container {
- margin-left: 0px;
- margin-right: 1px;
- }
- .bubble-sub-button {
- margin-left: 0px;
- margin-right: -25px;
- background: none !important;
- border-radius: 0;
- font-size: 8px !important;
- }
- .bubble-state {
- font-size: 8px !important;
- }
- .bubble-sub-button-2 > ha-icon {
- color: ${hass.states['sensor.temp_bedroom'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_bedroom'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-2 {
- color: ${hass.states['sensor.temp_bedroom'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_bedroom'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-1 {
- color: ${hass.states['input_select.light_bedroom_lamp_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_bedroom_lamp_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_bedroom_lamp_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_bedroom_lamp_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_bedroom_lamp_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-1 > ha-icon {
- color: ${hass.states['input_select.light_bedroom_lamp_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_bedroom_lamp_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_bedroom_lamp_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_bedroom_lamp_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_bedroom_lamp_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- ${subButtonIcon[1].setAttribute("icon", hass.states['sensor.temp_bedroom'].state <= 15 ? 'mdi:thermometer-chevron-down'
- : hass.states['sensor.temp_bedroom'].state <= 25 ? 'mdi:thermometer'
- : 'mdi:thermometer-chevron-up')}
- - type: custom:bubble-card ## Bathroom Light
- card_type: button
- button_type: slider
- scrolling_effect: false
- show_last_changed: true
- show_attribute: false
- show_state: false
- show_name: false
- columns: 1
- card_layout: large-2-rows
- entity: light.bathroom
- tap_action:
- action: toggle
- double_tap_action:
- action: more-info
- sub_button:
- - name: Mode
- entity: input_select.light_bathroom_mode
- show_icon: true
- icon:
- show_background: false
- show_state: true
- icon: mdi:lightbulb-group-outline
- - name: Temp
- entity: sensor.temp_bathroom
- show_icon: true
- show_background: false
- show_state: true
- styles: |
- .bubble-name-container {
- margin-left: 0px;
- margin-right: 0px;
- font-size: 12px !important;
- }
- .bubble-icon-container {
- margin-left: 0px;
- margin-right: 1px;
- }
- .bubble-sub-button {
- margin-left: 0px;
- margin-right: -25px;
- background: none !important;
- border-radius: 0;
- font-size: 8px !important;
- }
- .bubble-state {
- font-size: 8px !important;
- }
- .bubble-sub-button-2 > ha-icon {
- color: ${hass.states['sensor.temp_bathroom'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_bathroom'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-2 {
- color: ${hass.states['sensor.temp_bathroom'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_bathroom'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-1 {
- color: ${hass.states['input_select.light_bathroom_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_bathroom_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_bathroom_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_bathroom_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_bathroom_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-1 > ha-icon {
- color: ${hass.states['input_select.light_bathroom_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_bathroom_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_bathroom_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_bathroom_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_bathroom_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- ${subButtonIcon[1].setAttribute("icon", hass.states['sensor.temp_bathroom'].state <= 15 ? 'mdi:thermometer-chevron-down'
- : hass.states['sensor.temp_bathroom'].state <= 25 ? 'mdi:thermometer'
- : 'mdi:thermometer-chevron-up')}
- - type: horizontal-stack # 3rd Row Lights
- cards:
- - type: custom:bubble-card # Toilet Light
- card_type: button
- button_type: slider
- scrolling_effect: false
- show_last_changed: true
- show_attribute: false
- show_state: false
- show_name: false
- columns: 1
- card_layout: large-2-rows
- entity: light.toilet
- tap_action:
- action: toggle
- double_tap_action:
- action: more-info
- sub_button:
- - name: Mode
- entity: input_select.light_toilet_mode
- show_icon: true
- icon:
- show_background: false
- show_state: true
- icon: mdi:lightbulb-group-outline
- - name: Temp
- entity: sensor.temp_toilet
- show_icon: true
- show_background: false
- show_state: true
- styles: |
- .bubble-name-container {
- margin-left: 0px;
- margin-right: 0px;
- font-size: 12px !important;
- }
- .bubble-icon-container {
- margin-left: 0px;
- margin-right: 1px;
- }
- .bubble-sub-button {
- margin-left: 0px;
- margin-right: -25px;
- background: none !important;
- border-radius: 0;
- font-size: 8px !important;
- }
- .bubble-state {
- font-size: 8px !important;
- }
- .bubble-sub-button-2 > ha-icon {
- color: ${hass.states['sensor.temp_toilet'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_toilet'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-2 {
- color: ${hass.states['sensor.temp_toilet'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_toilet'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-1 {
- color: ${hass.states['input_select.light_toilet_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_toilet_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_toilet_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_toilet_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_toilet_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-1 > ha-icon {
- color: ${hass.states['input_select.light_toilet_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_toilet_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_toilet_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_toilet_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_toilet_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- ${subButtonIcon[1].setAttribute("icon", hass.states['sensor.temp_toilet'].state <= 15 ? 'mdi:thermometer-chevron-down'
- : hass.states['sensor.temp_toilet'].state <= 25 ? 'mdi:thermometer'
- : 'mdi:thermometer-chevron-up')}
- - type: custom:bubble-card # Laundry Light
- card_type: button
- button_type: slider
- scrolling_effect: false
- show_last_changed: true
- show_attribute: false
- show_state: false
- show_name: false
- columns: 1
- card_layout: large-2-rows
- entity: light.laundry
- tap_action:
- action: toggle
- double_tap_action:
- action: more-info
- sub_button:
- - name: Mode
- entity: input_select.light_laundry_mode
- show_icon: true
- icon:
- show_background: false
- show_state: true
- icon: mdi:lightbulb-group-outline
- - name: Temp
- entity: sensor.temp_laundry
- show_icon: true
- show_background: false
- show_state: true
- styles: |
- .bubble-name-container {
- margin-left: 0px;
- margin-right: 0px;
- font-size: 12px !important;
- }
- .bubble-icon-container {
- margin-left: 0px;
- margin-right: 1px;
- }
- .bubble-sub-button {
- margin-left: 0px;
- margin-right: -25px;
- background: none !important;
- border-radius: 0;
- font-size: 8px !important;
- }
- .bubble-state {
- font-size: 8px !important;
- }
- .bubble-sub-button-2 > ha-icon {
- color: ${hass.states['sensor.temp_laundry'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_laundry'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-2 {
- color: ${hass.states['sensor.temp_laundry'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_laundry'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-1 {
- color: ${hass.states['input_select.light_laundry_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_laundry_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_laundry_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_laundry_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_laundry_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-1 > ha-icon {
- color: ${hass.states['input_select.light_laundry_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_laundry_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_laundry_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_laundry_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_laundry_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- ${subButtonIcon[1].setAttribute("icon", hass.states['sensor.temp_laundry'].state <= 15 ? 'mdi:thermometer-chevron-down'
- : hass.states['sensor.temp_laundry'].state <= 25 ? 'mdi:thermometer'
- : 'mdi:thermometer-chevron-up')}
- - type: vertical-stack # 2nd Page Colum
- cards:
- - type: vertical-stack # Group 1 - Blinds
- cards:
- - type: custom:bubble-card
- card_type: separator
- name: Blinds
- icon: mdi:roller-shade
- show_state: true
- - type: horizontal-stack
- cards:
- - type: custom:bubble-card # Lounge Blinds
- card_type: button
- button_type: slider
- entity: cover.curtain_lounge
- name: Lounge
- show_state: false
- show_attribute: true
- attribute: current_position
- card_layout: normal
- icon_open: mdi:blinds-vertical
- icon: mdi:blinds-vertical-closed
- styles: |
- .bubble-range-fill {
- background: var(--cover-colour) !important;
- opacity: 1 !important;
- }
- .bubble-icon {
- color: var(--cover-colour) !important;
- opacity: 1 !important;
- }
- - type: custom:bubble-card # Laundry Blinds
- card_type: button
- name: Laundry
- button_type: slider
- entity: cover.curtain_laundry
- show_state: false
- show_attribute: true
- attribute: current_position
- scrolling_effect: true
- card_layout: normal
- icon_open: mdi:roller-shade
- icon: mdi:roller-shade-closed
- styles: |
- .bubble-range-fill {
- background: var(--cover-colour) !important;
- opacity: 1 !important;
- }
- .bubble-icon {
- color: var(--cover-colour) !important;
- opacity: 1 !important;
- }
- - type: vertical-stack # Group 2 - Climate
- cards:
- - type: custom:bubble-card
- card_type: separator
- name: Climate
- icon: mdi:home-assistant
- - type: custom:bubble-card # Row 1 - Aircon
- card_type: button
- button_type: switch
- scrolling_effect: false
- show_last_changed: false
- show_attribute: true
- show_state: false
- show_name: false
- name: Aircon
- card_layout: large-2-rows
- entity: switch.aircon_change_settings
- double_tap_action:
- action: call-service
- service: switch.turn_off
- service_data:
- entity_id: switch.aircon
- tap_action:
- action: call-service
- service: input_boolean.turn_on
- service_data:
- entity_id: input_boolean.aircon_change_settings
- hold_action:
- action: call-service
- service: input_select.select_next
- service_data:
- entity_id: input_select.aircon_mode
- sub_button:
- - name: Current Speed Settings
- entity: input_select.aircon_speed
- show_icon: true
- icon: mdi:fan
- show_background: false
- show_state: true
- show_name: false
- - name: Mode
- entity: input_number.aircon_temp
- show_icon: true
- show_background: false
- show_state: true
- - name: Fan Increase
- entity: input_select.aircon_speed
- show_name: false
- show_icon: true
- icon: mdi:fan-plus
- show_background: false
- show_state: false
- tap_action:
- action: call-service
- service: input_select.select_next
- service_data:
- entity_id: input_select.aircon_speed
- - name: Fan Increase
- entity: input_select.aircon_speed
- show_name: false
- show_icon: true
- icon: mdi:fan-minus
- show_background: false
- show_state: false
- tap_action:
- action: call-service
- service: input_select.select_previous
- service_data:
- entity_id: input_select.aircon_speed
- - name: Temp Increase
- entity: input_number.aircon_temp
- show_name: false
- show_icon: true
- icon: mdi:thermometer-plus
- show_background: false
- show_state: false
- tap_action:
- action: call-service
- service: input_number.increment
- service_data:
- entity_id: input_number.aircon_temp
- - name: Temp Decrease
- entity: input_number.aircon_temp
- show_name: false
- show_icon: true
- icon: mdi:thermometer-minus
- show_background: false
- show_state: false
- tap_action:
- action: call-service
- service: input_number.decrement
- service_data:
- entity_id: input_number.aircon_temp
- styles: |
- .bubble-button-background {
- background-color: var(--primary-background-colour) !important;
- }
- ${card.querySelector('.bubble-state').innerText = hass.states['input_text.aircon_settings_last_sent_to_aircon'].state}
- .bubble-icon-container {
- margin-left: 0px;
- margin-right: 1px;
- }
- .bubble-state {
- font-size: 10px !important;
- color: ${hass.states['sensor.aircon_settings_not_updated_since_change'].state == 'True' ? 'var(--primary-button-colour)'
- : '' } !important;
- animation: ${hass.states['sensor.aircon_settings_not_updated_since_change'].state == 'True' ? 'blink 3s linear infinite'
- : '' } !important;
- }
- {}
- .bubble-icon {
- animation: ${hass.states['switch.aircon'].state == 'off' ? 'var(--primary-button-colour)'
- : hass.states['input_select.aircon_speed'].state == '0' ? 'rotate 6s linear infinite'
- : hass.states['input_select.aircon_speed'].state == '1' ? 'rotate 5s linear infinite'
- : hass.states['input_select.aircon_speed'].state == '2' ? 'rotate 4s linear infinite'
- : hass.states['input_select.aircon_speed'].state == '3' ? 'rotate 3s linear infinite'
- : hass.states['input_select.aircon_speed'].state == '4' ? 'rotate 2s linear infinite'
- : hass.states['input_select.aircon_speed'].state == '5' ? 'rotate 1s linear infinite'
- : ''};
- color: ${hass.states['switch.aircon'].state == 'off' ? ' '
- : hass.states['input_select.aircon_mode'].state === 'Fan' ? 'var(--secondary-button-colour)'
- : hass.states['input_select.aircon_mode'].state === 'Heat' ? 'var(--high-colour)'
- : hass.states['input_select.aircon_mode'].state === 'Cool' ? 'var(--low-colour)'
- : hass.states['input_select.aircon_mode'].state === 'Dry' ? 'var(--mid-colour)'
- : 'var(--primary-button-colour)' } !important;
- }
- ${icon.setAttribute("icon", hass.states['input_select.aircon_mode'].state === 'Fan' ? 'mdi:fan'
- : hass.states['input_select.aircon_mode'].state === 'Heat' ? 'mdi:white-balance-sunny'
- : hass.states['input_select.aircon_mode'].state === 'Cool' ? 'mdi:snowflake'
- : hass.states['input_select.aircon_mode'].state === 'Dry' ? 'mdi:water-percent'
- : 'mdi:air-conditioner')} !important;
- }
- {}
- @keyframes rotate {
- 0% {
- transform: rotate(0deg);
- }
- 100% {
- transform: rotate(360deg);
- }
- }
- @keyframes blink {
- 50% {opacity: 0; }
- }
- .bubble-sub-button-1 > ha-icon {
- color: ${hass.states['input_select.aircon_speed'].state === '0' ? 'var(--low-colour)'
- : hass.states['input_select.aircon_speed'].state === '1' ? 'var(--low-colour)'
- : hass.states['input_select.aircon_speed'].state === '2' ? 'var(--mid-colour)'
- : hass.states['input_select.aircon_speed'].state === '3' ? 'var(--mid-colour)'
- : hass.states['input_select.aircon_speed'].state === '4' ? 'var(--high-colour)'
- : hass.states['input_select.aircon_speed'].state === '5' ? 'var(--high-colour)'
- : 'var(--high-colour)'
- }}
- {}
- ${subButtonIcon[1].setAttribute("icon", hass.states['input_number.aircon_temp'].state <= 16 ? 'mdi:thermometer-chevron-down'
- : hass.states['input_number.aircon_temp'].state <= 20 ? 'mdi:thermometer'
- : 'mdi:thermometer-chevron-up')}
- {}
- .bubble-sub-button-2 > ha-icon {
- color: ${hass.states['input_number.aircon_temp'].state <= 16 ? 'var(--low-colour)'
- : hass.states['input_number.aircon_temp'].state <= 20 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- ${subButtonIcon[1].setAttribute("icon", hass.states['input_number.aircon_temp'].state <= 16 ? 'mdi:thermometer-chevron-down'
- : hass.states['input_number.aircon_temp'].state <= 20 ? 'mdi:thermometer'
- : 'mdi:thermometer-chevron-up')}
- {}
- .bubble-sub-button-3 > ha-icon {
- color: ${'var(--primary-button-colour)' } !important;
- }
- .bubble-sub-button-4 > ha-icon {
- color: ${'var(--primary-button-colour)' } !important;
- }
- .bubble-sub-button-5 > ha-icon {
- color: ${'var(--primary-button-colour)' } !important;
- }
- .bubble-sub-button-6 > ha-icon {
- color: ${'var(--primary-button-colour)' } !important;
- }
- - type: custom:stack-in-card # Row 2 - Switches
- mode: horizontal
- style:
- .: |
- ha-card {
- border-radius: 35px;
- overflow: hidden;
- margin: 0 auto;
- padding-top: 0px;
- }
- cards:
- - type: 'custom:button-card' # Bedtime Mode
- template: quick_switch_toggle_bedtime
- entity: switch.bedtime
- name: Bedtime
- - type: 'custom:button-card' # Bedroom Fan
- template: quick_switch_toggle_fan
- entity: switch.bedroom_fan
- name: Bd. Fan
- - type: 'custom:button-card' # Dehumidfier
- template: quick_switch_toggle_dehumidifier
- entity: fan.dehumidifier
- name: d.Hum
- - type: 'custom:button-card' # Aircon Switch
- template: quick_switch_toggle_aircon
- entity: switch.aircon
- name: Aircon
- - type: 'custom:button-card' # Electric Blanket
- template: quick_switch_toggle_blanket
- entity: switch.blanket
- name: Blanket
- - type: custom:bubble-card # Row 3 - Weather
- card_type: button
- button_type: state
- entity: sensor.launceston_extended_text_0
- name: Weather
- scrolling_effect: true
- show_state: true
- card_layout: large-2-rows
- columns: 1
- styles: >-
- .bubble-icon {
- color: var(--primary-button-colour) !important;
- }
- .bubble-state {
- font-size: 9px !important;
- }
- .bubble-sub-button {
- background: none !important;
- font-size: 10px !important;
- align-content: right;
- }
- ${icon.setAttribute("icon", getWeatherIcon(hass.states['weather.launceston'].state))}
- ${card.querySelector('.bubble-name').innerText = "Outside: " + hass.states['sensor.launceston_min_to_max'].state}
- - type: vertical-stack # Group 3 - Work
- cards:
- - type: custom:bubble-card
- card_type: separator
- name: Work
- icon: mdi:home-assistant
- - type: 'custom:button-card' # Row 4 - Work
- template: work_details
- entity: sensor.work_message
- style:
- .: |
- ha-card {
- border-radius: 35px;
- overflow: hidden;
- margin: 0 auto;
- padding-top: 0px;
- }
- #### ui-lovelace file for Button Card Templates
- button_card_templates:
- haptic:
- # triggers_update: all
- tap_action:
- haptic: light
- action: more-info
- hold_action:
- haptic: success
- action: more-info
- double_tap_action:
- haptic: success
- action: more-info
- state:
- - value: Unknown
- icon: 'mdi:help'
- color: black
- styles:
- card:
- # - border-radius: 40%
- - --mdc-ripple-color: var(--secondary-button-colour)
- - --mdc-ripple-press-opacity: 0.5
- style: |
- ha-card {
- box-shadow: none;
- ha-card-border-radius: 50px
- overflow: hidden;
- }
- 1_state_small:
- template: haptic
- show_name: true
- show_state: false
- show_icon: true
- show_label: false
- show_last_changed: true
- styles:
- card:
- - font-weight: bold
- - font-size: 13px
- - color: var(primary-text-color)
- - align-self: start
- - justify-self: start
- - padding-bottom: 4px
- - text-shadow: 0px 0px 5px black
- - text-transform: capitalize
- - color: auto
- name:
- - font-size: 13px
- - color: var(primary-text-color)
- - align-self: middle
- - justify-self: middle
- label:
- - font-size: 8px
- - color: var(primary-text-color)
- - align-self: middle
- - justify-self: middle
- state:
- - font-size: 13px
- - color: var(primary-text-color)
- - align-self: middle
- - justify-self: middle
- 1_lock:
- template: 1_state_small
- entity: lock.front_door
- tap_action:
- action: call-service
- service: script.turn_on
- service_data:
- entity_id: script.lock_toggle
- hold_action:
- action: more-info
- double_tap_action:
- action: call-service
- service: lock.unlock
- service_data:
- entity_id: lock.front_door
- state:
- - color: var(--primary-button-colour)
- icon: mdi:door-closed-lock
- value: 'on'
- - color: var(--secondary-button-colour)
- icon: mdi:door-open
- value: 'off'
- 1_alarm:
- template: 1_state_small
- show_state: true
- tap_action:
- action: call-service
- service: switch.toggle
- service_data:
- entity_id: switch.security_home
- hold_action:
- action: call-service
- service: alarm_control_panel.alarm_disarm
- service_data:
- entity_id: alarm_control_panel.security
- double_tap_action:
- action: more-info
- state:
- - color: var(--low-colour)
- icon: 'mdi:shield-off'
- operator: template
- value: >
- [[[
- var kitdis = states['input_boolean.security_disarmed_occupied_kitchen'].state;
- var security = states['alarm_control_panel.security'].state;
- return (security === 'disarmed' && kitdis === 'on');
- ]]]
- label: 'Disarmed'
- - color: var(--high-colour)
- icon: 'mdi:shield-off'
- operator: template
- value: >
- [[[
- var delayarm = states['input_boolean.security_home_delayed_by_screen_door'].state;
- var security = states['alarm_control_panel.security'].state;
- return (security === 'disarmed' && delayarm === 'on');
- ]]]
- label: >
- [[[
- return states['sensor.security_delay_arm_end'].state;
- ]]]
- styles:
- icon:
- - animation: >
- [[[
- var rem = states['sensor.security_delay_arm_end_seconds'].state;
- if (rem > 300) return 'blink 10s ease infinite';
- if (rem > 180) return 'blink 5s ease infinite';
- if (rem > 120) return 'blink 3s ease infinite';
- if (rem > 60) return 'blink 2s ease infinite';
- return 'blink 1s ease infinite';
- ]]]
- - color: var(--primary-button-colour)
- icon: 'mdi:shield-off'
- value: disarmed
- label: 'Disarmed'
- - color: var(--primary-button-colour)
- icon: 'mdi:shield-home'
- value: armed_home
- label: Home
- - color: var(--primary-button-colour)
- icon: 'mdi:shield-lock'
- value: armed_night
- label: Night
- - color: var(--primary-button-colour)
- icon: 'mdi:shield-key'
- value: armed_away
- label: Away
- - color: var(--secondary-button-colour)
- icon: 'mdi:bell-alert'
- styles:
- card:
- - animation: blink 3s ease infinite
- value: triggered
- label: Alarm!!
- - color: var(--primary-button-colour)
- icon: 'mdi:bell-alert'
- value: pending
- label: Pendings
- 1_garage_door:
- template: 1_state_small
- show_last_changed: true
- state:
- - color: var(--secondary-button-colour)
- icon: 'mdi:garage-open-variant'
- value: 'open'
- - color: var(--secondary-button-colour)
- icon: 'mdi:garage-open-variant'
- value: 'opening'
- - color: var(--secondary-button-colour)
- icon: 'mdi:garage-open-variant'
- value: 'closing'
- - color: var(--primary-button-colour)
- icon: 'mdi:garage-variant'
- value: 'closed'
- quick_switch_toggle:
- template: haptic
- tap_action:
- action: toggle
- hold_action:
- action: more-info
- show_label: true
- show_last_changed: true
- styles:
- card:
- - font-weight: bold
- - font-size: 13px
- - color: var(primary-text-color)
- - align-self: start
- - justify-self: start
- - padding-bottom: 4px
- - text-shadow: 0px 0px 5px black
- - text-transform: capitalize
- - color: auto
- name:
- - font-weight: bold
- - font-size: 13px
- - color: var(primary-text-color)
- - align-self: middle
- - justify-self: middle
- - padding-bottom: 4px
- label:
- - font-size: 8px
- - color: var(primary-text-color)
- - align-self: middle
- - justify-self: middle
- quick_switch_toggle_bedtime:
- template: quick_switch_toggle
- state:
- - color: var(--secondary-button-colour)
- icon: 'mdi:sleep'
- value: 'on'
- - color: var(--primary-button-colour)
- icon: 'mdi:sleep-off'
- value: 'off'
- quick_switch_toggle_fan:
- template: quick_switch_toggle
- name: Fan
- state:
- - color: var(--secondary-button-colour)
- icon: 'mdi:fan'
- value: 'on'
- - color: var(--primary-button-colour)
- icon: 'mdi:fan-off'
- value: 'off'
- quick_switch_toggle_dehumidifier:
- template: quick_switch_toggle
- state:
- - color: var(--secondary-button-colour)
- icon: 'mdi:air-humidifier'
- value: 'on'
- - color: var(--primary-button-colour)
- icon: 'mdi:air-humidifier-off'
- value: 'off'
- quick_switch_toggle_bedtime:
- template: quick_switch_toggle
- state:
- - color: var(--secondary-button-colour)
- icon: 'mdi:sleep'
- value: 'on'
- - color: var(--primary-button-colour)
- icon: 'mdi:sleep-off'
- value: 'off'
- quick_switch_toggle_blanket:
- template: quick_switch_toggle
- tap_action:
- action: toggle
- double_tap_action:
- action: call-service
- service: script.turn_on
- service_data:
- entity_id: script.blanket_10_minutes
- state:
- - color: var(--primary-button-colour)
- icon: 'mdi:heating-coil'
- value: 'off'
- - color: var(--high-colour)
- icon: 'mdi:heating-coil'
- value: 'on'
- quick_switch_toggle_aircon:
- template: quick_switch_toggle
- double_tap_action:
- action: call-service
- service: input_select.select_next
- service_data:
- entity_id: input_select.aircon_mode
- state:
- - color: var(--primary-button-colour)
- icon: 'mdi:fan'
- operator: template
- value: >
- [[[
- var ac = states['switch.aircon'].state;
- return (ac === 'off' && /F/.test(states['input_select.aircon_mode'].state));
- ]]]
- - color: var(--secondary-button-colour)
- icon: 'mdi:fan'
- operator: template
- value: >
- [[[
- var ac = states['switch.aircon'].state;
- return (ac === 'on' && /F/.test(states['input_select.aircon_mode'].state));
- ]]]
- - color: var(--primary-button-colour)
- icon: 'mdi:snowflake'
- operator: template
- value: >
- [[[
- var ac = states['switch.aircon'].state;
- return (ac === 'off' && /C/.test(states['input_select.aircon_mode'].state));
- ]]]
- - color: var(--secondary-button-colour)
- icon: 'mdi:snowflake'
- operator: template
- value: >
- [[[
- var ac = states['switch.aircon'].state;
- return (ac === 'on' && /C/.test(states['input_select.aircon_mode'].state));
- ]]]
- - color: var(--primary-button-colour)
- icon: 'mdi:white-balance-sunny'
- operator: template
- value: >
- [[[
- var ac = states['switch.aircon'].state;
- return (ac === 'off' && /H/.test(states['input_select.aircon_mode'].state));
- ]]]
- - color: var(--secondary-button-colour)
- icon: 'mdi:white-balance-sunny'
- operator: template
- value: >
- [[[
- var ac = states['switch.aircon'].state;
- return (ac === 'on' && /H/.test(states['input_select.aircon_mode'].state));
- ]]]
- work_details:
- template: haptic
- show_icon: false
- show_state: true
- show_label: true
- show_name: false
- icon: 'mdi:store'
- styles:
- grid:
- - grid-template-areas: '"s" "l"'
- - grid-template-columns: 1fr
- - grid-template-rows: 1fr min-content
- tap_action:
- action: call-service
- service: input_boolean.toggle
- service_data:
- entity_id: input_boolean.work_annual_leave
- label: >
- [[[
- return states['sensor.work_lovelace_script'].state ;
- ]]]
- state:
- - operator: template
- value: >
- [[[
- return states['sensor.work_today_state'].state === 'At Work';
- ]]]
- color: var(--low-colour)
- icon: 'mdi:store'
- - operator: template
- value: >
- [[[
- return states['sensor.work_today_state'].state === 'On Leave';
- ]]]
- color: var(--secondary-button-colour)
- icon: 'mdi:home-floor-l'
- - value: >
- [[[
- return states['sensor.work_today_state'].state === 'No Work Today';
- ]]]
- icon: 'mdi:store'
- color: var(--secondary-button-colour)
- - value: >
- [[[
- return states['sensor.work_today_state'].state === 'Working Today';
- ]]]
- icon: 'mdi:store'
- color: var(--primary-button-colour)
- ### Light Button with 6 Sub buttons
- - type: custom:bubble-card
- card_type: button
- button_type: slider
- scrolling_effect: false
- show_last_changed: true
- show_attribute: true
- show_state: false
- show_name: false
- card_layout: large-2-rows
- entity: light.lounge
- tap_action:
- action: toggle
- double_tap_action:
- action: more-info
- hold_action:
- action: call-service
- data:
- entity_id: input_select.light_lounge_mode
- service: input_select.select_next
- sub_button:
- - name: Motion
- entity: binary_sensor.ms_lounge
- show_icon: true
- show_background: false
- show_state: true
- - name: Motion
- entity: sensor.temp_lounge
- show_icon: true
- show_background: false
- show_state: true
- - name: Mode
- entity: input_select.light_lounge_mode
- show_icon: true
- icon: mdi:lightbulb-group-outline
- show_background: false
- show_state: true
- - name: Auto Mode
- entity: switch.light_lounge_auto_default_mode
- show_name: false
- show_icon: true
- show_background: false
- show_state: true
- - name: Auto On
- entity: automation.light_lounge_auto_on
- show_name: false
- show_icon: true
- show_background: false
- show_state: true
- - name: Auto Off
- entity: automation.light_lounge_auto_off
- show_name: false
- show_icon: true
- show_background: false
- show_state: true
- styles: |
- ${subButtonIcon[0].setAttribute("icon", hass.states['binary_sensor.ms_lounge'].state === 'on' ? 'mdi:run-fast' : 'mdi:walk')}
- ${subButtonIcon[1].setAttribute("icon", hass.states['sensor.temp_lounge'].state <= 15 ? 'mdi:thermometer-chevron-down'
- : hass.states['sensor.temp_lounge'].state <= 25 ? 'mdi:thermometer'
- : 'mdi:thermometer-chevron-up')}
- ${subButtonIcon[3].setAttribute("icon", hass.states['switch.light_lounge_auto_default_mode'].state === 'off' ? 'mdi:transition-masked' : 'mdi:transition')}
- ${subButtonIcon[4].setAttribute("icon", hass.states['automation.light_lounge_auto_on'].state === 'off' ? 'mdi:motion-sensor-off' : 'mdi:motion-sensor')}
- ${subButtonIcon[5].setAttribute("icon", hass.states['automation.light_lounge_auto_off'].state === 'off' ? 'mdi:light-switch-off' : 'mdi:light-switch')}
- .bubble-icon-container {
- margin-left: 0px;
- margin-right: 1px;
- }
- .bubble-state {
- font-size: 10px !important
- }
- .bubble-sub-button-1 {
- color: ${hass.states['binary_sensor.ms_lounge'].state === 'on' ? 'var(--secondary-button-colour)' : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-1 > ha-icon {
- color: ${hass.states['binary_sensor.ms_lounge'].state === 'on' ? 'var(--secondary-button-colour)' : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-2 {
- color: ${hass.states['sensor.temp_lounge'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_lounge'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-2 > ha-icon {
- color: ${hass.states['sensor.temp_lounge'].state <= 15 ? 'var(--low-colour)'
- : hass.states['sensor.temp_lounge'].state <= 25 ? 'var(--primary-button-colour)'
- : 'var(--high-colour)'} !important;
- }
- .bubble-sub-button-3 {
- color: ${hass.states['input_select.light_lounge_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_lounge_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_lounge_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_lounge_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_lounge_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-3 > ha-icon {
- color: ${hass.states['input_select.light_lounge_mode'].state === 'Bright' ? 'var(--light-bright)'
- : hass.states['input_select.light_lounge_mode'].state === 'Soft' ? 'var(--light-soft)'
- : hass.states['input_select.light_lounge_mode'].state === 'Dim' ? 'var(--light-dim)'
- : hass.states['input_select.light_lounge_mode'].state === 'Dark' ? 'var(--light-dark)'
- : hass.states['input_select.light_lounge_mode'].state === 'Night' ? 'var(--light-soft)'
- : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-4 {
- color: ${hass.states['switch.light_lounge_auto_default_mode'].state === 'off' ? 'var(--secondary-button-colour)' : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-4 > ha-icon {
- color: ${hass.states['switch.light_lounge_auto_default_mode'].state === 'off' ? 'var(--secondary-button-colour)' : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-5 {
- color: ${hass.states['automation.light_lounge_auto_on'].state === 'off' ? 'var(--secondary-button-colour)' : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-5 > ha-icon {
- color: ${hass.states['automation.light_lounge_auto_on'].state === 'off' ? 'var(--secondary-button-colour)' : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-6 {
- color: ${hass.states['automation.light_lounge_auto_off'].state === 'off' ? 'var(--secondary-button-colour)' : 'var(--primary-button-colour)'} !important;
- }
- .bubble-sub-button-6 > ha-icon {
- color: ${hass.states['automation.light_lounge_auto_off'].state === 'off' ? 'var(--secondary-button-colour)' : 'var(--primary-button-colour)'} !important;
- }
Advertisement
Add Comment
Please, Sign In to add comment