A card that shows the state of a binary sensor, including an icon as an alert. Nice for doors, windows and occupancy alerts.
4/1
Grid with 2 columns
SAK Tool
Used for
Circle
The half circle, as the left part of the circle is cutoff by the card. Animated, state dependent
Icon
Entity Icon. Animated, state dependent
Icon
Alert Icon. Animated, state dependent. Only visible if state is on
Name
Name of Entity
State
Secondary Info
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_alert2:template:type:layoutdefaults:-sak_layout_binary_alert_battery_entity_disabled:falselayout:aspectratio:4/1toolsets:# ================================================================-toolset:half-circleposition:cx:0# Center on cards border cy:50tools:# -------------------------------------------------------------type:circleposition:cx:50cy:50radius:50entity_index:0animations:-state:'on'styles:circle:fill:var(--theme-sys-color-secondary-container)-state:'off'styles:circle:fill:var(--theme-sys-elevation-surface-neutral2)styles:circle:stroke:none# ================================================================-toolset:column-iconposition:cx:25cy:50tools:# -------------------------------------------------------------type:iconposition:cx:50cy:50align:centericon_size:45entity_index:0animations:-state:'on'styles:icon:fill:var(--theme-sys-color-secondary)-state:'off'styles:icon:fill:var(--theme-sys-elevation-surface-neutral10)styles:icon:opacity:0.9# ================================================================-toolset:alert-iconposition:cx:40cy:18tools:# -------------------------------------------------------------type:circleposition:cx:50cy:50radius:15entity_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:28entity_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:70# Left part = 75, so 75+(300-75)/2cy:50tools:# -------------------------------------------------------------type:nameposition:cx:50cy:37entity_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:26emfont-weight:500opacity:0.7# ================================================================-toolset:battery-icondisabled:'[[sak_layout_binary_alert_battery_entity_disabled]]'position:cx:370cy:15scale_y:1.5# Make battery tallerrotate:90tools:# -------------------------------------------------------------type:iconposition:cx:50cy:50align:endicon_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