Add streamline card template for outdoor "floor" cards
This commit is contained in:
@ -142,6 +142,83 @@ streamline_templates:
|
||||
elements:
|
||||
sub_buttons:
|
||||
- 1
|
||||
main_button_outdoors:
|
||||
defaults:
|
||||
name: ''
|
||||
icon: ''
|
||||
navigation_path: ''
|
||||
occupancy_entity: ''
|
||||
temp_entity: ''
|
||||
lux_entity: ''
|
||||
card:
|
||||
type: custom:bubble-card
|
||||
card_type: button
|
||||
button_type: state
|
||||
entity: '[[occupancy_entity]]'
|
||||
name: '[[name]]'
|
||||
icon: '[[icon]]'
|
||||
show_state: false
|
||||
double_tap_action:
|
||||
action: none
|
||||
hold_action:
|
||||
action: none
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: '[[navigation_path]]'
|
||||
button_action:
|
||||
double_tap_action:
|
||||
action: none
|
||||
hold_action:
|
||||
action: none
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: '[[navigation_path]]'
|
||||
styles_javascript: |
|
||||
const occupancy = states['[[occupancy_entity]]'].state;
|
||||
return `
|
||||
.is-unavailable {
|
||||
opacity: 0.5 !important;
|
||||
}
|
||||
.bubble-button-background {
|
||||
opacity: 1 !important;
|
||||
background-color: ${
|
||||
occupancy === 'on' ? 'var(--accent-color)' : 'var(--bubble-main-background-color)'
|
||||
} !important;
|
||||
transition: background-color 1s !important;
|
||||
}
|
||||
.bubble-sub-button {
|
||||
background: transparent
|
||||
}
|
||||
.bubble-sub-button-1 {
|
||||
background-color: ${
|
||||
occupancy === 'on' ? 'var(--accent-color)' : 'var(--bubble-main-background-color)'
|
||||
} !important;
|
||||
}
|
||||
`;
|
||||
sub_button:
|
||||
- entity: '[[temp_entity]]'
|
||||
name: Temp
|
||||
show_state: true
|
||||
show_name: false
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: '[[navigation_path]]'
|
||||
show_background: false
|
||||
- entity: '[[lux_entity]]'
|
||||
show_state: true
|
||||
name: Lux
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: '[[navigation_path]]'
|
||||
show_background: false
|
||||
modules:
|
||||
- default
|
||||
- temperature_colouring
|
||||
temperature_colouring:
|
||||
temperature_sensor: '[[temp_entity]]'
|
||||
elements:
|
||||
sub_buttons:
|
||||
- 1
|
||||
floors_separator:
|
||||
defaults:
|
||||
- name: ''
|
||||
|
Reference in New Issue
Block a user