Skip to content

Instantly share code, notes, and snippets.

View Mariusthvdb's full-sized avatar

Marius Mariusthvdb

View GitHub Profile
@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: >
@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 / 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')
##########################################################################################
# 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 / buttons_dashboard_menu.yaml
Last active March 31, 2023 14:25
Buttons for dashboard menu
type: horizontal-stack
cards:
- type: custom:button-card
template: button_dashboard_menu
variables:
path: home
board: ui-overzicht
# view: >
# [[[ return window.location.pathname.split('/')[2]; ]]]
# dash: >
##########################################################################################
# https://community.home-assistant.io/t/card-mod-super-charge-your-themes/212176/419
# My 'Custom header' card-mod theme, allowing to color individual view icons and have an
# optional replacement for the three-dots option menu
# Set left menu icons, animations and colors, and add a notification badge next to it
# set backgrounds to override the default background set in theme
# https://community.home-assistant.io/t/card-mod-super-charge-your-themes/212176/1236
# most interface elements are now set using the new Kiosk-mode on
# https://github.com/NemesisRE/kiosk-mode
# using Custom sidebar https://github.com/elchininet/custom-sidebar/discussions/163
@Mariusthvdb
Mariusthvdb / themes-single-card
Last active October 28, 2025 13:42
themes-single-card
meteoalarm:
card-background-color: rgb(16,55,115)
primary-text-color: rgb(254,255,244)
secondary-text-color: rgb(101,158,198)
plex:
card-background-color: black
@Mariusthvdb
Mariusthvdb / pre-2025.5-sidebar-config.yaml
Last active September 26, 2025 17:22
Configuration file for custom-sidebar
##########################################################################################
# Global settings Custom sidebar https://github.com/elchininet/custom-sidebar
# version https://github.com/elchininet/custom-sidebar/releases/tag/v7.0.0
# @mariusthvdb 25-11-24
# https://community.home-assistant.io/u/mariusthvdb/summary
#
# still in card_mod theme: conditional animations and the notification badge on collapsed menu icon
##########################################################################################
# keep colors even when selected (and not change to the default HA styling in that case)
@Mariusthvdb
Mariusthvdb / custom-sidebar-config.yaml
Last active June 16, 2026 13:02
custom-sidebar-config
##########################################################################################
# Global settings Custom sidebar https://github.com/elchininet/custom-sidebar
# version https://github.com/elchininet/custom-sidebar/releases/tag/v15.0.0
# introducing state_translated function
# @mariusthvdb 2026-06-04
# https://community.home-assistant.io/u/mariusthvdb/summary
#
# still in UIX theme: conditional animations and the notification badge on collapsed menu icon
##########################################################################################
# default_path: /ui-overzicht/welkom
@Mariusthvdb
Mariusthvdb / card-mod-themes-version card-mod.yaml
Last active February 21, 2026 10:31
card-mod-themes version card-mod
##########################################################################################
# https://community.home-assistant.io/t/card-mod-super-charge-your-themes/212176/419
# My 'Custom header' card-mod theme:
# - Enables individual color customization for view icons.
# - Provides an optional replacement for the default three-dots options menu.
# - Supports configuration of left-side menu icons, including animations, color schemes,
# and notification badges.
# - Allows definition of custom background images or colors to override the default
# theme background.
#