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
Name
Name of Entity
State
Secondary Info of Entity
Icon
Normal 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_alert3:template:type:layoutdefaults:-sak_layout_binary_alert_battery_entity_disabled:falselayout:aspectratio:3/1toolsets:# ================================================================-toolset:badge-backgroundposition:cx:150# Center at middle of cardcy:50# Center at middle of cardtools:-type:badgeposition:cx:50cy:50height:100# Badge covers the full..width:300# ...size of the cardratio:25radius:5divider:20entity_index:0# Uses entity 0animations:-state:'on'# Animate for state ONstyles:left:fill:var(--theme-sys-color-primary)-state:'off'# Animate for state OFFstyles:left:fill:var(--theme-sys-elevation-surface-neutral4)styles:left:fill:greyright:fill:none# Show background of card# ================================================================-toolset:column-iconposition:cx:37.5cy:50tools:# -------------------------------------------------------------type:iconposition:cx:50cy:50align:centericon_size:45entity_index:0animations:-state:'on'icon:'mdi:fire-alert'styles:icon:fill:var(--brand-google-red)opacity:1-state:'off'icon:'mdi:fire'styles:icon:fill:var(--theme-sys-color-secondary)opacity:0.9styles:icon:fill:var(--primary-background-color)opacity:0.9# ================================================================-toolset:battery-icondisabled:'[[sak_layout_binary_alert_battery_entity_disabled]]'position:cx:280cy:15rotate: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# ================================================================-toolset:column-nameposition:cx:100# Left part = 75, so 75+(300-75)/2cy:50tools:# -------------------------------------------------------------type:nameposition:cx:50cy:40entity_index:0styles:name:text-anchor:startfont-size:30emfont-weight:700opacity:1# -------------------------------------------------------------type:stateposition:cx:50cy:70entity_index:1show:uom:nonestyles:state:text-anchor:startfont-size:16emfont-weight:500opacity:0.7