A card that shows the state of a binary sensor, including an icon as an alert. Nice for doors, windows and occupancy alerts.
3/1
Grid with 3 columns
SAK Tool
Used for
Badge
Background of card. Left part is animated, state dependent
Icon
Entity Icon. Animated, state dependent. Red if active
Icon
Alert Icon. Animated, state dependent. Only visible if state is on
Name
Name of Entity
Icon
Stretched battery Icon in the upper left corner of the card. Animated, state dependent. Becomes yellow or blinking red if battery almost dead. Entity can be disabled
sak_layout_fce_binary_alert4:template:type:layoutdefaults:-sak_layout_binary_alert_battery_entity_disabled:falselayout:aspectratio:3/1toolsets:# ================================================================-toolset:badge-backgroundposition:cx:150cy:50tools:-type:badgeposition:cx:50cy:50height:100width:300ratio:25radius:5divider:20entity_index:0animations:-state:'on'styles:left:fill:var(--theme-sys-color-primary)-state:'off'styles:left:fill:var(--theme-sys-elevation-surface-neutral4)styles:left:fill:greyright:fill:none# ================================================================-toolset:column-iconposition:cx:37.5cy:50tools:# -------------------------------------------------------------type:iconposition:cx:50cy:50align:centericon_size:45entity_index:0animations:-state:'on'styles:icon:fill:var(--primary-background-color)-state:'off'styles:icon:fill:var(--theme-sys-color-secondary)styles:icon:fill:var(--primary-background-color)opacity:0.9# ================================================================-toolset:alert-iconposition:cx:75cy:18tools:# -------------------------------------------------------------type:circleposition:cx:50cy:50radius:13entity_index:0# Use state from 0animations:-state:'on'# If ONstyles:circle:fill:var(--primary-background-color)-state:'off'# If OFFstyles:circle:display:none# Hide icon# -------------------------------------------------------------type:iconposition:cx:50cy:50align:centericon_size:25entity_index:0# Use state from 0icon:mdi:alert-circle# Use alert circle iconanimations:-state:'on'# If ONstyles:icon:fill:var(--brand-google-red, red)# Set icon to red color-state:'off'# If OFFstyles:icon:display:none# Hide iconstyles:icon:fill:grey# Default grey color# ================================================================-toolset:column-nameposition:cx:100cy:50tools:# -------------------------------------------------------------type:nameposition:cx:50cy:50entity_index:0styles:name:text-anchor:startfont-size:30emfont-weight:700opacity:1# ================================================================-toolset:battery-icondisabled:'[[sak_layout_binary_alert_battery_entity_disabled]]'position:cx:270cy:15scale_y:1.5# Make battery tallerrotate:90tools:# -------------------------------------------------------------type:iconposition:cx:50cy:50align:centericon_size:30entity_index:2animations:-state:'20'# Battery almost dead!operator:<=styles:icon:animation:blinkingText 2s ease-in-out both infinitefill:var(--brand-google-red)-state:'30'# Battery warning!operator:<=styles:icon:fill:var(--brand-google-yellow)styles:icon:fill:var(--theme-sys-color-tertiary)opacity:0.5