diff --git a/dashboards/evcs_master.yaml b/dashboards/evcs_master.yaml index 7b4ab59..4921dfc 100755 --- a/dashboards/evcs_master.yaml +++ b/dashboards/evcs_master.yaml @@ -1,5 +1,5 @@ views: - - title: EVCS Master + - title: Session path: default_view icon: mdi:car-electric cards: @@ -38,559 +38,100 @@ views: content: | ## ✅ Charge EVCS active - - type: custom:layout-card - layout_type: grid - layout: - grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)) - grid-gap: 16px - margin: 0 + - type: custom:vertical-stack-in-card cards: - - type: custom:vertical-stack-in-card - cards: - - type: custom:mushroom-title-card - title: État borne - subtitle: Statut global + - type: custom:mushroom-title-card + title: État borne + subtitle: Statut global - - type: custom:mushroom-template-card - entity: sensor.victron_evcs_statut_fr - primary: EVCS - secondary: > - {{ states('sensor.victron_evcs_statut_fr') }} - • Mode {{ states('sensor.victron_evcs_mode_fr') }} - • {{ states('sensor.victron_evcs_current') | float(0) | round(1) }} A - multiline_secondary: true - icon: mdi:ev-station - icon_color: > - {% if is_state('switch.victron_evcs_charging', 'on') %} - green - {% elif is_state('binary_sensor.victron_evcs_vehicle_connected', 'on') %} - blue - {% else %} - grey - {% endif %} + - type: custom:mushroom-template-card + entity: sensor.victron_evcs_statut_fr + primary: EVCS + secondary: > + {{ states('sensor.victron_evcs_statut_fr') }} + • Mode {{ states('sensor.victron_evcs_mode_fr') }} + • {{ states('sensor.victron_evcs_current') | float(0) | round(1) }} A + multiline_secondary: true + icon: mdi:ev-station + icon_color: > + {% if is_state('switch.victron_evcs_charging', 'on') %} + green + {% elif is_state('binary_sensor.victron_evcs_vehicle_connected', 'on') %} + blue + {% else %} + grey + {% endif %} - - type: entities - show_header_toggle: false - entities: - - entity: sensor.victron_evcs_statut_fr - name: Statut FR - - entity: sensor.victron_evcs_mode_fr - name: Mode FR - - entity: sensor.victron_evcs_status_raw - name: Statut brut - - entity: sensor.victron_evcs_mode_raw - name: Mode brut - - entity: binary_sensor.victron_evcs_device_connected - name: EVCS détecté - - entity: binary_sensor.victron_evcs_vehicle_connected - name: Véhicule connecté - - entity: sensor.victron_evcs_charging_time - name: Durée charge - - entity: input_boolean.victron_evcs_surplus_auto_enabled - name: Contrôleur surplus actif + - type: entities + show_header_toggle: false + entities: + - entity: sensor.victron_evcs_statut_fr + name: Statut FR + - entity: sensor.victron_evcs_mode_fr + name: Mode FR + - entity: sensor.victron_evcs_status_raw + name: Statut brut + - entity: sensor.victron_evcs_mode_raw + name: Mode brut + - entity: binary_sensor.victron_evcs_device_connected + name: EVCS détecté + - entity: binary_sensor.victron_evcs_vehicle_connected + name: Véhicule connecté + - entity: sensor.victron_evcs_charging_time + name: Durée charge + - entity: input_boolean.victron_evcs_surplus_auto_enabled + name: Contrôleur surplus actif - - type: custom:vertical-stack-in-card - cards: - - type: custom:mushroom-title-card - title: Session - subtitle: Courant / puissance / énergie + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Session + subtitle: Courant / puissance / énergie - - type: custom:gauge-card-pro - entity: sensor.victron_evcs_current - header: Courant EVCS - min: 0 - max: 32 - needle: true - segments: - - from: 0 - color: "#43a047" - - from: 6 - color: "#fdd835" - - from: 16 - color: "#fb8c00" - - from: 24 - color: "#e53935" + - type: custom:gauge-card-pro + entity: sensor.victron_evcs_current + header: Courant EVCS + min: 0 + max: 32 + needle: true + segments: + - from: 0 + color: "#43a047" + - from: 6 + color: "#fdd835" + - from: 16 + color: "#fb8c00" + - from: 24 + color: "#e53935" - - type: custom:mushroom-template-card - primary: Session en cours - secondary: > - {{ states('sensor.victron_evcs_ac_power') | float(0) | round(0) }} W - • {{ states('sensor.victron_evcs_current') | float(0) | round(1) }} A - • Consigne {{ states('sensor.victron_evcs_set_current') | float(0) | round(1) }} A - • {{ states('sensor.victron_evcs_charging_time') }} - multiline_secondary: true - icon: mdi:flash - icon_color: amber + - type: custom:mushroom-template-card + primary: Session en cours + secondary: > + {{ states('sensor.victron_evcs_ac_power') | float(0) | round(0) }} W + • {{ states('sensor.victron_evcs_current') | float(0) | round(1) }} A + • Consigne {{ states('sensor.victron_evcs_set_current') | float(0) | round(1) }} A + • {{ states('sensor.victron_evcs_charging_time') }} + multiline_secondary: true + icon: mdi:flash + icon_color: amber - - type: entities - show_header_toggle: false - entities: - - entity: sensor.victron_evcs_ac_power - name: Puissance EVCS - - entity: sensor.victron_evcs_l1_power - name: Puissance L1 - - entity: sensor.victron_evcs_current - name: Courant réel - - entity: sensor.victron_evcs_set_current - name: Consigne lue - - entity: number.victron_evcs_set_current_command - name: Consigne envoyée - - entity: sensor.victron_evcs_charging_time - name: Durée charge - - entity: sensor.victron_evcs_l1_energy_forward - name: Énergie session - - - type: custom:vertical-stack-in-card - cards: - - type: custom:mushroom-title-card - title: Stratégie & décision - subtitle: Mode utilisateur / logique n8n - - - type: custom:mushroom-template-card - primary: Mode utilisateur - secondary: > - Stratégie : {{ states('input_select.victron_evcs_strategy') }} - • Profil : {{ states('input_text.victron_evcs_operating_mode') }} - • Décision : {{ states('input_text.victron_evcs_surplus_current_decision') }} - • Source : {{ states('input_text.victron_evcs_source_mode') }} - multiline_secondary: true - icon: mdi:strategy - icon_color: > - {% if is_state('input_select.victron_evcs_strategy', 'force_grid_now') %} - red - {% elif is_state('input_select.victron_evcs_strategy', 'force_charge_now') %} - orange - {% elif is_state('input_select.victron_evcs_strategy', 'auto_solar_plus') %} - green - {% elif is_state('input_select.victron_evcs_strategy', 'auto_solar') %} - teal - {% else %} - grey - {% endif %} - - # Un contournement manuel doit afficher son echeance, sinon - # « force_grid_now » se lit comme un etat permanent — c'est ce - # qui a laisse tourner une charge reseau au plein tarif le - # 17/09/2026. - - type: conditional - conditions: - - entity: input_select.victron_evcs_strategy - state: force_grid_now - card: - type: custom:mushroom-template-card - primary: Réseau forcé — échéance - secondary: > - {% set s = states.input_select.victron_evcs_strategy %} - {% set d = ((as_timestamp(now()) - as_timestamp(s.last_changed)) / 60) | round(0) %} - {% set p = states('input_number.evcs_force_grid_max_minutes') | float(180) %} - {% if is_state('input_boolean.evcs_expiration_force_grid_enabled', 'on') %} - Actif depuis {{ d }} min. S'arrête à la sortie de la fenêtre - d'heures creuses, ou après {{ p | round(0) }} min. - {% else %} - ⚠️ Expiration DÉSACTIVÉE : il ne s'arrêtera pas tout seul. - Actif depuis {{ d }} min. - {% endif %} - multiline_secondary: true - icon: mdi:timer-sand - icon_color: > - {% if is_state('input_boolean.evcs_expiration_force_grid_enabled', 'on') %}orange{% else %}red{% endif %} - - - type: custom:mushroom-template-card - primary: Besoin véhicule - secondary: > - Véhicule : {{ states('input_select.victron_evcs_target_vehicle') }} - • {{ states('input_number.victron_evcs_required_energy_kwh') | float(0) | round(1) }} kWh - • Départ : {{ states('input_datetime.victron_evcs_departure_time') }} - multiline_secondary: true - icon: mdi:calendar-clock - icon_color: cyan - - - type: entities - title: JEEP — lue par la voiture (Uconnect) - show_header_toggle: false - entities: - - entity: sensor.jeep_renegade_phev_hvbattery_charge - name: 🔋 Batterie (dernier état publié) - - entity: sensor.jeep_renegade_phev_extrapolated_battery - name: 🔋 Batterie estimée maintenant (extrapolée) - - entity: binary_sensor.jeep_renegade_phev_ev_charger - name: Câble branché - - entity: binary_sensor.jeep_renegade_phev_charging - name: En charge - - entity: sensor.jeep_renegade_phev_charging_rate - name: Vitesse de charge - - entity: sensor.jeep_renegade_phev_time_to_charge_l2 - name: Temps restant jusqu'au plein - - entity: sensor.jeep_renegade_phev_driving_range - name: Autonomie électrique - - entity: sensor.jeep_renegade_phev_driving_range_gas - name: Autonomie essence - - entity: sensor.jeep_renegade_phev_odometer - name: Compteur kilométrique - - entity: sensor.jeep_renegade_phev_12v_battery - name: Batterie 12 V - - entity: sensor.jeep_renegade_phev_last_info_update_at - name: Dernier état publié par la voiture - format: relative - - type: section - label: "Au branchement, la JEEP s'identifie seule : étiquette, sélecteur et niveau posés automatiquement" - - - type: entities - title: Relevé kilométrique (km par kWh et usure des batteries) - show_header_toggle: false - entities: - - entity: input_select.evcs_releve_vehicule - name: Véhicule - - entity: input_number.evcs_releve_km_valeur - name: Compteur (km) - - entity: input_number.evcs_releve_niveau - name: Niveau batterie (%, -1 = inconnu) - - type: button - name: Enregistrer le relevé - icon: mdi:content-save - action_name: Enregistrer - tap_action: - action: perform-action - perform_action: script.evcs_enregistrer_releve_km - - type: section - label: "Ou par WhatsApp : « JEEP 112694 km 54 % » — toujours avec le niveau" - - entity: input_number.victron_evcs_autonomie_jeep_km - name: Autonomie de référence JEEP - - entity: input_number.victron_evcs_autonomie_vw_km - name: Autonomie de référence VW - - entity: input_number.victron_evcs_autonomie_zero_km - name: Autonomie de référence ZERO - - - type: entities - title: Paramètres utilisateur - show_header_toggle: false - entities: - - entity: input_select.victron_evcs_vehicle - name: Véhicule branché (VW/JEEP) - - entity: input_number.victron_evcs_required_energy_kwh - name: Énergie demandée - - entity: input_boolean.victron_evcs_departure_priority_enabled - name: Priorité départ - - entity: input_datetime.victron_evcs_departure_time - name: Heure départ VW - - entity: input_datetime.victron_evcs_departure_time_jeep - name: Heure départ JEEP - - entity: input_datetime.victron_evcs_departure_time_zero - name: Heure départ ZERO - - entity: input_text.victron_evcs_jeep_morning_departure_days - name: Jours où la JEEP part le matin (vide = tous) - - entity: input_text.victron_evcs_vw_morning_departure_days - name: Jours où la VW part le matin (vide = tous) - - entity: input_text.victron_evcs_zero_morning_departure_days - name: Jours où la ZERO part le matin (vide = tous) - - entity: input_number.victron_evcs_vehicle_level_pct - name: 🔋 Niveau du véhicule branché (à saisir au branchement) - - entity: input_datetime.victron_evcs_departure_ponctuel - name: 🕒 Repart aujourd'hui à (départ ponctuel, VW / ZERO) - - entity: input_select.victron_evcs_night_charge_mode - name: 🌙 Charge cette nuit (sans EDF = budget batterie seul) - - entity: input_number.evcs_balance_night_vehicle_budget_kwh - name: 🔋 Budget batterie de la nuit sans EDF - - entity: input_datetime.victron_evcs_jeep_midday_departure - name: JEEP repart après midi à - - entity: input_text.victron_evcs_jeep_midday_departure_days - name: Jours où la JEEP repart (lun mar mer jeu ven sam dim) - - entity: input_datetime.victron_evcs_vw_midday_departure - name: VW repart après midi à - - entity: input_text.victron_evcs_vw_midday_departure_days - name: Jours où la VW repart (lun mar mer jeu ven sam dim) - - entity: input_datetime.victron_evcs_zero_midday_departure - name: ZERO repart après midi à - - entity: input_text.victron_evcs_zero_midday_departure_days - name: Jours où la ZERO repart (lun mar mer jeu ven sam dim) - - entity: input_number.victron_evcs_capacity_jeep_kwh - name: Capacité mesurée JEEP - - entity: input_number.victron_evcs_charger_kw_jeep - name: Puissance de charge JEEP - - entity: input_number.victron_evcs_capacity_vw_kwh - name: Capacité mesurée VW - - entity: input_number.victron_evcs_charger_kw_vw - name: Puissance de charge VW - - entity: input_number.victron_evcs_capacity_zero_kwh - name: Capacité mesurée ZERO - - entity: input_number.victron_evcs_charger_kw_zero - name: Puissance de charge ZERO - - entity: input_boolean.evcs_balance_vehicle_grid_needed - name: Réseau justifié pour le véhicule à midi (verdict du bilan) - - entity: input_number.evcs_balance_vehicle_need_kwh - name: Besoin voiture avant départ - - entity: input_number.evcs_balance_vehicle_solar_kwh - name: Solaire disponible pour la voiture avant départ - - entity: input_boolean.victron_evcs_allow_grid_departure_urgent - name: ⚡ Réseau avant départ (P9) - - entity: input_select.victron_evcs_strategy - name: Stratégie EVCS - - entity: input_boolean.evcs_expiration_force_grid_enabled - name: └ ⏳ le réseau forcé expire tout seul - - entity: input_number.evcs_force_grid_max_minutes - name: " └ durée maximale" - - entity: input_text.evcs_force_grid_last_expiry - name: " └ dernière expiration" - - entity: input_boolean.victron_evcs_allow_grid_hc_night - name: Réseau HC nuit - - entity: input_boolean.victron_evcs_night_battery_charge - name: 🔋 Charge nuit sur batterie (P12) - - entity: input_boolean.victron_evcs_night_battery_done - name: └ surplus de la nuit épuisé - - entity: input_boolean.victron_evcs_allow_grid_hc_midday - name: Réseau HC midi - - entity: input_boolean.victron_evcs_surplus_auto_enabled - name: Contrôleur surplus actif - - - type: entities - title: Décision contrôleur - show_header_toggle: false - entities: - - entity: input_text.victron_evcs_operating_mode - name: Profil actif - - entity: input_text.victron_evcs_surplus_state - name: État interne - - entity: input_text.victron_evcs_surplus_current_decision - name: Décision logique - - entity: input_text.victron_evcs_source_mode - name: Source autorisée - - entity: input_text.victron_evcs_surplus_reason - name: Raison courte - - entity: input_text.victron_evcs_last_block_reason - name: Dernier blocage - - entity: input_datetime.victron_evcs_blocked_until - name: Bloqué jusqu'à - - - type: custom:vertical-stack-in-card - cards: - - type: custom:mushroom-title-card - title: Contexte énergie - subtitle: Batterie / PV / maison / réseau - - - type: custom:mushroom-template-card - primary: Contexte instantané - secondary: > - SOC {{ states('sensor.victron_battery_soc') | float(0) | round(1) }} % - • PV {{ states('sensor.victron_pv_power_system') | float(0) | round(0) }} W - • Maison {{ states('sensor.victron_consumption_power_l1') | float(0) | round(0) }} W - • Grid {{ states('sensor.victron_grid_power_l1') | float(0) | round(0) }} W - multiline_secondary: true - icon: mdi:home-lightning-bolt - icon_color: > - {% set pv = states('sensor.victron_pv_power_system') | float(0) %} - {% if pv < 300 %} grey - {% elif pv < 1500 %} yellow - {% else %} green - {% endif %} - - - type: entities - show_header_toggle: false - entities: - - entity: sensor.victron_battery_soc - name: SOC batterie - - entity: sensor.victron_battery_current - name: Courant batterie - - entity: sensor.victron_pv_power_system - name: Puissance PV - - entity: sensor.victron_consumption_power_l1 - name: Charges maison - - entity: sensor.victron_grid_power_l1 - name: Puissance réseau - - entity: switch.edf_general_ok_switch - name: Réseau EDF - - - type: custom:vertical-stack-in-card - cards: - - type: custom:mushroom-title-card - title: Actions rapides - subtitle: Contrôle direct EVCS - - - type: grid - columns: 2 - square: false - cards: - - type: custom:button-card - entity: switch.victron_evcs_charging - name: Charge - icon: mdi:ev-station - show_state: true - state_display: > - [[[ - if (!entity) return 'Inconnu'; - if (entity.state === 'on') return 'ON'; - if (entity.state === 'off') return 'OFF'; - return entity.state; - ]]] - tap_action: - action: toggle - hold_action: - action: more-info - styles: - card: - - border-radius: 18px - - padding: 12px - name: - - font-size: 15px - - font-weight: 600 - state: - - font-size: 12px - state: - - value: "on" - color: "#43a047" - - value: "off" - color: "#757575" - - - type: custom:button-card - entity: input_boolean.victron_evcs_surplus_auto_enabled - name: Contrôleur surplus - icon: mdi:robot - show_state: true - tap_action: - action: toggle - hold_action: - action: more-info - styles: - card: - - border-radius: 18px - - padding: 12px - name: - - font-size: 15px - - font-weight: 600 - state: - - font-size: 12px - state: - - value: "on" - color: "#26a69a" - - value: "off" - color: "#757575" - - - type: custom:button-card - entity: binary_sensor.victron_evcs_vehicle_connected - name: Véhicule - icon: mdi:car-electric - show_state: true - tap_action: - action: more-info - styles: - card: - - border-radius: 18px - - padding: 12px - name: - - font-size: 15px - - font-weight: 600 - state: - - font-size: 12px - state: - - value: "on" - color: "#1e88e5" - - value: "off" - color: "#757575" - - - type: custom:button-card - entity: number.victron_evcs_set_current_command - name: Courant demandé - icon: mdi:current-ac - show_state: true - tap_action: - action: more-info - hold_action: - action: more-info - styles: - card: - - border-radius: 18px - - padding: 12px - name: - - font-size: 15px - - font-weight: 600 - state: - - font-size: 12px - - - type: entities - title: Commandes manuelles - show_header_toggle: false - entities: - - entity: switch.victron_evcs_charging - name: Start / Stop charge - - entity: number.victron_evcs_set_current_command - name: Courant demandé - - entity: input_boolean.victron_evcs_charge_permission_now - name: Permission charge - - entity: input_boolean.victron_evcs_control_latch - name: Latch contrôle - - entity: switch.victron_evcs_auto_start - name: Auto Start borne (diagnostic) - - - type: horizontal-stack - cards: - - type: button - entity: script.evcs_boost_edf - name: ⚡ BOOST EDF 28A - icon: mdi:flash - icon_height: 60px - tap_action: - action: call-service - service: script.turn_on - target: - entity_id: script.evcs_boost_edf - - type: button - entity: script.evcs_boost_off - name: Retour normal - icon: mdi:flash-off - icon_height: 60px - tap_action: - action: call-service - service: script.turn_on - target: - entity_id: script.evcs_boost_off - - - type: entities - title: Plafonds courant EVCS - show_header_toggle: false - entities: - - entity: input_number.evcs_plafond_courant_edf_on - name: Plafond EDF ON (tous modes) - - entity: input_number.victron_evcs_current_max_auto_a - name: Plafond modes auto - - - type: custom:vertical-stack-in-card - cards: - - type: custom:mushroom-title-card - title: Diagnostic - subtitle: Identité / version / brut - - - type: entities - show_header_toggle: false - entities: - - entity: sensor.victron_evcs_product_name - name: Produit - - entity: sensor.victron_evcs_custom_name - name: Nom borne - - entity: sensor.victron_evcs_serial - name: Numéro de série - - entity: sensor.victron_evcs_firmware_version - name: Firmware - - entity: sensor.victron_evcs_connected_raw - name: Connected brut - - entity: sensor.victron_evcs_status_raw - name: Statut brut - - entity: sensor.victron_evcs_mode_raw - name: Mode brut - - entity: switch.victron_evcs_auto_start - name: Auto Start borne - - entity: input_datetime.victron_evcs_last_start_at - name: Dernier start - - entity: input_datetime.victron_evcs_last_stop_at - name: Dernier stop - - entity: input_datetime.victron_evcs_last_current_change_at - name: Dernier changement courant - - entity: input_datetime.victron_evcs_probe_started_at - name: Début probe - - entity: input_datetime.victron_evcs_cloud_debt_started_at - name: Début cloud debt - - entity: input_number.victron_evcs_cloud_debt_kwh - name: Cloud debt - - entity: input_text.victron_evcs_control_last_signature - name: Signature + - type: entities + show_header_toggle: false + entities: + - entity: sensor.victron_evcs_ac_power + name: Puissance EVCS + - entity: sensor.victron_evcs_l1_power + name: Puissance L1 + - entity: sensor.victron_evcs_current + name: Courant réel + - entity: sensor.victron_evcs_set_current + name: Consigne lue + - entity: number.victron_evcs_set_current_command + name: Consigne envoyée + - entity: sensor.victron_evcs_charging_time + name: Durée charge + - entity: sensor.victron_evcs_l1_energy_forward + name: Énergie session - type: custom:vertical-stack-in-card cards: @@ -621,7 +162,6 @@ views: name: Réseau color: "#ef5350" - - type: vertical-stack cards: - type: custom:mushroom-title-card @@ -658,6 +198,480 @@ views: - entity: input_boolean.evcs_advisor_enabled name: Conseiller actif (kill-switch) + - title: Véhicules + path: vehicules + icon: mdi:car-multiple + cards: + - type: entities + title: JEEP — lue par la voiture (Uconnect) + show_header_toggle: false + entities: + - entity: sensor.jeep_renegade_phev_hvbattery_charge + name: 🔋 Batterie (dernier état publié) + - entity: sensor.jeep_renegade_phev_extrapolated_battery + name: 🔋 Batterie estimée maintenant (extrapolée) + - entity: binary_sensor.jeep_renegade_phev_ev_charger + name: Câble branché + - entity: binary_sensor.jeep_renegade_phev_charging + name: En charge + - entity: sensor.jeep_renegade_phev_charging_rate + name: Vitesse de charge + - entity: sensor.jeep_renegade_phev_time_to_charge_l2 + name: Temps restant jusqu'au plein + - entity: sensor.jeep_renegade_phev_driving_range + name: Autonomie électrique + - entity: sensor.jeep_renegade_phev_driving_range_gas + name: Autonomie essence + - entity: sensor.jeep_renegade_phev_odometer + name: Compteur kilométrique + - entity: sensor.jeep_renegade_phev_12v_battery + name: Batterie 12 V + - entity: sensor.jeep_renegade_phev_last_info_update_at + name: Dernier état publié par la voiture + format: relative + - type: section + label: "Au branchement, la JEEP s'identifie seule : étiquette, sélecteur et niveau posés automatiquement" + + - type: entities + title: Véhicule branché et cette nuit + show_header_toggle: false + entities: + - entity: input_select.victron_evcs_vehicle + name: Véhicule branché (VW/JEEP) + - entity: input_number.victron_evcs_vehicle_level_pct + name: 🔋 Niveau du véhicule branché (à saisir au branchement) + - entity: input_datetime.victron_evcs_departure_ponctuel + name: 🕒 Repart aujourd'hui à (départ ponctuel, VW / ZERO) + - entity: input_select.victron_evcs_night_charge_mode + name: 🌙 Charge cette nuit (sans EDF = budget batterie seul) + - entity: input_number.evcs_balance_night_vehicle_budget_kwh + name: 🔋 Budget batterie de la nuit sans EDF + - entity: input_number.victron_evcs_required_energy_kwh + name: Énergie demandée + - entity: input_boolean.victron_evcs_departure_priority_enabled + name: Priorité départ + + - type: entities + title: Relevé kilométrique (km par kWh et usure des batteries) + show_header_toggle: false + entities: + - entity: input_select.evcs_releve_vehicule + name: Véhicule + - entity: input_number.evcs_releve_km_valeur + name: Compteur (km) + - entity: input_number.evcs_releve_niveau + name: Niveau batterie (%, -1 = inconnu) + - type: button + name: Enregistrer le relevé + icon: mdi:content-save + action_name: Enregistrer + tap_action: + action: perform-action + perform_action: script.evcs_enregistrer_releve_km + - type: section + label: "Ou par WhatsApp : « JEEP 112694 km 54 % » — toujours avec le niveau" + - entity: input_number.victron_evcs_autonomie_jeep_km + name: Autonomie de référence JEEP + - entity: input_number.victron_evcs_autonomie_vw_km + name: Autonomie de référence VW + - entity: input_number.victron_evcs_autonomie_zero_km + name: Autonomie de référence ZERO + + - type: entities + title: Calendrier des départs + show_header_toggle: false + entities: + - entity: input_datetime.victron_evcs_departure_time + name: Heure départ VW + - entity: input_datetime.victron_evcs_departure_time_jeep + name: Heure départ JEEP + - entity: input_datetime.victron_evcs_departure_time_zero + name: Heure départ ZERO + - entity: input_text.victron_evcs_jeep_morning_departure_days + name: Jours où la JEEP part le matin (vide = tous) + - entity: input_text.victron_evcs_vw_morning_departure_days + name: Jours où la VW part le matin (vide = tous) + - entity: input_text.victron_evcs_zero_morning_departure_days + name: Jours où la ZERO part le matin (vide = tous) + - entity: input_datetime.victron_evcs_jeep_midday_departure + name: JEEP repart après midi à + - entity: input_text.victron_evcs_jeep_midday_departure_days + name: Jours où la JEEP repart (lun mar mer jeu ven sam dim) + - entity: input_datetime.victron_evcs_vw_midday_departure + name: VW repart après midi à + - entity: input_text.victron_evcs_vw_midday_departure_days + name: Jours où la VW repart (lun mar mer jeu ven sam dim) + - entity: input_datetime.victron_evcs_zero_midday_departure + name: ZERO repart après midi à + - entity: input_text.victron_evcs_zero_midday_departure_days + name: Jours où la ZERO repart (lun mar mer jeu ven sam dim) + + - type: entities + title: Capacités et puissances mesurées + show_header_toggle: false + entities: + - entity: input_number.victron_evcs_capacity_jeep_kwh + name: Capacité mesurée JEEP + - entity: input_number.victron_evcs_charger_kw_jeep + name: Puissance de charge JEEP + - entity: input_number.victron_evcs_capacity_vw_kwh + name: Capacité mesurée VW + - entity: input_number.victron_evcs_charger_kw_vw + name: Puissance de charge VW + - entity: input_number.victron_evcs_capacity_zero_kwh + name: Capacité mesurée ZERO + - entity: input_number.victron_evcs_charger_kw_zero + name: Puissance de charge ZERO + + - type: entities + title: "Voiture à midi : le réseau est-il justifié ? (verdict du bilan)" + show_header_toggle: false + entities: + - entity: input_boolean.evcs_balance_vehicle_grid_needed + name: Réseau justifié pour le véhicule à midi (verdict du bilan) + - entity: input_number.evcs_balance_vehicle_need_kwh + name: Besoin voiture avant départ + - entity: input_number.evcs_balance_vehicle_solar_kwh + name: Solaire disponible pour la voiture avant départ + + - title: Pilotage + path: pilotage + icon: mdi:tune-variant + cards: + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Stratégie & décision + subtitle: Mode utilisateur / logique n8n + + - type: custom:mushroom-template-card + primary: Mode utilisateur + secondary: > + Stratégie : {{ states('input_select.victron_evcs_strategy') }} + • Profil : {{ states('input_text.victron_evcs_operating_mode') }} + • Décision : {{ states('input_text.victron_evcs_surplus_current_decision') }} + • Source : {{ states('input_text.victron_evcs_source_mode') }} + multiline_secondary: true + icon: mdi:strategy + icon_color: > + {% if is_state('input_select.victron_evcs_strategy', 'force_grid_now') %} + red + {% elif is_state('input_select.victron_evcs_strategy', 'force_charge_now') %} + orange + {% elif is_state('input_select.victron_evcs_strategy', 'auto_solar_plus') %} + green + {% elif is_state('input_select.victron_evcs_strategy', 'auto_solar') %} + teal + {% else %} + grey + {% endif %} + + # Un contournement manuel doit afficher son echeance, sinon + # « force_grid_now » se lit comme un etat permanent — c'est ce + # qui a laisse tourner une charge reseau au plein tarif le + # 17/09/2026. + - type: conditional + conditions: + - entity: input_select.victron_evcs_strategy + state: force_grid_now + card: + type: custom:mushroom-template-card + primary: Réseau forcé — échéance + secondary: > + {% set s = states.input_select.victron_evcs_strategy %} + {% set d = ((as_timestamp(now()) - as_timestamp(s.last_changed)) / 60) | round(0) %} + {% set p = states('input_number.evcs_force_grid_max_minutes') | float(180) %} + {% if is_state('input_boolean.evcs_expiration_force_grid_enabled', 'on') %} + Actif depuis {{ d }} min. S'arrête à la sortie de la fenêtre + d'heures creuses, ou après {{ p | round(0) }} min. + {% else %} + ⚠️ Expiration DÉSACTIVÉE : il ne s'arrêtera pas tout seul. + Actif depuis {{ d }} min. + {% endif %} + multiline_secondary: true + icon: mdi:timer-sand + icon_color: > + {% if is_state('input_boolean.evcs_expiration_force_grid_enabled', 'on') %}orange{% else %}red{% endif %} + + - type: entities + title: Décision contrôleur + show_header_toggle: false + entities: + - entity: input_text.victron_evcs_operating_mode + name: Profil actif + - entity: input_text.victron_evcs_surplus_state + name: État interne + - entity: input_text.victron_evcs_surplus_current_decision + name: Décision logique + - entity: input_text.victron_evcs_source_mode + name: Source autorisée + - entity: input_text.victron_evcs_surplus_reason + name: Raison courte + - entity: input_text.victron_evcs_last_block_reason + name: Dernier blocage + - entity: input_datetime.victron_evcs_blocked_until + name: Bloqué jusqu'à + + - type: entities + title: Stratégie et autorisations réseau + show_header_toggle: false + entities: + - entity: input_boolean.victron_evcs_allow_grid_departure_urgent + name: ⚡ Réseau avant départ (P9) + - entity: input_select.victron_evcs_strategy + name: Stratégie EVCS + - entity: input_boolean.evcs_expiration_force_grid_enabled + name: └ ⏳ le réseau forcé expire tout seul + - entity: input_number.evcs_force_grid_max_minutes + name: " └ durée maximale" + - entity: input_text.evcs_force_grid_last_expiry + name: " └ dernière expiration" + - entity: input_boolean.victron_evcs_allow_grid_hc_night + name: Réseau HC nuit + - entity: input_boolean.victron_evcs_night_battery_charge + name: 🔋 Charge nuit sur batterie (P12) + - entity: input_boolean.victron_evcs_night_battery_done + name: └ surplus de la nuit épuisé + - entity: input_boolean.victron_evcs_allow_grid_hc_midday + name: Réseau HC midi + - entity: input_boolean.victron_evcs_surplus_auto_enabled + name: Contrôleur surplus actif + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Contexte énergie + subtitle: Batterie / PV / maison / réseau + + - type: custom:mushroom-template-card + primary: Contexte instantané + secondary: > + SOC {{ states('sensor.victron_battery_soc') | float(0) | round(1) }} % + • PV {{ states('sensor.victron_pv_power_system') | float(0) | round(0) }} W + • Maison {{ states('sensor.victron_consumption_power_l1') | float(0) | round(0) }} W + • Grid {{ states('sensor.victron_grid_power_l1') | float(0) | round(0) }} W + multiline_secondary: true + icon: mdi:home-lightning-bolt + icon_color: > + {% set pv = states('sensor.victron_pv_power_system') | float(0) %} + {% if pv < 300 %} grey + {% elif pv < 1500 %} yellow + {% else %} green + {% endif %} + + - type: entities + show_header_toggle: false + entities: + - entity: sensor.victron_battery_soc + name: SOC batterie + - entity: sensor.victron_battery_current + name: Courant batterie + - entity: sensor.victron_pv_power_system + name: Puissance PV + - entity: sensor.victron_consumption_power_l1 + name: Charges maison + - entity: sensor.victron_grid_power_l1 + name: Puissance réseau + - entity: switch.edf_general_ok_switch + name: Réseau EDF + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Actions rapides + subtitle: Contrôle direct EVCS + + - type: grid + columns: 2 + square: false + cards: + - type: custom:button-card + entity: switch.victron_evcs_charging + name: Charge + icon: mdi:ev-station + show_state: true + state_display: > + [[[ + if (!entity) return 'Inconnu'; + if (entity.state === 'on') return 'ON'; + if (entity.state === 'off') return 'OFF'; + return entity.state; + ]]] + tap_action: + action: toggle + hold_action: + action: more-info + styles: + card: + - border-radius: 18px + - padding: 12px + name: + - font-size: 15px + - font-weight: 600 + state: + - font-size: 12px + state: + - value: "on" + color: "#43a047" + - value: "off" + color: "#757575" + + - type: custom:button-card + entity: input_boolean.victron_evcs_surplus_auto_enabled + name: Contrôleur surplus + icon: mdi:robot + show_state: true + tap_action: + action: toggle + hold_action: + action: more-info + styles: + card: + - border-radius: 18px + - padding: 12px + name: + - font-size: 15px + - font-weight: 600 + state: + - font-size: 12px + state: + - value: "on" + color: "#26a69a" + - value: "off" + color: "#757575" + + - type: custom:button-card + entity: binary_sensor.victron_evcs_vehicle_connected + name: Véhicule + icon: mdi:car-electric + show_state: true + tap_action: + action: more-info + styles: + card: + - border-radius: 18px + - padding: 12px + name: + - font-size: 15px + - font-weight: 600 + state: + - font-size: 12px + state: + - value: "on" + color: "#1e88e5" + - value: "off" + color: "#757575" + + - type: custom:button-card + entity: number.victron_evcs_set_current_command + name: Courant demandé + icon: mdi:current-ac + show_state: true + tap_action: + action: more-info + hold_action: + action: more-info + styles: + card: + - border-radius: 18px + - padding: 12px + name: + - font-size: 15px + - font-weight: 600 + state: + - font-size: 12px + + - type: entities + title: Commandes manuelles + show_header_toggle: false + entities: + - entity: switch.victron_evcs_charging + name: Start / Stop charge + - entity: number.victron_evcs_set_current_command + name: Courant demandé + - entity: input_boolean.victron_evcs_charge_permission_now + name: Permission charge + - entity: input_boolean.victron_evcs_control_latch + name: Latch contrôle + - entity: switch.victron_evcs_auto_start + name: Auto Start borne (diagnostic) + + - type: horizontal-stack + cards: + - type: button + entity: script.evcs_boost_edf + name: ⚡ BOOST EDF 28A + icon: mdi:flash + icon_height: 60px + tap_action: + action: call-service + service: script.turn_on + target: + entity_id: script.evcs_boost_edf + - type: button + entity: script.evcs_boost_off + name: Retour normal + icon: mdi:flash-off + icon_height: 60px + tap_action: + action: call-service + service: script.turn_on + target: + entity_id: script.evcs_boost_off + + - type: entities + title: Plafonds courant EVCS + show_header_toggle: false + entities: + - entity: input_number.evcs_plafond_courant_edf_on + name: Plafond EDF ON (tous modes) + - entity: input_number.victron_evcs_current_max_auto_a + name: Plafond modes auto + + - title: Diagnostic + path: diagnostic + icon: mdi:stethoscope + cards: + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Diagnostic + subtitle: Identité / version / brut + + - type: entities + show_header_toggle: false + entities: + - entity: sensor.victron_evcs_product_name + name: Produit + - entity: sensor.victron_evcs_custom_name + name: Nom borne + - entity: sensor.victron_evcs_serial + name: Numéro de série + - entity: sensor.victron_evcs_firmware_version + name: Firmware + - entity: sensor.victron_evcs_connected_raw + name: Connected brut + - entity: sensor.victron_evcs_status_raw + name: Statut brut + - entity: sensor.victron_evcs_mode_raw + name: Mode brut + - entity: switch.victron_evcs_auto_start + name: Auto Start borne + - entity: input_datetime.victron_evcs_last_start_at + name: Dernier start + - entity: input_datetime.victron_evcs_last_stop_at + name: Dernier stop + - entity: input_datetime.victron_evcs_last_current_change_at + name: Dernier changement courant + - entity: input_datetime.victron_evcs_probe_started_at + name: Début probe + - entity: input_datetime.victron_evcs_cloud_debt_started_at + name: Début cloud debt + - entity: input_number.victron_evcs_cloud_debt_kwh + name: Cloud debt + - entity: input_text.victron_evcs_control_last_signature + name: Signature + - type: vertical-stack cards: - type: custom:mushroom-title-card