#DASHBOARD
#Note that this uses the custom Lovelace Stack In Card - https://github.com/custom-cards/stack-in-card

type: custom:stack-in-card
mode: vertical
title: Fiat 500e
cards:
  - type: map
    entities:
      - entity: sensor.fiat_map
    hours_to_show: 12
    auto_fit: true
  - type: button
    show_name: false
    show_icon: true
    tap_action:
      action: call-service
      service: script.update_fiat_stats
      service_data: {}
      target: {}
    entity: script.update_fiat_stats
    name: Update
    icon_height: 30px
  - type: glance
    columns: 3
    entities:
      - entity: sensor.soc
        name: Charge
      - entity: sensor.range_m
        name: Range
        icon: mdi:map-marker-distance
      - entity: sensor.odo_m
        name: Odometer
        icon: mdi:counter
      - entity: sensor.location_spd_m0
        name: Speed
        icon: mdi:speedometer
      - entity: sensor.batt_12v_per2
        name: 12 V Battery
        icon: mdi:car-battery
      - entity: sensor.vehicle_ambient_temp_f
        name: Temperature
    state_color: true
  - type: entities
    entities:
      - type: divider
  - type: entities
    entities:
      - entity: script.1649176278340
        name: ' '
        secondary_info:
          entity: sensor.fiat_charging_status
      - entity: lock.fiat_lock
        name: ' '
        secondary_info:
          entity: sensor.fiat_lock_status
    style:
      .: |
        #states > * {
            margin: -2px 0px !important;
        }

        ha-card {
          box-shadow: none;
        }
    state_color: true
