$ show DBuit/sidebar-card
This repository provides a custom Lovelace card for Home Assistant that replaces the default sidebar with a fully customizable sidebar. The card is implemented as a single TypeScript file (src/sidebar-card.ts) using LitElement and integrates with Home Assistant via card-tools and custom-card-helpers. It supports analog/digital clocks, date display, a configurable menu with navigation, toggle, call-service, and other actions, template-based messages, and a bottom card slot. The initialization code modifies the DOM to wrap the main view and insert the sidebar, and can hide the default HA header, footer, and sidebar. The codebase is functional but shows signs of technical drift (outdated dependencies like LitElement 2.x, Moment.js, old TypeScript) and tight coupling to the Home Assistant DOM structure. It is actively used (498 stars) but has 49 open issues.
The LLM identified 1 files worth highlighting for reuse:
The `_evaluateVisibleCondition` method parses simple Home Assistant state conditions (e.g., `is_state('entity','value')`, `states['entity'] == 'value'`, numeric comparisons with `| int`/`| float`) without relying on a full template engine. It is a self-contained utility that could be extracted and reused in other Home Assistant custom cards or frontend components to evaluate visibility conditions based on entity states. It demonstrates a lightweight, pattern-matching approach to conditional logic.