Improve testing page for better, well, testing
This commit is contained in:
@ -5995,27 +5995,394 @@ views:
|
|||||||
- type: grid
|
- type: grid
|
||||||
cards:
|
cards:
|
||||||
- type: heading
|
- type: heading
|
||||||
heading: New section
|
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:
|
||||||
|
name: Main Button Name
|
||||||
|
icon: mdi:button-cursor
|
||||||
|
- type: custom:streamline-card
|
||||||
|
template: main_button_floors
|
||||||
|
variables:
|
||||||
|
occupancy_entity: binary_sensor.basement_occupied
|
||||||
|
name: Main Button Floors
|
||||||
|
icon: mdi:twitch
|
||||||
|
navigation_path: '#basement-studio'
|
||||||
|
temp_entity: sensor.basement_studio_temperature
|
||||||
|
lux_entity: sensor.basement_studio_illuminance
|
||||||
|
hot_entity: binary_sensor.basement_studio_hot
|
||||||
|
cold_entity: binary_sensor.basement_studio_cold
|
||||||
|
- type: custom:streamline-card
|
||||||
|
template: main_button_outdoors
|
||||||
|
variables:
|
||||||
|
occupancy_entity: binary_sensor.front_doorbell_motion_mqtt
|
||||||
|
name: Main Button Outdoors
|
||||||
|
icon: hue:room-porch
|
||||||
|
navigation_path: '#front-porch'
|
||||||
|
temp_entity: sensor.home_tempest_temperature
|
||||||
|
lux_entity: sensor.home_tempest_illuminance
|
||||||
|
- type: custom:streamline-card
|
||||||
|
template: floors_separator
|
||||||
|
variables:
|
||||||
|
name: Floors Separator
|
||||||
|
icon: mdi:home-floor-1
|
||||||
|
power_entity: sensor.first_floor_total_power_sensor
|
||||||
|
lights_entity: light.first_floor_lights
|
||||||
|
- type: custom:streamline-card
|
||||||
|
template: state_color_button
|
||||||
|
variables:
|
||||||
|
entity: binary_sensor.living_room_front_motion
|
||||||
|
name: State Color Button
|
||||||
|
color: accent-color
|
||||||
|
- type: grid
|
||||||
|
cards:
|
||||||
|
- type: heading
|
||||||
|
heading: Template Development
|
||||||
|
heading_style: title
|
||||||
|
icon: mdi:wrench-cog
|
||||||
- type: custom:bubble-card
|
- type: custom:bubble-card
|
||||||
card_type: button
|
card_type: button
|
||||||
button_type: state
|
button_type: state
|
||||||
entity: input_boolean.gaming_mode
|
entity: binary_sensor.security_faults
|
||||||
name: Gaming Mode
|
name: Main Button State Red
|
||||||
tap_action:
|
tap_action:
|
||||||
|
action: navigate
|
||||||
|
navigation_path: '#security'
|
||||||
|
double_tap_action:
|
||||||
action: none
|
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
|
||||||
|
name: Main Button Name
|
||||||
|
icon: mdi:button-cursor
|
||||||
|
tap_action:
|
||||||
|
action: navigate
|
||||||
|
navigation_path: '#security'
|
||||||
|
button_action:
|
||||||
|
tap_action:
|
||||||
|
action: navigate
|
||||||
|
navigation_path: '#security'
|
||||||
|
columns: 2
|
||||||
|
styles: |-
|
||||||
|
.bubble-button-background {
|
||||||
|
opacity: 1 !important;
|
||||||
|
background-color: var(--bubble-main-background-color) !important;
|
||||||
|
}
|
||||||
|
- type: custom:bubble-card
|
||||||
|
card_type: button
|
||||||
|
button_type: state
|
||||||
|
entity: binary_sensor.basement_occupied
|
||||||
|
name: Main Button Floors
|
||||||
|
icon: mdi:twitch
|
||||||
|
show_state: false
|
||||||
|
double_tap_action:
|
||||||
|
action: none
|
||||||
|
hold_action:
|
||||||
|
action: none
|
||||||
|
tap_action:
|
||||||
|
action: navigate
|
||||||
|
navigation_path: '#basement-studio'
|
||||||
|
button_action:
|
||||||
|
double_tap_action:
|
||||||
|
action: none
|
||||||
|
hold_action:
|
||||||
|
action: none
|
||||||
|
tap_action:
|
||||||
|
action: navigate
|
||||||
|
navigation_path: '#basement-studio'
|
||||||
|
sub_button:
|
||||||
|
- entity: sensor.basement_studio_temperature
|
||||||
|
name: Temp
|
||||||
|
show_state: true
|
||||||
|
show_name: false
|
||||||
|
tap_action:
|
||||||
|
action: navigate
|
||||||
|
navigation_path: '#basement-studio'
|
||||||
|
show_background: false
|
||||||
|
- entity: sensor.basement_studio_illuminance
|
||||||
|
show_state: true
|
||||||
|
name: Lux
|
||||||
|
tap_action:
|
||||||
|
action: navigate
|
||||||
|
navigation_path: '#basement-studio'
|
||||||
|
show_background: false
|
||||||
|
modules:
|
||||||
|
- default
|
||||||
|
- temperature_colouring
|
||||||
|
- main_button_floors
|
||||||
|
temperature_colouring:
|
||||||
|
temperature_sensor: sensor.basement_studio_temperature
|
||||||
|
elements:
|
||||||
|
sub_buttons:
|
||||||
|
- 1
|
||||||
|
main_button_floors:
|
||||||
|
occupancy_entity: binary_sensor.basement_occupied
|
||||||
|
hot_entity: binary_sensor.basement_studio_hot
|
||||||
|
cold_entity: binary_sensor.basement_studio_cold
|
||||||
|
- type: custom:bubble-card
|
||||||
|
card_type: button
|
||||||
|
button_type: state
|
||||||
|
entity: binary_sensor.front_doorbell_motion_mqtt
|
||||||
|
name: Main Button Outdoors
|
||||||
|
icon: hue:room-porch
|
||||||
|
show_state: false
|
||||||
|
double_tap_action:
|
||||||
|
action: none
|
||||||
|
hold_action:
|
||||||
|
action: none
|
||||||
|
tap_action:
|
||||||
|
action: navigate
|
||||||
|
navigation_path: '#front-porch'
|
||||||
|
button_action:
|
||||||
|
double_tap_action:
|
||||||
|
action: none
|
||||||
|
hold_action:
|
||||||
|
action: none
|
||||||
|
tap_action:
|
||||||
|
action: navigate
|
||||||
|
navigation_path: '#front-porch'
|
||||||
|
sub_button:
|
||||||
|
- entity: sensor.home_tempest_temperature
|
||||||
|
name: Temp
|
||||||
|
show_state: true
|
||||||
|
show_name: false
|
||||||
|
tap_action:
|
||||||
|
action: navigate
|
||||||
|
navigation_path: '#front-porch'
|
||||||
|
show_background: false
|
||||||
|
- entity: sensor.home_tempest_illuminance
|
||||||
|
show_state: true
|
||||||
|
name: Lux
|
||||||
|
tap_action:
|
||||||
|
action: navigate
|
||||||
|
navigation_path: '#front-porch'
|
||||||
|
show_background: false
|
||||||
|
modules:
|
||||||
|
- default
|
||||||
|
- temperature_colouring
|
||||||
|
- main_button_outdoors
|
||||||
|
temperature_colouring:
|
||||||
|
temperature_sensor: sensor.home_tempest_temperature
|
||||||
|
elements:
|
||||||
|
sub_buttons:
|
||||||
|
- 1
|
||||||
|
main_button_outdoors:
|
||||||
|
occupancy_entity: binary_sensor.front_doorbell_motion_mqtt
|
||||||
|
- type: custom:bubble-card
|
||||||
|
card_type: separator
|
||||||
|
name: Floors Separator
|
||||||
|
icon: mdi:home-floor-1
|
||||||
|
sub_button:
|
||||||
|
- entity: sensor.first_floor_total_power_sensor
|
||||||
|
name: Power
|
||||||
|
show_state: true
|
||||||
|
tap_action:
|
||||||
|
action: none
|
||||||
|
- entity: light.first_floor_lights
|
||||||
|
name: Lights
|
||||||
|
icon: mdi:lightbulb
|
||||||
|
show_name: true
|
||||||
|
show_state: false
|
||||||
|
tap_action:
|
||||||
|
action: toggle
|
||||||
|
- type: custom:bubble-card
|
||||||
|
card_type: button
|
||||||
|
button_type: state
|
||||||
|
entity: binary_sensor.living_room_front_motion
|
||||||
|
name: State Color Button
|
||||||
|
show_state: true
|
||||||
|
tap_action:
|
||||||
|
action: more-info
|
||||||
double_tap_action:
|
double_tap_action:
|
||||||
action: none
|
action: none
|
||||||
hold_action:
|
hold_action:
|
||||||
action: none
|
action: none
|
||||||
button_action:
|
button_action:
|
||||||
tap_action:
|
|
||||||
action: none
|
|
||||||
double_tap_action:
|
double_tap_action:
|
||||||
action: none
|
action: none
|
||||||
hold_action:
|
hold_action:
|
||||||
action: none
|
action: none
|
||||||
show_state: false
|
|
||||||
columns: 2
|
|
||||||
modules:
|
modules:
|
||||||
|
- default
|
||||||
- state_color_button
|
- state_color_button
|
||||||
|
state_color_button:
|
||||||
|
color: accent-color
|
||||||
|
- type: grid
|
||||||
|
cards:
|
||||||
|
- type: heading
|
||||||
|
heading: Popups
|
||||||
|
heading_style: title
|
||||||
|
icon: m3r:ad-group
|
||||||
|
- type: custom:streamline-card
|
||||||
|
template: main_button_name
|
||||||
|
variables:
|
||||||
|
name: Open Test Popup
|
||||||
|
icon: mdi:test-tube
|
||||||
|
navigation_path: '#testing'
|
||||||
|
- type: vertical-stack
|
||||||
|
cards:
|
||||||
|
- type: custom:bubble-card
|
||||||
|
card_type: pop-up
|
||||||
|
hash: '#testing'
|
||||||
|
button_type: name
|
||||||
|
name: Pop-up Testing
|
||||||
|
icon: mdi:test-tube
|
||||||
|
- type: horizontal-stack
|
||||||
|
cards:
|
||||||
|
- type: custom:streamline-card
|
||||||
|
template: popup_temperature_button
|
||||||
|
variables:
|
||||||
|
entity: sensor.basement_studio_temperature
|
||||||
|
name: Popup Temp Button
|
||||||
|
hot_entity: binary_sensor.basement_studio_hot
|
||||||
|
cold_entity: binary_sensor.basement_studio_cold
|
||||||
|
- type: custom:bubble-card
|
||||||
|
card_type: empty-column
|
||||||
|
- type: custom:streamline-card
|
||||||
|
template: popup_timer_card
|
||||||
|
variables:
|
||||||
|
entity: timer.basement_studio_door_timer
|
||||||
|
name: Popup Timer Card
|
||||||
|
- type: grid
|
||||||
|
cards:
|
||||||
|
- type: heading
|
||||||
|
heading: Popup Development
|
||||||
|
heading_style: title
|
||||||
|
icon: m3r:add-ad
|
||||||
|
- type: custom:bubble-card
|
||||||
|
card_type: button
|
||||||
|
button_type: name
|
||||||
|
name: Open Dev Popup
|
||||||
|
icon: mdi:test-tube
|
||||||
|
tap_action:
|
||||||
|
action: navigate
|
||||||
|
navigation_path: '#testing-dev'
|
||||||
|
button_action:
|
||||||
|
tap_action:
|
||||||
|
action: navigate
|
||||||
|
navigation_path: '#testing-dev'
|
||||||
|
columns: 2
|
||||||
|
styles: |-
|
||||||
|
.bubble-button-background {
|
||||||
|
opacity: 1 !important;
|
||||||
|
background-color: var(--bubble-main-background-color) !important;
|
||||||
|
}
|
||||||
|
- type: vertical-stack
|
||||||
|
cards:
|
||||||
|
- type: custom:bubble-card
|
||||||
|
card_type: pop-up
|
||||||
|
hash: '#testing-dev'
|
||||||
|
button_type: name
|
||||||
|
name: Pop-up Dev
|
||||||
|
icon: mdi:test-tube
|
||||||
|
- type: horizontal-stack
|
||||||
|
cards:
|
||||||
|
- type: custom:bubble-card
|
||||||
|
card_type: button
|
||||||
|
button_type: state
|
||||||
|
entity: sensor.basement_studio_temperature
|
||||||
|
name: Popup Temp Button
|
||||||
|
show_attribute: false
|
||||||
|
modules:
|
||||||
|
- default
|
||||||
|
- popup_temperature_button
|
||||||
|
popup_temperature_button:
|
||||||
|
hot_entity: binary_sensor.basement_studio_hot
|
||||||
|
cold_entity: binary_sensor.basement_studio_cold
|
||||||
|
- type: custom:bubble-card
|
||||||
|
card_type: empty-column
|
||||||
|
- type: conditional
|
||||||
|
conditions:
|
||||||
|
- condition: state
|
||||||
|
entity: timer.basement_studio_door_timer
|
||||||
|
state_not: idle
|
||||||
|
card:
|
||||||
|
type: custom:bubble-card
|
||||||
|
card_type: button
|
||||||
|
button_type: state
|
||||||
|
entity: timer.basement_studio_door_timer
|
||||||
|
name: Popup Timer Button
|
||||||
|
icon: mdi:timer
|
||||||
|
sub_button:
|
||||||
|
- entity: timer.basement_studio_door_timer
|
||||||
|
tap_action:
|
||||||
|
action: perform-action
|
||||||
|
perform_action: timer.start
|
||||||
|
target:
|
||||||
|
entity_id: timer.basement_studio_door_timer
|
||||||
|
name: Start
|
||||||
|
icon: mdi:play
|
||||||
|
visibility: []
|
||||||
|
- entity: timer.basement_studio_door_timer
|
||||||
|
name: Pause
|
||||||
|
icon: mdi:pause
|
||||||
|
tap_action:
|
||||||
|
action: perform-action
|
||||||
|
perform_action: timer.pause
|
||||||
|
target:
|
||||||
|
entity_id: timer.basement_studio_door_timer
|
||||||
|
- entity: timer.basement_studio_door_timer
|
||||||
|
name: Cancel
|
||||||
|
icon: mdi:cancel
|
||||||
|
tap_action:
|
||||||
|
action: perform-action
|
||||||
|
perform_action: timer.cancel
|
||||||
|
target:
|
||||||
|
entity_id: timer.basement_studio_door_timer
|
||||||
|
- entity: timer.basement_studio_door_timer
|
||||||
|
name: Finish
|
||||||
|
icon: mdi:clock-end
|
||||||
|
tap_action:
|
||||||
|
action: perform-action
|
||||||
|
perform_action: timer.finish
|
||||||
|
target:
|
||||||
|
entity_id: timer.basement_studio_door_timer
|
||||||
|
modules:
|
||||||
|
- default
|
||||||
|
- popup_timer_card
|
||||||
|
header:
|
||||||
|
layout: responsive
|
||||||
|
badges_position: bottom
|
||||||
|
badges_wrap: wrap
|
||||||
|
card:
|
||||||
|
type: markdown
|
||||||
|
text_only: true
|
||||||
|
content: |-
|
||||||
|
# Hello {{ user }}
|
||||||
|
Add your text here, template variables are supported ✨
|
||||||
|
badges:
|
||||||
|
- type: custom:mushroom-template-badge
|
||||||
|
content: '{{ "Farts Activated" if is_state(entity,''on'') else "Farts Inactive" }}'
|
||||||
|
icon: mdi:test-tube
|
||||||
|
color: '{{ "red" if is_state(entity,''on'') else "green" }}'
|
||||||
|
entity: input_boolean.toggle_testing
|
||||||
|
label: '{{ state_attr(entity,''friendly_name'') }}'
|
||||||
|
tap_action:
|
||||||
|
action: toggle
|
||||||
|
hold_action:
|
||||||
|
action: more-info
|
||||||
|
double_tap_action:
|
||||||
|
action: none
|
||||||
title: ''
|
title: ''
|
||||||
|
Reference in New Issue
Block a user