diff --git a/HA-COPIE-LISEZMOI.md b/HA-COPIE-LISEZMOI.md new file mode 100644 index 0000000..8c83c61 --- /dev/null +++ b/HA-COPIE-LISEZMOI.md @@ -0,0 +1,42 @@ +# Les fichiers Home Assistant versionnes ici sont des COPIES + +`packages/*.yaml`, `dashboards/*.yaml` et `ha-configuration.yaml` sont des +copies de ce que Home Assistant lit reellement dans +`/mnt/ARCH3/docker/HA/` (partage NFS de 10.10.10.17). + +⚠️ **LA SOURCE DE VERITE EST LE PARTAGE, PAS CE DEPOT.** C'est l'inverse exact +de `src/nodes/` — la, git gagne et `tools/n8n-push.mjs` ecrase n8n. Ici, HA +gagne : editer la copie du depot ne change RIEN a l'installation. + +Pour modifier un paquet ou une carte : + +1. editer le fichier dans `/mnt/ARCH3/docker/HA/`, apres sauvegarde + (`packages/SAVE/`, `SAVE_CONFIG/`) ; +2. recharger — `input_boolean.reload`, `input_number.reload`, + `input_text.reload`, `input_select.reload`, `input_datetime.reload`, + `template.reload` selon ce qui a bouge. Un redemarrage complet de HA n'est + necessaire que pour `configuration.yaml` ; +3. recopier ici et commiter, dans le meme mouvement. + + cp /mnt/ARCH3/docker/HA/packages/*.yaml packages/ + cp /mnt/ARCH3/docker/HA/dashboards/*.yaml dashboards/ + cp /mnt/ARCH3/docker/HA/configuration.yaml ha-configuration.yaml + +## Pourquoi les versionner alors qu'ils sont deja sauvegardes + +La sauvegarde HA quotidienne (§34) les couvre deja — 20 Mo, poussee sur +10.10.10.22 et 10.10.10.50. Elle protege contre la PERTE ; elle ne donne ni +historique, ni diff, ni le « qu'avons-nous change le 6 septembre, et +pourquoi ». C'est ce que git ajoute, et c'est ce qui manquait : le retrait des +`initial:` du 06/09, les helpers de la reserve d'orage, la politique batterie +dynamique, la carte du conseiller reecrite le 13/09 n'existaient qu'en un seul +exemplaire vivant, sans trace de leur evolution. + +## Ce qui n'est PAS ici, et ne doit pas y venir + +- `secrets.yaml`, `.storage/` — identifiants et etat interne ; +- la VALEUR de `input_text.evcs_balance_forecast_api_key` (le paquet n'en porte + que la DECLARATION, `mode: password` ; la valeur vit dans `.storage`) ; +- `packages/SAVE/` et `SAVE_CONFIG/` — sauvegardes locales avant modification, + c'est git qui joue ce role desormais ; +- `home-assistant_v2.db` — 4,4 Go d'historique, hors sujet ici. diff --git a/dashboards/ECS_DEBUG_REGLAGES.yaml b/dashboards/ECS_DEBUG_REGLAGES.yaml new file mode 100755 index 0000000..01c7baa --- /dev/null +++ b/dashboards/ECS_DEBUG_REGLAGES.yaml @@ -0,0 +1,286 @@ +- title: ECS Réglages & Debug + path: ecs-debug + icon: mdi:bug + cards: + - type: vertical-stack + cards: + - type: custom:mushroom-title-card + title: ECS - Réglages & Debug + subtitle: Analyse complète advisor / observer / protector + + - type: custom:mushroom-chips-card + chips: + - type: entity + entity: input_select.victron_water_heater_recommended_mode + name: Conseil + - type: entity + entity: input_text.victron_water_heater_observed_regime + name: Observé + - type: entity + entity: input_boolean.victron_evcs_priority_active + name: EVCS + icon_color: >- + {% if is_state('input_boolean.victron_evcs_priority_active','on') %} + red + {% else %} + grey + {% endif %} + - type: entity + entity: input_boolean.victron_water_heater_forced_off_by_advisor + name: Forced OFF + icon_color: >- + {% if is_state('input_boolean.victron_water_heater_forced_off_by_advisor','on') %} + red + {% else %} + grey + {% endif %} + - type: entity + entity: switch.tt_chauffe_eau_pleumeur_switch + name: Alim + + - type: custom:mushroom-template-card + primary: >- + ECS {{ states('input_select.victron_water_heater_recommended_mode')|upper }} + / {{ states('input_select.victron_water_heater_advice_color')|upper }} + secondary: >- + État: {{ states('input_text.victron_water_heater_advice_state') }} + {% if states('input_text.victron_water_heater_pending_user_action') not in ['','unknown','unavailable'] %} + • Action: {{ states('input_text.victron_water_heater_pending_user_action') }} + {% endif %} + icon: mdi:water-boiler-alert + icon_color: >- + {% set c = states('input_select.victron_water_heater_advice_color') %} + {% if c == 'green' %} + green + {% elif c == 'orange' %} + orange + {% else %} + red + {% endif %} + multiline_secondary: true + + - type: custom:mushroom-title-card + title: Capteurs bruts + subtitle: Contexte énergétique + + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-entity-card + entity: sensor.victron_battery_soc + name: SOC batterie + icon: mdi:battery + - type: custom:mushroom-entity-card + entity: sensor.victron_battery_current + name: Courant batterie + icon: mdi:current-dc + - type: custom:mushroom-entity-card + entity: sensor.victron_pv_power_system + name: PV instantané + icon: mdi:solar-power + - type: custom:mushroom-entity-card + entity: sensor.victron_pv_power_10m_avg + name: PV moyenne 10 min + icon: mdi:chart-bell-curve + - type: custom:mushroom-entity-card + entity: sensor.victron_consumption_power_l1 + name: Charge maison + icon: mdi:home-lightning-bolt + - type: custom:mushroom-entity-card + entity: sensor.victron_grid_power_l1 + name: Réseau + icon: mdi:transmission-tower + - type: custom:mushroom-entity-card + entity: switch.edf_general_ok_switch + name: Commande EDF + icon: mdi:flash + - type: custom:mushroom-entity-card + entity: sensor.victron_ac_in1_available + name: AC-IN disponible + icon: mdi:power-plug + - type: custom:mushroom-entity-card + entity: sensor.energy_production_today_remaining + name: Prod restante jour + icon: mdi:weather-sunny + - type: custom:mushroom-entity-card + entity: sensor.energy_production_tomorrow + name: Prod demain + icon: mdi:weather-partly-cloudy + + - type: custom:mushroom-title-card + title: Chauffe-eau réel + subtitle: Observation runtime + + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-entity-card + entity: switch.tt_chauffe_eau_pleumeur_switch + name: Alim ECS + icon: mdi:water-boiler + - type: custom:mushroom-entity-card + entity: sensor.tt_chauffe_eau_pleumeur_energie_totale + name: Énergie totale ECS + icon: mdi:counter + - type: custom:mushroom-entity-card + entity: input_number.victron_water_heater_observed_power_w + name: Puissance observée + icon: mdi:flash + - type: custom:mushroom-entity-card + entity: input_text.victron_water_heater_observed_regime + name: Régime observé + icon: mdi:eye + - type: custom:mushroom-entity-card + entity: input_number.victron_water_heater_energy_total_prev_kwh + name: Énergie précédente + icon: mdi:history + - type: custom:mushroom-entity-card + entity: input_datetime.victron_water_heater_energy_prev_at + name: Échantillon précédent + icon: mdi:clock-outline + + - type: custom:mushroom-title-card + title: Decision engine + subtitle: Sortie advisor + + - type: entities + entities: + - entity: input_select.victron_water_heater_recommended_mode + name: Mode recommandé + - entity: input_select.victron_water_heater_advice_color + name: Couleur conseil + - entity: input_text.victron_water_heater_advice_state + name: État advisor + - entity: input_text.victron_water_heater_advice_reason + name: Raison courte + - entity: input_number.victron_water_heater_projected_end_of_day_soc + name: SOC projeté fin de jour + - entity: input_number.victron_water_heater_budget_margin_kwh + name: Marge budget + - entity: input_number.victron_load_water_heater_kwh + name: Charge retenue + - entity: input_text.victron_water_heater_advice_last_signature + name: Signature + + - type: custom:mushroom-title-card + title: Action humaine / protection + subtitle: Mismatch, délai, coupure + + - type: entities + entities: + - entity: input_text.victron_water_heater_pending_user_action + name: Action utilisateur attendue + - entity: input_datetime.victron_water_heater_mode_mismatch_since + name: Mismatch depuis + - entity: input_boolean.victron_water_heater_forced_off_by_advisor + name: Coupé par advisor + - entity: input_text.victron_water_heater_forced_off_reason + name: Raison coupure + - entity: input_datetime.victron_water_heater_forced_off_at + name: Coupé à + - entity: input_number.victron_water_heater_mode_mismatch_delay_min + name: Délai mismatch + - entity: input_number.victron_water_heater_restore_surplus_w + name: Surplus mini restauration + + - type: custom:mushroom-title-card + title: Intégration EVCS + subtitle: Priorité globale maison + + - type: entities + entities: + - entity: input_boolean.victron_evcs_priority_active + name: EVCS prioritaire + - entity: input_select.victron_energy_priority_mode + name: Mode priorité énergie + - entity: input_text.victron_energy_priority_reason + name: Raison priorité + - entity: input_datetime.victron_evcs_priority_until + name: Priorité jusqu'à + + - type: custom:mushroom-title-card + title: Réglages usage ECS + subtitle: Demande, horaires, politique + + - type: entities + entities: + - entity: input_boolean.victron_water_heater_advisor_enabled + name: Advisor activé + - entity: input_boolean.victron_water_heater_notifications + name: Notifications + - entity: input_select.victron_water_heater_hot_water_demand + name: Demande ECS + - entity: input_boolean.victron_water_heater_morning_boost_priority_enabled + name: Priorité boost matin + - entity: input_datetime.victron_water_heater_morning_boost_latest_time + name: Heure max boost matin + - entity: input_datetime.victron_water_heater_late_red_time + name: Heure red tardive + - entity: input_datetime.victron_flexible_day_start_time + name: Début fenêtre jour + - entity: input_datetime.victron_flexible_day_stop_time + name: Fin fenêtre jour + + - type: custom:mushroom-title-card + title: Réglages énergie + subtitle: Seuils et garde-fous + + - type: entities + entities: + - entity: input_number.victron_water_heater_green_power_w + name: Green W + - entity: input_number.victron_water_heater_auto_power_w + name: Auto W + - entity: input_number.victron_water_heater_boost_power_w + name: Boost W + - entity: input_number.victron_water_heater_strong_forecast_kwh + name: Forecast fort + - entity: input_number.victron_water_heater_medium_forecast_kwh + name: Forecast moyen + - entity: input_number.victron_water_heater_strong_pv_now_w + name: PV fort + - entity: input_number.victron_water_heater_medium_pv_now_w + name: PV moyen + - entity: input_number.victron_water_heater_morning_boost_min_soc_strong_day + name: SOC mini boost matin jour fort + - entity: input_number.victron_water_heater_boost_min_soc_medium_day + name: SOC mini boost jour moyen + - entity: input_number.victron_water_heater_end_of_day_soc_guard + name: Garde SOC fin de jour + - entity: input_number.victron_end_of_day_soc_target + name: Cible SOC fin de jour + - entity: input_number.victron_base_load_remaining_kwh + name: Base load restante + - entity: input_number.victron_flexible_safety_margin_kwh + name: Marge sécurité + - entity: input_number.victron_ac_loads_max_safe_w + name: Charge AC max safe + + - type: history-graph + title: ECS - Puissance / PV / Maison + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: input_number.victron_water_heater_observed_power_w + name: ECS observé + - entity: sensor.victron_pv_power_system + name: PV + - entity: sensor.victron_consumption_power_l1 + name: Maison + - entity: sensor.victron_grid_power_l1 + name: Réseau + + - type: history-graph + title: ECS - États / protection + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: switch.tt_chauffe_eau_pleumeur_switch + name: Alim ECS + - entity: input_boolean.victron_water_heater_forced_off_by_advisor + name: Forced OFF + - entity: input_boolean.victron_evcs_priority_active + name: EVCS prioritaire + diff --git a/dashboards/ECS_DEBUG_REGLAGES_PREMIUM.yaml b/dashboards/ECS_DEBUG_REGLAGES_PREMIUM.yaml new file mode 100755 index 0000000..933f4ec --- /dev/null +++ b/dashboards/ECS_DEBUG_REGLAGES_PREMIUM.yaml @@ -0,0 +1,324 @@ +title: ECS Debug Réglages Premium +views: + - title: ECS Debug Premium + path: ecs-debug-premium + icon: mdi:bug + cards: + - type: vertical-stack + cards: + - type: custom:mushroom-title-card + title: ECS Réglages & Debug + subtitle: Advisor + Observer + Protection + EVCS + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-chips-card + chips: + - type: entity + entity: input_select.victron_water_heater_recommended_mode + name: Conseil + - type: entity + entity: input_text.victron_water_heater_observed_regime + name: Observé + - type: entity + entity: input_boolean.victron_evcs_priority_active + name: EVCS + icon_color: >- + {% if is_state('input_boolean.victron_evcs_priority_active','on') %} + red + {% else %} + grey + {% endif %} + - type: entity + entity: input_boolean.victron_water_heater_forced_off_by_advisor + name: Forced OFF + icon_color: >- + {% if is_state('input_boolean.victron_water_heater_forced_off_by_advisor','on') %} + red + {% else %} + grey + {% endif %} + - type: entity + entity: switch.tt_chauffe_eau_pleumeur_switch + name: Alim + - type: entity + entity: input_boolean.victron_water_heater_advisor_enabled + name: Advisor + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-template-card + entity: input_text.victron_water_heater_advice_state + primary: >- + ECS {{ states('input_select.victron_water_heater_recommended_mode')|upper }} + / {{ states('input_select.victron_water_heater_advice_color')|upper }} + secondary: >- + État: {{ states('input_text.victron_water_heater_advice_state') }} + {% if states('input_text.victron_water_heater_pending_user_action') not in ['','unknown','unavailable'] %} + • Action: {{ states('input_text.victron_water_heater_pending_user_action') }} + {% endif %} + icon: mdi:water-boiler-alert + icon_color: >- + {% set c = states('input_select.victron_water_heater_advice_color') %} + {% if c == 'green' %} + green + {% elif c == 'orange' %} + orange + {% else %} + red + {% endif %} + multiline_secondary: true + + - type: custom:mushroom-title-card + title: Capteurs bruts + subtitle: Contexte énergétique réel + + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-entity-card + entity: sensor.victron_battery_soc + name: SOC batterie + icon: mdi:battery + + - type: custom:mushroom-entity-card + entity: sensor.victron_battery_current + name: Courant batterie + icon: mdi:current-dc + + - type: custom:mushroom-entity-card + entity: sensor.victron_pv_power_system + name: PV instantané + icon: mdi:solar-power + + - type: custom:mushroom-entity-card + entity: sensor.victron_pv_power_10m_avg + name: PV moyen 10 min + icon: mdi:chart-bell-curve + + - type: custom:mushroom-entity-card + entity: sensor.victron_consumption_power_l1 + name: Charge maison + icon: mdi:home-lightning-bolt + + - type: custom:mushroom-entity-card + entity: sensor.victron_grid_power_l1 + name: Réseau + icon: mdi:transmission-tower + + - type: custom:mushroom-entity-card + entity: switch.edf_general_ok_switch + name: Commande EDF + icon: mdi:flash + + - type: custom:mushroom-entity-card + entity: sensor.victron_ac_in1_available + name: AC-IN dispo + icon: mdi:power-plug + + - type: custom:mushroom-entity-card + entity: sensor.energy_production_today_remaining + name: Prod restante jour + icon: mdi:weather-sunny + + - type: custom:mushroom-entity-card + entity: sensor.energy_production_tomorrow + name: Prod demain + icon: mdi:weather-partly-cloudy + + - type: custom:mushroom-title-card + title: Chauffe-eau observé + subtitle: Runtime réel + + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-entity-card + entity: switch.tt_chauffe_eau_pleumeur_switch + name: Alim ECS + icon: mdi:water-boiler + + - type: custom:mushroom-entity-card + entity: sensor.tt_chauffe_eau_pleumeur_energie_totale + name: Énergie totale ECS + icon: mdi:counter + + - type: custom:mushroom-entity-card + entity: input_number.victron_water_heater_observed_power_w + name: Puissance observée + icon: mdi:flash + + - type: custom:mushroom-entity-card + entity: input_text.victron_water_heater_observed_regime + name: Régime observé + icon: mdi:eye + + - type: custom:mushroom-entity-card + entity: input_number.victron_water_heater_energy_total_prev_kwh + name: Énergie précédente + icon: mdi:history + + - type: custom:mushroom-entity-card + entity: input_datetime.victron_water_heater_energy_prev_at + name: Échantillon précédent + icon: mdi:clock-outline + + - type: custom:mushroom-title-card + title: Sortie advisor + subtitle: Décision calculée + + - type: custom:vertical-stack-in-card + cards: + - type: entities + entities: + - entity: input_select.victron_water_heater_recommended_mode + name: Mode recommandé + - entity: input_select.victron_water_heater_advice_color + name: Couleur conseil + - entity: input_text.victron_water_heater_advice_state + name: État advisor + - entity: input_text.victron_water_heater_advice_reason + name: Raison + - entity: input_number.victron_water_heater_projected_end_of_day_soc + name: SOC projeté fin de jour + - entity: input_number.victron_water_heater_budget_margin_kwh + name: Marge budget + - entity: input_number.victron_load_water_heater_kwh + name: Charge retenue + - entity: input_text.victron_water_heater_advice_last_signature + name: Signature + + - type: custom:mushroom-title-card + title: Mismatch & protection + subtitle: Interaction humaine + sécurité EVCS + + - type: custom:vertical-stack-in-card + cards: + - type: entities + entities: + - entity: input_text.victron_water_heater_pending_user_action + name: Action utilisateur attendue + - entity: input_datetime.victron_water_heater_mode_mismatch_since + name: Mismatch depuis + - entity: input_boolean.victron_water_heater_forced_off_by_advisor + name: Coupé par advisor + - entity: input_text.victron_water_heater_forced_off_reason + name: Raison coupure + - entity: input_datetime.victron_water_heater_forced_off_at + name: Coupé à + - entity: input_number.victron_water_heater_mode_mismatch_delay_min + name: Délai mismatch + - entity: input_number.victron_water_heater_restore_surplus_w + name: Surplus mini restauration + + - type: custom:mushroom-title-card + title: Intégration EVCS + subtitle: Priorité maison globale + + - type: custom:vertical-stack-in-card + cards: + - type: entities + entities: + - entity: input_boolean.victron_evcs_priority_active + name: EVCS prioritaire + - entity: input_select.victron_energy_priority_mode + name: Mode priorité énergie + - entity: input_text.victron_energy_priority_reason + name: Raison priorité + - entity: input_datetime.victron_evcs_priority_until + name: Priorité jusqu'à + + - type: custom:mushroom-title-card + title: Réglages usage ECS + subtitle: Demande, horaires, politique + + - type: custom:vertical-stack-in-card + cards: + - type: entities + entities: + - entity: input_boolean.victron_water_heater_advisor_enabled + name: Advisor activé + - entity: input_boolean.victron_water_heater_notifications + name: Notifications + - entity: input_select.victron_water_heater_hot_water_demand + name: Demande ECS + - entity: input_boolean.victron_water_heater_morning_boost_priority_enabled + name: Priorité boost matin + - entity: input_datetime.victron_water_heater_morning_boost_latest_time + name: Heure max boost matin + - entity: input_datetime.victron_water_heater_late_red_time + name: Heure red tardive + - entity: input_datetime.victron_flexible_day_start_time + name: Début fenêtre jour + - entity: input_datetime.victron_flexible_day_stop_time + name: Fin fenêtre jour + + - type: custom:mushroom-title-card + title: Réglages énergie + subtitle: Seuils et garde-fous + + - type: custom:vertical-stack-in-card + cards: + - type: entities + entities: + - entity: input_number.victron_water_heater_green_power_w + name: Green W + - entity: input_number.victron_water_heater_auto_power_w + name: Auto W + - entity: input_number.victron_water_heater_boost_power_w + name: Boost W + - entity: input_number.victron_water_heater_strong_forecast_kwh + name: Forecast fort + - entity: input_number.victron_water_heater_medium_forecast_kwh + name: Forecast moyen + - entity: input_number.victron_water_heater_strong_pv_now_w + name: PV fort + - entity: input_number.victron_water_heater_medium_pv_now_w + name: PV moyen + - entity: input_number.victron_water_heater_morning_boost_min_soc_strong_day + name: SOC mini boost matin jour fort + - entity: input_number.victron_water_heater_boost_min_soc_medium_day + name: SOC mini boost jour moyen + - entity: input_number.victron_water_heater_end_of_day_soc_guard + name: Garde SOC fin de jour + - entity: input_number.victron_end_of_day_soc_target + name: Cible SOC fin de jour + - entity: input_number.victron_base_load_remaining_kwh + name: Base load restante + - entity: input_number.victron_flexible_safety_margin_kwh + name: Marge sécurité + - entity: input_number.victron_ac_loads_max_safe_w + name: Charge AC max safe + + - type: custom:mushroom-title-card + title: Historique + subtitle: Visualisation rapide 24h + + - type: history-graph + title: ECS / PV / Maison + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: input_number.victron_water_heater_observed_power_w + name: ECS observé + - entity: sensor.victron_pv_power_system + name: PV + - entity: sensor.victron_consumption_power_l1 + name: Maison + - entity: sensor.victron_grid_power_l1 + name: Réseau + + - type: history-graph + title: États / protection + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: switch.tt_chauffe_eau_pleumeur_switch + name: Alim ECS + - entity: input_boolean.victron_water_heater_forced_off_by_advisor + name: Forced OFF + - entity: input_boolean.victron_evcs_priority_active + name: EVCS prioritaire + diff --git a/dashboards/ECS_PILOTAGE.yaml b/dashboards/ECS_PILOTAGE.yaml new file mode 100755 index 0000000..e6fa44f --- /dev/null +++ b/dashboards/ECS_PILOTAGE.yaml @@ -0,0 +1,170 @@ +i- title: ECS Pilotage + path: ecs-pilotage + icon: mdi:water-boiler + cards: + - type: vertical-stack + cards: + - type: custom:mushroom-title-card + title: Chauffe-eau thermodynamique + subtitle: Pilotage quotidien ECS + + - type: custom:mushroom-chips-card + chips: + - type: entity + entity: switch.tt_chauffe_eau_pleumeur_switch + name: Alim ECS + icon_color: >- + {% if is_state('switch.tt_chauffe_eau_pleumeur_switch','on') %} + green + {% else %} + grey + {% endif %} + - type: entity + entity: input_select.victron_water_heater_recommended_mode + name: Conseil + - type: entity + entity: input_select.victron_water_heater_advice_color + name: Couleur + - type: entity + entity: input_text.victron_water_heater_observed_regime + name: Régime + - type: entity + entity: input_boolean.victron_evcs_priority_active + name: EVCS + icon_color: >- + {% if is_state('input_boolean.victron_evcs_priority_active','on') %} + red + {% else %} + grey + {% endif %} + + - type: custom:mushroom-template-card + primary: >- + {% set mode = states('input_select.victron_water_heater_recommended_mode') %} + {% set color = states('input_select.victron_water_heater_advice_color') %} + Conseil ECS : {{ mode|upper }} / {{ color|upper }} + secondary: >- + {{ states('input_text.victron_water_heater_advice_state') }} + icon: mdi:water-boiler + icon_color: >- + {% set c = states('input_select.victron_water_heater_advice_color') %} + {% if c == 'green' %} + green + {% elif c == 'orange' %} + orange + {% else %} + red + {% endif %} + multiline_secondary: true + tap_action: + action: more-info + entity: input_text.victron_water_heater_advice_state + + - type: horizontal-stack + cards: + - type: custom:mushroom-entity-card + entity: input_number.victron_water_heater_observed_power_w + name: Puissance observée + icon: mdi:flash + icon_color: amber + - type: custom:mushroom-entity-card + entity: sensor.tt_chauffe_eau_pleumeur_energie_totale + name: Compteur ECS + icon: mdi:counter + icon_color: blue + + - type: horizontal-stack + cards: + - type: custom:mushroom-entity-card + entity: input_number.victron_water_heater_projected_end_of_day_soc + name: SOC projeté + icon: mdi:battery + icon_color: green + - type: custom:mushroom-entity-card + entity: input_number.victron_water_heater_budget_margin_kwh + name: Marge budget + icon: mdi:scale-balance + icon_color: >- + {% if states('input_number.victron_water_heater_budget_margin_kwh')|float(0) >= 0 %} + green + {% else %} + red + {% endif %} + + - type: custom:mushroom-entity-card + entity: input_select.victron_water_heater_hot_water_demand + name: Demande ECS + icon: mdi:shower + icon_color: blue + + - type: conditional + conditions: + - entity: input_boolean.victron_evcs_priority_active + state: "on" + card: + type: custom:mushroom-template-card + entity: input_boolean.victron_evcs_priority_active + primary: EVCS prioritaire + secondary: >- + {{ states('input_text.victron_energy_priority_reason') }} + {% if states('input_datetime.victron_evcs_priority_until') not in ['unknown','unavailable',''] %} + • jusqu'à {{ states('input_datetime.victron_evcs_priority_until') }} + {% endif %} + icon: mdi:car-electric + icon_color: red + multiline_secondary: true + + - type: conditional + conditions: + - entity: input_text.victron_water_heater_pending_user_action + state_not: "" + card: + type: custom:mushroom-template-card + entity: input_text.victron_water_heater_pending_user_action + primary: Action utilisateur conseillée + secondary: "{{ states('input_text.victron_water_heater_pending_user_action') }}" + icon: mdi:account-alert + icon_color: orange + multiline_secondary: true + + - type: conditional + conditions: + - entity: input_boolean.victron_water_heater_forced_off_by_advisor + state: "on" + card: + type: custom:mushroom-template-card + entity: input_boolean.victron_water_heater_forced_off_by_advisor + primary: ECS coupé par l'advisor + secondary: >- + {{ states('input_text.victron_water_heater_forced_off_reason') }} + icon: mdi:power-plug-off + icon_color: red + multiline_secondary: true + + - type: custom:mushroom-entity-card + entity: switch.tt_chauffe_eau_pleumeur_switch + name: Alimentation chauffe-eau + icon: mdi:power + icon_color: >- + {% if is_state('switch.tt_chauffe_eau_pleumeur_switch','on') %} + green + {% else %} + grey + {% endif %} + tap_action: + action: toggle + + - type: entities + title: Détail rapide + entities: + - entity: input_text.victron_water_heater_advice_reason + name: Raison + - entity: input_text.victron_water_heater_observed_regime + name: Régime observé + - entity: input_number.victron_load_water_heater_kwh + name: Charge ECS retenue + - entity: input_boolean.victron_water_heater_advisor_enabled + name: Advisor activé + - entity: input_boolean.victron_water_heater_notifications + name: Notifications + diff --git a/dashboards/ECS_PILOTAGE_PREMIUM.yaml b/dashboards/ECS_PILOTAGE_PREMIUM.yaml new file mode 100755 index 0000000..632959d --- /dev/null +++ b/dashboards/ECS_PILOTAGE_PREMIUM.yaml @@ -0,0 +1,244 @@ +title: ECS Pilotage Premium +views: + - title: ECS Premium + path: ecs-premium + icon: mdi:water-boiler + cards: + - type: vertical-stack + cards: + - type: custom:mushroom-title-card + title: Chauffe-eau thermodynamique + subtitle: Pilotage intelligent ECS / EVCS + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-chips-card + chips: + - type: entity + entity: switch.tt_chauffe_eau_pleumeur_switch + name: ECS + icon_color: >- + {% if is_state('switch.tt_chauffe_eau_pleumeur_switch','on') %} + green + {% else %} + grey + {% endif %} + - type: entity + entity: input_select.victron_water_heater_recommended_mode + name: Conseil + - type: entity + entity: input_select.victron_water_heater_advice_color + name: Couleur + - type: entity + entity: input_text.victron_water_heater_observed_regime + name: Régime + - type: entity + entity: input_boolean.victron_evcs_priority_active + name: EVCS + icon_color: >- + {% if is_state('input_boolean.victron_evcs_priority_active','on') %} + red + {% else %} + grey + {% endif %} + - type: entity + entity: input_boolean.victron_water_heater_forced_off_by_advisor + name: Protection + icon_color: >- + {% if is_state('input_boolean.victron_water_heater_forced_off_by_advisor','on') %} + red + {% else %} + grey + {% endif %} + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-template-card + entity: input_text.victron_water_heater_advice_state + primary: >- + {% set mode = states('input_select.victron_water_heater_recommended_mode') %} + {% set color = states('input_select.victron_water_heater_advice_color') %} + Conseil ECS : {{ mode|upper }} / {{ color|upper }} + secondary: >- + {{ states('input_text.victron_water_heater_advice_state') }} + icon: mdi:water-boiler + icon_color: >- + {% set c = states('input_select.victron_water_heater_advice_color') %} + {% if c == 'green' %} + green + {% elif c == 'orange' %} + orange + {% else %} + red + {% endif %} + multiline_secondary: true + tap_action: + action: more-info + + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-entity-card + entity: input_number.victron_water_heater_observed_power_w + name: Puissance observée + icon: mdi:flash + icon_color: amber + + - type: custom:mushroom-entity-card + entity: sensor.tt_chauffe_eau_pleumeur_energie_totale + name: Compteur ECS + icon: mdi:counter + icon_color: blue + + - type: custom:mushroom-entity-card + entity: input_number.victron_water_heater_projected_end_of_day_soc + name: SOC projeté + icon: mdi:battery + icon_color: green + + - type: custom:mushroom-template-card + entity: input_number.victron_water_heater_budget_margin_kwh + primary: Marge budget + secondary: "{{ states('input_number.victron_water_heater_budget_margin_kwh') }} kWh" + icon: mdi:scale-balance + icon_color: >- + {% if states('input_number.victron_water_heater_budget_margin_kwh')|float(0) >= 0 %} + green + {% else %} + red + {% endif %} + + - type: conditional + conditions: + - entity: input_boolean.victron_evcs_priority_active + state: "on" + card: + type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-template-card + entity: input_boolean.victron_evcs_priority_active + primary: EVCS prioritaire + secondary: >- + {{ states('input_text.victron_energy_priority_reason') }} + {% set until = states('input_datetime.victron_evcs_priority_until') %} + {% if until not in ['unknown','unavailable',''] %} + • jusqu'à {{ until }} + {% endif %} + icon: mdi:car-electric + icon_color: red + multiline_secondary: true + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-template-card + entity: input_text.victron_water_heater_pending_user_action + primary: >- + {% if states('input_text.victron_water_heater_pending_user_action') not in ['','unknown','unavailable'] %} + Action utilisateur conseillée + {% else %} + Aucune action utilisateur + {% endif %} + secondary: >- + {% set a = states('input_text.victron_water_heater_pending_user_action') %} + {% if a not in ['','unknown','unavailable'] %} + {{ a }} + {% else %} + Rien à faire pour le moment. + {% endif %} + icon: mdi:account-alert + icon_color: >- + {% set a = states('input_text.victron_water_heater_pending_user_action') %} + {% if a not in ['','unknown','unavailable'] %} + orange + {% else %} + green + {% endif %} + multiline_secondary: true + + - type: conditional + conditions: + - entity: input_boolean.victron_water_heater_forced_off_by_advisor + state: "on" + card: + type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-template-card + entity: input_boolean.victron_water_heater_forced_off_by_advisor + primary: Chauffe-eau temporairement coupé + secondary: >- + {{ states('input_text.victron_water_heater_forced_off_reason') }} + icon: mdi:power-plug-off + icon_color: red + multiline_secondary: true + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Commandes rapides + subtitle: Actions quotidiennes + + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-entity-card + entity: switch.tt_chauffe_eau_pleumeur_switch + name: Alimentation ECS + icon: mdi:power + tap_action: + action: toggle + icon_color: >- + {% if is_state('switch.tt_chauffe_eau_pleumeur_switch','on') %} + green + {% else %} + grey + {% endif %} + + - type: custom:mushroom-entity-card + entity: input_select.victron_water_heater_hot_water_demand + name: Demande ECS + icon: mdi:shower + icon_color: blue + + - type: custom:mushroom-entity-card + entity: input_boolean.victron_water_heater_advisor_enabled + name: Advisor ECS + icon: mdi:robot + tap_action: + action: toggle + icon_color: >- + {% if is_state('input_boolean.victron_water_heater_advisor_enabled','on') %} + green + {% else %} + grey + {% endif %} + + - type: custom:mushroom-entity-card + entity: input_boolean.victron_water_heater_notifications + name: Notifications + icon: mdi:bell + tap_action: + action: toggle + icon_color: >- + {% if is_state('input_boolean.victron_water_heater_notifications','on') %} + amber + {% else %} + grey + {% endif %} + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Détail rapide + subtitle: Lecture immédiate + + - type: entities + entities: + - entity: input_text.victron_water_heater_advice_reason + name: Raison + - entity: input_text.victron_water_heater_observed_regime + name: Régime observé + - entity: input_number.victron_load_water_heater_kwh + name: Charge ECS retenue + diff --git a/dashboards/EVCS_SOLAR.yaml b/dashboards/EVCS_SOLAR.yaml new file mode 100755 index 0000000..e5e64ac --- /dev/null +++ b/dashboards/EVCS_SOLAR.yaml @@ -0,0 +1,148 @@ +title: EVCS & Solar Dashboard +views: + - panel: false + path: evcs_solar_hub + badges: [] + cards: + # --- HEADER & INFO GÉNÉRALE --- + - type: custom:grid-layout + grid-template-columns: 1fr 2fr 1fr + grid-template-rows: auto auto + grid-template-areas: | + "header header header" + "stats stats stats" + cards: + # 1. Titre et Logo (Gauche) + - type: custom:grid-item + grid-column: 1 / 2 + grid-row: 1 / 3 + card: + type: custom:button-card + entity: sensor.solar_production_daily + show_state: true + show_label: true + label: Installation + tap_action: + action: more-info + color_type: card + styles: + card: + - background-color: transparent + - border-radius: 8px + - padding: 10px + - border: 1px solid rgba(0,0,0,0.1) + - display: flex + - flex-direction: column + - align-items: center + - justify-content: center + - height: 100% + - text-align: center + tap: + action: none + + # 2. Statistiques (Droite) + - type: custom:grid-item + grid-column: 3 / 4 + grid-row: 1 / 3 + card: + type: entities + title: "" + entities: + - entity: sensor.weather_temperature + name: Température + - entity: sensor.weather_condition + name: Météo + - entity: sensor.internet_status + name: Internet + + # --- ZONE CENTRALE (STATUS BATTERIE & CONSOMMATION) --- + # On utilise une grille 3 colonnes pour séparer la batterie, la charge (EV) et le réseau + - type: grid + columns: 3 + cards: + # CARTE GAUCHE : BATTERIE & RÉSEAU + - type: entities + entities: + - type: divider + - entity: sensor.battery_voltage + name: État Décharge (62.0%) + show_state: true + show_icon: true + show_unit_of_measurement: false + - entity: sensor.battery_power + name: Courant + show_state: true + - entity: sensor.battery_temperature + name: Température + - type: divider + - entity: binary_sensor.network_status + name: Réseau + state: + - value: 'off' + attributes: + - state: true + color: red + name: Connecté + - entity: sensor.solar_production_now + name: Production PV + show_state: true + + # CARTE CENTRE : CHARGEUR EV + - type: entities + entities: + - type: divider + - entity: binary_sensor.ev_charge_state + name: Chargeur VE + show_state: true + - entity: number.ev_max_current_setting + name: Courant Max (Manual) + show_state: true + - entity: sensor.ev_charge_duration + name: Temps restant + show_state: true + - entity: sensor.ev_charging_energy_total + name: Énergie Totale (7kWh) + + # CARTE DROITE : GRID & MPPT (SIMULÉ) + - type: entities + entities: + - type: divider + - entity: sensor.ac_loads_power + name: Charges CA (703 W) + show_state: true + - entity: sensor.frequency_hz + name: Fréquence + show_state: true + - entity: sensor.mppt_current + name: MPPT (PV) + show_state: true + + # --- ZONE GRAPHIQUES DU BAS --- + - type: custom:vertical-stack-in-card + cards: + # Courbe de consommation / production + - type: custom:mini-graph-card + entities: + - entity: sensor.solar_production + - entity: sensor.power_consumption + show: + state: false + labels: false + labels_secondary: false + icons: false + name: false + legend: true + hours_to_show: 24 + show: + points: false + graph: line + # Prévisions (Barres - simplifiées ici) + - type: custom:mini-graph-card + entities: + - entity: sensor.solar_production_forecast + show: + legend: false + hours_to_show: 24 + show: + points: false + graph: bar diff --git a/dashboards/GARAGE_DEBUG_PREMIUM.yaml b/dashboards/GARAGE_DEBUG_PREMIUM.yaml new file mode 100755 index 0000000..4bc586a --- /dev/null +++ b/dashboards/GARAGE_DEBUG_PREMIUM.yaml @@ -0,0 +1,223 @@ +title: Garage Debug Premium +views: + - title: Garage Debug Premium + path: garage-debug-premium + icon: mdi:bug + cards: + - type: vertical-stack + cards: + - type: custom:mushroom-title-card + title: Garage / Clim - Réglages & Debug + subtitle: Analyse complète automate garage + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-chips-card + chips: + - type: entity + entity: switch.clim_hygro_socket_1 + name: Sortie + - type: entity + entity: input_boolean.garage_clim_surplus_auto_enabled + name: Auto + - type: entity + entity: input_boolean.garage_clim_latch + name: Latch + - type: entity + entity: input_text.garage_clim_state + name: State + - type: entity + entity: input_boolean.victron_evcs_priority_active + name: EVCS + icon_color: >- + {% if is_state('input_boolean.victron_evcs_priority_active','on') %} + red + {% else %} + grey + {% endif %} + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-template-card + entity: input_text.garage_clim_state + primary: >- + Garage : {{ states('input_text.garage_clim_state') }} + secondary: >- + {{ states('input_text.garage_clim_reason') }} + icon: mdi:garage-variant + icon_color: >- + {% if is_state('switch.clim_hygro_socket_1','on') %} + blue + {% elif is_state('input_boolean.victron_evcs_priority_active','on') %} + red + {% else %} + grey + {% endif %} + multiline_secondary: true + + - type: custom:mushroom-title-card + title: Capteurs bruts + subtitle: Température et énergie + + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-entity-card + entity: sensor.garage_t_temperature + name: Température garage + icon: mdi:thermometer + + - type: custom:mushroom-entity-card + entity: switch.clim_hygro_socket_1 + name: Sortie clim/hygro + icon: mdi:air-conditioner + + - type: custom:mushroom-entity-card + entity: sensor.victron_battery_soc + name: SOC batterie + icon: mdi:battery + + - type: custom:mushroom-entity-card + entity: sensor.victron_battery_current + name: Courant batterie + icon: mdi:current-dc + + - type: custom:mushroom-entity-card + entity: sensor.victron_pv_power_system + name: PV instantané + icon: mdi:solar-power + + - type: custom:mushroom-entity-card + entity: sensor.victron_pv_power_10m_avg + name: PV moyen 10 min + icon: mdi:chart-bell-curve + + - type: custom:mushroom-entity-card + entity: sensor.victron_consumption_power_l1 + name: Charge maison + icon: mdi:home-lightning-bolt + + - type: custom:mushroom-entity-card + entity: sensor.victron_grid_power_l1 + name: Réseau + icon: mdi:transmission-tower + + - type: custom:mushroom-entity-card + entity: switch.edf_general_ok_switch + name: Commande EDF + icon: mdi:flash + + - type: custom:mushroom-entity-card + entity: sensor.victron_ac_in1_available + name: AC-IN dispo + icon: mdi:power-plug + + - type: custom:mushroom-entity-card + entity: sensor.energy_production_today_remaining + name: Prod restante + icon: mdi:weather-sunny + + - type: custom:mushroom-title-card + title: État automate + subtitle: Décision et mémoire + + - type: custom:vertical-stack-in-card + cards: + - type: entities + entities: + - entity: input_text.garage_clim_state + name: State + - entity: input_text.garage_clim_reason + name: Reason + - entity: input_text.garage_clim_last_signature + name: Signature + - entity: input_boolean.garage_clim_latch + name: Latch + - entity: input_datetime.garage_clim_last_on_at + name: Dernier ON + - entity: input_datetime.garage_clim_last_off_at + name: Dernier OFF + + - type: custom:mushroom-title-card + title: Réglages garage + subtitle: Seuils et fenêtres + + - type: custom:vertical-stack-in-card + cards: + - type: entities + entities: + - entity: input_boolean.garage_clim_surplus_auto_enabled + name: Auto garage + - entity: input_boolean.garage_clim_surplus_notifications + name: Notifications + - entity: input_boolean.garage_clim_manual_adopt_enabled + name: Adoption manuelle + - entity: input_number.garage_temp_min_c + name: Temp mini + - entity: input_number.garage_temp_max_c + name: Temp maxi + - entity: input_number.garage_clim_soc_on + name: SOC ON + - entity: input_number.garage_clim_soc_off + name: SOC OFF + - entity: input_number.garage_clim_pv_on_w + name: PV ON + - entity: input_number.garage_clim_pv_off_w + name: PV OFF + - entity: input_number.garage_clim_surplus_min_kwh + name: Surplus mini + - entity: input_number.garage_clim_min_on_minutes + name: Mini ON + - entity: input_number.garage_clim_min_off_minutes + name: Mini OFF + - entity: input_number.garage_clim_battery_discharge_stop_a + name: Stop décharge batterie + - entity: input_number.garage_clim_house_ac_max_w + name: Charge maison max + - entity: input_datetime.garage_clim_start_time + name: Début fenêtre + - entity: input_datetime.garage_clim_stop_time + name: Fin fenêtre + + - type: custom:mushroom-title-card + title: Priorité EVCS + subtitle: Arbitrage global + + - type: custom:vertical-stack-in-card + cards: + - type: entities + entities: + - entity: input_boolean.victron_evcs_priority_active + name: EVCS prioritaire + - entity: input_select.victron_energy_priority_mode + name: Mode priorité énergie + - entity: input_text.victron_energy_priority_reason + name: Raison priorité + - entity: input_datetime.victron_evcs_priority_until + name: Priorité jusqu'à + + - type: history-graph + title: Température / PV / Maison + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: sensor.garage_t_temperature + name: Temp garage + - entity: sensor.victron_pv_power_system + name: PV + - entity: sensor.victron_consumption_power_l1 + name: Maison + + - type: history-graph + title: États garage / EVCS + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: switch.clim_hygro_socket_1 + name: Sortie garage + - entity: input_boolean.garage_clim_latch + name: Latch garage + - entity: input_boolean.victron_evcs_priority_active + name: EVCS prioritaire + diff --git a/dashboards/GARAGE_MOBILE.yaml b/dashboards/GARAGE_MOBILE.yaml new file mode 100755 index 0000000..b1fbd5b --- /dev/null +++ b/dashboards/GARAGE_MOBILE.yaml @@ -0,0 +1,169 @@ +title: Garage Mobile +views: + - title: Garage Mobile + path: garage-mobile + icon: mdi:garage-variant + cards: + - type: vertical-stack + cards: + - type: custom:mushroom-title-card + title: Garage / Clim + subtitle: Vue mobile compacte + + - type: custom:mushroom-chips-card + chips: + - type: entity + entity: switch.clim_hygro_socket_1 + name: Sortie + icon_color: >- + {% if is_state('switch.clim_hygro_socket_1','on') %} + green + {% else %} + grey + {% endif %} + - type: entity + entity: input_boolean.garage_clim_surplus_auto_enabled + name: Auto + icon_color: >- + {% if is_state('input_boolean.garage_clim_surplus_auto_enabled','on') %} + green + {% else %} + grey + {% endif %} + - type: entity + entity: input_boolean.garage_clim_latch + name: Latch + icon_color: >- + {% if is_state('input_boolean.garage_clim_latch','on') %} + orange + {% else %} + grey + {% endif %} + - type: entity + entity: input_boolean.victron_evcs_priority_active + name: EVCS + icon_color: >- + {% if is_state('input_boolean.victron_evcs_priority_active','on') %} + red + {% else %} + grey + {% endif %} + + - type: custom:mushroom-template-card + entity: input_text.garage_clim_state + primary: >- + {{ states('input_text.garage_clim_state') }} + secondary: >- + Temp {{ states('sensor.garage_t_temperature') }}°C + • {{ states('input_text.garage_clim_reason') }} + icon: mdi:air-conditioner + icon_color: >- + {% if is_state('switch.clim_hygro_socket_1','on') %} + blue + {% elif is_state('input_boolean.victron_evcs_priority_active','on') %} + red + {% else %} + grey + {% endif %} + multiline_secondary: true + tap_action: + action: more-info + + - type: conditional + conditions: + - entity: input_boolean.victron_evcs_priority_active + state: "on" + card: + type: custom:mushroom-template-card + entity: input_boolean.victron_evcs_priority_active + primary: Priorité EVCS active + secondary: >- + {{ states('input_text.victron_energy_priority_reason') }} + icon: mdi:car-electric + icon_color: red + multiline_secondary: true + + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-entity-card + entity: sensor.garage_t_temperature + name: Temp garage + icon: mdi:thermometer + icon_color: blue + + - type: custom:mushroom-entity-card + entity: sensor.victron_pv_power_system + name: PV + icon: mdi:solar-power + icon_color: amber + + - type: custom:mushroom-entity-card + entity: sensor.victron_battery_soc + name: SOC + icon: mdi:battery + icon_color: green + + - type: custom:mushroom-entity-card + entity: sensor.victron_consumption_power_l1 + name: Maison + icon: mdi:home-lightning-bolt + icon_color: orange + + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-entity-card + entity: switch.clim_hygro_socket_1 + name: Clim garage + icon: mdi:power + tap_action: + action: toggle + icon_color: >- + {% if is_state('switch.clim_hygro_socket_1','on') %} + green + {% else %} + grey + {% endif %} + + - type: custom:mushroom-entity-card + entity: input_boolean.garage_clim_surplus_auto_enabled + name: Auto garage + icon: mdi:robot + tap_action: + action: toggle + icon_color: >- + {% if is_state('input_boolean.garage_clim_surplus_auto_enabled','on') %} + green + {% else %} + grey + {% endif %} + + - type: custom:mushroom-entity-card + entity: input_boolean.garage_clim_manual_adopt_enabled + name: Adopt manuel + icon: mdi:hand-back-right + tap_action: + action: toggle + icon_color: >- + {% if is_state('input_boolean.garage_clim_manual_adopt_enabled','on') %} + orange + {% else %} + grey + {% endif %} + + - type: custom:mushroom-entity-card + entity: input_boolean.garage_clim_surplus_notifications + name: Notifs + icon: mdi:bell + tap_action: + action: toggle + icon_color: >- + {% if is_state('input_boolean.garage_clim_surplus_notifications','on') %} + amber + {% else %} + grey + {% endif %} + diff --git a/dashboards/GARAGE_PREMIUM_PILOTAGE.yaml b/dashboards/GARAGE_PREMIUM_PILOTAGE.yaml new file mode 100755 index 0000000..8fff086 --- /dev/null +++ b/dashboards/GARAGE_PREMIUM_PILOTAGE.yaml @@ -0,0 +1,208 @@ +title: Garage Premium Pilotage +views: + - title: Garage Premium + path: garage-premium + icon: mdi:garage-variant + cards: + - type: vertical-stack + cards: + - type: custom:mushroom-title-card + title: Garage / Clim + subtitle: Pilotage thermique et arbitrage énergétique + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-chips-card + chips: + - type: entity + entity: switch.clim_hygro_socket_1 + name: Clim garage + icon_color: >- + {% if is_state('switch.clim_hygro_socket_1','on') %} + green + {% else %} + grey + {% endif %} + - type: entity + entity: input_boolean.garage_clim_surplus_auto_enabled + name: Auto + icon_color: >- + {% if is_state('input_boolean.garage_clim_surplus_auto_enabled','on') %} + green + {% else %} + grey + {% endif %} + - type: entity + entity: input_boolean.garage_clim_latch + name: Latch + icon_color: >- + {% if is_state('input_boolean.garage_clim_latch','on') %} + orange + {% else %} + grey + {% endif %} + - type: entity + entity: sensor.garage_t_temperature + name: Temp + - type: entity + entity: input_boolean.victron_evcs_priority_active + name: EVCS + icon_color: >- + {% if is_state('input_boolean.victron_evcs_priority_active','on') %} + red + {% else %} + grey + {% endif %} + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-template-card + entity: input_text.garage_clim_state + primary: >- + Garage : {{ states('input_text.garage_clim_state') }} + secondary: >- + {{ states('input_text.garage_clim_reason') }} + icon: mdi:air-conditioner + icon_color: >- + {% if is_state('switch.clim_hygro_socket_1','on') %} + blue + {% elif is_state('input_boolean.victron_evcs_priority_active','on') %} + red + {% else %} + grey + {% endif %} + multiline_secondary: true + + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-entity-card + entity: sensor.garage_t_temperature + name: Température garage + icon: mdi:thermometer + icon_color: blue + + - type: custom:mushroom-template-card + entity: input_boolean.garage_clim_latch + primary: État sortie + secondary: >- + Switch={{ states('switch.clim_hygro_socket_1') | upper }} + • Latch={{ states('input_boolean.garage_clim_latch') | upper }} + icon: mdi:toggle-switch + icon_color: >- + {% if is_state('switch.clim_hygro_socket_1','on') %} + green + {% else %} + grey + {% endif %} + + - type: custom:mushroom-entity-card + entity: sensor.victron_pv_power_system + name: PV instantané + icon: mdi:solar-power + icon_color: amber + + - type: custom:mushroom-entity-card + entity: sensor.victron_battery_soc + name: SOC batterie + icon: mdi:battery + icon_color: green + + - type: conditional + conditions: + - entity: input_boolean.victron_evcs_priority_active + state: "on" + card: + type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-template-card + entity: input_boolean.victron_evcs_priority_active + primary: EVCS prioritaire + secondary: >- + {{ states('input_text.victron_energy_priority_reason') }} + {% set until = states('input_datetime.victron_evcs_priority_until') %} + {% if until not in ['unknown','unavailable',''] %} + • jusqu'à {{ until }} + {% endif %} + icon: mdi:car-electric + icon_color: red + multiline_secondary: true + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Commandes rapides + subtitle: Usage quotidien + + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-entity-card + entity: switch.clim_hygro_socket_1 + name: Clim garage + icon: mdi:power + tap_action: + action: toggle + icon_color: >- + {% if is_state('switch.clim_hygro_socket_1','on') %} + green + {% else %} + grey + {% endif %} + + - type: custom:mushroom-entity-card + entity: input_boolean.garage_clim_surplus_auto_enabled + name: Automatisation + icon: mdi:robot + tap_action: + action: toggle + icon_color: >- + {% if is_state('input_boolean.garage_clim_surplus_auto_enabled','on') %} + green + {% else %} + grey + {% endif %} + + - type: custom:mushroom-entity-card + entity: input_boolean.garage_clim_manual_adopt_enabled + name: Adoption manuelle + icon: mdi:hand-back-right + tap_action: + action: toggle + icon_color: >- + {% if is_state('input_boolean.garage_clim_manual_adopt_enabled','on') %} + orange + {% else %} + grey + {% endif %} + + - type: custom:mushroom-entity-card + entity: input_boolean.garage_clim_surplus_notifications + name: Notifications + icon: mdi:bell + tap_action: + action: toggle + icon_color: >- + {% if is_state('input_boolean.garage_clim_surplus_notifications','on') %} + amber + {% else %} + grey + {% endif %} + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Détail rapide + subtitle: Lecture immédiate + + - type: entities + entities: + - entity: input_text.garage_clim_reason + name: Raison + - entity: input_datetime.garage_clim_last_on_at + name: Dernier ON + - entity: input_datetime.garage_clim_last_off_at + name: Dernier OFF + diff --git a/dashboards/SDB_DEBUG_PREMIUM.yaml b/dashboards/SDB_DEBUG_PREMIUM.yaml new file mode 100755 index 0000000..1256b5b --- /dev/null +++ b/dashboards/SDB_DEBUG_PREMIUM.yaml @@ -0,0 +1,290 @@ +title: SDB Debug Premium +views: + - title: SDB Debug Premium + path: sdb-debug-premium + icon: mdi:bug + cards: + - type: vertical-stack + cards: + - type: custom:mushroom-title-card + title: SDB Réglages & Debug + subtitle: Confort, humidité, surplus, EVCS + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-chips-card + chips: + - type: entity + entity: input_text.sdb_climate_surplus_state + name: State + - type: entity + entity: switch.sdb_prise_socket_1 + name: Master + - type: entity + entity: switch.deshumide_sdb_socket_1 + name: Déshumide + - type: entity + entity: switch.sdb_radiateur_socket_1 + name: Radiateur + - type: entity + entity: input_boolean.victron_evcs_priority_active + name: EVCS + icon_color: >- + {% if is_state('input_boolean.victron_evcs_priority_active','on') %} + red + {% else %} + grey + {% endif %} + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-template-card + entity: input_text.sdb_climate_surplus_state + primary: >- + SDB : {{ states('input_text.sdb_climate_surplus_state') }} + secondary: >- + {{ states('input_text.sdb_climate_surplus_reason') }} + icon: mdi:shower-head + icon_color: >- + {% set s = states('input_text.sdb_climate_surplus_state') %} + {% if 'blocked' in s or 'disabled' in s %} + red + {% elif 'wait' in s %} + orange + {% elif s in ['deshumide_on','radiator_on','deshumide_and_radiator_on'] %} + green + {% else %} + grey + {% endif %} + multiline_secondary: true + + - type: custom:mushroom-title-card + title: Capteurs SDB + subtitle: Température, humidité, prises, énergie + + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-entity-card + entity: sensor.sdb_temp_hygro_temperature + name: Température SDB + icon: mdi:thermometer + + - type: custom:mushroom-entity-card + entity: sensor.sdb_temp_hygro_humidite + name: Humidité SDB + icon: mdi:water-percent + + - type: custom:mushroom-entity-card + entity: switch.sdb_prise_socket_1 + name: Master SDB + icon: mdi:power-plug + + - type: custom:mushroom-entity-card + entity: sensor.sdb_prise_energie_totale + name: Énergie master + icon: mdi:counter + + - type: custom:mushroom-entity-card + entity: switch.deshumide_sdb_socket_1 + name: Déshumidificateur + icon: mdi:air-humidifier-off + + - type: custom:mushroom-entity-card + entity: sensor.deshumide_sdb_energie_totale + name: Énergie déshumide + icon: mdi:counter + + - type: custom:mushroom-entity-card + entity: switch.sdb_radiateur_socket_1 + name: Radiateur + icon: mdi:radiator + + - type: custom:mushroom-entity-card + entity: sensor.sdb_radiateur_energie_totale + name: Énergie radiateur + icon: mdi:counter + + - type: custom:mushroom-title-card + title: Contexte énergie + subtitle: Ce que voit le compute + + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-entity-card + entity: sensor.victron_battery_soc + name: SOC batterie + icon: mdi:battery + + - type: custom:mushroom-entity-card + entity: sensor.victron_battery_current + name: Courant batterie + icon: mdi:current-dc + + - type: custom:mushroom-entity-card + entity: sensor.victron_pv_power_system + name: PV instantané + icon: mdi:solar-power + + - type: custom:mushroom-entity-card + entity: sensor.victron_pv_power_10m_avg + name: PV moyen 10 min + icon: mdi:chart-bell-curve + + - type: custom:mushroom-entity-card + entity: sensor.victron_consumption_power_l1 + name: Charge maison + icon: mdi:home-lightning-bolt + + - type: custom:mushroom-entity-card + entity: sensor.victron_grid_power_l1 + name: Réseau + icon: mdi:transmission-tower + + - type: custom:mushroom-entity-card + entity: switch.edf_general_ok_switch + name: Commande EDF + icon: mdi:flash + + - type: custom:mushroom-entity-card + entity: sensor.victron_ac_in1_available + name: AC-IN dispo + icon: mdi:power-plug + + - type: custom:mushroom-title-card + title: Sortie automate + subtitle: State, raison, mémoire + + - type: custom:vertical-stack-in-card + cards: + - type: entities + entities: + - entity: input_text.sdb_climate_surplus_state + name: State + - entity: input_text.sdb_climate_surplus_reason + name: Reason + - entity: input_text.sdb_climate_surplus_last_signature + name: Signature + - entity: input_boolean.sdb_master_power_latch + name: Latch master + - entity: input_boolean.sdb_deshumide_latch + name: Latch déshumide + - entity: input_boolean.sdb_radiator_latch + name: Latch radiateur + - entity: input_datetime.sdb_master_last_on_at + name: Master dernier ON + - entity: input_datetime.sdb_master_last_off_at + name: Master dernier OFF + - entity: input_datetime.sdb_deshumide_last_on_at + name: Déshumide dernier ON + - entity: input_datetime.sdb_deshumide_last_off_at + name: Déshumide dernier OFF + - entity: input_datetime.sdb_radiator_last_on_at + name: Radiateur dernier ON + - entity: input_datetime.sdb_radiator_last_off_at + name: Radiateur dernier OFF + + - type: custom:mushroom-title-card + title: Réglages confort SDB + subtitle: Température et humidité + + - type: custom:vertical-stack-in-card + cards: + - type: entities + entities: + - entity: input_boolean.sdb_climate_surplus_auto_enabled + name: Auto SDB + - entity: input_boolean.sdb_climate_surplus_notifications + name: Notifications + - entity: input_boolean.sdb_master_manual_adopt_enabled + name: Adoption manuelle + - entity: input_number.sdb_temp_on_min_c + name: Temp ON mini + - entity: input_number.sdb_temp_off_max_c + name: Temp OFF maxi + - entity: input_number.sdb_humidity_on_pct + name: Humidité ON + - entity: input_number.sdb_humidity_off_pct + name: Humidité OFF + - entity: input_number.sdb_deshumide_min_on_minutes + name: Déshumide min ON + - entity: input_number.sdb_deshumide_min_off_minutes + name: Déshumide min OFF + + - type: custom:mushroom-title-card + title: Réglages radiateur surplus + subtitle: Chauffage flexible SDB + + - type: custom:vertical-stack-in-card + cards: + - type: entities + entities: + - entity: input_boolean.sdb_radiator_surplus_auto_enabled + name: Auto radiateur + - entity: input_number.sdb_radiator_soc_on + name: SOC ON + - entity: input_number.sdb_radiator_soc_off + name: SOC OFF + - entity: input_number.sdb_radiator_pv_on_w + name: PV ON + - entity: input_number.sdb_radiator_pv_off_w + name: PV OFF + - entity: input_number.sdb_radiator_battery_charge_ceiling_a + name: Plafond charge batterie + - entity: input_number.sdb_radiator_house_ac_max_w + name: Charge maison max + - entity: input_number.sdb_radiator_min_on_minutes + name: Radiateur min ON + - entity: input_number.sdb_radiator_min_off_minutes + name: Radiateur min OFF + - entity: input_datetime.victron_flexible_day_start_time + name: Début fenêtre + - entity: input_datetime.victron_flexible_day_stop_time + name: Fin fenêtre + + - type: custom:mushroom-title-card + title: Intégration EVCS + subtitle: Arbitrage global + + - type: custom:vertical-stack-in-card + cards: + - type: entities + entities: + - entity: input_boolean.victron_evcs_priority_active + name: EVCS prioritaire + - entity: input_select.victron_energy_priority_mode + name: Mode priorité énergie + - entity: input_text.victron_energy_priority_reason + name: Raison priorité + - entity: input_datetime.victron_evcs_priority_until + name: Priorité jusqu'à + + - type: history-graph + title: Température / Humidité + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: sensor.sdb_temp_hygro_temperature + name: Température + - entity: sensor.sdb_temp_hygro_humidite + name: Humidité + + - type: history-graph + title: SDB / énergie / états + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: switch.deshumide_sdb_socket_1 + name: Déshumide + - entity: switch.sdb_radiateur_socket_1 + name: Radiateur + - entity: switch.sdb_prise_socket_1 + name: Master + - entity: sensor.victron_pv_power_10m_avg + name: PV 10 min + - entity: input_boolean.victron_evcs_priority_active + name: EVCS + diff --git a/dashboards/SDB_PREMIUM_PILOTAGE.yaml b/dashboards/SDB_PREMIUM_PILOTAGE.yaml new file mode 100755 index 0000000..992fcab --- /dev/null +++ b/dashboards/SDB_PREMIUM_PILOTAGE.yaml @@ -0,0 +1,215 @@ +title: SDB Premium Pilotage +views: + - title: SDB Premium + path: sdb-premium + icon: mdi:shower-head + cards: + - type: vertical-stack + cards: + - type: custom:mushroom-title-card + title: Salle de bain + subtitle: Pilotage confort / humidité / surplus + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-chips-card + chips: + - type: entity + entity: switch.sdb_prise_socket_1 + name: Master + icon_color: >- + {% if is_state('switch.sdb_prise_socket_1','on') %} + green + {% else %} + grey + {% endif %} + - type: entity + entity: switch.deshumide_sdb_socket_1 + name: Déshumide + icon_color: >- + {% if is_state('switch.deshumide_sdb_socket_1','on') %} + blue + {% else %} + grey + {% endif %} + - type: entity + entity: switch.sdb_radiateur_socket_1 + name: Radiateur + icon_color: >- + {% if is_state('switch.sdb_radiateur_socket_1','on') %} + orange + {% else %} + grey + {% endif %} + - type: entity + entity: input_boolean.sdb_climate_surplus_auto_enabled + name: Auto + icon_color: >- + {% if is_state('input_boolean.sdb_climate_surplus_auto_enabled','on') %} + green + {% else %} + grey + {% endif %} + - type: entity + entity: input_boolean.victron_evcs_priority_active + name: EVCS + icon_color: >- + {% if is_state('input_boolean.victron_evcs_priority_active','on') %} + red + {% else %} + grey + {% endif %} + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-template-card + entity: input_text.sdb_climate_surplus_state + primary: >- + SDB : {{ states('input_text.sdb_climate_surplus_state') }} + secondary: >- + {{ states('input_text.sdb_climate_surplus_reason') }} + icon: mdi:shower-head + icon_color: >- + {% set s = states('input_text.sdb_climate_surplus_state') %} + {% if 'blocked' in s or 'disabled' in s %} + red + {% elif 'wait' in s %} + orange + {% elif s in ['deshumide_on','radiator_on','deshumide_and_radiator_on'] %} + green + {% else %} + grey + {% endif %} + multiline_secondary: true + + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-entity-card + entity: sensor.sdb_temp_hygro_temperature + name: Température + icon: mdi:thermometer + icon_color: blue + + - type: custom:mushroom-entity-card + entity: sensor.sdb_temp_hygro_humidite + name: Humidité + icon: mdi:water-percent + icon_color: cyan + + - type: custom:mushroom-entity-card + entity: sensor.victron_battery_soc + name: SOC batterie + icon: mdi:battery + icon_color: green + + - type: custom:mushroom-entity-card + entity: sensor.victron_pv_power_10m_avg + name: PV moyen 10 min + icon: mdi:solar-power + icon_color: amber + + - type: conditional + conditions: + - entity: input_boolean.victron_evcs_priority_active + state: "on" + card: + type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-template-card + entity: input_boolean.victron_evcs_priority_active + primary: Priorité EVCS active + secondary: >- + {{ states('input_text.victron_energy_priority_reason') }} + {% set until = states('input_datetime.victron_evcs_priority_until') %} + {% if until not in ['unknown','unavailable',''] %} + • jusqu'à {{ until }} + {% endif %} + icon: mdi:car-electric + icon_color: red + multiline_secondary: true + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Commandes rapides + subtitle: Usage quotidien + + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-entity-card + entity: input_boolean.sdb_climate_surplus_auto_enabled + name: Auto SDB + icon: mdi:robot + tap_action: + action: toggle + icon_color: >- + {% if is_state('input_boolean.sdb_climate_surplus_auto_enabled','on') %} + green + {% else %} + grey + {% endif %} + + - type: custom:mushroom-entity-card + entity: input_boolean.sdb_climate_surplus_notifications + name: Notifications + icon: mdi:bell + tap_action: + action: toggle + icon_color: >- + {% if is_state('input_boolean.sdb_climate_surplus_notifications','on') %} + amber + {% else %} + grey + {% endif %} + + - type: custom:mushroom-entity-card + entity: input_boolean.sdb_master_manual_adopt_enabled + name: Adoption manuelle + icon: mdi:hand-back-right + tap_action: + action: toggle + icon_color: >- + {% if is_state('input_boolean.sdb_master_manual_adopt_enabled','on') %} + orange + {% else %} + grey + {% endif %} + + - type: custom:mushroom-entity-card + entity: input_boolean.sdb_radiator_surplus_auto_enabled + name: Auto radiateur + icon: mdi:radiator + tap_action: + action: toggle + icon_color: >- + {% if is_state('input_boolean.sdb_radiator_surplus_auto_enabled','on') %} + orange + {% else %} + grey + {% endif %} + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Détail rapide + subtitle: Lecture immédiate + + - type: entities + entities: + - entity: input_text.sdb_climate_surplus_reason + name: Raison + - entity: input_boolean.sdb_master_power_latch + name: Latch master + - entity: input_boolean.sdb_deshumide_latch + name: Latch déshumide + - entity: input_boolean.sdb_radiator_latch + name: Latch radiateur + - entity: input_datetime.sdb_deshumide_last_on_at + name: Déshumide dernier ON + - entity: input_datetime.sdb_radiator_last_on_at + name: Radiateur dernier ON + diff --git a/dashboards/big_victron_debug.yaml b/dashboards/big_victron_debug.yaml new file mode 100755 index 0000000..f61494c --- /dev/null +++ b/dashboards/big_victron_debug.yaml @@ -0,0 +1,1096 @@ +views: + - title: Victron + path: victron + icon: mdi:battery-charging + panel: true + cards: + - type: vertical-stack + cards: + - type: conditional + conditions: + - entity: input_boolean.victron_auto_charge_enabled + state: "off" + card: + type: markdown + content: > + ## ⚠️ Automatisation batterie désactivée + Le workflow batterie ne pilote plus automatiquement les consignes de charge. + + - type: conditional + conditions: + - entity: input_boolean.victron_charge_override_enabled + state: "on" + card: + type: markdown + content: > + ## 🖐️ Override manuel actif + Un profil manuel remplace temporairement les consignes automatiques. + + - type: glance + title: Synthèse rapide + show_name: true + show_state: true + columns: 7 + entities: + - entity: sensor.victron_battery_soc + name: SOC + - entity: sensor.victron_consumption_power_l1 + name: Charges AC + - entity: switch.edf_general_ok_switch + name: Réseau + - entity: sensor.victron_grid_power_l1 + name: Grid W + - entity: sensor.victron_pv_power_system + name: PV + - entity: sensor.victron_evcs_ac_power + name: EVCS W + - entity: sensor.victron_battery_current + name: Batt A + + - type: horizontal-stack + cards: + - type: gauge + entity: sensor.victron_battery_soc + name: SOC Batterie + min: 0 + max: 100 + severity: + red: 0 + yellow: 22 + green: 35 + + - type: entities + title: Batterie - pilotage principal + show_header_toggle: false + entities: + - entity: input_boolean.victron_auto_charge_enabled + name: Automatisation batterie + - entity: input_boolean.victron_auto_charge_notifications + name: Notifications batterie + - entity: sensor.victron_battery_voltage + name: Tension batterie + - entity: sensor.victron_battery_current + name: Courant batterie + - entity: input_number.victron_soc_live + name: SOC vu par l'automate + - entity: input_text.victron_charge_reason + name: Raison batterie + - entity: input_text.victron_charge_last_signature + name: Signature batterie + secondary_info: last-changed + + - type: horizontal-stack + cards: + - type: entities + title: Override manuel charge + show_header_toggle: false + entities: + - entity: input_boolean.victron_charge_override_enabled + name: Override actif + - entity: input_select.victron_charge_override_profile + name: Profil override + - entity: input_number.victron_override_charge_current + name: Courant override + - entity: input_number.victron_override_charge_voltage + name: Tension override + - entity: input_datetime.victron_charge_override_until + name: Override jusqu'à + - entity: input_text.victron_charge_override_reason + name: Raison override + - entity: input_text.victron_effective_charge_profile + name: Profil appliqué + + - type: entities + title: Consignes batterie calculées / réelles + show_header_toggle: false + entities: + - entity: input_number.victron_target_charge_current + name: Courant cible automate + - entity: sensor.victron_max_charge_current_setting + name: Courant réglé Victron + - entity: input_number.victron_target_charge_voltage + name: Tension cible automate + - entity: sensor.victron_max_charge_voltage_setting + name: Tension réglée Victron + - entity: input_text.victron_charge_mode + name: Mode batterie + - entity: input_text.victron_effective_charge_profile + name: Profil batterie + + - type: horizontal-stack + cards: + - type: entities + title: Production / réseau / prévisions + show_header_toggle: false + entities: + - entity: switch.edf_general_ok_switch + name: Réseau EDF + - entity: sensor.victron_grid_power_l1 + name: Puissance réseau + - entity: sensor.victron_pv_power_system + name: Puissance PV + - entity: sensor.victron_consumption_power_l1 + name: Charges AC maison + - entity: sensor.energy_production_today_remaining + name: Production restante aujourd'hui + - entity: sensor.energy_production_tomorrow + name: Production demain + + - type: history-graph + title: Historique PV / AC / Grid + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: sensor.victron_pv_power_system + name: PV + - entity: sensor.victron_consumption_power_l1 + name: Charges AC + - entity: sensor.victron_grid_power_l1 + name: Grid + + - type: horizontal-stack + cards: + - type: entities + title: Flexible Load Advisor + show_header_toggle: false + entities: + - entity: input_boolean.victron_flexible_load_advisor_enabled + name: Advisor actif + - entity: input_boolean.victron_flexible_load_notifications + name: Notifications advisor + - entity: input_number.victron_end_of_day_soc_target + name: Cible SOC fin de journée + - entity: input_number.victron_flexible_safety_margin_kwh + name: Marge sécurité + - entity: input_number.victron_base_load_remaining_kwh + name: Charge de fond restante + - entity: input_text.victron_flexible_load_state + name: État advisor + - entity: input_text.victron_flexible_load_reason + name: Raison advisor + - entity: input_text.victron_flexible_load_last_signature + name: Signature advisor + secondary_info: last-changed + + - type: entities + title: Charges flexibles - verdict + show_header_toggle: false + entities: + - entity: input_boolean.victron_advice_evcs_ok + name: EVCS OK + - entity: input_boolean.victron_advice_water_heater_ok + name: Chauffe-eau OK (legacy) + - entity: input_boolean.victron_advice_dishwasher_ok + name: Lave-vaisselle OK + - entity: input_boolean.victron_advice_washer_ok + name: Lave-linge OK + - entity: input_boolean.victron_advice_garage_clim_ok + name: Garage OK + - entity: input_boolean.victron_advice_sdb_heater_ok + name: Chauffage SDB OK + - entity: input_select.victron_evcs_target_vehicle + name: Véhicule cible + - entity: input_number.victron_evcs_required_energy_kwh + name: Besoin EVCS + - entity: input_boolean.victron_evcs_departure_priority_enabled + name: Priorité départ + - entity: input_datetime.victron_evcs_departure_time + name: Heure départ + + - type: markdown + content: | + ## Feux vert / rouge - charges flexibles + + - type: grid + columns: 5 + square: false + cards: + - type: conditional + conditions: + - entity: input_boolean.victron_advice_evcs_ok + state: "on" + card: + type: markdown + content: | + ### ✅ EVCS OK + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_evcs_ok + state: "off" + card: + type: markdown + content: | + ### ❌ EVCS NON + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_water_heater_ok + state: "on" + card: + type: markdown + content: | + ### ✅ Chauffe-eau OK + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_water_heater_ok + state: "off" + card: + type: markdown + content: | + ### ❌ Chauffe-eau NON + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_dishwasher_ok + state: "on" + card: + type: markdown + content: | + ### ✅ Lave-vaisselle OK + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_dishwasher_ok + state: "off" + card: + type: markdown + content: | + ### ❌ Lave-vaisselle NON + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_washer_ok + state: "on" + card: + type: markdown + content: | + ### ✅ Lave-linge OK + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_washer_ok + state: "off" + card: + type: markdown + content: | + ### ❌ Lave-linge NON + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_garage_clim_ok + state: "on" + card: + type: markdown + content: | + ### ✅ Garage OK + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_garage_clim_ok + state: "off" + card: + type: markdown + content: | + ### ❌ Garage NON + + - type: horizontal-stack + cards: + - type: entities + title: Chauffe-eau thermodynamique - Advisor V2 + show_header_toggle: false + entities: + - entity: input_boolean.victron_water_heater_advisor_enabled + name: Advisor chauffe-eau actif + - entity: input_boolean.victron_water_heater_notifications + name: Notifications chauffe-eau + - entity: input_select.victron_water_heater_hot_water_demand + name: Besoin ECS + - entity: input_select.victron_water_heater_recommended_mode + name: Mode recommandé + - entity: input_select.victron_water_heater_advice_color + name: Couleur conseil + - entity: input_boolean.victron_water_heater_green_allowed + name: Green autorisé + - entity: input_boolean.victron_water_heater_auto_allowed + name: Auto autorisé + - entity: input_boolean.victron_water_heater_boost_allowed + name: Boost autorisé + - entity: input_number.victron_water_heater_projected_end_of_day_soc + name: SOC fin de jour projeté + - entity: input_number.victron_water_heater_budget_margin_kwh + name: Marge budget ECS + - entity: input_text.victron_water_heater_advice_state + name: État advisor ECS + - entity: input_text.victron_water_heater_advice_reason + name: Raison advisor ECS + - entity: input_text.victron_water_heater_advice_last_signature + name: Signature advisor ECS + secondary_info: last-changed + + - type: entities + title: Chauffe-eau - réglages + show_header_toggle: false + entities: + - entity: switch.tt_chauffe_eau_pleumeur_switch + name: Chauffe-eau + - entity: sensor.tt_chauffe_eau_pleumeur_energie_totale + name: Énergie chauffe-eau + - entity: input_boolean.victron_water_heater_morning_boost_priority_enabled + name: Priorité boost matin + - entity: input_datetime.victron_water_heater_morning_boost_latest_time + name: Fin fenêtre boost matin + - entity: input_datetime.victron_water_heater_late_red_time + name: Heure tardive défavorable + - entity: input_number.victron_water_heater_green_power_w + name: Puissance Green + - entity: input_number.victron_water_heater_auto_power_w + name: Puissance Auto + - entity: input_number.victron_water_heater_boost_power_w + name: Puissance Boost + - entity: input_number.victron_water_heater_strong_forecast_kwh + name: Prévision forte + - entity: input_number.victron_water_heater_medium_forecast_kwh + name: Prévision moyenne + - entity: input_number.victron_water_heater_strong_pv_now_w + name: PV fort instantané + - entity: input_number.victron_water_heater_medium_pv_now_w + name: PV moyen instantané + - entity: input_number.victron_water_heater_morning_boost_min_soc_strong_day + name: SOC mini boost jour fort + - entity: input_number.victron_water_heater_boost_min_soc_medium_day + name: SOC mini boost jour moyen + - entity: input_number.victron_water_heater_end_of_day_soc_guard + name: Garde SOC fin de jour + - entity: input_number.victron_load_water_heater_kwh + name: Charge ECS estimée + + - type: markdown + content: | + ## Chauffe-eau - feu de décision + + - type: horizontal-stack + cards: + - type: conditional + conditions: + - entity: input_select.victron_water_heater_advice_color + state: green + card: + type: markdown + content: | + ### ✅ Chauffe-eau conseillé + + - type: conditional + conditions: + - entity: input_select.victron_water_heater_advice_color + state: orange + card: + type: markdown + content: | + ### ⚠️ Chauffe-eau possible mais prudent + + - type: conditional + conditions: + - entity: input_select.victron_water_heater_advice_color + state: red + card: + type: markdown + content: | + ### ❌ Chauffe-eau déconseillé + + - type: horizontal-stack + cards: + - type: conditional + conditions: + - entity: input_select.victron_water_heater_recommended_mode + state: green + card: + type: markdown + content: | + ### Mode recommandé : GREEN + + - type: conditional + conditions: + - entity: input_select.victron_water_heater_recommended_mode + state: auto + card: + type: markdown + content: | + ### Mode recommandé : AUTO + + - type: conditional + conditions: + - entity: input_select.victron_water_heater_recommended_mode + state: boost + card: + type: markdown + content: | + ### Mode recommandé : BOOST + + - type: conditional + conditions: + - entity: input_select.victron_water_heater_recommended_mode + state: "off" + card: + type: markdown + content: | + ### Mode recommandé : OFF + + - type: horizontal-stack + cards: + - type: entities + title: Grid Hysteresis + show_header_toggle: false + entities: + - entity: input_boolean.victron_grid_hysteresis_enabled + name: Hystérésis réseau active + - entity: input_boolean.victron_grid_hysteresis_notifications + name: Notifications réseau + - entity: input_boolean.victron_grid_hysteresis_latch + name: Latch réseau + - entity: input_number.victron_grid_soc_on + name: Seuil réseau ON + - entity: input_number.victron_grid_soc_off + name: Seuil réseau OFF + - entity: input_number.victron_grid_min_on_minutes + name: Durée mini ON + - entity: input_number.victron_grid_cooldown_minutes + name: Cooldown réseau + - entity: input_text.victron_grid_control_state + name: État réseau + - entity: input_text.victron_grid_control_reason + name: Raison réseau + - entity: input_text.victron_grid_control_last_signature + name: Signature réseau + secondary_info: last-changed + + - type: entities + title: Réseau - timestamps / sécurité + show_header_toggle: false + entities: + - entity: input_datetime.victron_grid_last_on_at + name: Dernier EDF ON + - entity: input_datetime.victron_grid_last_off_at + name: Dernier EDF OFF + - entity: input_number.victron_ac_loads_max_safe_w + name: Limite AC sûre + - entity: sensor.victron_consumption_power_l1 + name: Charges AC maison + - entity: sensor.victron_grid_power_l1 + name: Puissance réseau + - entity: switch.edf_general_ok_switch + name: Réseau EDF + + - type: horizontal-stack + cards: + - type: entities + title: EVCS Victron - commandes + show_header_toggle: false + entities: + - entity: switch.victron_evcs_charging + name: Charge EVCS ON/OFF + - entity: switch.victron_evcs_auto_start + name: Auto Start EVCS + - entity: number.victron_evcs_set_current_command + name: Courant borne demandé + - entity: sensor.victron_evcs_set_current + name: Consigne borne lue + - entity: sensor.victron_evcs_current + name: Courant réel borne + - entity: sensor.victron_evcs_max_current + name: Courant max borne + - entity: sensor.victron_evcs_min_current + name: Courant min borne + - entity: sensor.victron_evcs_mode + name: Mode réel borne + - entity: sensor.victron_evcs_charging_time + name: Durée charge + + - type: entities + title: EVCS - état / énergie + show_header_toggle: false + entities: + - entity: sensor.victron_evcs_status + name: Statut EVCS + - entity: sensor.victron_evcs_status_raw + name: Status brut + - entity: binary_sensor.victron_evcs_device_connected + name: EVCS connecté au GX + - entity: binary_sensor.victron_evcs_vehicle_connected + name: EV probablement connecté + - entity: sensor.victron_evcs_connected_raw + name: Connected brut + - entity: sensor.victron_evcs_ac_power + name: Puissance EVCS + - entity: sensor.victron_evcs_l1_power + name: Puissance L1 + - entity: sensor.victron_evcs_l1_energy_forward + name: Énergie L1 + - entity: sensor.victron_evcs_product_name + name: Produit + - entity: sensor.victron_evcs_custom_name + name: Nom EVCS + - entity: sensor.victron_evcs_serial + name: Série + - entity: sensor.victron_evcs_firmware_version + name: Firmware + + - type: horizontal-stack + cards: + - type: entities + title: Charges pilotables maison + show_header_toggle: false + entities: + - entity: switch.tt_chauffe_eau_pleumeur_switch + name: Chauffe-eau + - entity: sensor.tt_chauffe_eau_pleumeur_energie_totale + name: Énergie chauffe-eau + - entity: switch.lave_vaisselles_socket_1 + name: Lave-vaisselle + - entity: sensor.lave_vaisselles_energie_totale + name: Énergie lave-vaisselle + - entity: switch.tt_lave_linge_frigo_ariston_socket_1 + name: Lave-linge + - entity: sensor.tt_lave_linge_frigo_ariston_energie_totale + name: Énergie lave-linge + + - type: entities + title: Garage / SDB / auxiliaires + show_header_toggle: false + entities: + - entity: switch.clim_hygro_socket_1 + name: Clim / Hygro garage + - entity: sensor.clim_hygro_energie_totale + name: Énergie clim / hygro + - entity: switch.sdb_prise_socket_1 + name: SDB prise + - entity: sensor.sdb_prise_energie_totale + name: Énergie SDB prise + - entity: switch.deshumide_sdb_socket_1 + name: Déshumidificateur SDB + - entity: sensor.deshumide_sdb_energie_totale + name: Énergie déshumidificateur + - entity: switch.sdb_radiateur_socket_1 + name: Radiateur SDB + - entity: sensor.sdb_radiateur_energie_totale + name: Énergie radiateur SDB + + - type: markdown + content: | + ## Garage - lecture rapide + + - type: horizontal-stack + cards: + - type: conditional + conditions: + - entity: switch.clim_hygro_socket_1 + state: "on" + - entity: input_boolean.garage_clim_latch + state: "on" + card: + type: markdown + content: | + ### ✅ Garage maintenu par l'automate + + - type: conditional + conditions: + - entity: switch.clim_hygro_socket_1 + state: "on" + - entity: input_boolean.garage_clim_latch + state: "off" + card: + type: markdown + content: | + ### 🟠 Garage ON manuel / non maintenu + + - type: conditional + conditions: + - entity: switch.clim_hygro_socket_1 + state: "off" + - entity: input_boolean.garage_clim_latch + state: "off" + card: + type: markdown + content: | + ### ☑️ Garage au repos + + - type: conditional + conditions: + - entity: switch.clim_hygro_socket_1 + state: "off" + - entity: input_boolean.garage_clim_latch + state: "on" + card: + type: markdown + content: | + ### ❌ État garage incohérent à vérifier + + - type: horizontal-stack + cards: + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: manual_on_outside_window + card: + type: markdown + content: | + **Garage :** ON manuel observé hors fenêtre + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: manual_on_not_adopted + card: + type: markdown + content: | + **Garage :** ON manuel non adopté par l'automate + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: manual_on_adopted + card: + type: markdown + content: | + **Garage :** ON manuel adopté par l'automate + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: auto_start + card: + type: markdown + content: | + **Garage :** démarrage automatique + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: auto_running + card: + type: markdown + content: | + **Garage :** fonctionnement automatique + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: hold_min_on + card: + type: markdown + content: | + **Garage :** maintien temps mini ON + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: hold_min_on_outside_window + card: + type: markdown + content: | + **Garage :** maintien mini ON hors fenêtre + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: outside_window + card: + type: markdown + content: | + **Garage :** hors fenêtre, pas de pilotage auto + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: outside_window_release + card: + type: markdown + content: | + **Garage :** relâché par l'automate hors fenêtre + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: conditions_not_met + card: + type: markdown + content: | + **Garage :** besoin détecté mais conditions insuffisantes + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: wait_min_off + card: + type: markdown + content: | + **Garage :** attente temps mini OFF + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: idle + card: + type: markdown + content: | + **Garage :** repos / confort OK + + - type: horizontal-stack + cards: + - type: entities + title: Garage thermique - pilotage + show_header_toggle: false + entities: + - entity: input_boolean.garage_clim_surplus_auto_enabled + name: Auto garage + - entity: input_boolean.garage_clim_surplus_notifications + name: Notifications garage + - entity: input_boolean.garage_clim_manual_adopt_enabled + name: Adoption manuelle garage + - entity: input_boolean.garage_clim_latch + name: Latch garage + - entity: input_text.garage_clim_state + name: État garage + - entity: input_text.garage_clim_reason + name: Raison garage + - entity: input_text.garage_clim_last_signature + name: Signature garage + secondary_info: last-changed + - entity: switch.clim_hygro_socket_1 + name: Clim / Hygro garage + + - type: entities + title: Garage thermique - seuils + show_header_toggle: false + entities: + - entity: sensor.garage_t_temperature + name: Température garage + - entity: input_number.garage_temp_min_c + name: Temp min garage + - entity: input_number.garage_temp_max_c + name: Temp max garage + - entity: input_number.garage_clim_soc_on + name: SOC ON garage + - entity: input_number.garage_clim_soc_off + name: SOC OFF garage + - entity: input_number.garage_clim_pv_on_w + name: PV ON garage + - entity: input_number.garage_clim_pv_off_w + name: PV OFF garage + - entity: input_number.garage_clim_surplus_min_kwh + name: Surplus mini garage + - entity: input_number.garage_clim_min_on_minutes + name: Temps mini ON garage + - entity: input_number.garage_clim_min_off_minutes + name: Temps mini OFF garage + - entity: input_number.garage_clim_battery_discharge_stop_a + name: Décharge stop garage + - entity: input_number.garage_clim_house_ac_max_w + name: Charge AC max garage + - entity: input_datetime.garage_clim_start_time + name: Début autorisation garage + - entity: input_datetime.garage_clim_stop_time + name: Fin autorisation garage + - entity: input_datetime.garage_clim_last_on_at + name: Dernier ON garage + - entity: input_datetime.garage_clim_last_off_at + name: Dernier OFF garage + + - type: horizontal-stack + cards: + - type: entities + title: SDB Climate & Surplus - pilotage + show_header_toggle: false + entities: + - entity: input_boolean.sdb_climate_surplus_auto_enabled + name: Auto SDB climate/surplus + - entity: input_boolean.sdb_climate_surplus_notifications + name: Notifications SDB + - entity: input_boolean.sdb_radiator_surplus_auto_enabled + name: Auto radiateur SDB + - entity: input_boolean.sdb_master_manual_adopt_enabled + name: Adoption manuelle maître + - entity: input_boolean.sdb_master_power_latch + name: Latch prise SDB + - entity: input_boolean.sdb_deshumide_latch + name: Latch déshumidificateur + - entity: input_boolean.sdb_radiator_latch + name: Latch radiateur + - entity: input_text.sdb_climate_surplus_state + name: État SDB + - entity: input_text.sdb_climate_surplus_reason + name: Raison SDB + - entity: input_text.sdb_climate_surplus_last_signature + name: Signature SDB + secondary_info: last-changed + - entity: switch.sdb_prise_socket_1 + name: SDB prise + - entity: switch.deshumide_sdb_socket_1 + name: Déshumidificateur SDB + - entity: switch.sdb_radiateur_socket_1 + name: Radiateur SDB + + - type: entities + title: SDB - ambiance / seuils + show_header_toggle: false + entities: + - entity: sensor.sdb_temp_hygro_temperature + name: Température SDB + - entity: sensor.sdb_temp_hygro_humidite + name: Humidité SDB + - entity: input_number.sdb_temp_on_min_c + name: Temp ON mini + - entity: input_number.sdb_temp_off_max_c + name: Temp OFF max + - entity: input_number.sdb_humidity_on_pct + name: Humidité ON + - entity: input_number.sdb_humidity_off_pct + name: Humidité OFF + - entity: input_number.sdb_deshumide_min_on_minutes + name: Déshumide temps mini ON + - entity: input_number.sdb_deshumide_min_off_minutes + name: Déshumide temps mini OFF + - entity: input_number.sdb_radiator_soc_on + name: Radiateur SOC ON + - entity: input_number.sdb_radiator_soc_off + name: Radiateur SOC OFF + - entity: input_number.sdb_radiator_pv_on_w + name: Radiateur PV ON + - entity: input_number.sdb_radiator_pv_off_w + name: Radiateur PV OFF + - entity: input_number.sdb_radiator_battery_charge_ceiling_a + name: Radiateur plafond charge batterie + - entity: input_number.sdb_radiator_house_ac_max_w + name: Radiateur AC max maison + - entity: input_number.sdb_radiator_min_on_minutes + name: Radiateur temps mini ON + - entity: input_number.sdb_radiator_min_off_minutes + name: Radiateur temps mini OFF + - entity: input_datetime.sdb_master_last_on_at + name: Dernier ON prise SDB + - entity: input_datetime.sdb_master_last_off_at + name: Dernier OFF prise SDB + - entity: input_datetime.sdb_deshumide_last_on_at + name: Dernier ON déshumide + - entity: input_datetime.sdb_deshumide_last_off_at + name: Dernier OFF déshumide + - entity: input_datetime.sdb_radiator_last_on_at + name: Dernier ON radiateur + - entity: input_datetime.sdb_radiator_last_off_at + name: Dernier OFF radiateur + + - type: history-graph + title: Historique batterie / PV / charges AC / réseau + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: sensor.victron_battery_soc + name: SOC batterie + - entity: sensor.victron_pv_power_system + name: PV + - entity: sensor.victron_consumption_power_l1 + name: Charges AC + - entity: sensor.victron_grid_power_l1 + name: Grid + + - type: history-graph + title: Historique garage / SDB / SOC + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: switch.clim_hygro_socket_1 + name: Clim garage + - entity: switch.deshumide_sdb_socket_1 + name: Déshumide SDB + - entity: switch.sdb_radiateur_socket_1 + name: Radiateur SDB + - entity: sensor.victron_battery_soc + name: SOC batterie + + - type: horizontal-stack + cards: + - type: history-graph + title: Historique courant cible vs réel batterie + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: input_number.victron_target_charge_current + name: Cible A + - entity: sensor.victron_max_charge_current_setting + name: Réel A + - entity: sensor.victron_battery_current + name: Batterie A + + - type: history-graph + title: Historique tension cible vs réelle batterie + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: input_number.victron_target_charge_voltage + name: Cible V + - entity: sensor.victron_max_charge_voltage_setting + name: Réel V + - entity: sensor.victron_battery_voltage + name: Batterie V + + - title: Test Cards + path: test-cards + icon: mdi:test-tube + cards: + - type: custom:mushroom-title-card + title: Validation cartes custom + subtitle: Test Mushroom / Button / Layout / Config Template / ApexCharts / Gauge Card Pro + + - type: custom:layout-card + layout_type: grid + layout: + grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) + grid-gap: 16px + margin: 0 + cards: + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-template-card + entity: sensor.victron_battery_soc + primary: Batterie + secondary: > + SOC {{ states('sensor.victron_battery_soc') }} % + • {{ states('sensor.victron_battery_power') }} W + multiline_secondary: true + icon: mdi:battery + icon_color: > + {% set s = states('sensor.victron_battery_soc') | float(0) %} + {% if s < 25 %} red + {% elif s < 50 %} orange + {% elif s < 75 %} yellow + {% else %} green + {% endif %} + + - type: custom:config-template-card + variables: + - states['input_number.ui_max_pv_power'].state + entities: + - input_number.ui_max_pv_power + - sensor.victron_pv_power_system + card: + type: gauge + entity: sensor.victron_pv_power_system + name: PV - max dynamique + min: 0 + max: "${ Number(vars[0]) }" + severity: + red: "${ Math.round(Number(vars[0]) * 0.25) }" + yellow: "${ Math.round(Number(vars[0]) * 0.50) }" + green: "${ Math.round(Number(vars[0]) * 0.75) }" + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-template-card + primary: VE.Bus + secondary: > + AC Out {{ states('sensor.victron_ve_bus_ac_out_l1_power') }} W + • {{ states('sensor.victron_mode_derived') }} + multiline_secondary: true + icon: mdi:transmission-tower + icon_color: > + {% if is_state('binary_sensor.victron_ve_bus_overload', 'on') %} + red + {% elif is_state('binary_sensor.victron_ve_bus_low_battery', 'on') %} + orange + {% else %} + green + {% endif %} + + - type: custom:button-card + entity: switch.victron_evcs_charging + name: EVCS Charge + icon: mdi:ev-station + show_state: true + tap_action: + action: more-info + hold_action: + action: more-info + styles: + card: + - border-radius: 18px + - padding: 14px + name: + - font-size: 16px + - font-weight: 600 + state: + - font-size: 13px + state: + - value: "on" + color: "#43a047" + - value: "off" + color: "#757575" + + - type: custom:mushroom-template-card + primary: EVCS + secondary: > + {{ states('sensor.victron_evcs_status') }} + • Mode {{ states('sensor.victron_evcs_mode') }} + • {{ states('sensor.victron_evcs_current') }} A + multiline_secondary: true + entity: sensor.victron_evcs_status + icon: mdi:car-electric + 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:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: ApexCharts + subtitle: Test historique 6h + + - type: custom:apexcharts-card + graph_span: 6h + header: + show: true + title: Flux énergie + show_states: true + series: + - entity: sensor.victron_pv_power_system + name: PV + color: "#fdd835" + - entity: sensor.victron_consumption_power_l1 + name: Maison + color: "#42a5f5" + - entity: sensor.victron_grid_power_l1 + name: Réseau + color: "#ef5350" + - entity: sensor.victron_battery_power + name: Batterie + color: "#ab47bc" + + - type: custom:vertical-stack-in-card + cards: + - type: markdown + content: | + ## Gauge Card Pro + Si la carte ci-dessous s'affiche correctement, on l'utilisera pour le Master V1 final. + Si elle affiche une erreur, envoie-moi juste le message exact ou une capture. + + - type: custom:gauge-card-pro + entity: sensor.victron_battery_soc + header: Test Gauge Card Pro + min: 0 + max: 100 + needle: true + segments: + - from: 0 + color: "#f44336" + - from: 25 + color: "#ff9800" + - from: 50 + color: "#ffeb3b" + - from: 75 + color: "#4caf50" + diff --git a/dashboards/evcs_master.yaml b/dashboards/evcs_master.yaml new file mode 100755 index 0000000..de55251 --- /dev/null +++ b/dashboards/evcs_master.yaml @@ -0,0 +1,520 @@ +views: + - title: EVCS Master + path: default_view + icon: mdi:car-electric + cards: + - type: vertical-stack + cards: + - type: custom:mushroom-title-card + title: EVCS Master + subtitle: Vue borne / session / stratégie / énergie + + - type: conditional + conditions: + - entity: binary_sensor.victron_evcs_vehicle_connected + state: "off" + card: + type: markdown + content: | + ## ℹ️ Véhicule non détecté + + - type: conditional + conditions: + - entity: binary_sensor.victron_evcs_vehicle_connected + state: "on" + - entity: switch.victron_evcs_charging + state: "off" + card: + type: markdown + content: | + ## ⚠️ Véhicule connecté mais charge inactive + + - type: conditional + conditions: + - entity: switch.victron_evcs_charging + state: "on" + card: + type: markdown + 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 + cards: + - type: custom:vertical-stack-in-card + cards: + - 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: 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: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: 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 %} + + - 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: 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_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.victron_evcs_allow_grid_hc_night + name: Réseau HC nuit + - 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: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Historique EVCS + subtitle: 12 dernières heures + + - type: custom:apexcharts-card + graph_span: 12h + header: + show: true + title: Session EVCS + show_states: false + series: + - entity: sensor.victron_evcs_current + name: Courant EVCS + color: "#42a5f5" + - entity: sensor.victron_evcs_set_current + name: Consigne lue + color: "#ffca28" + - entity: sensor.victron_evcs_ac_power + name: Puissance EVCS + color: "#66bb6a" + - entity: sensor.victron_pv_power_system + name: PV + color: "#fdd835" + - entity: sensor.victron_grid_power_l1 + name: Réseau + color: "#ef5350" + + + - type: vertical-stack + cards: + - type: custom:mushroom-title-card + title: 🤖 Conseiller IA (observateur) + subtitle: Il regarde et signale — il ne décide rien + + - type: entities + title: Dernière observation + entities: + - entity: input_text.evcs_advisor_gravite + name: Gravité + icon: mdi:alert-circle-outline + - entity: input_text.evcs_advisor_constat + name: Ce qu'il voit + icon: mdi:eye-outline + - entity: input_text.evcs_advisor_ce_qui_cloche + name: Ce qui cloche + icon: mdi:help-rhombus-outline + - entity: input_text.evcs_advisor_reason + name: Piste (et sa confiance) + icon: mdi:magnify + - type: divider + - entity: input_text.evcs_advisor_status + name: Statut + - entity: input_text.evcs_advisor_model + name: Modèle LLM + - entity: input_text.evcs_advisor_last_run + name: Dernière analyse + - entity: input_number.evcs_advisor_agree_count + name: Cycles calmes + - entity: input_number.evcs_advisor_diverge_count + name: Signalements + - type: divider + - entity: input_boolean.evcs_advisor_enabled + name: Conseiller actif (kill-switch) diff --git a/dashboards/evcs_mobile.yaml b/dashboards/evcs_mobile.yaml new file mode 100755 index 0000000..b14998a --- /dev/null +++ b/dashboards/evcs_mobile.yaml @@ -0,0 +1,310 @@ +views: + - title: EVCS Mobile + path: default_view + icon: mdi:car-electric + cards: + - type: vertical-stack + cards: + - type: custom:mushroom-title-card + title: EVCS Mobile + subtitle: Vue rapide borne / session / énergie + + - type: conditional + conditions: + - entity: binary_sensor.victron_evcs_vehicle_connected + state: "off" + card: + type: markdown + content: | + ## ℹ️ Véhicule non détecté + + - type: conditional + conditions: + - entity: binary_sensor.victron_evcs_vehicle_connected + state: "on" + - entity: switch.victron_evcs_charging + state: "off" + card: + type: markdown + content: | + ## ⚠️ Véhicule connecté mais charge inactive + + - type: conditional + conditions: + - entity: switch.victron_evcs_charging + state: "on" + card: + type: markdown + content: | + ## ✅ Charge EVCS active + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-template-card + entity: sensor.victron_evcs_status + primary: EVCS + secondary: > + {{ states('sensor.victron_evcs_status') }} + • Mode {{ states('sensor.victron_evcs_mode') }} + • {{ 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_mode + name: Mode borne + - entity: sensor.victron_evcs_status_raw + name: Statut 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 + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Session + subtitle: Puissance / courant / énergie + + - 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 + • {{ states('sensor.victron_evcs_l1_energy_forward') | float(0) | round(2) }} kWh + 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_l1_energy_forward + name: Énergie session + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Actions rapides + subtitle: Contrôle direct + + - 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: switch.victron_evcs_auto_start + name: Auto Start + icon: mdi:auto-mode + 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: "#42a5f5" + - 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 + 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: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Stratégie + subtitle: Besoin véhicule / départ + + - type: custom:mushroom-template-card + primary: Départ & besoin + secondary: > + Véhicule {{ states('input_select.victron_evcs_target_vehicle') }} + • Besoin {{ 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 + show_header_toggle: false + entities: + - entity: input_select.victron_evcs_target_vehicle + name: Véhicule cible + - 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 + - entity: input_boolean.victron_advice_evcs_ok + name: EVCS OK selon advisor + + - 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: Historique court + subtitle: 6 dernières heures + + - type: custom:apexcharts-card + graph_span: 6h + header: + show: true + title: Session EVCS + show_states: false + series: + - entity: sensor.victron_evcs_current + name: Courant EVCS + color: "#42a5f5" + - entity: sensor.victron_evcs_set_current + name: Consigne lue + color: "#ffca28" + - entity: sensor.victron_evcs_ac_power + name: Puissance EVCS + color: "#66bb6a" + diff --git a/dashboards/test_cards.yaml b/dashboards/test_cards.yaml new file mode 100755 index 0000000..3482699 --- /dev/null +++ b/dashboards/test_cards.yaml @@ -0,0 +1,124 @@ +views: + - title: Test Cards + path: default_view + icon: mdi:test-tube + cards: + - type: markdown + content: | + ## Test cartes custom + Ce dashboard sert uniquement à valider les cartes HACS. + Si une carte plante ici, elle ne casse pas le Master. + + - type: custom:mushroom-template-card + entity: sensor.victron_battery_soc + primary: Batterie + secondary: > + SOC {{ states('sensor.victron_battery_soc') | float(0) | round(1) }} % + • {{ states('sensor.victron_battery_power') | float(0) | round(0) }} W + multiline_secondary: true + icon: mdi:battery + icon_color: > + {% set s = states('sensor.victron_battery_soc') | float(0) %} + {% if s < 25 %} red + {% elif s < 50 %} orange + {% elif s < 75 %} yellow + {% else %} green + {% endif %} + + - type: custom:button-card + entity: switch.victron_evcs_charging + name: EVCS 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: more-info + hold_action: + action: more-info + styles: + card: + - border-radius: 18px + - padding: 14px + name: + - font-size: 16px + - font-weight: 600 + state: + - font-size: 13px + state: + - value: "on" + color: "#43a047" + - value: "off" + color: "#757575" + + - type: custom:layout-card + layout_type: grid + layout: + grid-template-columns: 1fr 1fr + grid-gap: 16px + margin: 0 + cards: + - type: tile + entity: sensor.victron_pv_power_system + name: Test Layout - PV + - type: tile + entity: sensor.victron_consumption_power_l1 + name: Test Layout - Maison + + - type: markdown + content: | + **Card-mod OK si cette carte a une bordure bleue arrondie** + card_mod: + style: | + ha-card { + border: 2px solid #42a5f5; + border-radius: 16px; + padding: 8px; + } + + - type: tile + entity: sensor.victron_pv_power_system + name: PV instantané + vertical: false + + - type: custom:apexcharts-card + graph_span: 6h + header: + show: true + title: Flux énergie + show_states: false + series: + - entity: sensor.victron_pv_power_system + name: PV + color: "#fdd835" + - entity: sensor.victron_consumption_power_l1 + name: Maison + color: "#42a5f5" + - entity: sensor.victron_grid_power_l1 + name: Réseau + color: "#ef5350" + - entity: sensor.victron_battery_power + name: Batterie + color: "#ab47bc" + + - type: custom:gauge-card-pro + entity: sensor.victron_battery_soc + header: Test Gauge Card Pro + min: 0 + max: 100 + needle: true + segments: + - from: 0 + color: "#f44336" + - from: 25 + color: "#ff9800" + - from: 50 + color: "#ffeb3b" + - from: 75 + color: "#4caf50" + diff --git a/dashboards/victron_debug.yaml b/dashboards/victron_debug.yaml new file mode 100755 index 0000000..a9aacfe --- /dev/null +++ b/dashboards/victron_debug.yaml @@ -0,0 +1,1040 @@ +views: + - title: Batterie + path: batterie + icon: mdi:battery-charging + panel: true + cards: + - type: vertical-stack + cards: + - type: conditional + conditions: + - entity: input_boolean.victron_auto_charge_enabled + state: "off" + card: + type: markdown + content: | + ## ⚠️ Automatisation batterie désactivée + Le workflow batterie ne pilote plus automatiquement les consignes de charge. + + - type: conditional + conditions: + - entity: input_boolean.victron_charge_override_enabled + state: "on" + card: + type: markdown + content: | + ## 🖐️ Override manuel actif + Un profil manuel remplace temporairement les consignes automatiques. + + - type: glance + title: Synthèse rapide + show_name: true + show_state: true + columns: 7 + entities: + - entity: sensor.victron_battery_soc + name: SOC + - entity: sensor.victron_consumption_power_l1 + name: Charges AC + - entity: switch.edf_general_ok_switch + name: Réseau + - entity: sensor.victron_grid_power_l1 + name: Grid W + - entity: sensor.victron_pv_power_system + name: PV + - entity: sensor.victron_evcs_ac_power + name: EVCS W + - entity: sensor.victron_battery_current + name: Batt A + + - type: horizontal-stack + cards: + - type: gauge + entity: sensor.victron_battery_soc + name: SOC batterie + min: 0 + max: 100 + severity: + red: 0 + yellow: 22 + green: 35 + + - type: entities + title: Batterie - pilotage principal + show_header_toggle: false + entities: + - entity: input_boolean.victron_auto_charge_enabled + name: Automatisation batterie + - entity: input_boolean.victron_auto_charge_notifications + name: Notifications batterie + - entity: sensor.victron_battery_voltage + name: Tension batterie + - entity: sensor.victron_battery_current + name: Courant batterie + - entity: input_number.victron_soc_live + name: SOC vu par l'automate + - entity: input_text.victron_charge_reason + name: Raison batterie + - entity: input_text.victron_charge_last_signature + name: Signature batterie + secondary_info: last-changed + + - type: horizontal-stack + cards: + - type: entities + title: Override manuel charge + show_header_toggle: false + entities: + - entity: input_boolean.victron_charge_override_enabled + name: Override actif + - entity: input_select.victron_charge_override_profile + name: Profil override + - entity: input_number.victron_override_charge_current + name: Courant override + - entity: input_number.victron_override_charge_voltage + name: Tension override + - entity: input_datetime.victron_charge_override_until + name: Override jusqu'à + - entity: input_text.victron_charge_override_reason + name: Raison override + - entity: input_text.victron_effective_charge_profile + name: Profil appliqué + + - type: entities + title: Consignes batterie calculées / réelles + show_header_toggle: false + entities: + - entity: input_number.victron_target_charge_current + name: Courant cible automate + - entity: sensor.victron_max_charge_current_setting + name: Courant réglé Victron + - entity: input_number.victron_target_charge_voltage + name: Tension cible automate + - entity: sensor.victron_max_charge_voltage_setting + name: Tension réglée Victron + - entity: input_text.victron_charge_mode + name: Mode batterie + - entity: input_text.victron_effective_charge_profile + name: Profil batterie + + - type: horizontal-stack + cards: + - type: entities + title: Production / réseau / prévisions + show_header_toggle: false + entities: + - entity: switch.edf_general_ok_switch + name: Réseau EDF + - entity: sensor.victron_grid_power_l1 + name: Puissance réseau + - entity: sensor.victron_pv_power_system + name: Puissance PV + - entity: sensor.victron_consumption_power_l1 + name: Charges AC maison + - entity: sensor.energy_production_today_remaining + name: Production restante aujourd'hui + - entity: sensor.energy_production_tomorrow + name: Production demain + + - type: history-graph + title: Historique PV / AC / Grid + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: sensor.victron_pv_power_system + name: PV + - entity: sensor.victron_consumption_power_l1 + name: Charges AC + - entity: sensor.victron_grid_power_l1 + name: Grid + + - type: horizontal-stack + cards: + - type: history-graph + title: Historique courant cible vs réel batterie + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: input_number.victron_target_charge_current + name: Cible A + - entity: sensor.victron_max_charge_current_setting + name: Réel A + - entity: sensor.victron_battery_current + name: Batterie A + + - type: history-graph + title: Historique tension cible vs réelle batterie + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: input_number.victron_target_charge_voltage + name: Cible V + - entity: sensor.victron_max_charge_voltage_setting + name: Réel V + - entity: sensor.victron_battery_voltage + name: Batterie V + + - title: Advisor & Réseau + path: advisor-reseau + icon: mdi:transmission-tower + panel: true + cards: + - type: vertical-stack + cards: + - type: horizontal-stack + cards: + - type: entities + title: Flexible Load Advisor + show_header_toggle: false + entities: + - entity: input_boolean.victron_flexible_load_advisor_enabled + name: Advisor actif + - entity: input_boolean.victron_flexible_load_notifications + name: Notifications advisor + - entity: input_number.victron_end_of_day_soc_target + name: Cible SOC fin de journée + - entity: input_number.victron_flexible_safety_margin_kwh + name: Marge sécurité + - entity: input_number.victron_base_load_remaining_kwh + name: Charge de fond restante + - entity: input_text.victron_flexible_load_state + name: État advisor + - entity: input_text.victron_flexible_load_reason + name: Raison advisor + - entity: input_text.victron_flexible_load_last_signature + name: Signature advisor + secondary_info: last-changed + + - type: entities + title: Charges flexibles - verdict + show_header_toggle: false + entities: + - entity: input_boolean.victron_advice_evcs_ok + name: EVCS OK + - entity: input_boolean.victron_advice_water_heater_ok + name: Chauffe-eau OK (legacy) + - entity: input_boolean.victron_advice_dishwasher_ok + name: Lave-vaisselle OK + - entity: input_boolean.victron_advice_washer_ok + name: Lave-linge OK + - entity: input_boolean.victron_advice_garage_clim_ok + name: Garage OK + - entity: input_boolean.victron_advice_sdb_heater_ok + name: Chauffage SDB OK + - entity: input_select.victron_evcs_target_vehicle + name: Véhicule cible + - entity: input_number.victron_evcs_required_energy_kwh + name: Besoin EVCS + - entity: input_boolean.victron_evcs_departure_priority_enabled + name: Priorité départ + - entity: input_datetime.victron_evcs_departure_time + name: Heure départ + + - type: markdown + content: | + ## Feux vert / rouge - charges flexibles + + - type: grid + columns: 5 + square: false + cards: + - type: conditional + conditions: + - entity: input_boolean.victron_advice_evcs_ok + state: "on" + card: + type: markdown + content: | + ### ✅ EVCS OK + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_evcs_ok + state: "off" + card: + type: markdown + content: | + ### ❌ EVCS NON + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_water_heater_ok + state: "on" + card: + type: markdown + content: | + ### ✅ Chauffe-eau OK + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_water_heater_ok + state: "off" + card: + type: markdown + content: | + ### ❌ Chauffe-eau NON + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_dishwasher_ok + state: "on" + card: + type: markdown + content: | + ### ✅ Lave-vaisselle OK + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_dishwasher_ok + state: "off" + card: + type: markdown + content: | + ### ❌ Lave-vaisselle NON + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_washer_ok + state: "on" + card: + type: markdown + content: | + ### ✅ Lave-linge OK + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_washer_ok + state: "off" + card: + type: markdown + content: | + ### ❌ Lave-linge NON + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_garage_clim_ok + state: "on" + card: + type: markdown + content: | + ### ✅ Garage OK + + - type: conditional + conditions: + - entity: input_boolean.victron_advice_garage_clim_ok + state: "off" + card: + type: markdown + content: | + ### ❌ Garage NON + + - type: horizontal-stack + cards: + - type: entities + title: Chauffe-eau thermodynamique - Advisor V2 + show_header_toggle: false + entities: + - entity: input_boolean.victron_water_heater_advisor_enabled + name: Advisor chauffe-eau actif + - entity: input_boolean.victron_water_heater_notifications + name: Notifications chauffe-eau + - entity: input_select.victron_water_heater_hot_water_demand + name: Besoin ECS + - entity: input_select.victron_water_heater_recommended_mode + name: Mode recommandé + - entity: input_select.victron_water_heater_advice_color + name: Couleur conseil + - entity: input_boolean.victron_water_heater_green_allowed + name: Green autorisé + - entity: input_boolean.victron_water_heater_auto_allowed + name: Auto autorisé + - entity: input_boolean.victron_water_heater_boost_allowed + name: Boost autorisé + - entity: input_number.victron_water_heater_projected_end_of_day_soc + name: SOC fin de jour projeté + - entity: input_number.victron_water_heater_budget_margin_kwh + name: Marge budget ECS + - entity: input_text.victron_water_heater_advice_state + name: État advisor ECS + - entity: input_text.victron_water_heater_advice_reason + name: Raison advisor ECS + - entity: input_text.victron_water_heater_advice_last_signature + name: Signature advisor ECS + secondary_info: last-changed + + - type: entities + title: Chauffe-eau - réglages + show_header_toggle: false + entities: + - entity: switch.tt_chauffe_eau_pleumeur_switch + name: Chauffe-eau + - entity: sensor.tt_chauffe_eau_pleumeur_energie_totale + name: Énergie chauffe-eau + - entity: input_boolean.victron_water_heater_morning_boost_priority_enabled + name: Priorité boost matin + - entity: input_datetime.victron_water_heater_morning_boost_latest_time + name: Fin fenêtre boost matin + - entity: input_datetime.victron_water_heater_late_red_time + name: Heure tardive défavorable + - entity: input_number.victron_water_heater_green_power_w + name: Puissance Green + - entity: input_number.victron_water_heater_auto_power_w + name: Puissance Auto + - entity: input_number.victron_water_heater_boost_power_w + name: Puissance Boost + - entity: input_number.victron_water_heater_strong_forecast_kwh + name: Prévision forte + - entity: input_number.victron_water_heater_medium_forecast_kwh + name: Prévision moyenne + - entity: input_number.victron_water_heater_strong_pv_now_w + name: PV fort instantané + - entity: input_number.victron_water_heater_medium_pv_now_w + name: PV moyen instantané + - entity: input_number.victron_water_heater_morning_boost_min_soc_strong_day + name: SOC mini boost jour fort + - entity: input_number.victron_water_heater_boost_min_soc_medium_day + name: SOC mini boost jour moyen + - entity: input_number.victron_water_heater_end_of_day_soc_guard + name: Garde SOC fin de jour + - entity: input_number.victron_load_water_heater_kwh + name: Charge ECS estimée + + - type: markdown + content: | + ## Chauffe-eau - feu de décision + + - type: horizontal-stack + cards: + - type: conditional + conditions: + - entity: input_select.victron_water_heater_advice_color + state: green + card: + type: markdown + content: | + ### ✅ Chauffe-eau conseillé + + - type: conditional + conditions: + - entity: input_select.victron_water_heater_advice_color + state: orange + card: + type: markdown + content: | + ### ⚠️ Chauffe-eau possible mais prudent + + - type: conditional + conditions: + - entity: input_select.victron_water_heater_advice_color + state: red + card: + type: markdown + content: | + ### ❌ Chauffe-eau déconseillé + + - type: horizontal-stack + cards: + - type: conditional + conditions: + - entity: input_select.victron_water_heater_recommended_mode + state: green + card: + type: markdown + content: | + ### Mode recommandé : GREEN + + - type: conditional + conditions: + - entity: input_select.victron_water_heater_recommended_mode + state: auto + card: + type: markdown + content: | + ### Mode recommandé : AUTO + + - type: conditional + conditions: + - entity: input_select.victron_water_heater_recommended_mode + state: boost + card: + type: markdown + content: | + ### Mode recommandé : BOOST + + - type: conditional + conditions: + - entity: input_select.victron_water_heater_recommended_mode + state: "off" + card: + type: markdown + content: | + ### Mode recommandé : OFF + + - type: horizontal-stack + cards: + - type: entities + title: Grid Hysteresis + show_header_toggle: false + entities: + - entity: input_boolean.victron_grid_hysteresis_enabled + name: Hystérésis réseau active + - entity: input_boolean.victron_grid_hysteresis_notifications + name: Notifications réseau + - entity: input_boolean.victron_grid_hysteresis_latch + name: Latch réseau + - entity: input_number.victron_grid_soc_on + name: Seuil réseau ON + - entity: input_number.victron_grid_soc_off + name: Seuil réseau OFF + - entity: input_number.victron_grid_min_on_minutes + name: Durée mini ON + - entity: input_number.victron_grid_cooldown_minutes + name: Cooldown réseau + - entity: input_text.victron_grid_control_state + name: État réseau + - entity: input_text.victron_grid_control_reason + name: Raison réseau + - entity: input_text.victron_grid_control_last_signature + name: Signature réseau + secondary_info: last-changed + + - type: entities + title: Réseau - timestamps / sécurité + show_header_toggle: false + entities: + - entity: input_datetime.victron_grid_last_on_at + name: Dernier EDF ON + - entity: input_datetime.victron_grid_last_off_at + name: Dernier EDF OFF + - entity: input_number.victron_ac_loads_max_safe_w + name: Limite AC sûre + - entity: sensor.victron_consumption_power_l1 + name: Charges AC maison + - entity: sensor.victron_grid_power_l1 + name: Puissance réseau + - entity: switch.edf_general_ok_switch + name: Réseau EDF + + - title: EVCS + path: evcs + icon: mdi:ev-station + panel: true + cards: + - type: vertical-stack + cards: + - type: glance + title: EVCS - synthèse + show_name: true + show_state: true + columns: 6 + entities: + - entity: sensor.victron_evcs_status + name: Statut + - entity: sensor.victron_evcs_mode + name: Mode + - entity: sensor.victron_evcs_current + name: Courant + - entity: sensor.victron_evcs_ac_power + name: Puissance + - entity: binary_sensor.victron_evcs_vehicle_connected + name: Véhicule + - entity: switch.victron_evcs_charging + name: Charge + + - type: horizontal-stack + cards: + - type: entities + title: EVCS Victron - commandes + show_header_toggle: false + entities: + - entity: switch.victron_evcs_charging + name: Charge EVCS ON/OFF + - entity: switch.victron_evcs_auto_start + name: Auto Start EVCS + - entity: number.victron_evcs_set_current_command + name: Courant borne demandé + - entity: sensor.victron_evcs_set_current + name: Consigne borne lue + - entity: sensor.victron_evcs_current + name: Courant réel borne + - entity: sensor.victron_evcs_max_current + name: Courant max borne + - entity: sensor.victron_evcs_min_current + name: Courant min borne + - entity: sensor.victron_evcs_mode + name: Mode réel borne + - entity: sensor.victron_evcs_charging_time + name: Durée charge + + - type: entities + title: EVCS - état / énergie + show_header_toggle: false + entities: + - entity: sensor.victron_evcs_status + name: Statut EVCS + - entity: sensor.victron_evcs_status_raw + name: Statut brut + - entity: binary_sensor.victron_evcs_device_connected + name: EVCS connecté au GX + - entity: binary_sensor.victron_evcs_vehicle_connected + name: EV probablement connecté + - entity: sensor.victron_evcs_connected_raw + name: Connected brut + - entity: sensor.victron_evcs_ac_power + name: Puissance EVCS + - entity: sensor.victron_evcs_l1_power + name: Puissance L1 + - entity: sensor.victron_evcs_l1_energy_forward + name: Énergie L1 + - entity: sensor.victron_evcs_product_name + name: Produit + - entity: sensor.victron_evcs_custom_name + name: Nom EVCS + - entity: sensor.victron_evcs_serial + name: Série + - entity: sensor.victron_evcs_firmware_version + name: Firmware + + - type: horizontal-stack + cards: + - type: entities + title: Besoin / départ véhicule + show_header_toggle: false + entities: + - entity: input_select.victron_evcs_target_vehicle + name: Véhicule cible + - entity: input_number.victron_evcs_required_energy_kwh + name: Besoin EVCS + - entity: input_boolean.victron_evcs_departure_priority_enabled + name: Priorité départ + - entity: input_datetime.victron_evcs_departure_time + name: Heure départ + - entity: input_boolean.victron_advice_evcs_ok + name: EVCS OK selon advisor + + - type: entities + title: Contexte énergie EVCS + 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 AC maison + - entity: sensor.victron_grid_power_l1 + name: Puissance réseau + - entity: switch.edf_general_ok_switch + name: Réseau EDF + + - type: conditional + conditions: + - entity: binary_sensor.victron_evcs_vehicle_connected + state: "off" + card: + type: markdown + content: | + ## ℹ️ Véhicule non détecté + Vérifie l'état de connexion avant de diagnostiquer la charge. + + - type: conditional + conditions: + - entity: binary_sensor.victron_evcs_vehicle_connected + state: "on" + - entity: switch.victron_evcs_charging + state: "off" + card: + type: markdown + content: | + ## ⚠️ Véhicule connecté mais charge inactive + + - type: conditional + conditions: + - entity: switch.victron_evcs_charging + state: "on" + card: + type: markdown + content: | + ## ✅ Charge EVCS active + + - title: Garage / SDB / Historiques + path: confort-historiques + icon: mdi:home-thermometer + panel: true + cards: + - type: vertical-stack + cards: + - type: horizontal-stack + cards: + - type: entities + title: Charges pilotables maison + show_header_toggle: false + entities: + - entity: switch.tt_chauffe_eau_pleumeur_switch + name: Chauffe-eau + - entity: sensor.tt_chauffe_eau_pleumeur_energie_totale + name: Énergie chauffe-eau + - entity: switch.lave_vaisselles_socket_1 + name: Lave-vaisselle + - entity: sensor.lave_vaisselles_energie_totale + name: Énergie lave-vaisselle + - entity: switch.tt_lave_linge_frigo_ariston_socket_1 + name: Lave-linge + - entity: sensor.tt_lave_linge_frigo_ariston_energie_totale + name: Énergie lave-linge + + - type: entities + title: Garage / SDB / auxiliaires + show_header_toggle: false + entities: + - entity: switch.clim_hygro_socket_1 + name: Clim / Hygro garage + - entity: sensor.clim_hygro_energie_totale + name: Énergie clim / hygro + - entity: switch.sdb_prise_socket_1 + name: SDB prise + - entity: sensor.sdb_prise_energie_totale + name: Énergie SDB prise + - entity: switch.deshumide_sdb_socket_1 + name: Déshumidificateur SDB + - entity: sensor.deshumide_sdb_energie_totale + name: Énergie déshumidificateur + - entity: switch.sdb_radiateur_socket_1 + name: Radiateur SDB + - entity: sensor.sdb_radiateur_energie_totale + name: Énergie radiateur SDB + + - type: markdown + content: | + ## Garage - lecture rapide + + - type: horizontal-stack + cards: + - type: conditional + conditions: + - entity: switch.clim_hygro_socket_1 + state: "on" + - entity: input_boolean.garage_clim_latch + state: "on" + card: + type: markdown + content: | + ### ✅ Garage maintenu par l'automate + + - type: conditional + conditions: + - entity: switch.clim_hygro_socket_1 + state: "on" + - entity: input_boolean.garage_clim_latch + state: "off" + card: + type: markdown + content: | + ### 🟠 Garage ON manuel / non maintenu + + - type: conditional + conditions: + - entity: switch.clim_hygro_socket_1 + state: "off" + - entity: input_boolean.garage_clim_latch + state: "off" + card: + type: markdown + content: | + ### ☑️ Garage au repos + + - type: conditional + conditions: + - entity: switch.clim_hygro_socket_1 + state: "off" + - entity: input_boolean.garage_clim_latch + state: "on" + card: + type: markdown + content: | + ### ❌ État garage incohérent à vérifier + + - type: horizontal-stack + cards: + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: manual_on_outside_window + card: + type: markdown + content: | + **Garage :** ON manuel observé hors fenêtre + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: manual_on_not_adopted + card: + type: markdown + content: | + **Garage :** ON manuel non adopté par l'automate + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: manual_on_adopted + card: + type: markdown + content: | + **Garage :** ON manuel adopté par l'automate + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: auto_start + card: + type: markdown + content: | + **Garage :** démarrage automatique + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: auto_running + card: + type: markdown + content: | + **Garage :** fonctionnement automatique + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: hold_min_on + card: + type: markdown + content: | + **Garage :** maintien temps mini ON + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: hold_min_on_outside_window + card: + type: markdown + content: | + **Garage :** maintien mini ON hors fenêtre + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: outside_window + card: + type: markdown + content: | + **Garage :** hors fenêtre, pas de pilotage auto + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: outside_window_release + card: + type: markdown + content: | + **Garage :** relâché par l'automate hors fenêtre + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: conditions_not_met + card: + type: markdown + content: | + **Garage :** besoin détecté mais conditions insuffisantes + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: wait_min_off + card: + type: markdown + content: | + **Garage :** attente temps mini OFF + + - type: conditional + conditions: + - entity: input_text.garage_clim_state + state: idle + card: + type: markdown + content: | + **Garage :** repos / confort OK + + - type: horizontal-stack + cards: + - type: entities + title: Garage thermique - pilotage + show_header_toggle: false + entities: + - entity: input_boolean.garage_clim_surplus_auto_enabled + name: Auto garage + - entity: input_boolean.garage_clim_surplus_notifications + name: Notifications garage + - entity: input_boolean.garage_clim_manual_adopt_enabled + name: Adoption manuelle garage + - entity: input_boolean.garage_clim_latch + name: Latch garage + - entity: input_text.garage_clim_state + name: État garage + - entity: input_text.garage_clim_reason + name: Raison garage + - entity: input_text.garage_clim_last_signature + name: Signature garage + secondary_info: last-changed + - entity: switch.clim_hygro_socket_1 + name: Clim / Hygro garage + + - type: entities + title: Garage thermique - seuils + show_header_toggle: false + entities: + - entity: sensor.garage_t_temperature + name: Température garage + - entity: input_number.garage_temp_min_c + name: Temp min garage + - entity: input_number.garage_temp_max_c + name: Temp max garage + - entity: input_number.garage_clim_soc_on + name: SOC ON garage + - entity: input_number.garage_clim_soc_off + name: SOC OFF garage + - entity: input_number.garage_clim_pv_on_w + name: PV ON garage + - entity: input_number.garage_clim_pv_off_w + name: PV OFF garage + - entity: input_number.garage_clim_surplus_min_kwh + name: Surplus mini garage + - entity: input_number.garage_clim_min_on_minutes + name: Temps mini ON garage + - entity: input_number.garage_clim_min_off_minutes + name: Temps mini OFF garage + - entity: input_number.garage_clim_battery_discharge_stop_a + name: Décharge stop garage + - entity: input_number.garage_clim_house_ac_max_w + name: Charge AC max garage + - entity: input_datetime.garage_clim_start_time + name: Début autorisation garage + - entity: input_datetime.garage_clim_stop_time + name: Fin autorisation garage + - entity: input_datetime.garage_clim_last_on_at + name: Dernier ON garage + - entity: input_datetime.garage_clim_last_off_at + name: Dernier OFF garage + + - type: horizontal-stack + cards: + - type: entities + title: SDB Climate & Surplus - pilotage + show_header_toggle: false + entities: + - entity: input_boolean.sdb_climate_surplus_auto_enabled + name: Auto SDB climate/surplus + - entity: input_boolean.sdb_climate_surplus_notifications + name: Notifications SDB + - entity: input_boolean.sdb_radiator_surplus_auto_enabled + name: Auto radiateur SDB + - entity: input_boolean.sdb_master_manual_adopt_enabled + name: Adoption manuelle maître + - entity: input_boolean.sdb_master_power_latch + name: Latch prise SDB + - entity: input_boolean.sdb_deshumide_latch + name: Latch déshumidificateur + - entity: input_boolean.sdb_radiator_latch + name: Latch radiateur + - entity: input_text.sdb_climate_surplus_state + name: État SDB + - entity: input_text.sdb_climate_surplus_reason + name: Raison SDB + - entity: input_text.sdb_climate_surplus_last_signature + name: Signature SDB + secondary_info: last-changed + - entity: switch.sdb_prise_socket_1 + name: SDB prise + - entity: switch.deshumide_sdb_socket_1 + name: Déshumidificateur SDB + - entity: switch.sdb_radiateur_socket_1 + name: Radiateur SDB + + - type: entities + title: SDB - ambiance / seuils + show_header_toggle: false + entities: + - entity: sensor.sdb_temp_hygro_temperature + name: Température SDB + - entity: sensor.sdb_temp_hygro_humidite + name: Humidité SDB + - entity: input_number.sdb_temp_on_min_c + name: Temp ON mini + - entity: input_number.sdb_temp_off_max_c + name: Temp OFF max + - entity: input_number.sdb_humidity_on_pct + name: Humidité ON + - entity: input_number.sdb_humidity_off_pct + name: Humidité OFF + - entity: input_number.sdb_deshumide_min_on_minutes + name: Déshumide temps mini ON + - entity: input_number.sdb_deshumide_min_off_minutes + name: Déshumide temps mini OFF + - entity: input_number.sdb_radiator_soc_on + name: Radiateur SOC ON + - entity: input_number.sdb_radiator_soc_off + name: Radiateur SOC OFF + - entity: input_number.sdb_radiator_pv_on_w + name: Radiateur PV ON + - entity: input_number.sdb_radiator_pv_off_w + name: Radiateur PV OFF + - entity: input_number.sdb_radiator_battery_charge_ceiling_a + name: Radiateur plafond charge batterie + - entity: input_number.sdb_radiator_house_ac_max_w + name: Radiateur AC max maison + - entity: input_number.sdb_radiator_min_on_minutes + name: Radiateur temps mini ON + - entity: input_number.sdb_radiator_min_off_minutes + name: Radiateur temps mini OFF + - entity: input_datetime.sdb_master_last_on_at + name: Dernier ON prise SDB + - entity: input_datetime.sdb_master_last_off_at + name: Dernier OFF prise SDB + - entity: input_datetime.sdb_deshumide_last_on_at + name: Dernier ON déshumide + - entity: input_datetime.sdb_deshumide_last_off_at + name: Dernier OFF déshumide + - entity: input_datetime.sdb_radiator_last_on_at + name: Dernier ON radiateur + - entity: input_datetime.sdb_radiator_last_off_at + name: Dernier OFF radiateur + + - type: history-graph + title: Historique batterie / PV / charges AC / réseau + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: sensor.victron_battery_soc + name: SOC batterie + - entity: sensor.victron_pv_power_system + name: PV + - entity: sensor.victron_consumption_power_l1 + name: Charges AC + - entity: sensor.victron_grid_power_l1 + name: Grid + + - type: history-graph + title: Historique garage / SDB / SOC + hours_to_show: 24 + refresh_interval: 60 + entities: + - entity: switch.clim_hygro_socket_1 + name: Clim garage + - entity: switch.deshumide_sdb_socket_1 + name: Déshumide SDB + - entity: switch.sdb_radiateur_socket_1 + name: Radiateur SDB + - entity: sensor.victron_battery_soc + name: SOC batterie + diff --git a/dashboards/victron_master.yaml b/dashboards/victron_master.yaml new file mode 100755 index 0000000..50a8c5c --- /dev/null +++ b/dashboards/victron_master.yaml @@ -0,0 +1,367 @@ +views: + - title: Master + path: default_view + icon: mdi:home-battery + cards: + - type: vertical-stack + cards: + - type: custom:mushroom-title-card + title: Victron Master + subtitle: Vue premium de synthèse énergie / pilotage + + - type: conditional + conditions: + - entity: input_boolean.victron_auto_charge_enabled + state: "off" + card: + type: markdown + content: | + ## ⚠️ Automatisation batterie désactivée + + - type: conditional + conditions: + - entity: input_boolean.victron_charge_override_enabled + state: "on" + card: + type: markdown + content: | + ## 🖐️ Override batterie actif + + - type: conditional + conditions: + - entity: switch.edf_general_ok_switch + state: "off" + card: + type: markdown + content: | + ## ⚠️ Réseau EDF désactivé + + - type: custom:layout-card + layout_type: grid + layout: + grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)) + grid-gap: 16px + margin: 0 + cards: + - type: custom:vertical-stack-in-card + cards: + - type: custom:gauge-card-pro + entity: sensor.victron_battery_soc + header: Batterie + min: 0 + max: 100 + needle: true + segments: + - from: 0 + color: "#f44336" + - from: 25 + color: "#fb8c00" + - from: 50 + color: "#fdd835" + - from: 75 + color: "#43a047" + + - type: custom:mushroom-template-card + entity: sensor.victron_battery_soc + primary: Batterie + secondary: > + SOC {{ states('sensor.victron_battery_soc') | float(0) | round(1) }} % + • {{ states('sensor.victron_battery_power') | float(0) | round(0) }} W + • {{ states('input_text.victron_charge_mode') }} + multiline_secondary: true + icon: mdi:battery + icon_color: > + {% set s = states('sensor.victron_battery_soc') | float(0) %} + {% if s < 25 %} red + {% elif s < 50 %} orange + {% elif s < 75 %} yellow + {% else %} green + {% endif %} + + - type: entities + show_header_toggle: false + entities: + - entity: sensor.victron_battery_voltage + name: Tension batterie + - entity: sensor.victron_battery_current + name: Courant batterie + - entity: input_text.victron_charge_reason + name: Raison batterie + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Flux énergie + subtitle: Instantané + + - type: custom:mushroom-template-card + primary: Production PV + secondary: > + {{ states('sensor.victron_pv_power_system') | float(0) | round(0) }} W + icon: mdi:solar-power + icon_color: > + {% set pv = states('sensor.victron_pv_power_system') | float(0) %} + {% if pv < 300 %} grey + {% elif pv < 1500 %} yellow + {% else %} green + {% endif %} + + - type: custom:mushroom-template-card + primary: Consommation maison + secondary: > + {{ states('sensor.victron_consumption_power_l1') | float(0) | round(0) }} W + icon: mdi:home-lightning-bolt + icon_color: blue + + - type: custom:mushroom-template-card + primary: Réseau + secondary: > + {{ states('sensor.victron_grid_power_l1') | float(0) | round(0) }} W + icon: mdi:transmission-tower + icon_color: > + {% set g = states('sensor.victron_grid_power_l1') | float(0) %} + {% if g > 0 %} red + {% elif g < 0 %} green + {% else %} blue + {% endif %} + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Charges pilotées + subtitle: EVCS / Chauffe-eau / Garage + + - type: custom:mushroom-template-card + entity: sensor.victron_evcs_status + primary: EVCS + secondary: > + {{ states('sensor.victron_evcs_status') }} + • Mode {{ states('sensor.victron_evcs_mode') }} + • {{ states('sensor.victron_evcs_current') | float(0) | round(0) }} 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: switch.tt_chauffe_eau_pleumeur_switch + primary: Chauffe-eau + secondary: > + Mode recommandé : {{ states('input_select.victron_water_heater_recommended_mode') }} + multiline_secondary: true + icon: mdi:water-boiler + icon_color: > + {% if is_state('switch.tt_chauffe_eau_pleumeur_switch', 'on') %} + orange + {% else %} + grey + {% endif %} + + - type: custom:mushroom-template-card + entity: switch.clim_hygro_socket_1 + primary: Garage + secondary: > + {{ states('input_text.garage_clim_state') }} + multiline_secondary: true + icon: mdi:air-conditioner + icon_color: > + {% if is_state('switch.clim_hygro_socket_1', 'on') %} + cyan + {% else %} + grey + {% endif %} + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Pilotage & conseils + subtitle: États système + + - type: entities + show_header_toggle: false + entities: + - entity: input_boolean.victron_auto_charge_enabled + name: Automatisation batterie + - entity: input_boolean.victron_charge_override_enabled + name: Override batterie + - entity: input_boolean.victron_flexible_load_advisor_enabled + name: Flexible Load Advisor + - entity: input_boolean.victron_water_heater_advisor_enabled + name: Advisor chauffe-eau + - entity: input_boolean.victron_grid_hysteresis_enabled + name: Hystérésis réseau + - entity: input_text.victron_grid_control_state + name: État réseau + - entity: input_text.victron_flexible_load_state + name: État advisor + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Actions rapides + subtitle: Contrôle direct + + - type: grid + columns: 2 + square: false + cards: + - type: custom:button-card + entity: switch.victron_evcs_charging + name: EVCS + 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: more-info + styles: + card: + - border-radius: 18px + - padding: 12px + name: + - font-size: 15px + - font-weight: 600 + state: + - value: "on" + color: "#43a047" + - value: "off" + color: "#757575" + + - type: custom:button-card + entity: switch.tt_chauffe_eau_pleumeur_switch + name: Chauffe-eau + icon: mdi:water-boiler + 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: more-info + styles: + card: + - border-radius: 18px + - padding: 12px + name: + - font-size: 15px + - font-weight: 600 + state: + - value: "on" + color: "#fb8c00" + - value: "off" + color: "#757575" + + - type: custom:button-card + entity: switch.edf_general_ok_switch + name: Réseau EDF + icon: mdi:transmission-tower + 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: more-info + styles: + card: + - border-radius: 18px + - padding: 12px + name: + - font-size: 15px + - font-weight: 600 + state: + - value: "on" + color: "#42a5f5" + - value: "off" + color: "#e53935" + + - type: custom:button-card + entity: switch.clim_hygro_socket_1 + name: Garage + icon: mdi:air-conditioner + 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: more-info + styles: + card: + - border-radius: 18px + - padding: 12px + name: + - font-size: 15px + - font-weight: 600 + state: + - value: "on" + color: "#26c6da" + - value: "off" + color: "#757575" + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Verdict rapide + subtitle: Conseils automatisation + + - type: entities + show_header_toggle: false + entities: + - entity: input_boolean.victron_advice_evcs_ok + name: EVCS OK + - entity: input_boolean.victron_advice_water_heater_ok + name: Chauffe-eau OK + - entity: input_boolean.victron_advice_garage_clim_ok + name: Garage OK + - entity: input_boolean.victron_advice_sdb_heater_ok + name: Chauffage SDB OK + - entity: input_select.victron_water_heater_recommended_mode + name: Mode recommandé chauffe-eau + + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-title-card + title: Historique énergie + subtitle: 8 dernières heures + + - type: custom:apexcharts-card + graph_span: 8h + header: + show: true + title: Flux énergie + show_states: false + series: + - entity: sensor.victron_pv_power_system + name: PV + color: "#fdd835" + - entity: sensor.victron_consumption_power_l1 + name: Maison + color: "#42a5f5" + - entity: sensor.victron_grid_power_l1 + name: Réseau + color: "#ef5350" + - entity: sensor.victron_battery_power + name: Batterie + color: "#ab47bc" + diff --git a/dashboards/victron_mobile.yaml b/dashboards/victron_mobile.yaml new file mode 100755 index 0000000..4769486 --- /dev/null +++ b/dashboards/victron_mobile.yaml @@ -0,0 +1,383 @@ +views: + - title: Mobile + path: default_view + icon: mdi:cellphone + cards: + - type: vertical-stack + cards: + - type: custom:mushroom-title-card + title: Victron Mobile + subtitle: Vue rapide iPhone / écran étroit + + - type: conditional + conditions: + - entity: input_boolean.victron_auto_charge_enabled + state: "off" + card: + type: markdown + content: | + ## ⚠️ Auto batterie OFF + + - type: conditional + conditions: + - entity: input_boolean.victron_charge_override_enabled + state: "on" + card: + type: markdown + content: | + ## 🖐️ Override actif + + - type: conditional + conditions: + - entity: switch.edf_general_ok_switch + state: "off" + card: + type: markdown + content: | + ## ⚠️ Réseau EDF OFF + + - type: custom:vertical-stack-in-card + mode: vertical + card_mod: + style: | + ha-card { + border-radius: 20px; + border: 1px solid rgba(255,255,255,0.10); + box-shadow: 0 6px 16px rgba(0,0,0,0.18); + } + cards: + - type: custom:gauge-card-pro + entity: sensor.victron_battery_soc + header: SOC Batterie + min: 0 + max: 100 + needle: true + segments: + - from: 0 + color: "#f44336" + - from: 25 + color: "#fb8c00" + - from: 50 + color: "#fdd835" + - from: 75 + color: "#43a047" + + - type: custom:mushroom-template-card + entity: sensor.victron_battery_soc + primary: Batterie + secondary: > + {{ states('sensor.victron_battery_soc') | float(0) | round(1) }} % + • {{ states('sensor.victron_battery_power') | float(0) | round(0) }} W + • {{ states('input_text.victron_charge_mode') }} + multiline_secondary: true + icon: mdi:battery + icon_color: > + {% set s = states('sensor.victron_battery_soc') | float(0) %} + {% if s < 25 %} red + {% elif s < 50 %} orange + {% elif s < 75 %} yellow + {% else %} green + {% endif %} + + - type: custom:vertical-stack-in-card + mode: vertical + card_mod: + style: | + ha-card { + border-radius: 20px; + border: 1px solid rgba(255,255,255,0.10); + box-shadow: 0 6px 16px rgba(0,0,0,0.18); + } + cards: + - type: custom:mushroom-title-card + title: Énergie + subtitle: Instantané + + - type: custom:mushroom-template-card + primary: Production PV + secondary: > + {{ states('sensor.victron_pv_power_system') | float(0) | round(0) }} W + icon: mdi:solar-power + icon_color: > + {% set pv = states('sensor.victron_pv_power_system') | float(0) %} + {% if pv < 300 %} grey + {% elif pv < 1500 %} yellow + {% else %} green + {% endif %} + + - type: custom:mushroom-template-card + primary: Maison + secondary: > + {{ states('sensor.victron_consumption_power_l1') | float(0) | round(0) }} W + icon: mdi:home-lightning-bolt + icon_color: blue + + - type: custom:mushroom-template-card + primary: Réseau + secondary: > + {{ states('sensor.victron_grid_power_l1') | float(0) | round(0) }} W + icon: mdi:transmission-tower + icon_color: > + {% set g = states('sensor.victron_grid_power_l1') | float(0) %} + {% if g > 0 %} red + {% elif g < 0 %} green + {% else %} blue + {% endif %} + + - type: custom:vertical-stack-in-card + mode: vertical + card_mod: + style: | + ha-card { + border-radius: 20px; + border: 1px solid rgba(255,255,255,0.10); + box-shadow: 0 6px 16px rgba(0,0,0,0.18); + } + cards: + - type: custom:mushroom-title-card + title: Charges pilotées + subtitle: États clés + + - type: custom:mushroom-template-card + entity: sensor.victron_evcs_status + primary: EVCS + secondary: > + {{ states('sensor.victron_evcs_status') }} + • {{ states('sensor.victron_evcs_current') | float(0) | round(0) }} 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: switch.tt_chauffe_eau_pleumeur_switch + primary: Chauffe-eau + secondary: > + {{ states('input_select.victron_water_heater_recommended_mode') }} + multiline_secondary: true + icon: mdi:water-boiler + icon_color: > + {% if is_state('switch.tt_chauffe_eau_pleumeur_switch', 'on') %} + orange + {% else %} + grey + {% endif %} + + - type: custom:mushroom-template-card + entity: switch.clim_hygro_socket_1 + primary: Garage + secondary: > + {{ states('input_text.garage_clim_state') }} + multiline_secondary: true + icon: mdi:air-conditioner + icon_color: > + {% if is_state('switch.clim_hygro_socket_1', 'on') %} + cyan + {% else %} + grey + {% endif %} + + - type: custom:vertical-stack-in-card + mode: vertical + card_mod: + style: | + ha-card { + border-radius: 20px; + border: 1px solid rgba(255,255,255,0.10); + box-shadow: 0 6px 16px rgba(0,0,0,0.18); + } + cards: + - type: custom:mushroom-title-card + title: Actions rapides + subtitle: Contrôle direct + + - type: grid + columns: 2 + square: false + cards: + - type: custom:button-card + entity: switch.victron_evcs_charging + name: EVCS + 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: more-info + styles: + card: + - border-radius: 18px + - padding: 10px + name: + - font-size: 14px + - font-weight: 600 + state: + - font-size: 12px + state: + - value: "on" + color: "#43a047" + - value: "off" + color: "#757575" + + - type: custom:button-card + entity: switch.tt_chauffe_eau_pleumeur_switch + name: ECS + icon: mdi:water-boiler + 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: more-info + styles: + card: + - border-radius: 18px + - padding: 10px + name: + - font-size: 14px + - font-weight: 600 + state: + - font-size: 12px + state: + - value: "on" + color: "#fb8c00" + - value: "off" + color: "#757575" + + - type: custom:button-card + entity: switch.edf_general_ok_switch + name: Réseau + icon: mdi:transmission-tower + 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: more-info + styles: + card: + - border-radius: 18px + - padding: 10px + name: + - font-size: 14px + - font-weight: 600 + state: + - font-size: 12px + state: + - value: "on" + color: "#42a5f5" + - value: "off" + color: "#e53935" + + - type: custom:button-card + entity: switch.clim_hygro_socket_1 + name: Garage + icon: mdi:air-conditioner + 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: more-info + styles: + card: + - border-radius: 18px + - padding: 10px + name: + - font-size: 14px + - font-weight: 600 + state: + - font-size: 12px + state: + - value: "on" + color: "#26c6da" + - value: "off" + color: "#757575" + + - type: custom:vertical-stack-in-card + mode: vertical + card_mod: + style: | + ha-card { + border-radius: 20px; + border: 1px solid rgba(255,255,255,0.10); + box-shadow: 0 6px 16px rgba(0,0,0,0.18); + } + cards: + - type: custom:mushroom-title-card + title: Verdict rapide + subtitle: Automatisation + + - type: entities + show_header_toggle: false + entities: + - entity: input_boolean.victron_advice_evcs_ok + name: EVCS OK + - entity: input_boolean.victron_advice_water_heater_ok + name: ECS OK + - entity: input_boolean.victron_advice_garage_clim_ok + name: Garage OK + - entity: input_boolean.victron_advice_sdb_heater_ok + name: SDB OK + - entity: input_select.victron_water_heater_recommended_mode + name: Mode ECS + - entity: input_text.victron_grid_control_state + name: État réseau + + - type: custom:vertical-stack-in-card + mode: vertical + card_mod: + style: | + ha-card { + border-radius: 20px; + border: 1px solid rgba(255,255,255,0.10); + box-shadow: 0 6px 16px rgba(0,0,0,0.18); + } + cards: + - type: custom:mushroom-title-card + title: Historique court + subtitle: 4 dernières heures + + - type: custom:apexcharts-card + graph_span: 4h + header: + show: true + title: Flux énergie + show_states: false + series: + - entity: sensor.victron_pv_power_system + name: PV + color: "#fdd835" + - entity: sensor.victron_consumption_power_l1 + name: Maison + color: "#42a5f5" + - entity: sensor.victron_grid_power_l1 + name: Réseau + color: "#ef5350" + - entity: sensor.victron_battery_power + name: Batterie + color: "#ab47bc" + diff --git a/ha-configuration.yaml b/ha-configuration.yaml new file mode 100755 index 0000000..91e0130 --- /dev/null +++ b/ha-configuration.yaml @@ -0,0 +1,407 @@ +# Loads default set of integrations. Do not remove. +default_config: + +homeassistant: + packages: !include_dir_named packages + +# Retention de l'historique brut (24/08/2026) : 10 jours par defaut -> 90 jours. +# Motif : pouvoir rejouer un incident plusieurs semaines apres coup. Les incidents +# EDF/EVCS de juillet-aout n'ont pas pu etre reconstitues finement faute d'historique. +# NB : les statistiques long terme (sommes horaires, base du bilan energetique) sont +# deja conservees SANS limite et ne dependent pas de ce reglage. +# Dimensionnement : 10 jours ~= 2,6 Go, donc 90 jours ~= 23 Go (volume1 : 5 To libres). + +# ===================================================================== +# HISTORISATION LONGUE — InfluxDB sur 10.10.10.22 (ajoute le 04/09/2026) +# L'historique brut ci-dessous (recorder) tient ~20 jours pour 5 Go ; les +# statistiques long terme ne gardent que des moyennes horaires. InfluxDB +# garde le detail, sur la duree, hors de cette machine. +# Details et mise en service : deploy/historisation/README.md du depot EVCS. +# ===================================================================== +influxdb: + # Pourquoi une liste plutôt que « tout » : la maison publie ~1,14 M états par + # jour, dont l'essentiel n'a aucun rapport avec l'énergie. On garde large sur + # le périmètre énergie — c'est justement là qu'on ne sait pas d'avance ce + # dont on aura besoin, comme l'ont montré les modes MPPT le 03/09 — et on + # laisse le reste de côté. + include: + entity_globs: + - sensor.victron_* + # Les capteurs propres a la borne (13 entites) : compteur cumulatif, + # energie et duree de la derniere session, statut. Absents jusqu'au + # 06/09, ce qui a empeche d'etablir la semantique de + # `last_session_energy` quand elle a fausse une cloture de session. + - sensor.evcs_* + - sensor.mppt_* + - sensor.airtria_* + - sensor.gx_device_* + - sensor.sun_solar_elevation + - binary_sensor.victron_* + - switch.edf_* + - switch.gx_device_* + - number.gx_device_* + - input_boolean.victron_evcs_* + - input_boolean.evcs_* + - input_number.victron_evcs_* + - input_number.evcs_* + - input_select.victron_evcs_* + - input_text.victron_evcs_* + - input_text.evcs_* + exclude: + entities: + # Une clé d'API n'a rien à faire dans une base de séries temporelles. + - input_text.evcs_balance_forecast_api_key + tags: + installation: airtria + +recorder: + purge_keep_days: 90 + exclude: + entities: + # Clé d'API : aucune raison de l'archiver 90 jours dans la base. + - input_text.evcs_balance_forecast_api_key + +# Load frontend themes from the themes folder +frontend: + themes: !include_dir_merge_named themes + +automation: !include automations.yaml +script: !include scripts.yaml +scene: !include scenes.yaml + +#gestion MQTT +mqtt: + sensor: + - name: "Victron Max Charge Current Setting" + unique_id: victron_max_charge_current_setting + state_topic: "N/c0619ab34ac5/settings/0/Settings/SystemSetup/MaxChargeCurrent" + value_template: "{{ value_json.value if value_json is defined and value_json.value is defined }}" + json_attributes_topic: "N/c0619ab34ac5/settings/0/Settings/SystemSetup/MaxChargeCurrent" + unit_of_measurement: "A" + icon: mdi:current-dc + state_class: measurement + + - name: "Victron Max Charge Voltage Setting" + unique_id: victron_max_charge_voltage_setting + state_topic: "N/c0619ab34ac5/settings/0/Settings/SystemSetup/MaxChargeVoltage" + value_template: "{{ value_json.value if value_json is defined and value_json.value is defined }}" + json_attributes_topic: "N/c0619ab34ac5/settings/0/Settings/SystemSetup/MaxChargeVoltage" + unit_of_measurement: "V" + icon: mdi:flash + state_class: measurement + + - name: "Victron Battery SoC Live" + unique_id: victron_battery_soc_live + state_topic: "N/c0619ab34ac5/battery/512/Soc" + value_template: "{{ value_json.value | float(0) if value_json is defined and value_json.value is defined }}" + unit_of_measurement: "%" + device_class: battery + state_class: measurement + expire_after: 600 + # force_update: true # optionnel (je te conseille de le laisser commenté au début) + + - name: "Victron Battery SoC" + unique_id: victron_battery_soc + state_topic: "N/c0619ab34ac5/battery/512/Soc" + unit_of_measurement: "%" + device_class: battery + value_template: "{{ value_json.value | float(0) if value_json is defined and value_json.value is defined }}" + expire_after: 600 + force_update: true + state_class: measurement + + - name: "Victron Battery Voltage" + unique_id: victron_battery_voltage + state_topic: "N/c0619ab34ac5/battery/512/Dc/0/Voltage" + unit_of_measurement: "V" + device_class: voltage + value_template: "{{ value_json.value | float(0) if value_json is defined and value_json.value is defined }}" + state_class: measurement + + - name: "Victron Battery Current" + unique_id: victron_battery_current + state_topic: "N/c0619ab34ac5/battery/512/Dc/0/Current" + unit_of_measurement: "A" + device_class: current + value_template: "{{ value_json.value | float(0) if value_json is defined and value_json.value is defined }}" + state_class: measurement + + - name: "Victron Battery Power" + unique_id: victron_battery_power + state_topic: "N/c0619ab34ac5/battery/512/Dc/0/Power" + unit_of_measurement: "W" + device_class: power + value_template: "{{ value_json.value | float(0) if value_json is defined and value_json.value is defined }}" + state_class: measurement + + - name: "Victron Battery Temperature" + unique_id: victron_battery_temperature + state_topic: "N/c0619ab34ac5/battery/512/Dc/0/Temperature" + unit_of_measurement: "°C" + device_class: temperature + value_template: "{{ value_json.value | float(0) if value_json is defined and value_json.value is defined }}" + state_class: measurement + + - name: "Victron PV Power (system)" + unique_id: victron_pv_power + state_topic: "N/c0619ab34ac5/system/0/Dc/Pv/Power" + unit_of_measurement: "W" + device_class: power + value_template: "{{ value_json.value | float(0) if value_json is defined and value_json.value is defined }}" + state_class: measurement + + - name: "Victron VE.Bus DC Power (system)" + unique_id: victron_vebus_dc_power + state_topic: "N/c0619ab34ac5/system/0/Dc/Vebus/Power" + unit_of_measurement: "W" + device_class: power + value_template: "{{ value_json.value | float(0) if value_json is defined and value_json.value is defined }}" + state_class: measurement + + - name: "Victron Grid Power L1" + unique_id: victron_grid_power_l1 + state_topic: "N/c0619ab34ac5/system/0/Ac/Grid/L1/Power" + unit_of_measurement: "W" + device_class: power + value_template: "{{ value_json.value | float(0) if value_json is defined and value_json.value is defined }}" + state_class: measurement + + - name: "Victron Consumption Power L1" + unique_id: victron_consumption_power_l1 + state_topic: "N/c0619ab34ac5/system/0/Ac/Consumption/L1/Power" + unit_of_measurement: "W" + device_class: power + value_template: "{{ value_json.value | float(0) if value_json is defined and value_json.value is defined }}" + state_class: measurement + + - name: "Victron VE.Bus State (raw)" + unique_id: victron_vebus_state_raw + state_topic: "N/c0619ab34ac5/vebus/276/State" + value_template: "{{ value_json.value | int(0) if value_json is defined and value_json.value is defined }}" + + - name: "Victron VE.Bus MainState (raw)" + unique_id: victron_vebus_mainstate_raw + state_topic: "N/c0619ab34ac5/vebus/276/VebusMainState" + value_template: "{{ value_json.value | int(0) if value_json is defined and value_json.value is defined }}" + + - name: "Victron VE.Bus ChargeState (raw)" + unique_id: victron_vebus_chargestate_raw + state_topic: "N/c0619ab34ac5/vebus/276/VebusChargeState" + value_template: "{{ value_json.value | int(0) if value_json is defined and value_json.value is defined }}" + + - name: "Victron AC-in1 available" + unique_id: victron_acin1_available + state_topic: "N/c0619ab34ac5/vebus/276/Ac/State/AcIn1Available" + value_template: "{{ value_json.value | int(0) if value_json is defined and value_json.value is defined }}" + +template: + - sensor: + - name: "Victron mode (derived)" + unique_id: victron_mode_derived + state: >- + {% set acin = states('sensor.victron_ac_in1_available')|int(0) %} + {% set gridw = states('sensor.victron_grid_power_l1')|float(0) %} + {% set batw = states('sensor.victron_battery_power')|float(0) %} + + {# Seuils anti-bruit #} + {% set GRID_ON_W = 50 %} + {% set BAT_CHG_W = 150 %} + {% set BAT_DIS_W = -150 %} + + {% if acin == 0 %} + {% if batw < BAT_DIS_W %} + Inverting (on battery) + {% else %} + Off-grid (idle/low load) + {% endif %} + {% else %} + {% if batw > BAT_CHG_W %} + Charging (AC-in) + {% elif gridw > GRID_ON_W %} + On grid (passthru/import) + {% else %} + Grid available (low import) + {% endif %} + {% endif %} + + - name: Victron EVCS Status FR + unique_id: victron_evcs_status_fr + icon: mdi:ev-station + state: >- + {% set raw = states('sensor.victron_evcs_status_raw') | string %} + {% set vehicle = is_state('binary_sensor.victron_evcs_vehicle_connected', 'on') %} + {% set charging_switch = is_state('switch.victron_evcs_charging', 'on') %} + {% set evcs_power = states('sensor.victron_evcs_ac_power') | float(0) %} + + {% if raw == '0' and not vehicle %} + EV déconnecté + {% elif raw == '2' %} + Charge en cours + {% elif raw == '6' and vehicle %} + Véhicule connecté - en attente + {% elif charging_switch or evcs_power > 100 %} + Charge en cours + {% elif raw in ['unknown', 'unavailable', '', 'none'] %} + Inconnu + {% else %} + Inconnu ({{ raw }}) + {% endif %} + attributes: + raw_status: "{{ states('sensor.victron_evcs_status_raw') }}" + vehicle_connected: "{{ states('binary_sensor.victron_evcs_vehicle_connected') }}" + charging_switch: "{{ states('switch.victron_evcs_charging') }}" + evcs_power_w: "{{ states('sensor.victron_evcs_ac_power') }}" + + - name: Victron EVCS mode FR + unique_id: victron_evcs_mode_fr + icon: mdi:tune + state: > + {% set raw = states('sensor.victron_evcs_mode_raw') | string %} + {% set source = states('sensor.victron_evcs_mode') | string %} + {% set label = source | lower %} + + {% if raw == '0' or label in ['manuel', 'manual'] %} + Manuel + {% elif raw == '1' or label in ['auto', 'automatic', 'automatique'] %} + Auto + {% elif raw == '2' or label in ['planifié', 'planifie', 'scheduled', 'schedule'] %} + Planifié + {% elif source not in ['unknown', 'unavailable', '', 'none'] %} + {{ source }} + {% else %} + Inconnu + {% endif %} + attributes: + raw_mode: "{{ states('sensor.victron_evcs_mode_raw') }}" + source_mode: "{{ states('sensor.victron_evcs_mode') }}" + +sensor: + - platform: filter + name: "Victron PV Power 10m Avg" + unique_id: victron_pv_power_10m_avg + entity_id: sensor.victron_pv_power_system + filters: + - filter: time_simple_moving_average + window_size: "00:10:00" + precision: 0 + + +lovelace: + dashboards: + bilan-energetique: + mode: yaml + title: Bilan énergétique + icon: mdi:scale-balance + show_in_sidebar: true + filename: dashboards/bilan_energetique.yaml + + victron-master: + mode: yaml + title: Victron Master + icon: mdi:home-battery + show_in_sidebar: true + filename: dashboards/victron_master.yaml + + victron-debug: + mode: yaml + title: Victron Debug + icon: mdi:bug + show_in_sidebar: true + require_admin: true + filename: dashboards/victron_debug.yaml + + test-cards: + mode: yaml + title: Test Cards + icon: mdi:test-tube + show_in_sidebar: true + require_admin: true + filename: dashboards/test_cards.yaml + + victron-mobile: + mode: yaml + title: Victron Mobile + icon: mdi:cellphone + show_in_sidebar: true + filename: dashboards/victron_mobile.yaml + + evcs-mobile: + mode: yaml + title: EVCS Mobile + icon: mdi:car-electric + show_in_sidebar: true + filename: dashboards/evcs_mobile.yaml + + evcs-master: + mode: yaml + title: EVCS Master + icon: mdi:car-electric + show_in_sidebar: true + filename: dashboards/evcs_master.yaml + + ecs-pilotage-premium: + mode: yaml + title: ECS Pilotage Premium + icon: mdi:water-boiler + show_in_sidebar: true + filename: dashboards/ECS_PILOTAGE_PREMIUM.yaml + + ecs-debug-reglages-premium: + mode: yaml + title: ECS Debug Réglages Premium + icon: mdi:bug + show_in_sidebar: true + require_admin: true + filename: dashboards/ECS_DEBUG_REGLAGES_PREMIUM.yaml + + garage-premium-pilotage: + mode: yaml + title: Garage Premium Pilotage + icon: mdi:garage-variant + show_in_sidebar: true + filename: dashboards/GARAGE_PREMIUM_PILOTAGE.yaml + + garage-debug-premium: + mode: yaml + title: Garage Debug Premium + icon: mdi:bug + show_in_sidebar: true + require_admin: true + filename: dashboards/GARAGE_DEBUG_PREMIUM.yaml + + garage-mobile: + mode: yaml + title: Garage Mobile + icon: mdi:cellphone + show_in_sidebar: true + filename: dashboards/GARAGE_MOBILE.yaml + + sdb-premium-pilotage: + mode: yaml + title: SDB Premium Pilotage + icon: mdi:shower-head + show_in_sidebar: true + filename: dashboards/SDB_PREMIUM_PILOTAGE.yaml + + sdb-debug-premium: + mode: yaml + title: SDB Debug Premium + icon: mdi:bug + show_in_sidebar: true + require_admin: true + filename: dashboards/SDB_DEBUG_PREMIUM.yaml + + + +# ===== NOUVELLE ENTITÉ V2.0 (Stratégie EVCS) ===== +input_select: + victron_evcs_strategy: + name: Stratégie EVCS Surplus + options: + - auto_solar + - auto_solar_plus + - force_grid_now + - force_charge_now + - stop + initial: "auto_solar_plus" + diff --git a/packages/evcs_advisor_shadow.yaml b/packages/evcs_advisor_shadow.yaml new file mode 100755 index 0000000..892d19e --- /dev/null +++ b/packages/evcs_advisor_shadow.yaml @@ -0,0 +1,113 @@ +# Conseiller IA — OBSERVATEUR (specialise le 12/09/2026) +# +# Il ne recommande plus d'action : il observe et signale. Les six helpers de +# l'epoque « recommandation » (strategie, cible SOC, plafond courant, charge du +# soir, divergence, et le toggle qui appliquait la cible) ont ete retires le +# 13/09/2026, en meme temps que leur cablage cote controleur. +# +# Pourquoi : depuis le 12/09 le conseiller n'ecrivait plus ces helpers, mais le +# controleur lisait toujours la cible. Ses quatre gardes passaient toutes — +# la garde de fraicheur date le RUN, pas la VALEUR — donc activer le toggle +# aurait applique un chiffre fige la veille. Un helper que plus personne +# n'ecrit, affiche comme une recommandation courante, est un piege. +# ⚠️ AUCUN `initial:` SUR LES REGLAGES MANUELS (06/09/2026). +# Dans Home Assistant, declarer `initial:` DESACTIVE la restauration d'etat : +# le helper est force a cette valeur a CHAQUE demarrage. Un reglage fait a la +# main est donc perdu au premier redemarrage, en silence. +# Constate deux fois sur le selecteur de vehicule (04/09 puis 06/09 : JEEP +# repasse a VW), et diagnostique le 06/09 en comparant avec +# `input_select.victron_evcs_strategy`, cree par l'interface donc sans +# `initial:`, qui survivait a tous les redemarrages. +# Les helpers de RUNTIME, eux, gardent leur `initial:` : ils sont reecrits par +# les workflows au cycle suivant, et repartir d'un etat connu y est voulu. +# Contrepartie assumee : sur une installation neuve, sans etat a restaurer, un +# input_select prend sa premiere option, un input_number son `min` et un +# input_datetime 00:00. + +input_boolean: + evcs_advisor_enabled: + name: EVCS Advisor - Actif (mode ombre) + icon: mdi:robot-outline + +input_text: + evcs_advisor_reason: + name: EVCS Advisor - Raison + max: 255 + icon: mdi:comment-text-outline + initial: (pas encore de recommandation) + + # ── OBSERVATION (12/09/2026) ────────────────────────────────────────── + # La mission principale du conseiller n est plus de choisir une strategie + # mais de REPERER CE QUI CLOCHE : les pannes de ce systeme sont des + # contradictions entre automates, chacun localement correct, et elles ne se + # voient que dans la SUITE des evenements. Le 12/09 le contacteur reseau a + # bascule toutes les 4 minutes pendant dix minutes — une automatisation + # coupait a 35 % de SOC, l hysteresis rallumait. Aucun automate ne l a vu. + evcs_advisor_constat: + name: EVCS Advisor - Constat + max: 255 + icon: mdi:eye-outline + + evcs_advisor_gravite: + name: EVCS Advisor - Gravite + max: 16 + icon: mdi:alert-outline + + evcs_advisor_ce_qui_cloche: + name: EVCS Advisor - Ce qui cloche + max: 255 + icon: mdi:puzzle-remove-outline + + evcs_advisor_status: + name: EVCS Advisor - Statut + max: 30 + icon: mdi:heart-pulse + initial: never_ran + + evcs_advisor_last_run: + name: EVCS Advisor - Dernière exécution + max: 40 + icon: mdi:clock-check-outline + initial: jamais + + evcs_advisor_model: + name: EVCS Advisor - Modèle utilisé + max: 60 + icon: mdi:chip + initial: aucun + +input_number: + # ⚠️ PAS d'`initial:` SUR UN COMPTEUR. Dans Home Assistant, declarer + # `initial:` DESACTIVE la restauration d'etat : le helper est force a cette + # valeur a CHAQUE demarrage. Sans consequence pour les helpers que le + # workflow reecrit au cycle suivant, mais fatal ici — un compteur + # s'incremente depuis sa valeur precedente. Chaque redemarrage de HA remettait + # donc la campagne de mesure a zero, en silence. (Meme piege que le selecteur + # de vehicule et les toggles de cablage, corriges le 06/09.) + # + # Ces compteurs ont change de sens DEUX FOIS le 12/09, il faut le savoir avant + # de lire leur valeur : + # 1. a l'origine ils comparaient la STRATEGIE recommandee a la strategie + # reelle — quasi toujours auto_solar_plus, d'ou 517 accords contre 23 : + # un score qui mesurait une constante, pas une decision ; + # 2. puis l'ecart entre la cible SOC de l'agent et celle du bilan ; + # 3. depuis que le conseiller est specialise en OBSERVATEUR et ne + # recommande plus de cible, ils comptent le VOLUME DE SIGNALEMENTS. + # On ne peut pas verifier automatiquement s'il a raison ; on peut + # mesurer s'il crie au loup. + # Remis a zero le 13/09 au matin : c'est de la que part la mesure utile. + evcs_advisor_agree_count: + name: EVCS Advisor - Cycles calmes (gravite aucune) + min: 0 + max: 100000 + step: 1 + mode: box + icon: mdi:thumb-up-outline + + evcs_advisor_diverge_count: + name: EVCS Advisor - Signalements (gravite faible a haute) + min: 0 + max: 100000 + step: 1 + mode: box + icon: mdi:thumb-down-outline diff --git a/packages/evcs_energy_balance.yaml b/packages/evcs_energy_balance.yaml new file mode 100755 index 0000000..63982e6 --- /dev/null +++ b/packages/evcs_energy_balance.yaml @@ -0,0 +1,225 @@ +# ===================================================================== +# Bilan énergétique EVCS — helpers (chantier du 24/08/2026) +# MODE OMBRE : le workflow "EVCS Energy Balance V1" n'écrit QUE dans ces +# entités. Aucun switch, aucune consigne de borne, aucune stratégie. +# Voir docs/CHANTIER_BILAN_ENERGETIQUE.md dans le dépôt EVCS. +# ===================================================================== + +input_boolean: + evcs_balance_enabled: + name: "Bilan énergétique — actif (kill-switch)" + icon: mdi:scale-balance + initial: true + evcs_balance_grid_needed: + name: "Bilan — réseau nécessaire" + icon: mdi:transmission-tower + evcs_balance_pv_censored: + name: "Bilan — production actuellement bridée" + icon: mdi:solar-power-variant-outline + # Vrai à partir de la vigilance ORANGE — le seuil est celui de Météo-France, + # pas un nombre choisi ici. N'agit sur rien : mode ombre. + evcs_balance_storm_active: + name: "Bilan — vigilance orage active" + icon: mdi:weather-lightning + +input_number: + # Saisi par l'utilisateur : capacité réellement disponible du parc batterie. + # 7 modules US2000C actifs au 24/08/2026 (un isolé) -> ~15 kWh. + evcs_balance_usable_capacity_kwh: + name: "Bilan — capacité batterie utile" + min: 2 + max: 60 + step: 0.5 + unit_of_measurement: kWh + mode: box + icon: mdi:battery-high + # Nombre de modules US2000C REELLEMENT en service. La courbe energie/SOC a ete + # mesuree sur sept modules (HANDOFF §41) ; elle est mise a l'echelle de ce + # nombre par le bilan ET par le controleur EVCS, qui le lisent tous deux ici — + # les deux decrivent forcement le meme parc. + # Helper absent ou hors bornes => repli sur 7, la valeur de la mesure. + # 05/09/2026 : pack ancien isole et coupe au coupe-circuit -> 4. + # ⚠️ EN EQUIVALENTS US2000C, PAS EN MODULES PHYSIQUES. + # La courbe energie/SOC est mesuree par US2000C (0,091 kWh AC par point de + # SOC et par module). Un US5000 fait 100 Ah contre 50 : il en vaut DEUX. + # 4 US2000C ....................... 4 + # 4 US2000C + 4 US5000 ............ 12 + # Cette valeur alimente TROIS consommateurs a la fois : la capacite utile du + # controleur, la conversion energie/SOC du bilan, et l'echelle des bandes de + # politique batterie. Une erreur ici se propage aux trois. + evcs_balance_modules_en_service: + name: "Parc batterie — équivalents US2000C" + min: 1 + max: 24 + step: 1 + unit_of_measurement: équiv. + mode: box + icon: mdi:battery-sync + + # Calculés par le bilan. + evcs_balance_required_soc: + name: "Bilan — SOC requis (décision)" + min: 0 + max: 100 + step: 0.1 + unit_of_measurement: "%" + mode: box + icon: mdi:battery-alert-variant-outline + evcs_balance_required_soc_prudent: + name: "Bilan — SOC requis (planification)" + min: 0 + max: 100 + step: 0.1 + unit_of_measurement: "%" + mode: box + icon: mdi:battery-clock + evcs_balance_energy_to_cover_kwh: + name: "Bilan — énergie à couvrir" + min: 0 + max: 100 + step: 0.01 + unit_of_measurement: kWh + mode: box + icon: mdi:flash-outline + evcs_balance_grid_energy_needed_kwh: + name: "Bilan — énergie réseau nécessaire" + min: 0 + max: 100 + step: 0.01 + unit_of_measurement: kWh + mode: box + icon: mdi:transmission-tower-import + # Prochaine fenêtre de déficit (typiquement la nuit qui vient). + evcs_balance_next_deficit_kwh: + name: "Bilan — énergie de la prochaine traversée déficitaire" + min: 0 + max: 200 + step: 0.01 + unit_of_measurement: kWh + mode: box + icon: mdi:weather-night + evcs_balance_next_deficit_required_soc: + name: "Bilan — SOC requis avant la traversée" + min: 0 + max: 300 + step: 0.1 + unit_of_measurement: "%" + mode: box + icon: mdi:battery-charging-100 + # Au-dessus de 100 % de SOC requis : capacité utile manquante. + # C'est le chiffre du dimensionnement du stockage. + evcs_balance_storage_shortfall_kwh: + name: "Bilan — capacité de stockage manquante" + min: 0 + max: 200 + step: 0.01 + unit_of_measurement: kWh + mode: box + icon: mdi:battery-alert + evcs_balance_vehicle_surplus_kwh: + name: "Bilan — surplus disponible pour le véhicule" + min: 0 + max: 200 + step: 0.01 + unit_of_measurement: kWh + mode: box + icon: mdi:car-electric + # --- Réserve d'orage (27/08/2026) --------------------------------------- + # Ce qu'il faut avoir en batterie pour traverser SANS réseau la fenêtre de + # déficit qui compte. C'est la couverture prudente (p80) du bilan, pas une + # nouvelle constante : une coupure n'arrête pas l'installation, elle retire + # seulement le filet de secours et la possibilité de rattraper. + evcs_balance_storm_reserve_kwh: + name: "Bilan — réserve d'orage (énergie)" + min: 0 + max: 100 + step: 0.01 + unit_of_measurement: "kWh" + mode: box + icon: mdi:weather-lightning + evcs_balance_storm_reserve_soc: + name: "Bilan — réserve d'orage (SOC)" + min: 0 + max: 100 + step: 0.1 + unit_of_measurement: "%" + mode: box + icon: mdi:battery-alert-variant-outline + +input_text: + # Profils recalculés une fois par jour, en CSV compact (24 valeurs, <255 car.) + evcs_balance_consumption_p50: + name: "Bilan — profil conso typique (CSV 24 h)" + max: 255 + evcs_balance_consumption_p80: + name: "Bilan — profil conso prudent (CSV 24 h)" + max: 255 + evcs_balance_envelope: + name: "Bilan — enveloppe de production démontrée (CSV 24 h)" + max: 255 + evcs_balance_censorship_rate: + name: "Bilan — taux de censure par heure (CSV 24 h)" + max: 255 + # Sorties lisibles. + evcs_balance_crossing_hour: + name: "Bilan — heure de croisement PV/conso" + max: 32 + evcs_balance_censor_reason: + name: "Bilan — motif du bridage" + max: 255 + evcs_balance_next_deficit_window: + name: "Bilan — prochaine traversée déficitaire" + max: 64 + # --- Prévision solaire horaire (Forecast.Solar, abonnement Professional) --- + # La clé vit ici et NON dans le dépôt : le workflow n8n la lit via le snapshot + # et construit l'URL lui-même. mode password pour la masquer dans l'interface. + evcs_balance_forecast_api_key: + name: "Bilan — clé API Forecast.Solar" + mode: password + max: 64 + # Plans au format attendu par l'API : dec/az/kWc répétés. + # ⚠️ Azimut selon la convention de l'API : 0 = sud, -90 = est, +90 = ouest. + evcs_balance_forecast_planes: + name: "Bilan — plans photovoltaïques (format API)" + max: 128 + # La DATE que decrit la courbe de prevision (AAAA-MM-JJ). Sans elle, « today » + # veut dire « le premier jour renvoye par l'API au moment de la publication », + # ce qui devient faux des qu'on passe minuit sans rafraichir : nuit du 07 au + # 08/09/2026, 4 h 45 sans publication, courbe du 7 lue comme celle du 8, bilan + # degrade et cible du matin retombee sur les paliers pendant quatre heures. + # PAS de `initial:` — il desactiverait la restauration d'etat. + evcs_balance_forecast_day0: + name: "Bilan — date de la courbe de prévision" + max: 10 + evcs_balance_forecast_today: + name: "Bilan — prévision horaire du jour (CSV 24 h, kWh)" + max: 255 + evcs_balance_forecast_tomorrow: + name: "Bilan — prévision horaire de demain (CSV 24 h, kWh)" + max: 255 + evcs_balance_forecast_updated: + name: "Bilan — prévision mise à jour" + # 128 et non 32 : ce champ porte soit un horodatage « JJ/MM HH:MM » (11 + # caracteres), soit un message d'echec. « échec : réponse illisible ou sans + # résultat » en fait 43 — Home Assistant le REJETAIT, si bien qu'aucune + # panne de prevision n'a jamais ete publiee ici. Constate le 08/09/2026 en + # cherchant pourquoi les 4 h 45 d'interruption de la nuit precedente + # n'avaient laisse aucune trace : zero message d'echec en quatre jours. + max: 128 + evcs_balance_status: + name: "Bilan — statut" + max: 64 + evcs_balance_reason: + name: "Bilan — explication" + max: 255 + evcs_balance_last_run: + name: "Bilan — dernière exécution" + max: 32 + evcs_balance_storm_level: + name: "Bilan — vigilance météo" + max: 40 + icon: mdi:weather-lightning-rainy + evcs_balance_storm_reason: + name: "Bilan — réserve d'orage (détail)" + max: 255 + icon: mdi:text-long diff --git a/packages/ui_master_helpers.yaml b/packages/ui_master_helpers.yaml new file mode 100755 index 0000000..ade942f --- /dev/null +++ b/packages/ui_master_helpers.yaml @@ -0,0 +1,71 @@ +input_number: + ui_max_pv_power: + name: UI Max PV Power + icon: mdi:solar-power + min: 1000 + max: 15000 + step: 100 + mode: box + unit_of_measurement: W + initial: 5000 + + ui_max_house_power: + name: UI Max House Power + icon: mdi:home-lightning-bolt + min: 1000 + max: 15000 + step: 100 + mode: box + unit_of_measurement: W + initial: 6000 + + ui_max_grid_power: + name: UI Max Grid Power + icon: mdi:transmission-tower + min: 500 + max: 15000 + step: 100 + mode: box + unit_of_measurement: W + initial: 5000 + + ui_max_ac_out_power: + name: UI Max AC Out Power + icon: mdi:power-plug + min: 500 + max: 15000 + step: 100 + mode: box + unit_of_measurement: W + initial: 3000 + + ui_max_battery_power: + name: UI Max Battery Power + icon: mdi:battery-high + min: 500 + max: 15000 + step: 100 + mode: box + unit_of_measurement: W + initial: 3000 + + ui_max_evcs_power: + name: UI Max EVCS Power + icon: mdi:ev-station + min: 1000 + max: 15000 + step: 100 + mode: box + unit_of_measurement: W + initial: 7400 + + ui_max_evcs_current: + name: UI Max EVCS Current + icon: mdi:current-ac + min: 6 + max: 32 + step: 1 + mode: box + unit_of_measurement: A + initial: 32 + diff --git a/packages/victron_evcs_battery_dynamic.yaml b/packages/victron_evcs_battery_dynamic.yaml new file mode 100755 index 0000000..6fe28c9 --- /dev/null +++ b/packages/victron_evcs_battery_dynamic.yaml @@ -0,0 +1,506 @@ +input_number: + + # ===================================================== + # GLOBAL TIMERS / GRACE / AUTO-REVERT + # ===================================================== + + victron_evcs_house_spike_grace_minutes: + name: EVCS Batt - Grâce pic maison + min: 0 + max: 30 + step: 1 + unit_of_measurement: min + mode: box + initial: 10 + + victron_evcs_solar_potential_grace_minutes: + name: EVCS Batt - Grâce solaire potentiel + min: 0 + max: 30 + step: 1 + unit_of_measurement: min + mode: box + initial: 12 + + victron_evcs_step_up_cooldown_seconds: + name: EVCS Batt - Cooldown montée courant + min: 5 + max: 300 + step: 5 + unit_of_measurement: s + mode: box + initial: 30 + + victron_evcs_step_down_cooldown_seconds: + name: EVCS Batt - Cooldown baisse courant + min: 5 + max: 300 + step: 5 + unit_of_measurement: s + mode: box + initial: 60 + + victron_evcs_force_mode_auto_revert_minutes: + name: EVCS Batt - Retour auto mode forcé + min: 0 + max: 480 + step: 5 + unit_of_measurement: min + mode: box + initial: 120 + + victron_evcs_overload_step_down_a: + name: EVCS Batt - Step-down surcharge convertisseur + min: 1 + max: 6 + step: 1 + unit_of_measurement: A + mode: box + initial: 2 + + victron_evcs_overload_hold_seconds: + name: EVCS Batt - Maintien avant nouvelle baisse surcharge + min: 5 + max: 300 + step: 5 + unit_of_measurement: s + mode: box + initial: 30 + + victron_evcs_overload_stop_after_seconds: + name: EVCS Batt - Arrêt surcharge persistante + min: 10 + max: 600 + step: 10 + unit_of_measurement: s + mode: box + initial: 120 + + + # ===================================================== + # SOC BAND > 90% + # ===================================================== + + victron_evcs_batt_discharge_soft_gt90_a: + name: EVCS Batt >90 - Décharge soft + min: -150 + max: 0 + step: 1 + unit_of_measurement: A + mode: box + initial: -50 + + victron_evcs_batt_discharge_hard_gt90_a: + name: EVCS Batt >90 - Décharge hard + min: -200 + max: 0 + step: 1 + unit_of_measurement: A + mode: box + initial: -100 + + victron_evcs_batt_charge_reserve_gt90_a: + name: EVCS Batt >90 - Réserve charge batterie + min: 0 + max: 200 + step: 1 + unit_of_measurement: A + mode: box + initial: 5 + + victron_evcs_batt_soft_tol_gt90_min: + name: EVCS Batt >90 - Tolérance soft + min: 0 + max: 60 + step: 1 + unit_of_measurement: min + mode: box + initial: 12 + + victron_evcs_batt_hard_tol_gt90_sec: + name: EVCS Batt >90 - Tolérance hard + min: 0 + max: 120 + step: 1 + unit_of_measurement: s + mode: box + initial: 20 + + victron_evcs_batt_recovery_gt90_min: + name: EVCS Batt >90 - Récupération + min: 0 + max: 60 + step: 1 + unit_of_measurement: min + mode: box + initial: 6 + + + # ===================================================== + # SOC BAND 80% - 90% + # ===================================================== + + victron_evcs_batt_discharge_soft_80_90_a: + name: EVCS Batt 80-90 - Décharge soft + min: -150 + max: 0 + step: 1 + unit_of_measurement: A + mode: box + initial: -40 + + victron_evcs_batt_discharge_hard_80_90_a: + name: EVCS Batt 80-90 - Décharge hard + min: -200 + max: 0 + step: 1 + unit_of_measurement: A + mode: box + initial: -80 + + victron_evcs_batt_charge_reserve_80_90_a: + name: EVCS Batt 80-90 - Réserve charge batterie + min: 0 + max: 200 + step: 1 + unit_of_measurement: A + mode: box + initial: 10 + + victron_evcs_batt_soft_tol_80_90_min: + name: EVCS Batt 80-90 - Tolérance soft + min: 0 + max: 60 + step: 1 + unit_of_measurement: min + mode: box + initial: 10 + + victron_evcs_batt_hard_tol_80_90_sec: + name: EVCS Batt 80-90 - Tolérance hard + min: 0 + max: 120 + step: 1 + unit_of_measurement: s + mode: box + initial: 20 + + victron_evcs_batt_recovery_80_90_min: + name: EVCS Batt 80-90 - Récupération + min: 0 + max: 60 + step: 1 + unit_of_measurement: min + mode: box + initial: 6 + + + # ===================================================== + # SOC BAND 60% - 80% + # ===================================================== + + victron_evcs_batt_discharge_soft_60_80_a: + name: EVCS Batt 60-80 - Décharge soft + min: -150 + max: 0 + step: 1 + unit_of_measurement: A + mode: box + initial: -20 + + victron_evcs_batt_discharge_hard_60_80_a: + name: EVCS Batt 60-80 - Décharge hard + min: -200 + max: 0 + step: 1 + unit_of_measurement: A + mode: box + initial: -50 + + victron_evcs_batt_charge_reserve_60_80_a: + name: EVCS Batt 60-80 - Réserve charge batterie + min: 0 + max: 250 + step: 1 + unit_of_measurement: A + mode: box + initial: 40 + + victron_evcs_batt_soft_tol_60_80_min: + name: EVCS Batt 60-80 - Tolérance soft + min: 0 + max: 60 + step: 1 + unit_of_measurement: min + mode: box + initial: 6 + + victron_evcs_batt_hard_tol_60_80_sec: + name: EVCS Batt 60-80 - Tolérance hard + min: 0 + max: 120 + step: 1 + unit_of_measurement: s + mode: box + initial: 15 + + victron_evcs_batt_recovery_60_80_min: + name: EVCS Batt 60-80 - Récupération + min: 0 + max: 60 + step: 1 + unit_of_measurement: min + mode: box + initial: 8 + + + # ===================================================== + # SOC BAND 40% - 60% + # ===================================================== + + victron_evcs_batt_discharge_soft_40_60_a: + name: EVCS Batt 40-60 - Décharge soft + min: -150 + max: 0 + step: 1 + unit_of_measurement: A + mode: box + initial: -12 + + victron_evcs_batt_discharge_hard_40_60_a: + name: EVCS Batt 40-60 - Décharge hard + min: -200 + max: 0 + step: 1 + unit_of_measurement: A + mode: box + initial: -30 + + victron_evcs_batt_charge_reserve_40_60_a: + name: EVCS Batt 40-60 - Réserve charge batterie + min: 0 + max: 250 + step: 1 + unit_of_measurement: A + mode: box + initial: 70 + + victron_evcs_batt_soft_tol_40_60_min: + name: EVCS Batt 40-60 - Tolérance soft + min: 0 + max: 60 + step: 1 + unit_of_measurement: min + mode: box + initial: 4 + + victron_evcs_batt_hard_tol_40_60_sec: + name: EVCS Batt 40-60 - Tolérance hard + min: 0 + max: 120 + step: 1 + unit_of_measurement: s + mode: box + initial: 10 + + victron_evcs_batt_recovery_40_60_min: + name: EVCS Batt 40-60 - Récupération + min: 0 + max: 60 + step: 1 + unit_of_measurement: min + mode: box + initial: 10 + + + # ===================================================== + # SOC BAND 25% - 40% + # ===================================================== + + victron_evcs_batt_discharge_soft_25_40_a: + name: EVCS Batt 25-40 - Décharge soft + min: -150 + max: 0 + step: 1 + unit_of_measurement: A + mode: box + initial: -5 + + victron_evcs_batt_discharge_hard_25_40_a: + name: EVCS Batt 25-40 - Décharge hard + min: -200 + max: 0 + step: 1 + unit_of_measurement: A + mode: box + initial: -15 + + victron_evcs_batt_charge_reserve_25_40_a: + name: EVCS Batt 25-40 - Réserve charge batterie + min: 0 + max: 300 + step: 1 + unit_of_measurement: A + mode: box + initial: 110 + + victron_evcs_batt_soft_tol_25_40_min: + name: EVCS Batt 25-40 - Tolérance soft + min: 0 + max: 60 + step: 1 + unit_of_measurement: min + mode: box + initial: 2 + + victron_evcs_batt_hard_tol_25_40_sec: + name: EVCS Batt 25-40 - Tolérance hard + min: 0 + max: 120 + step: 1 + unit_of_measurement: s + mode: box + initial: 5 + + victron_evcs_batt_recovery_25_40_min: + name: EVCS Batt 25-40 - Récupération + min: 0 + max: 60 + step: 1 + unit_of_measurement: min + mode: box + initial: 12 + + + # ===================================================== + # SOC BAND < 25% + # ===================================================== + + victron_evcs_batt_discharge_soft_lt25_a: + name: EVCS Batt <25 - Décharge soft + min: -150 + max: 0 + step: 1 + unit_of_measurement: A + mode: box + initial: -3 + + victron_evcs_batt_discharge_hard_lt25_a: + name: EVCS Batt <25 - Décharge hard + min: -200 + max: 0 + step: 1 + unit_of_measurement: A + mode: box + initial: -8 + + victron_evcs_batt_charge_reserve_lt25_a: + name: EVCS Batt <25 - Réserve charge batterie + min: 0 + max: 300 + step: 1 + unit_of_measurement: A + mode: box + initial: 150 + + victron_evcs_batt_soft_tol_lt25_min: + name: EVCS Batt <25 - Tolérance soft + min: 0 + max: 60 + step: 1 + unit_of_measurement: min + mode: box + initial: 1 + + victron_evcs_batt_hard_tol_lt25_sec: + name: EVCS Batt <25 - Tolérance hard + min: 0 + max: 120 + step: 1 + unit_of_measurement: s + mode: box + initial: 2 + + victron_evcs_batt_recovery_lt25_min: + name: EVCS Batt <25 - Récupération + min: 0 + max: 60 + step: 1 + unit_of_measurement: min + mode: box + initial: 15 + + + # ===================================================== + # HIGH CELL VOLTAGE / BATTERY CHARGE VOLTAGE MANAGEMENT + # ===================================================== + + victron_battery_charge_voltage_normal_v: + name: Batt - Tension charge normale + min: 48.0 + max: 52.5 + step: 0.1 + unit_of_measurement: V + mode: box + initial: 51.3 + + victron_battery_charge_voltage_hcv_step1_v: + name: Batt - Tension HCV palier 1 + min: 48.0 + max: 52.5 + step: 0.1 + unit_of_measurement: V + mode: box + initial: 51.0 + + victron_battery_charge_voltage_hcv_step2_v: + name: Batt - Tension HCV palier 2 + min: 48.0 + max: 52.5 + step: 0.1 + unit_of_measurement: V + mode: box + initial: 50.9 + + victron_battery_charge_voltage_recovery_step_v: + name: Batt - Pas de remontée tension + min: 0.1 + max: 0.5 + step: 0.1 + unit_of_measurement: V + mode: box + initial: 0.1 + + victron_battery_hcv_hold_minutes: + name: Batt - Maintien réduction HCV + min: 1 + max: 120 + step: 1 + unit_of_measurement: min + mode: box + initial: 15 + + +input_text: + + # ===================================================== + # MEMOIRE DU DEPASSEMENT SOUPLE (01/09/2026) + # ===================================================== + # La table des bandes SOC ci-dessus declare, pour chaque bande, un courant + # de decharge SOUPLE tolere pendant N MINUTES (batt_soft_tol_*_min) et un + # courant DUR tolere quelques secondes. La dimension temporelle n'etait + # branchee nulle part : le controleur comparait un echantillon instantane a + # un seuil, toutes les 30 s. A SOC eleve la batterie est en float et son + # courant oscille autour de zero (mesure du 01/09 : +1,8 / -2,6 A d'un + # echantillon a l'autre) : le test devenait un tirage a pile ou face, et la + # charge du vehicule s'arretait sur du bruit. + # + # Ce helper porte l'horodatage du DEBUT du depassement souple en cours, + # ecrit par le controleur EVCS. Vide = aucun depassement en cours. + # Il ne se regle pas a la main. + victron_evcs_battery_soft_breach_at: + name: Victron EVCS Batt - Debut depassement souple + min: 0 + max: 32 + initial: "" + icon: mdi:battery-clock-outline diff --git a/packages/victron_evcs_night_helpers.yaml b/packages/victron_evcs_night_helpers.yaml new file mode 100755 index 0000000..2adfb0f --- /dev/null +++ b/packages/victron_evcs_night_helpers.yaml @@ -0,0 +1,168 @@ +input_number: + # ===================================================== + # RUNTIME HELPERS EVCS NIGHT + # ===================================================== + victron_evcs_night_target_soc: + name: Victron EVCS Night Target SOC + min: 0 + max: 100 + step: 0.1 + mode: box + unit_of_measurement: "%" + icon: mdi:battery-clock + initial: 35 + + victron_evcs_night_grid_trigger_soc: + name: Victron EVCS Night Grid Trigger SOC + min: 0 + max: 100 + step: 0.1 + mode: box + unit_of_measurement: "%" + icon: mdi:transmission-tower + initial: 35 + + # ===================================================== + # EVCS NIGHT PARAMETERS + # ===================================================== + victron_evcs_night_battery_hard_floor_pct: + name: Victron EVCS Night Battery Hard Floor Pct + min: 0 + max: 100 + step: 0.1 + mode: box + unit_of_measurement: "%" + icon: mdi:battery-alert-variant-outline + initial: 22 + + victron_evcs_night_strong_forecast_kwh: + name: Victron EVCS Night Strong Forecast Kwh + min: 0 + max: 80 + step: 0.1 + mode: box + unit_of_measurement: "kWh" + icon: mdi:weather-sunny + initial: 18 + + victron_evcs_night_medium_forecast_kwh: + name: Victron EVCS Night Medium Forecast Kwh + min: 0 + max: 80 + step: 0.1 + mode: box + unit_of_measurement: "kWh" + icon: mdi:weather-partly-cloudy + initial: 10 + + victron_evcs_night_target_strong_forecast_pct: + name: Victron EVCS Night Target Strong Forecast Pct + min: 0 + max: 100 + step: 0.1 + mode: box + unit_of_measurement: "%" + icon: mdi:battery-30 + initial: 35 + + victron_evcs_night_target_medium_forecast_pct: + name: Victron EVCS Night Target Medium Forecast Pct + min: 0 + max: 100 + step: 0.1 + mode: box + unit_of_measurement: "%" + icon: mdi:battery-50 + initial: 55 + + victron_evcs_night_target_weak_forecast_pct: + name: Victron EVCS Night Target Weak Forecast Pct + min: 0 + max: 100 + step: 0.1 + mode: box + unit_of_measurement: "%" + icon: mdi:battery-80 + initial: 85 + + victron_evcs_night_battery_recovery_power_kw: + name: Victron EVCS Night Battery Recovery Power Kw + min: 0.1 + max: 10 + step: 0.1 + mode: box + unit_of_measurement: "kW" + icon: mdi:battery-sync + initial: 2.5 + + victron_evcs_night_departure_safety_min: + name: Victron EVCS Night Departure Safety Min + min: 0 + max: 240 + step: 1 + mode: box + unit_of_measurement: "min" + icon: mdi:clock-alert-outline + initial: 30 + +input_text: + # ===================================================== + # RUNTIME HELPERS EVCS NIGHT + # ===================================================== + victron_evcs_night_preferred_source_mode: + name: Victron EVCS Night Preferred Source Mode + max: 64 + initial: "blocked" + icon: mdi:source-branch + + victron_evcs_night_session_start_soc: + name: Victron EVCS Night Session Start SOC + max: 16 + initial: "" + icon: mdi:battery-start + + victron_evcs_night_session_start_at: + name: Victron EVCS Night Session Start At + max: 32 + initial: "" + icon: mdi:clock-start + +input_boolean: + # ===================================================== + # RUNTIME HELPERS EVCS NIGHT + # ===================================================== + victron_evcs_night_grid_takeover_needed: + name: Victron EVCS Night Grid Takeover Needed + icon: mdi:transmission-tower-import + initial: false + + # ===================================================== + # SESSION RESEAU UNIQUE DE LA NUIT (03/09/2026) + # ===================================================== + # Ecrit par le controleur EVCS, ne se regle pas a la main. + # + # ON = pendant CETTE session de nuit, le bilan energetique a constate que la + # batterie ne couvrait pas la nuit, et on s'est engage a utiliser la fenetre + # d'heures creuses en UNE session continue. + # + # Ce bit existe pour que le relachement ne depende PAS d'un seuil de SOC : + # engagement sur le bilan, relachement a la FIN DE LA FENETRE. Sans lui, tout + # relachement sur seuil rouvre l'oscillateur corrige le 27/08 — et il le + # rouvrirait sur une grandeur fausse, la conversion kWh -> points de SOC du + # bilan etant lineaire (15 kWh) alors que la jauge vaut ~17 kWh au-dessus de + # 42 % et s'effondre a 8-12 kWh en dessous (mesures du 03/09). + victron_evcs_night_grid_session_committed: + name: Victron EVCS Night - Session reseau engagee + icon: mdi:transmission-tower + initial: false + + victron_evcs_night_battery_recovery_urgent: + name: Victron EVCS Night Battery Recovery Urgent + icon: mdi:battery-alert + initial: false + + victron_evcs_night_session_active: + name: Victron EVCS Night Session Active + icon: mdi:car-electric + initial: false + diff --git a/packages/victron_evcs_priority.yaml b/packages/victron_evcs_priority.yaml new file mode 100755 index 0000000..8cea646 --- /dev/null +++ b/packages/victron_evcs_priority.yaml @@ -0,0 +1,28 @@ +input_boolean: + victron_evcs_priority_active: + name: EVCS priorité active + icon: mdi:car-electric + +input_select: + victron_energy_priority_mode: + name: Priorité énergie + options: + - normal + - evcs_priority + - comfort_priority + - water_priority + initial: normal + icon: mdi:priority-high + +input_text: + victron_energy_priority_reason: + name: Raison priorité énergie + max: 255 + icon: mdi:comment-alert + +input_datetime: + victron_evcs_priority_until: + name: EVCS priorité jusqu'à + has_date: true + has_time: true + diff --git a/packages/victron_evcs_priority_manual.yaml b/packages/victron_evcs_priority_manual.yaml new file mode 100755 index 0000000..cf65ae5 --- /dev/null +++ b/packages/victron_evcs_priority_manual.yaml @@ -0,0 +1,26 @@ +input_boolean: + victron_evcs_priority_manual_override: + name: EVCS priorité manuelle + icon: mdi:hand-back-right + +input_select: + victron_evcs_priority_manual_mode: + name: EVCS priorité manuelle mode + options: + - normal + - evcs_priority + initial: normal + icon: mdi:tune + +input_text: + victron_evcs_priority_manual_reason: + name: EVCS priorité manuelle raison + max: 255 + icon: mdi:comment-edit + +input_datetime: + victron_evcs_priority_manual_until: + name: EVCS priorité manuelle jusqu'à + has_date: true + has_time: true + diff --git a/packages/victron_evcs_surplus_v14.yaml b/packages/victron_evcs_surplus_v14.yaml new file mode 100755 index 0000000..759dd14 --- /dev/null +++ b/packages/victron_evcs_surplus_v14.yaml @@ -0,0 +1,208 @@ +input_boolean: + victron_evcs_allow_grid_hc_night: + name: Victron EVCS - Autoriser réseau HC nuit + + victron_evcs_allow_grid_hc_midday: + name: Victron EVCS - Autoriser réseau HC midi + + victron_evcs_probe_enabled: + name: Victron EVCS - Mode sonde activé + + victron_evcs_dynamic_ok: + name: Victron EVCS - Dynamic OK + + victron_evcs_must_stop: + name: Victron EVCS - Must stop + + +input_number: + victron_evcs_probe_minutes: + name: Victron EVCS - Durée sonde + min: 1 + max: 10 + step: 1 + mode: box + unit_of_measurement: min + + victron_evcs_probe_retry_minutes: + name: Victron EVCS - Retry sonde + min: 5 + max: 180 + step: 5 + mode: box + unit_of_measurement: min + + victron_evcs_probe_current_a: + name: Victron EVCS - Courant sonde + min: 6 + max: 16 + step: 1 + mode: box + unit_of_measurement: A + + victron_evcs_grid_battery_soft_a: + name: Victron EVCS - Garde batterie réseau soft + min: -20 + max: 10 + step: 1 + mode: box + unit_of_measurement: A + + victron_evcs_grid_battery_hard_a: + name: Victron EVCS - Garde batterie réseau hard + min: -20 + max: 10 + step: 1 + mode: box + unit_of_measurement: A + + victron_evcs_morning_probe_pv_avg_min_w: + name: Victron EVCS - PV moyen mini matin + min: 0 + max: 5000 + step: 100 + mode: box + unit_of_measurement: W + + victron_evcs_morning_probe_pv_trend_min_w: + name: Victron EVCS - Tendance PV mini matin + min: -2000 + max: 2000 + step: 50 + mode: box + unit_of_measurement: W + + victron_evcs_midday_probe_pv_avg_min_w: + name: Victron EVCS - PV moyen mini midi + min: 0 + max: 5000 + step: 100 + mode: box + unit_of_measurement: W + + victron_evcs_morning_soc_min: + name: Victron EVCS - SOC mini matin + min: 0 + max: 100 + step: 1 + mode: box + unit_of_measurement: "%" + + victron_evcs_midday_soc_min: + name: Victron EVCS - SOC mini midi + min: 0 + max: 100 + step: 1 + mode: box + unit_of_measurement: "%" + + victron_evcs_evening_soc_start_min: + name: Victron EVCS - SOC start soir + min: 0 + max: 100 + step: 1 + mode: box + unit_of_measurement: "%" + + victron_evcs_evening_soc_stop_min: + name: Victron EVCS - SOC stop soir + min: 0 + max: 100 + step: 1 + mode: box + unit_of_measurement: "%" + + victron_evcs_morning_battery_max_discharge_a: + name: Victron EVCS - Décharge batt max matin + min: -100 + max: 20 + step: 1 + mode: box + unit_of_measurement: A + + victron_evcs_midday_battery_max_discharge_a: + name: Victron EVCS - Décharge batt max midi + min: -100 + max: 20 + step: 1 + mode: box + unit_of_measurement: A + + victron_evcs_evening_battery_max_discharge_a: + name: Victron EVCS - Décharge batt max soir + min: -100 + max: 20 + step: 1 + mode: box + unit_of_measurement: A + + +input_datetime: + victron_evcs_hc_night_start: + name: Victron EVCS - Début HC nuit + has_date: false + has_time: true + + victron_evcs_hc_night_stop: + name: Victron EVCS - Fin HC nuit + has_date: false + has_time: true + + victron_evcs_morning_start: + name: Victron EVCS - Début matin + has_date: false + has_time: true + + victron_evcs_morning_stop: + name: Victron EVCS - Fin matin + has_date: false + has_time: true + + victron_evcs_hc_midday_start: + name: Victron EVCS - Début HC midi + has_date: false + has_time: true + + victron_evcs_hc_midday_stop: + name: Victron EVCS - Fin HC midi + has_date: false + has_time: true + + victron_evcs_evening_start: + name: Victron EVCS - Début soir + has_date: false + has_time: true + + victron_evcs_evening_stop: + name: Victron EVCS - Fin soir + has_date: false + has_time: true + + victron_evcs_blocked_until: + name: Victron EVCS - Bloqué jusqu'à + has_date: true + has_time: true + + victron_evcs_probe_started_at: + name: Victron EVCS - Sonde démarrée à + has_date: true + has_time: true + + +input_text: + victron_evcs_last_block_reason: + name: Victron EVCS - Dernière raison de blocage + max: 255 + + victron_evcs_surplus_state: + name: Victron EVCS - Surplus state + max: 255 + + victron_evcs_surplus_current_decision: + name: Victron EVCS - Current decision + max: 255 + + victron_evcs_surplus_reason: + name: Victron EVCS - Reason + max: 255 + diff --git a/packages/victron_evcs_vehicle_demand_filter.yaml b/packages/victron_evcs_vehicle_demand_filter.yaml new file mode 100755 index 0000000..a1e33ee --- /dev/null +++ b/packages/victron_evcs_vehicle_demand_filter.yaml @@ -0,0 +1,37 @@ +input_number: + victron_evcs_delivery_ratio_ema: + name: Victron EVCS Delivery Ratio EMA + min: 0 + max: 1 + step: 0.001 + mode: box + + victron_evcs_delivery_noise_ema: + name: Victron EVCS Delivery Noise EMA + min: 0 + max: 1 + step: 0.001 + mode: box + + victron_evcs_no_demand_score_ema: + name: Victron EVCS No Demand Score EMA + min: 0 + max: 1 + step: 0.001 + mode: box + +input_boolean: + victron_evcs_no_demand_semantic_active: + name: Victron EVCS No Demand Semantic Active + +input_datetime: + victron_evcs_no_demand_since_at: + name: Victron EVCS No Demand Since At + has_date: true + has_time: true + + victron_evcs_no_demand_filter_eval_at: + name: Victron EVCS No Demand Filter Eval At + has_date: true + has_time: true + diff --git a/packages/victron_evcs_vehicles.yaml b/packages/victron_evcs_vehicles.yaml new file mode 100755 index 0000000..83b8dcd --- /dev/null +++ b/packages/victron_evcs_vehicles.yaml @@ -0,0 +1,44 @@ +# ===================================================== +# EVCS — VÉHICULES & DÉPART (P9) — créé le 09/08/2026 (HANDOFF §21) +# Deux véhicules alternent sur la borne : +# - VW : départ tardif (input_datetime.victron_evcs_departure_time, ~08:50), +# ne publie pas franchement "charged" (statut 3 rare) +# - JEEP : départ tôt (06:30), publie "charged" franchement +# Le sélecteur dit au contrôleur QUELLE heure de départ utiliser. +# P9 : si le toggle est ON, le réseau est autorisé HORS fenêtre HC dans les +# 120 min précédant le départ pour finir la charge du véhicule +# (arrêt automatique via VDF/statut + états collants anti-rebond). +# ===================================================== + +# ⚠️ AUCUN `initial:` SUR LES REGLAGES MANUELS (06/09/2026). +# Dans Home Assistant, declarer `initial:` DESACTIVE la restauration d'etat : +# le helper est force a cette valeur a CHAQUE demarrage. Un reglage fait a la +# main est donc perdu au premier redemarrage, en silence. +# Constate deux fois sur le selecteur de vehicule (04/09 puis 06/09 : JEEP +# repasse a VW), et diagnostique le 06/09 en comparant avec +# `input_select.victron_evcs_strategy`, cree par l'interface donc sans +# `initial:`, qui survivait a tous les redemarrages. +# Les helpers de RUNTIME, eux, gardent leur `initial:` : ils sont reecrits par +# les workflows au cycle suivant, et repartir d'un etat connu y est voulu. +# Contrepartie assumee : sur une installation neuve, sans etat a restaurer, un +# input_select prend sa premiere option, un input_number son `min` et un +# input_datetime 00:00. + +input_select: + victron_evcs_vehicle: + name: EVCS - Véhicule branché + options: + - VW + - JEEP + icon: mdi:car-multiple + +input_datetime: + victron_evcs_departure_time_jeep: + name: EVCS - Heure départ JEEP + has_date: false + has_time: true + +input_boolean: + victron_evcs_allow_grid_departure_urgent: + name: EVCS - Réseau avant départ (P9) + icon: mdi:car-clock diff --git a/packages/victron_grid_charge_dwell.yaml b/packages/victron_grid_charge_dwell.yaml new file mode 100755 index 0000000..20c25ec --- /dev/null +++ b/packages/victron_grid_charge_dwell.yaml @@ -0,0 +1,65 @@ +# ===================================================== +# RELACHEMENT DU CONTACTEUR SUR UNE DUREE (06/09/2026) +# ===================================================== +# La regle posee le 05/09 ferme le contacteur EDF quand la maison demande plus +# de 80 % de ce que le parc sait delivrer, et le relachait des que la charge +# repassait sous 50 % — sur un SEUL echantillon. +# +# Mesure de la soiree du 05/09 (maison, pas d'une minute, seuil 2550 W) : +# +# pendant la cuisson 20:33 -> 21:37 13 accalmies, la plus longue 5 min +# apres la cuisson 21:40 -> 01:00 une seule accalmie 201 min +# +# La distribution est franchement bimodale : un creux de 20 minutes n'existe +# pas tant que ca cuisine. Le relachement instantane offrait donc 13 occasions +# de rendre le reseau au milieu du service, et chaque aller-retour du +# contacteur coute 50 a 150 Wh de transitoire. +# +# Ces deux durees sont des RESULTATS DE MESURE, pas des reglages de confort : +# a re-mesurer si les habitudes du foyer changent +# (cf. HANDOFF, soiree du 05-06/09). + +input_number: + + victron_grid_charge_dwell_long_min: + name: Grid - Relachement charge (reserve deja condamnee) + min: 0 + max: 120 + step: 1 + mode: box + unit_of_measurement: min + icon: mdi:timer-sand + # Milieu du fosse entre 5 min et 201 min, marge x4 sur la plus longue + # accalmie de cuisson observee. S'applique quand le bilan energetique dit + # que la batterie touchera son plancher avant l'ouverture des heures + # creuses : l'energie reseau du soir est due de toute facon, tenir le + # contacteur ne fait qu'en changer l'heure. + initial: 20 + + victron_grid_charge_dwell_court_min: + name: Grid - Relachement charge (reserve suffisante) + min: 0 + max: 120 + step: 1 + mode: box + unit_of_measurement: min + icon: mdi:timer-outline + # Juste au-dessus de la plus longue accalmie mesuree pendant la cuisson + # (5 min). S'applique quand la batterie passerait la nuit toute seule : + # chaque kWh reseau du soir deplace alors un kWh d'heures creuses vers des + # heures pleines, donc on rend le reseau des que c'est sur. + initial: 6 + +input_datetime: + + # Derniere fois ou la maison a ATTEINT le seuil de relachement. + # Ecrit par le workflow d'hysteresis a chaque cycle ou la charge est haute, + # quel que soit l'etat du contacteur : il suit la MAISON, grandeur que le + # contacteur ne modifie pas. C'est ce qui empeche la decision de detruire sa + # propre cause — le piege des quatre oscillateurs deja corriges. + # Ne se regle pas a la main. + victron_grid_charge_high_last_at: + name: Grid - Derniere charge maison haute + has_date: true + has_time: true + icon: mdi:home-lightning-bolt-outline diff --git a/packages/victron_vebus_mqtt.yaml b/packages/victron_vebus_mqtt.yaml new file mode 100755 index 0000000..b430da7 --- /dev/null +++ b/packages/victron_vebus_mqtt.yaml @@ -0,0 +1,133 @@ +mqtt: + sensor: + - name: "Victron VE.Bus State" + unique_id: victron_vebus_state + state_topic: "N/c0619ab34ac5/vebus/276/State" + value_template: "{{ value_json.value if value_json is defined and value_json.value is defined }}" + icon: mdi:state-machine + + - name: "Victron VE.Bus Main State" + unique_id: victron_vebus_main_state + state_topic: "N/c0619ab34ac5/vebus/276/VebusMainState" + value_template: "{{ value_json.value if value_json is defined and value_json.value is defined }}" + icon: mdi:state-machine + + - name: "Victron VE.Bus AC Out L1 Power" + unique_id: victron_vebus_ac_out_l1_power + state_topic: "N/c0619ab34ac5/vebus/276/Ac/Out/L1/P" + value_template: "{{ value_json.value if value_json is defined and value_json.value is defined }}" + unit_of_measurement: "W" + device_class: power + state_class: measurement + + - name: "Victron VE.Bus AC Out L1 Current" + unique_id: victron_vebus_ac_out_l1_current + state_topic: "N/c0619ab34ac5/vebus/276/Ac/Out/L1/I" + value_template: "{{ value_json.value if value_json is defined and value_json.value is defined }}" + unit_of_measurement: "A" + device_class: current + state_class: measurement + + - name: "Victron VE.Bus AC Out L1 Voltage" + unique_id: victron_vebus_ac_out_l1_voltage + state_topic: "N/c0619ab34ac5/vebus/276/Ac/Out/L1/V" + value_template: "{{ value_json.value if value_json is defined and value_json.value is defined }}" + unit_of_measurement: "V" + device_class: voltage + state_class: measurement + + - name: "Victron VE.Bus Nominal Inverter Power" + unique_id: victron_vebus_nominal_inverter_power + state_topic: "N/c0619ab34ac5/vebus/276/Ac/Out/L1/NominalInverterPower" + value_template: "{{ value_json.value if value_json is defined and value_json.value is defined }}" + unit_of_measurement: "W" + device_class: power + + - name: "Victron VE.Bus DC Voltage" + unique_id: victron_vebus_dc_voltage + state_topic: "N/c0619ab34ac5/vebus/276/Dc/0/Voltage" + value_template: "{{ value_json.value if value_json is defined and value_json.value is defined }}" + unit_of_measurement: "V" + device_class: voltage + state_class: measurement + + - name: "Victron VE.Bus DC Current" + unique_id: victron_vebus_dc_current + state_topic: "N/c0619ab34ac5/vebus/276/Dc/0/Current" + value_template: "{{ value_json.value if value_json is defined and value_json.value is defined }}" + unit_of_measurement: "A" + device_class: current + state_class: measurement + + - name: "Victron VE.Bus DC Power" + unique_id: victron_vebus_dc_power + state_topic: "N/c0619ab34ac5/vebus/276/Dc/0/Power" + value_template: "{{ value_json.value if value_json is defined and value_json.value is defined }}" + unit_of_measurement: "W" + device_class: power + state_class: measurement + + - name: "Victron VE.Bus UBat Ripple" + unique_id: victron_vebus_ubat_ripple + state_topic: "N/c0619ab34ac5/vebus/276/Devices/3/Diagnostics/UBatRipple" + value_template: "{{ value_json.value if value_json is defined and value_json.value is defined }}" + icon: mdi:sine-wave + state_class: measurement + + - name: "Victron VE.Bus UBat Terminal" + unique_id: victron_vebus_ubat_terminal + state_topic: "N/c0619ab34ac5/vebus/276/Devices/3/Diagnostics/UBatTerminal" + value_template: "{{ value_json.value if value_json is defined and value_json.value is defined }}" + unit_of_measurement: "V" + device_class: voltage + state_class: measurement + + binary_sensor: + - name: "Victron VE.Bus Overload" + unique_id: victron_vebus_overload + state_topic: "N/c0619ab34ac5/vebus/276/Alarms/Overload" + value_template: "{% if value_json is defined and value_json.value is defined %}{{ 'ON' if (value_json.value | int(0)) > 0 else 'OFF' }}{% endif %}" + payload_on: "ON" + payload_off: "OFF" + device_class: problem + + - name: "Victron VE.Bus L1 Overload" + unique_id: victron_vebus_l1_overload + state_topic: "N/c0619ab34ac5/vebus/276/Alarms/L1/Overload" + value_template: "{% if value_json is defined and value_json.value is defined %}{{ 'ON' if (value_json.value | int(0)) > 0 else 'OFF' }}{% endif %}" + payload_on: "ON" + payload_off: "OFF" + device_class: problem + + - name: "Victron VE.Bus Low Battery" + unique_id: victron_vebus_low_battery + state_topic: "N/c0619ab34ac5/vebus/276/Alarms/LowBattery" + value_template: "{% if value_json is defined and value_json.value is defined %}{{ 'ON' if (value_json.value | int(0)) > 0 else 'OFF' }}{% endif %}" + payload_on: "ON" + payload_off: "OFF" + device_class: battery + + - name: "Victron VE.Bus L1 Low Battery" + unique_id: victron_vebus_l1_low_battery + state_topic: "N/c0619ab34ac5/vebus/276/Alarms/L1/LowBattery" + value_template: "{% if value_json is defined and value_json.value is defined %}{{ 'ON' if (value_json.value | int(0)) > 0 else 'OFF' }}{% endif %}" + payload_on: "ON" + payload_off: "OFF" + device_class: battery + + - name: "Victron VE.Bus LED Overload" + unique_id: victron_vebus_led_overload + state_topic: "N/c0619ab34ac5/vebus/276/Leds/Overload" + value_template: "{% if value_json is defined and value_json.value is defined %}{{ 'ON' if (value_json.value | int(0)) > 0 else 'OFF' }}{% endif %}" + payload_on: "ON" + payload_off: "OFF" + device_class: problem + + - name: "Victron VE.Bus LED Low Battery" + unique_id: victron_vebus_led_low_battery + state_topic: "N/c0619ab34ac5/vebus/276/Leds/LowBattery" + value_template: "{% if value_json is defined and value_json.value is defined %}{{ 'ON' if (value_json.value | int(0)) > 0 else 'OFF' }}{% endif %}" + payload_on: "ON" + payload_off: "OFF" + device_class: battery + diff --git a/packages/victron_water_heater_runtime.yaml b/packages/victron_water_heater_runtime.yaml new file mode 100755 index 0000000..c2b9577 --- /dev/null +++ b/packages/victron_water_heater_runtime.yaml @@ -0,0 +1,75 @@ +input_number: + victron_water_heater_energy_total_prev_kwh: + name: Victron Water Heater Energy Total Prev kWh + min: 0 + max: 999999 + step: 0.001 + mode: box + icon: mdi:counter + + victron_water_heater_observed_power_w: + name: Victron Water Heater Observed Power + min: 0 + max: 5000 + step: 1 + mode: box + unit_of_measurement: W + icon: mdi:flash + + victron_water_heater_restore_surplus_w: + name: Victron Water Heater Restore Surplus + min: 0 + max: 5000 + step: 50 + mode: slider + unit_of_measurement: W + initial: 2500 + icon: mdi:solar-power + + victron_water_heater_mode_mismatch_delay_min: + name: Victron Water Heater Mode Mismatch Delay + min: 1 + max: 60 + step: 1 + mode: slider + unit_of_measurement: min + initial: 15 + icon: mdi:timer-sand + +input_text: + victron_water_heater_observed_regime: + name: Victron Water Heater Observed Regime + max: 50 + icon: mdi:eye + + victron_water_heater_pending_user_action: + name: Victron Water Heater Pending User Action + max: 255 + icon: mdi:account-alert + + victron_water_heater_forced_off_reason: + name: Victron Water Heater Forced Off Reason + max: 255 + icon: mdi:power-plug-off + +input_boolean: + victron_water_heater_forced_off_by_advisor: + name: Victron Water Heater Forced Off By Advisor + icon: mdi:power-cycle + +input_datetime: + victron_water_heater_energy_prev_at: + name: Victron Water Heater Energy Prev At + has_date: true + has_time: true + + victron_water_heater_mode_mismatch_since: + name: Victron Water Heater Mode Mismatch Since + has_date: true + has_time: true + + victron_water_heater_forced_off_at: + name: Victron Water Heater Forced Off At + has_date: true + has_time: true +