Skip to content

Instantly share code, notes, and snippets.

D34DC3N73R / motion.yaml
Last active February 2, 2023 19:03
Add motion sensors to light button cards - Add motion.yaml to the button_card_templates directory. Add variables: motion: and define the motion sensor entity_id in your light button card. If you want the card to update with the motion sensor and light entity state (rather than only the light entity), you'll also need to add the motion entity to …
View motion.yaml
motion: |
return states[variables.motion].state == 'on'
? '<ha-icon icon="mdi:motion-sensor" style="width:100%;display:flex;color:var(--state-icon-active-color);"></ha-icon>'
: '<ha-icon icon="mdi:motion-sensor-off" style="width:100%;display:flex;color:var(--state-icon-color);"></ha-icon>';
D34DC3N73R / progress_bar.yaml
Last active October 25, 2023 07:29
This will add a progress bar to conditional media cards. Add progress_bar.yaml to button_card_templates directory. Add the lines from themes.yaml to themes.yaml. Add - progress_bar to conditional_media cards in ui-lovelace.yaml
View progress_bar.yaml
- background-color: var(--progress-bar-background-color)
- position: absolute
- left: 0%
- top: 73.9%
- height: var(--progress-bar-height)
- width: 100%
D34DC3N73R /
Created October 5, 2017 18:32 — forked from blacktwin/
Create a Plex Playlist with what was aired on this today's month-day, sort by oldest first, using PlexAPI
Create a Plex Playlist with what was aired on this today's month-day, sort by oldest first.
If Playlist from yesterday exists delete and create today's.
If today's Playlist exists exit.
import operator, time
from plexapi.server import PlexServer
import requests