# ============================================
# Spotprisoptimering - LOVELACE DASHBOARD
# ============================================

title: Spotprisoptimering
views:
  - title: Hem
    icon: mdi:home
    cards:
      - type: heading
        heading: ⚡ Elpris just nu
        heading_style: title
      - type: grid
        columns: 3
        cards:
          - type: entity
            entity: sensor.spotpris_aktuellt
            name: Pris
            icon: mdi:currency-sek
          - type: entity
            entity: sensor.spotpris_nivå
            name: Nivå
          - type: entity
            entity: sensor.spotpris_signal
            name: Signal
            icon: mdi:heat-pump
            
      - type: heading
        heading: 🔥 Värmepump
        heading_style: title
      - type: entities
        entities:
          - entity: sensor.spotpris_värmepump
            name: Rekommendation
          - entity: switch.heatpump
            name: Värmepump
          - type: section
          - entity: automation.spotpris_heatpump_control
            name: Automatisk styrning
            
      - type: heading
        heading: 🚗 Elbil
        heading_style: title
      - type: grid
        columns: 2
        cards:
          - type: entity
            entity: sensor.spotpris_bil_status
            name: Batteri
            icon: mdi:car-electric
          - type: entity
            entity: sensor.spotpris_bil_rekommendation
            name: Rekommendation
      - type: entities
        entities:
          - entity: binary_sensor.car_plugged_in
            name: Inkopplad
          - entity: switch.car_charger
            name: Laddare
          - entity: automation.spotpris_car_charging
            name: Automatisk laddning
            
      - type: heading
        heading: 💧 Varmvatten
        heading_style: title
      - type: entities
        entities:
          - entity: input_boolean.water_heater_enabled
            name: Aktivera styrning
          - entity: sensor.spotpris_varmvatten
            name: Rekommendation
          - entity: switch.water_heater
            name: Varmvattenberedare
          - entity: automation.spotpris_water_heater
            name: Automatisk styrning
            
      - type: heading
        heading: ☀️ Solceller & Batteri
        heading_style: title
      - type: grid
        columns: 2
        cards:
          - type: entity
            entity: sensor.spotpris_batteri_soc
            name: Batterinivå
          - type: entity
            entity: sensor.spotpris_solceller_action
            name: Rekommendation
      - type: entities
        entities:
          - entity: input_boolean.battery_enabled
            name: Aktivera batterihandel
          - entity: automation.spotpris_battery_arbitrage
            name: Automatisk handel
            
      - type: heading
        heading: 📊 Prisprognos
        heading_style: title
      - type: entities
        entities:
          - entity: sensor.spotpris_signal
            name: Prisprognos
            type: custom:multiple-entity-row
            entities:
              - attribute: price.min_price_24h
                name: Min
              - attribute: price.max_price_24h
                name: Max
              - attribute: price.avg_price
                name: Snitt