From 98df2da6f9fe3742a0d6a04682288ed0d98debe7 Mon Sep 17 00:00:00 2001 From: Claus Dethlefsen Date: Tue, 24 Mar 2026 20:44:38 +0100 Subject: [PATCH] feat(dashboard): Full Pro SnowyWhite Tesla Lovelace view - Implemented numeric template sensors for battery, range, charging rate, energy added, and charging state - Added gauges for battery and range - Added tiles for charging status, rate, energy, charger power, and time to full charge - Added Start/Stop charging buttons - Added history-graph timeline for charging - Added sections for doors & locks, temperature, arrival info, and maintenance/alerts - Fully compatible with standard Lovelace (no Dwains Dashboard dependencies) --- dashboards/views/07_tesla.yaml | 160 +++++++++++++++++++-------------- 1 file changed, 93 insertions(+), 67 deletions(-) diff --git a/dashboards/views/07_tesla.yaml b/dashboards/views/07_tesla.yaml index 0cb5dda..fc35c88 100644 --- a/dashboards/views/07_tesla.yaml +++ b/dashboards/views/07_tesla.yaml @@ -1,86 +1,112 @@ title: Tesla path: tesla icon: mdi:car-electric -type: sections +cards: -sections: - - # 🔋 Batteri og opladning - - type: grid + # 🔋 Batteri & Opladning + - type: vertical-stack cards: - - type: heading - heading: Batteri & Opladning + - type: gauge + entity: sensor.snowywhite_battery_numeric + name: Batteri + min: 0 + max: 100 + severity: + green: 50 + yellow: 20 + red: 0 + unit: '%' - - type: tile - entity: sensor.snowywhite_battery_level - name: Batteri (%) - - - type: tile - entity: sensor.snowywhite_battery_range - name: Rækkevidde (km) - - - type: tile - entity: sensor.snowywhite_charge_state - name: Opladningstilstand - - - type: tile - entity: sensor.snowywhite_charge_rate - name: Ladehastighed (km/t) - - - # 🚗 Døre, låse og tilstand - - type: grid - cards: - - type: heading - heading: Døre & Lås + - type: gauge + entity: sensor.snowywhite_range_numeric + name: Rækkevidde + min: 0 + max: 600 + severity: + green: 400 + yellow: 150 + red: 0 + unit: 'km' - type: entities entities: - - lock.snowywhite_door_lock - - binary_sensor.snowywhite_front_left_door - - binary_sensor.snowywhite_front_right_door - - binary_sensor.snowywhite_rear_left_door - - binary_sensor.snowywhite_rear_right_door - - binary_sensor.snowywhite_trunk - - binary_sensor.snowywhite_frunk + - entity: binary_sensor.snowywhite_charging + name: Oplader nu? + - entity: sensor.snowywhite_charging_rate_numeric + name: Ladehastighed (km/t) + - entity: sensor.snowywhite_energy_added_numeric + name: Energi tilføjet (kWh) + - entity: sensor.snowywhite_charger_power + name: Charger power (kW) + - entity: sensor.snowywhite_time_charge_complete + name: Forventet fuld opladning - - type: tile - entity: sensor.snowywhite_vehicle_state - name: Tilstand + - type: horizontal-stack + cards: + - type: button + name: Start opladning + icon: mdi:flash-circle + tap_action: + action: call-service + service: switch.turn_on + target: + entity_id: switch.home_charging + - type: button + name: Stop opladning + icon: mdi:flash-off + tap_action: + action: call-service + service: switch.turn_off + target: + entity_id: switch.home_charging + + # 🕒 Opladning Timeline (graf) + - type: history-graph + title: Ladeplan / Timeline + entities: + - entity: sensor.snowywhite_charging_numeric + name: Lader nu + - entity: sensor.snowywhite_charging_rate_numeric + name: Ladehastighed + - entity: sensor.snowywhite_energy_added_numeric + name: Energi tilføjet + hours_to_show: 24 + refresh_interval: 60 + + # 🚗 Døre & Lås + - type: entities + title: Døre & Lås + entities: + - binary_sensor.snowywhite_doors + - binary_sensor.snowywhite_windows + - binary_sensor.snowywhite_parking_brake + - binary_sensor.snowywhite_user_present + - sensor.snowywhite_shift_state # 🌡️ Temperatur - - type: grid + - type: horizontal-stack cards: - - type: heading - heading: Temperatur - - - type: tile - entity: sensor.snowywhite_inside_temp + - type: sensor + entity: sensor.snowywhite_temperature_inside name: Inde (°C) - - - type: tile - entity: sensor.snowywhite_outside_temp + - type: sensor + entity: sensor.snowywhite_temperature_outside name: Ude (°C) - - # 📍 Lokation - - type: map - title: Lokation - default_zoom: 15 + # 📍 Lokation / Ankomst + - type: entities + title: Ankomst / Distance entities: - - device_tracker.snowywhite - show_state: true + - sensor.snowywhite_arrival_time + - sensor.snowywhite_distance_to_arrival - - # 🔧 Maintenance / alerts - - type: grid - cards: - - type: heading - heading: Vedligeholdelse / Alerts - - - type: entities - entities: - - sensor.snowywhite_maintenance_required - - sensor.snowywhite_tire_pressure_alert - - sensor.snowywhite_software_update + # 🔧 Vedligeholdelse / Alerts + - type: entities + title: Vedligeholdelse / Alerts + entities: + - sensor.snowywhite_tpms_front_left + - sensor.snowywhite_tpms_front_right + - sensor.snowywhite_tpms_rear_left + - sensor.snowywhite_tpms_rear_right + - sensor.snowywhite_data_last_update_time