Replace main_button_state_red with state_color_button_nav

This commit is contained in:
2025-07-13 21:40:47 -04:00
parent 367fadf870
commit 008b500b74

View File

@ -1,34 +1,4 @@
streamline_templates:
main_button_state_red:
default:
- name: ''
- columns: 2
- navigation_path: ''
card:
type: custom:bubble-card
card_type: button
button_type: state
entity: '[[entity]]'
name: '[[name]]'
tap_action:
action: navigate
navigation_path: '[[navigation_path]]'
double_tap_action:
action: none
hold_action:
action: more-info
button_action:
tap_action:
action: navigate
navigation_path: '[[navigation_path]]'
double_tap_action:
action: none
hold_action:
action: more-info
show_state: false
columns: '[[columns]]'
modules:
- main_button_state_red
main_button_name:
default:
- name: ''
@ -271,13 +241,15 @@ streamline_templates:
state_color_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: true
show_state: '[[show_state]]'
tap_action:
action: more-info
double_tap_action:
@ -289,6 +261,40 @@ streamline_templates:
action: none
hold_action:
action: none
columns: '[[columns]]'
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
@ -429,12 +435,14 @@ views:
heading_style: title
icon: mdi:home-analytics
- type: custom:streamline-card
template: main_button_state_red
template: state_color_button_nav
variables:
- name: Security
- entity: binary_sensor.security_faults
- navigation_path: '#security'
- columns: 2
- color: error-color
- show_state: false
grid_options:
columns: 6
rows: auto
@ -5998,12 +6006,6 @@ views:
heading: Templates
heading_style: title
icon: mdi:wrench
- type: custom:streamline-card
template: main_button_state_red
variables:
entity: binary_sensor.security_faults
name: Main Button State Red
navigation_path: '#security'
- type: custom:streamline-card
template: main_button_name
variables:
@ -6042,36 +6044,21 @@ views:
entity: binary_sensor.living_room_front_motion
name: State Color Button
color: accent-color
columns: '2'
- type: custom:streamline-card
template: state_color_button_nav
variables:
entity: binary_sensor.security_faults
name: State Color Button Nav
navigation_path: '#security'
color: error-color
columns: '2'
- type: grid
cards:
- type: heading
heading: Template Development
heading_style: title
icon: mdi:wrench-cog
- type: custom:bubble-card
card_type: button
button_type: state
entity: binary_sensor.security_faults
name: Main Button State Red
tap_action:
action: navigate
navigation_path: '#security'
double_tap_action:
action: none
hold_action:
action: more-info
button_action:
tap_action:
action: navigate
navigation_path: '#security'
double_tap_action:
action: none
hold_action:
action: more-info
show_state: false
columns: 2
modules:
- main_button_state_red
- type: custom:bubble-card
card_type: button
button_type: name
@ -6224,11 +6211,39 @@ views:
action: none
hold_action:
action: none
columns: 2
modules:
- default
- state_color_button
state_color_button:
color: accent-color
- type: custom:bubble-card
card_type: button
button_type: state
entity: binary_sensor.security_faults
name: State Color Button Nav
show_state: true
tap_action:
action: navigate
navigation_path: '#security'
double_tap_action:
action: none
hold_action:
action: none
button_action:
tap_action:
action: navigate
navigation_path: '#security'
double_tap_action:
action: none
hold_action:
action: none
columns: 2
modules:
- default
- state_color_button
state_color_button:
color: error-color
- type: grid
cards:
- type: heading