Some reworks for streamline card templates
This commit is contained in:
@@ -1,4 +1,29 @@
|
||||
streamline_templates:
|
||||
main_button_name:
|
||||
default:
|
||||
- name: ''
|
||||
- columns: 2
|
||||
- navigation_path: ''
|
||||
- icon: ''
|
||||
card:
|
||||
type: custom:bubble-card
|
||||
card_type: button
|
||||
button_type: name
|
||||
name: '[[name]]'
|
||||
icon: '[[icon]]'
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: '[[navigation_path]]'
|
||||
button_action:
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: '[[navigation_path]]'
|
||||
columns: '[[columns]]'
|
||||
styles: |-
|
||||
.bubble-button-background {
|
||||
opacity: 1 !important;
|
||||
background-color: var(--bubble-main-background-color) !important;
|
||||
}
|
||||
phone_info_grid:
|
||||
card:
|
||||
type: custom:stack-in-card
|
||||
@@ -138,48 +163,18 @@ streamline_templates:
|
||||
- entity: sensor.[[gamertag]]_gamer_score
|
||||
name: Gamer Score
|
||||
show_header_toggle: false
|
||||
main_security_button:
|
||||
state_color_button:
|
||||
defaults:
|
||||
- name: ''
|
||||
- columns: ''
|
||||
- columns: 2
|
||||
- show_state: true
|
||||
card:
|
||||
type: custom:bubble-card
|
||||
card_type: button
|
||||
button_type: state
|
||||
entity: '[[entity]]'
|
||||
name: '[[name]]'
|
||||
card_layout: large
|
||||
double_tap_action:
|
||||
action: none
|
||||
hold_action:
|
||||
action: none
|
||||
button_action:
|
||||
double_tap_action:
|
||||
action: none
|
||||
hold_action:
|
||||
action: none
|
||||
columns: '[[columns]]'
|
||||
styles: |-
|
||||
.is-unavailable {
|
||||
opacity: 0.5 !important;
|
||||
}
|
||||
.bubble-button-background {
|
||||
opacity: 1 !important;
|
||||
background-color: ${state === 'on' ? 'var(--error-color)' : 'var(--background-color-2)'} !important;
|
||||
transition: background-color 1s !important;
|
||||
}
|
||||
main_accent_color_button:
|
||||
defaults:
|
||||
- name: ''
|
||||
- columns: ''
|
||||
card:
|
||||
type: custom:bubble-card
|
||||
card_type: button
|
||||
button_type: state
|
||||
entity: '[[entity]]'
|
||||
name: '[[name]]'
|
||||
show_state: true
|
||||
card_layout: large
|
||||
show_state: '[[show_state]]'
|
||||
tap_action:
|
||||
action: more-info
|
||||
double_tap_action:
|
||||
@@ -192,11 +187,77 @@ streamline_templates:
|
||||
hold_action:
|
||||
action: none
|
||||
columns: '[[columns]]'
|
||||
styles: |-
|
||||
.bubble-button-background {
|
||||
opacity: 1 !important;
|
||||
background-color: ${state === 'on' ? 'var(--accent-color)' : 'var(--background-color-2)'} !important;
|
||||
}
|
||||
modules:
|
||||
- default
|
||||
- state_color_button
|
||||
state_color_button:
|
||||
color: '[[color]]'
|
||||
state_color_button_nav:
|
||||
defaults:
|
||||
- name: ''
|
||||
- columns: 2
|
||||
- show_state: false
|
||||
card:
|
||||
type: custom:bubble-card
|
||||
card_type: button
|
||||
button_type: state
|
||||
entity: '[[entity]]'
|
||||
name: '[[name]]'
|
||||
show_state: '[[show_state]]'
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: '[[navigation_path]]'
|
||||
double_tap_action:
|
||||
action: none
|
||||
hold_action:
|
||||
action: none
|
||||
button_action:
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: '[[navigation_path]]'
|
||||
double_tap_action:
|
||||
action: none
|
||||
hold_action:
|
||||
action: none
|
||||
columns: '[[columns]]'
|
||||
modules:
|
||||
- default
|
||||
- state_color_button
|
||||
state_color_button:
|
||||
color: '[[color]]'
|
||||
contact_sensor_button:
|
||||
defaults:
|
||||
- name: ''
|
||||
- columns: 2
|
||||
- show_state: true
|
||||
card:
|
||||
type: custom:bubble-card
|
||||
card_type: button
|
||||
button_type: state
|
||||
entity: '[[entity]]'
|
||||
name: '[[name]]'
|
||||
show_state: '[[show_state]]'
|
||||
tap_action:
|
||||
action: more-info
|
||||
double_tap_action:
|
||||
action: none
|
||||
hold_action:
|
||||
action: none
|
||||
button_action:
|
||||
double_tap_action:
|
||||
action: none
|
||||
hold_action:
|
||||
action: none
|
||||
columns: '[[columns]]'
|
||||
modules:
|
||||
- default
|
||||
- state_color_button
|
||||
- get_state_attribute
|
||||
state_color_button:
|
||||
color: '[[color]]'
|
||||
get_state_attribute:
|
||||
- entity: '[[entity]]'
|
||||
- entity: '[[entity]]_tamper'
|
||||
main_temperature_button:
|
||||
defaults:
|
||||
- name: ''
|
||||
@@ -210,20 +271,16 @@ streamline_templates:
|
||||
show_attribute: false
|
||||
card_layout: large
|
||||
columns: '[[columns]]'
|
||||
styles: |
|
||||
.is-unavailable {
|
||||
opacity: 0.5 !important;
|
||||
}
|
||||
.bubble-button-background {
|
||||
opacity: 1 !important;
|
||||
background-color: ${hass.states['[[hot_entity]]'].state === 'on' ? 'var(--error-color)' : 'var(--background-color-2)'} !important;
|
||||
transition: background-color 1s !important;
|
||||
}
|
||||
modules:
|
||||
- default
|
||||
- popup_temperature_button
|
||||
popup_temperature_button:
|
||||
hot_entity: '[[hot_entity]]'
|
||||
cold_entity: '[[cold_entity]]'
|
||||
main_room_header:
|
||||
defaults:
|
||||
- name: ''
|
||||
- icon: ''
|
||||
- scene_text: ''
|
||||
- power_entity: ''
|
||||
- light_entity: ''
|
||||
card:
|
||||
@@ -233,17 +290,6 @@ streamline_templates:
|
||||
icon: '[[icon]]'
|
||||
card_layout: large
|
||||
sub_button:
|
||||
- name: Scene
|
||||
entity: '[[scene_text]]'
|
||||
show_state: true
|
||||
state_background: false
|
||||
icon: mdi:palette
|
||||
tap_action:
|
||||
action: none
|
||||
visibility:
|
||||
- condition: state
|
||||
entity: '[[light_entity]]'
|
||||
state: 'on'
|
||||
- name: Power
|
||||
entity: '[[power_entity]]'
|
||||
show_state: true
|
||||
@@ -857,7 +903,6 @@ views:
|
||||
variables:
|
||||
- name: Living Room
|
||||
- icon: hue:room-living
|
||||
- scene_text: input_text.living_room_selected_scene
|
||||
- power_entity: sensor.living_room_total_power_sensor
|
||||
- light_entity: light.living_room_lights
|
||||
- type: custom:bubble-card
|
||||
@@ -950,6 +995,7 @@ views:
|
||||
- name: Front Temp
|
||||
- entity: sensor.living_room_front_temperature
|
||||
- hot_entity: binary_sensor.living_room_hot
|
||||
- cold_entity: binary_sensor.living_room_cold
|
||||
- columns: 2
|
||||
grid_options:
|
||||
columns: 6
|
||||
@@ -968,6 +1014,7 @@ views:
|
||||
- name: Back Temp
|
||||
- entity: sensor.living_room_back_temperature
|
||||
- hot_entity: binary_sensor.living_room_back_hot
|
||||
- cold_entity: binary_sensor.living_room_back_cold
|
||||
- columns: 2
|
||||
grid_options:
|
||||
columns: 6
|
||||
@@ -981,26 +1028,29 @@ views:
|
||||
card_layout: large
|
||||
columns: 2
|
||||
- type: custom:streamline-card
|
||||
template: main_accent_color_button
|
||||
template: state_color_button
|
||||
variables:
|
||||
- name: Front Motion
|
||||
- entity: binary_sensor.living_room_front_motion
|
||||
- color: bubble-accent-color
|
||||
grid_options:
|
||||
columns: 4
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_accent_color_button
|
||||
template: state_color_button
|
||||
variables:
|
||||
- name: Back Motion
|
||||
- entity: binary_sensor.living_room_back_motion
|
||||
- color: bubble-accent-color
|
||||
grid_options:
|
||||
columns: 4
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_accent_color_button
|
||||
template: state_color_button
|
||||
variables:
|
||||
- name: Occupied
|
||||
- entity: binary_sensor.living_room_occupied
|
||||
- color: bubble-accent-color
|
||||
grid_options:
|
||||
columns: 4
|
||||
rows: auto
|
||||
@@ -1020,82 +1070,92 @@ views:
|
||||
icon: mdi:security
|
||||
card_layout: large
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
- name: Door
|
||||
- entity: binary_sensor.front_door
|
||||
- color: error-color
|
||||
grid_options:
|
||||
columns: 4
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
- name: Front 1
|
||||
- entity: binary_sensor.front_window_1
|
||||
- color: error-color
|
||||
grid_options:
|
||||
columns: 4
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
- name: Front 2
|
||||
- entity: binary_sensor.front_window_2
|
||||
- color: error-color
|
||||
grid_options:
|
||||
columns: 4
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
- name: Front 3
|
||||
- entity: binary_sensor.front_window_3
|
||||
- color: error-color
|
||||
grid_options:
|
||||
columns: 4
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
- name: Side 1
|
||||
- entity: binary_sensor.side_window_1
|
||||
- color: error-color
|
||||
grid_options:
|
||||
columns: 4
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
- name: Side 2
|
||||
- entity: binary_sensor.side_window_2
|
||||
- color: error-color
|
||||
grid_options:
|
||||
columns: 4
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
- name: Side 3
|
||||
- entity: binary_sensor.side_window_3
|
||||
- color: error-color
|
||||
grid_options:
|
||||
columns: 4
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
- name: Side 4
|
||||
- entity: binary_sensor.side_window_4
|
||||
- color: error-color
|
||||
grid_options:
|
||||
columns: 4
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
- name: Back 1
|
||||
- entity: binary_sensor.back_window_1
|
||||
- color: error-color
|
||||
grid_options:
|
||||
columns: 4
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
- name: Back 2
|
||||
- entity: binary_sensor.back_window_2
|
||||
- color: error-color
|
||||
grid_options:
|
||||
columns: 4
|
||||
rows: auto
|
||||
@@ -1173,7 +1233,6 @@ views:
|
||||
variables:
|
||||
- name: Downstairs Bathroom
|
||||
- icon: mdi:toilet
|
||||
- scene_text: input_text.downstairs_bathroom_selected_scene
|
||||
- power_entity: sensor.downstairs_bathroom_lights_power_sensor
|
||||
- light_entity: light.downstairs_bathroom_lights
|
||||
- type: custom:bubble-card
|
||||
@@ -1240,6 +1299,7 @@ views:
|
||||
- name: Temp
|
||||
- entity: sensor.downstairs_bathroom_temperature
|
||||
- hot_entity: binary_sensor.downstairs_bathroom_hot
|
||||
- cold_entity: binary_sensor.downstairs_bathroom_cold
|
||||
- columns: 2
|
||||
grid_options:
|
||||
columns: 6
|
||||
@@ -1252,20 +1312,22 @@ views:
|
||||
card_layout: large
|
||||
columns: 2
|
||||
- type: custom:streamline-card
|
||||
template: main_accent_color_button
|
||||
template: state_color_button
|
||||
variables:
|
||||
- name: Motion
|
||||
- entity: binary_sensor.downstairs_bathroom_motion
|
||||
- columns: 2
|
||||
- color: bubble-accent-color
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_accent_color_button
|
||||
template: state_color_button
|
||||
variables:
|
||||
- name: Occupied
|
||||
- entity: binary_sensor.downstairs_bathroom_occupied
|
||||
- columns: 2
|
||||
- color: bubble-accent-color
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
@@ -1275,20 +1337,22 @@ views:
|
||||
icon: mdi:security
|
||||
card_layout: large
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
- name: Back
|
||||
- entity: binary_sensor.downstairs_bathroom_window_1
|
||||
- columns: 2
|
||||
- color: error-color
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
- name: Side
|
||||
- entity: binary_sensor.downstairs_bathroom_window_2
|
||||
- columns: 2
|
||||
- color: error-color
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
@@ -1338,7 +1402,6 @@ views:
|
||||
variables:
|
||||
name: Tina Desk
|
||||
icon: mdi:desk
|
||||
scene_text: input_text.downstairs_bathroom_selected_scene
|
||||
light_entity: light.tina_desk_lights
|
||||
power_entity: sensor.tina_desk_total_power_sensor
|
||||
- type: custom:bubble-card
|
||||
@@ -1398,11 +1461,12 @@ views:
|
||||
icon: mdi:list-box
|
||||
card_layout: large
|
||||
- type: custom:streamline-card
|
||||
template: main_accent_color_button
|
||||
template: state_color_button
|
||||
variables:
|
||||
name: Occupied
|
||||
columns: 2
|
||||
entity: binary_sensor.tina_desk_occupied
|
||||
color: bubble-accent-color
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
@@ -1447,18 +1511,20 @@ views:
|
||||
icon: mdi:security
|
||||
card_layout: large
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
name: Big
|
||||
entity: binary_sensor.kitchen_big_window
|
||||
color: error-color
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
name: Sink
|
||||
entity: binary_sensor.kitchen_sink_window
|
||||
color: error-color
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
@@ -1471,10 +1537,9 @@ views:
|
||||
template: main_room_header
|
||||
variables:
|
||||
name: Mud Room
|
||||
scene_text: input_text.mud_room_selected_scene
|
||||
icon: hue:room-other
|
||||
light_entity: light.mud_room_overhead
|
||||
power_entity: sensor.mud_room_overhead_power_sensor
|
||||
icon: hue:room-other
|
||||
- type: custom:bubble-card
|
||||
card_type: button
|
||||
button_type: slider
|
||||
@@ -1519,6 +1584,7 @@ views:
|
||||
columns: 2
|
||||
entity: sensor.mud_room_temperature
|
||||
hot_entity: binary_sensor.mud_room_hot
|
||||
cold_entity: binary_sensor.mud_room_cold
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
@@ -1533,20 +1599,22 @@ views:
|
||||
bottom: []
|
||||
entity: sensor.mud_room_illuminance
|
||||
- type: custom:streamline-card
|
||||
template: main_accent_color_button
|
||||
template: state_color_button
|
||||
variables:
|
||||
name: Motion
|
||||
columns: 2
|
||||
entity: binary_sensor.mud_room_motion
|
||||
color: bubble-accent-color
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_accent_color_button
|
||||
template: state_color_button
|
||||
variables:
|
||||
name: Occupied
|
||||
columns: 2
|
||||
entity: binary_sensor.mud_room_occupied
|
||||
color: bubble-accent-color
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
@@ -1556,20 +1624,22 @@ views:
|
||||
icon: mdi:security
|
||||
card_layout: large
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
name: Back Door
|
||||
columns: 2
|
||||
entity: binary_sensor.back_door
|
||||
color: error-color
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_security_button
|
||||
template: contact_sensor_button
|
||||
variables:
|
||||
name: Window
|
||||
columns: 2
|
||||
entity: binary_sensor.mud_room_window
|
||||
color: error-color
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
@@ -2711,7 +2781,6 @@ views:
|
||||
variables:
|
||||
- name: Basement Studio
|
||||
- icon: mdi:twitch
|
||||
- scene_text: input_text.basement_studio_selected_scene
|
||||
- power_entity: sensor.basement_studio_total_power_sensor
|
||||
- light_entity: light.basement_studio_lights
|
||||
- type: horizontal-stack
|
||||
@@ -2962,6 +3031,7 @@ views:
|
||||
- name: Temp
|
||||
- entity: sensor.basement_studio_temperature
|
||||
- hot_entity: binary_sensor.basement_studio_hot
|
||||
- cold_entity: binary_sensor.basement_studio_cold
|
||||
- columns: 2
|
||||
grid_options:
|
||||
columns: 6
|
||||
@@ -2986,20 +3056,22 @@ views:
|
||||
card_layout: large
|
||||
columns: 2
|
||||
- type: custom:streamline-card
|
||||
template: main_accent_color_button
|
||||
template: state_color_button
|
||||
variables:
|
||||
- name: Motion
|
||||
- entity: binary_sensor.basement_studio_motion
|
||||
- columns: 2
|
||||
- color: bubble-accent-color
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
- type: custom:streamline-card
|
||||
template: main_accent_color_button
|
||||
template: state_color_button
|
||||
variables:
|
||||
- name: Occupied
|
||||
- entity: binary_sensor.basement_occupied
|
||||
- columns: 2
|
||||
- color: bubble-accent-color
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
|
||||
Reference in New Issue
Block a user