Skip to content

Instantly share code, notes, and snippets.

View Mariusthvdb's full-sized avatar

Marius Mariusthvdb

View GitHub Profile
##########################################################################################
# My themes file, using some anchors to set generic parts for all themes, and dedicated
# sections for dark and light themes. NOT using the dark_mode functionality, which doesnt
# fit my needs.
# config:
#
# frontend:
# themes: !include_dir_merge_named /config/frontend_themes
#
# @mariusthvdb
@Mariusthvdb
Mariusthvdb / custom_header_template.yaml
Last active August 20, 2024 07:26
Custom header theme
template:
- sensor:
- unique_id: custom_header_option_template
name: Custom header template
state: >
{% if is_state('input_boolean.menu_options_template','on') %}
{% if states('sensor.your_browsermod_id') not in ['unknown','unavailable'] %} /*replace with correct sensor id */
{{state_attr('sensor.your_browsermod_id','path')
@Mariusthvdb
Mariusthvdb / buttons_shortcut_menu.yaml
Last active January 16, 2022 21:38
Shortcut menu bar
type: vertical-stack
cards:
- type: custom:stack-in-card
mode: horizontal
keep:
background: true
cards:
#history.back(-1)
@Mariusthvdb
Mariusthvdb / button_card_templates.yaml
Last active March 28, 2026 09:11
My Button card templates
# https://css-tricks.com/almanac/properties/a/aspect-ratio/
##########################################################################################
# 'module' templates used in Button templates
##########################################################################################
# functions:
# capitalizeFirstLetter: >
# [[[ function capitalizeFirstLetter(string) {
# return string.charAt(0).toUpperCase() + string.slice(1);
# } ]]]
# removeSubstrings: >