Hey, here’s my person_but_also card:
On your left: wife’s info.
- icon for car states (locked / running / windows etc…)
- colored circle for device tracker (green = home / blue = another known zone / pink = unknown)
- 2x “badge” for phone information ( battery + ring mode and phone state)
- the name zone (maison=home)
On your right: my info
- Same thing for car and second phone (work)
- fuel and exhaust fluid low level alert (badge)
- 2 lines of 4 icons for various stuff, including my main phone battery level and ring mode, desktop state, AVR state, calendar and more to come.
The card is designed for swiss-army-knife-card component. Here’s the code.
Code
type: custom:swiss-army-knife-card
entities:
- entity: sun.sun #0
- entity: person.olive #1
- entity: sensor.tplt_olivecell_phone_state #2
- entity: sensor.olivecell_battery_level #3
- entity: device_tracker.bmw_116i #4
- entity: sensor.tplt_device_tracker_bmw_116i #5
- entity: sun.sun #6
- entity: sun.sun #7
- entity: sun.sun #8
- entity: sun.sun #9
- entity: sun.sun #10
- entity: person.nova #11
- entity: sensor.tplt_novacell_phone_state #12
- entity: sensor.novacell_battery_level #13
- entity: sun.sun #14
- entity: sun.sun #15
- entity: sun.sun #16
- entity: sun.sun #17
- entity: sun.sun #18
- entity: sun.sun #19
- entity: sun.sun #20
- entity: person.alise #21
- entity: sensor.tplt_alisecell_phone_state #22
- entity: sensor.alisecell_battery_level #23
- entity: device_tracker.alisecell #24
- entity: sensor.tplt_device_tracker_alisecell #25
- entity: sensor.tplt_alert_ford_focus #26
- entity: sensor.fordpass_deepsleep #27
- entity: sun.sun #28
- entity: sun.sun #29
- entity: sun.sun #30
- entity: sensor.tplt_novadesktop_uplink #31
- entity: switch.plug_nous_garage_avr #32
icon: mdi:audio-video
- entity: sun.sun #33
- entity: calendar.google_alise_dg #34
icon: mdi:calendar
- entity: sun.sun #35
- entity: sensor.tplt_weather_alisecell #36
- entity: sensor.tplt_weather_alisecell
attribute: alert_level #37
aspectratio: 5/1.3
layout:
toolsets:
# ================================================================================================================================
# ================================================================================================================================
# ================================================================ Olive
# ================================================================================================================================
# ================================================================================================================================
# ================================================================ OliveCar Device Tracker
# -------------------------- Circle
- toolset: dt-circle
position:
cx: 30
cy: 30
tools:
- entity_index: 4
<<: &dt-circle
type: circle
position:
cx: 50
cy: 50
radius: 45
animations:
- state: "unavailable"
styles:
circle:
stroke: var(--secondary-text-color)
transition: stroke 3s ease
animation: flash 3s ease-in-out 2
- state: "not_home"
styles:
circle:
stroke: var(--nova-color)
transition: stroke 3s ease
animation: flash 3s ease-in-out 2
- state: "home"
styles:
circle:
stroke: var(--success-color)
styles:
circle:
fill: none
stroke: var(--info-color)
stroke-width: 4em
transition: stroke 3s ease
user_actions:
tap_action: none
# -------------------------- Icon
- toolset: dt-icon
position:
cx: 30
cy: 30
tools:
- entity_index: 5
<<: &dt-icon
type: icon
styles:
icon:
fill: var(--primary-text-color)
position:
cx: 50
cy: 50
align: center
icon_size: 36
user_actions:
tap_action:
haptic: selection
actions:
- action: fire-dom-event
browser_mod:
service: browser_mod.navigate
data:
path: /nova-dashboard/vehicle_bmw_116i
### -------------------------- State
- toolset: dt-state
position:
cx: 80
cy: 112
tools:
- entity_index: 5
<<: &dt-state
type: state
position:
cx: 50
cy: 50
show:
uom: none
styles:
state:
fill: var(--primary-text-color)
text-anchor: middle
font-size: 20em
font-weight: 400
opacity: 1
user_actions:
tap_action: ### warning, do not copy following outside SAK card
haptic: selection
actions:
- action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
content:
type: map
aspect_ratio: "1:1.85"
entities:
- person.alise
- person.olive
# tap_action:
# haptic: selection
# actions:
# - action: fire-dom-event
# browser_mod:
# service: browser_mod.navigate
# data:
# path: /nova-dashboard/map
# ================================================================ OliveCell Phone State
- toolset: phone-badge
position:
cx: 75
cy: 20
tools:
### -------------------------- Circle
- entity_index: 2
<<: &phone-circle
type: circle
position:
cx: 50
cy: 50
radius: 16
animations:
- state: "disponible"
styles:
circle:
display: none # HIDE
- state: "en ligne"
styles:
circle:
stroke: var(--primary-text-color)
fill: var(--mantle)
transition: fill 3s ease
- state: "sonne"
styles:
circle:
stroke: var(--primary-text-color)
fill: var(--mantle)
transition: fill 3s ease
- state: "silencieux"
styles:
circle:
stroke: var(--primary-text-color)
fill: var(--mantle)
transition: fill 3s ease
- state: "vibreur"
styles:
circle:
stroke: var(--primary-text-color)
fill: var(--mantle)
transition: fill 3s ease
- state: "hors ligne"
styles:
circle:
stroke: var(--primary-text-color)
fill: var(--mantle)
transition: fill 3s ease
styles:
circle:
stroke-width: 3px
user_actions:
tap_action: none
### -------------------------- Icon
- entity_index: 2
<<: &phone-icon
type: icon
position:
cx: 50
cy: 50
align: center
icon_size: 22
animations:
- state: "disponible"
styles:
icon:
display: none # HIDE
- state: "en ligne"
styles:
icon:
fill: var(--success-color)
transition: fill 3s ease
- state: "sonne"
styles:
icon:
fill: var(--success-color)
transition: fill 3s ease
- state: "silencieux"
styles:
icon:
fill: var(--info-color)
transition: fill 3s ease
- state: "vibreur"
styles:
icon:
fill: var(--info-color)
transition: fill 3s ease
- state: "hors ligne"
styles:
icon:
fill: var(--warning-color)
transition: fill 3s ease
user_actions:
tap_action: none
# ================================================================ OliveCell Battery Level
- toolset: battery-badge
position:
cx: 65
cy: 65
tools:
# -------------------------- Circle
- entity_index: 3
<<: &battery-circle
type: circle
position:
cx: 50
cy: 50
radius: 16
animations:
- state: "95"
operator: ">="
styles:
circle:
stroke: var(--primary-text-color)
fill: var(--mantle)
transition: fill 3s ease
- state: "30"
operator: ">="
styles:
circle:
display: none # HIDE
- state: "30"
operator: "<"
styles:
circle:
stroke: var(--primary-text-color)
fill: var(--mantle)
transition: fill 3s ease
styles:
circle:
stroke-width: 4px
user_actions:
tap_action: none
# -------------------------- Icon
- entity_index: 3
<<: &battery-icon
type: icon
position:
cx: 50
cy: 50
align: center
icon_size: 22
animations:
- state: "95"
operator: ">="
styles:
icon:
fill: var(--success-color)
transition: fill 3s ease
- state: "30"
operator: ">="
styles:
icon:
display: none # HIDE
- state: "10"
operator: ">"
styles:
icon:
fill: var(--warning-color)
transition: fill 3s ease
- state: "10"
operator: "<="
styles:
icon:
fill: var(--error-color)
transition: fill 3s ease
user_actions:
tap_action: none
# # ================================================================ third Badge
# - toolset: #3-badge
# position:
# cx: 20
# cy: 75
# tools:
# ================================================================================================================================
# ================================================================================================================================
# ================================================================ Nova
# ================================================================================================================================
# ================================================================================================================================
# ================================================================ Nova States
# ================================================= Line A Stuff 1
- toolset: A1-desktop
position:
cx: 195
cy: 24
tools:
### -------------------------- Icon
- <<: &stuff-icon
type: icon
position:
cx: 50
cy: 50
align: center
icon_size: 32
entity_index: 31
animations:
- state: "attention"
styles:
icon:
fill: var(--warning-color)
transition: fill 3s ease
- state: "allumé"
styles:
icon:
fill: var(--info-color)
transition: fill 3s ease
- state: "distance"
styles:
icon:
fill: var(--nova-color)
transition: fill 3s ease
- state: "eteint"
styles:
icon:
fill: var(--primary-text-color)
transition: fill 3s ease
user_actions:
tap_action:
haptic: selection
actions:
- action: navigate
navigation_path: "#office"
# ================================================= Line A Stuff 2
- toolset: A2-garage-avr
position:
cx: 255
cy: 24
tools:
### -------------------------- Icon
- <<: *stuff-icon
entity_index: 32
animations:
- state: "on"
styles:
icon:
fill: var(--nova-color)
transition: fill 3s ease
- state: "off"
styles:
icon:
fill: var(--primary-text-color)
transition: fill 3s ease
# user_actions:
# tap_action:
# haptic: success
# actions:
# - action: call-service
# # confirmation: # DO NOT WORK 12/2023
# # text: Basculer l'ampli du garage?
# service: switch.toggle
# target:
# entity_id: switch.plug_nous_garage_avr
# # ================================================= Line A Stuff 3
# - toolset: A3
# position:
# cx: 315
# cy: 24
# tools:
# ### -------------------------- Icon
# - <<: *stuff-icon
# # ================================================= Line A Stuff 4
- toolset: A4-calendar
position:
cx: 375
cy: 24
tools:
### -------------------------- Icon
- <<: *stuff-icon
entity_index: 34
user_actions:
tap_action:
haptic: selection
actions:
- action: fire-dom-event
browser_mod:
service: browser_mod.navigate
data:
path: /calendar
# ================================================================ Nova Badges
# ================================================= Line B Stuff 1
- toolset: B1-battery
position:
cx: 195
cy: 73
tools:
### -------------------------- Icon
- <<: *stuff-icon
entity_index: 13
animations:
- state: "95"
operator: ">="
styles:
icon:
fill: var(--success-color)
transition: fill 3s ease
- state: "30"
operator: ">"
styles:
icon:
fill: var(--primary-text-color)
transition: fill 3s ease
- state: "10"
operator: ">"
styles:
icon:
fill: var(--warning-color)
transition: fill 3s ease
- state: "10"
operator: "<="
styles:
icon:
fill: var(--error-color)
transition: fill 3s ease
user_actions:
tap_action: none
# -------------------------- State
- entity_index: 13
type: state
position:
cx: 50
cy: 80
styles:
state:
font-size: 16em
opacity: 0.8
uom:
opacity: 0.4
user_actions:
tap_action: none
# # ================================================= Line B Stuff 2
- toolset: B2-phone
position:
cx: 255
cy: 73
tools:
### -------------------------- Icon
- <<: *stuff-icon
entity_index: 12
animations:
- state: "disponible"
styles:
icon:
fill: var(--primary-text-color)
transition: fill 3s ease
# display: none # HIDE
- state: "en ligne"
styles:
icon:
fill: var(--success-color)
transition: fill 3s ease
- state: "sonne"
styles:
icon:
fill: var(--success-color)
transition: fill 3s ease
- state: "silencieux"
styles:
icon:
fill: var(--info-color)
transition: fill 3s ease
- state: "vibreur"
styles:
icon:
fill: var(--info-color)
transition: fill 3s ease
- state: "hors ligne"
styles:
icon:
fill: var(--warning-color)
transition: fill 3s ease
user_actions:
tap_action: none
# # ================================================= Line B Stuff 3
# - toolset: B3
# position:
# cx: 315
# cy: 73
# tools:
# ### -------------------------- Icon
# - <<: *stuff-icon
# ================================================= Line B Stuff 4
- toolset: B4-meteo-alise
position:
cx: 375
cy: 73
tools:
# ### -------------------------- Circle (weather alise alert)
# - type: circle
# position:
# cx: 50
# cy: 50
# radius: 20
# entity_index: 36
# animations:
# - state: "66"
# styles:
# circle:
# fill: var(--green)
# <<: &weather_alise
# opacity: 0.5
# transition: fill 10s ease
# - state: "84"
# styles:
# circle:
# fill: var(--red)
# <<: *weather_alise
# styles:
# circle:
# fill: none
# stroke-width: 0em
# transition: fill 3s ease
# user_actions:
# actions:
# - action: navigate
# navigation_path: "#meteo_alise"
### -------------------------- Icon (weather alise)
- type: icon
entity_indexes:
- entity_index: 36
- entity_index: 37
position:
cx: 50
cy: 50
align: center
icon_size: 32
styles:
icon:
stroke: 0em
transition: fill 1s ease
animation: none
animations:
- state: "84"
operator: '!='
entity_index: 36
styles:
icon:
fill: var(--primary-text-color)
transition: fill 1s ease
animation: flash 1s ease-in-out infinite
- state: "Vert"
entity_index: 37
styles:
icon:
transition: fill 7s ease
animation: flash 4s ease-in-out 2
- state: "Jaune"
entity_index: 37
styles:
icon:
fill: var(--yellow)
transition: fill 5s ease
animation: flash 3s ease-in-out infinite
- state: "Orange"
entity_index: 37
styles:
icon:
fill: var(--fire)
transition: fill 3s ease
animation: flash 2s ease-in-out infinite
- state: "Rouge"
entity_index: 37
styles:
icon:
fill: var(--red)
transition: fill 1s ease
animation: flash 1s ease-in-out infinite
- state: "84"
operator: ==
entity_index: 36
styles:
icon:
fill: none
user_actions:
tap_action:
actions:
- action: navigate
navigation_path: "#meteo_alise"
# ================================================================================================================================
# ================================================================================================================================
# ================================================================ Alise
# ================================================================================================================================
# ================================================================================================================================
# ================================================================ AliseCell Device Tracker
### -------------------------- Circle
- toolset: dt_circle
position:
cx: 470
cy: 30
tools:
- entity_index: 24 # spé 25
<<: *dt-circle
# animations:
# - state: 'indisponible'
# styles:
# circle:
# stroke: var(--secondary-text-color)
# transition: stroke 3s ease
# animation: flash 3s ease-in-out 2
### -------------------------- Icon
- toolset: dt-icon
position:
cx: 470
cy: 30
tools:
- entity_index: 25
<<: *dt-icon
animations:
- state: '[[[ return (state); ]]]'
styles:
icon:
fill: >-
[[[
if (states["sensor.fordpass_deepsleep"].state == 'ACTIVE') return 'var(--subtext0)';
return 'var(--primary-text-color)';
]]]
user_actions:
tap_action:
haptic: selection
actions:
- action: fire-dom-event
browser_mod:
service: browser_mod.navigate
data:
path: /nova-dashboard/vehicle_ford_focus
### -------------------------- State
- toolset: dt-state
position:
cx: 355
cy: 112
tools:
- entity_index: 25
<<: *dt-state
# ================================================================ AliseCell Phone State
- toolset: phone-badge
position:
cx: 425
cy: 20
tools:
# -------------------------- Circle
- entity_index: 22
<<: *phone-circle
# -------------------------- Icon
- entity_index: 22
<<: *phone-icon
# ================================================================ AliseCell Battery Level
- toolset: battery-badge
position:
cx: 435
cy: 65
tools:
# -------------------------- Circle
- entity_index: 23
<<: *battery-circle
# -------------------------- Icon
- entity_index: 23
<<: *battery-icon
# ================================================================ Ford Focus Alert
- toolset: car-badge
position:
cx: 480
cy: 75
tools:
### -------------------------- Circle
- entity_index: 26
<<: &car-circle
type: circle
position:
cx: 50
cy: 50
radius: 16
animations:
- state: "OK"
styles:
circle:
display: none # HIDE
- state: "Critique"
styles:
circle:
stroke: var(--primary-text-color)
fill: var(--mantle)
transition: fill 3s ease
- state: "Faible"
styles:
circle:
stroke: var(--primary-text-color)
fill: var(--mantle)
transition: fill 3s ease
styles:
circle:
stroke-width: 3px
user_actions:
tap_action: none
### -------------------------- Icon
- entity_index: 26
<<: &car-icon
type: icon
position:
cx: 50
cy: 50
align: center
icon_size: 22
animations:
- state: "OK"
styles:
icon:
display: none # HIDE
- state: "Critique"
styles:
icon:
fill: var(--error-color)
animation: flash 2s ease infinite
transition: fill 3s ease
- state: "Faible"
styles:
icon:
fill: var(--warning-color)
animation: flash 4s ease infinite
transition: fill 3s ease
user_actions:
tap_action: none
# ================================================================================================================================
# ================================================================================================================================
# ================================================================ Lines
# ================================================================================================================================
# ================================================================================================================================
### -------------------------- Line
- toolset: line1
position:
cx: 160
cy: 65
tools: &line
- type: line
position:
cx: 50
cy: 50
orientation: vertical
length: 90
styles:
line:
fill: var(--primary-text-color)
opacity: 0.8
# ### -------------------------- Line
# - toolset: line2
# position:
# cx: 340
# cy: 75
# tools: *line