Jump to content


Photo

[...I’m afraid I can’t do that] Domotica


  • Please log in to reply
2706 replies to this topic

#2701 p.nightmare

p.nightmare

    Dittatore

  • Amministratori
  • 100658 posts

Posted Yesterday, 09:56

siccome sta baracca di macchina non comunica la potenza di carica e qualche colonnina idem (o meglio, qualche operatore tipo shell) ho fatto un sensorino, ho fatto fare tutto a gemini, senza correzioni. sembra ok

template:
  - trigger:
      - platform: state
        entity_id: sensor.c3_batteria
    sensor:
      - name: "Potenza Ricarica C3"
        unique_id: potenza_ricarica_c3
        unit_of_measurement: "kW"
        device_class: power
        state_class: measurement
        state: >
          {% set capacita_batteria_kwh = 44.0 %}
          {% set stato_attuale = states('sensor.c3_batteria') | float(0) %}
          {% set stato_precedente = trigger.from_state.state | float(0) %}
          {% set delta_percentuale = stato_attuale - stato_precedente %}
          {% if delta_percentuale > 0 %}
            {% set delta_tempo_secondi = as_timestamp(now()) - as_timestamp(trigger.from_state.last_changed) %}
            {% if delta_tempo_secondi > 0 %}
              {% set kwh_aggiunti = (delta_percentuale / 100) * capacita_batteria_kwh %}
              {% set potenza_kw = (kwh_aggiunti / (delta_tempo_secondi / 3600)) %}
              {{ potenza_kw }}
            {% else %}
              {{ this.state | float(0) }}
            {% endif %}
          {% else %}
            0
          {% endif %} 

  • harbinger likes this
No real limits of any kind apply here - not even the sky
è diventato un tutt'uno con lo spazio...
PVoutput

#2702 harbinger

harbinger

    Rompicoglioni DOCG

  • Grandi donatori di sperma
  • PipPipPipPipPipPipPip
  • 47635 posts

Posted Yesterday, 10:19

Bello e pulito!


If you're smart enough you'll survive to get bigger. If you're not then you're just part of the food chain.


#2703 p.nightmare

p.nightmare

    Dittatore

  • Amministratori
  • 100658 posts

Posted Yesterday, 10:49

tra l'altro è inaspettatamente accurato anche caricando a casa (giusto per prova, non che mi serva), si vede che il bms non è poi così stupido e che la macchina comunica la percentuale a intervalli corretti


  • harbinger likes this
No real limits of any kind apply here - not even the sky
è diventato un tutt'uno con lo spazio...
PVoutput

#2704 yorkeiser

yorkeiser

    Schiavo

  • Membri
  • PipPipPipPipPipPipPipPip
  • 73311 posts

Posted Yesterday, 11:45

Funziona anche con la macchina dal meccanico? :trollface:

Il sole è giallo

Brava Giovanna, brava

E canto please don't let me be misunderstood mentre parcheggio nel parcheggio l'alfasud


#2705 p.nightmare

p.nightmare

    Dittatore

  • Amministratori
  • 100658 posts

Posted Yesterday, 13:16

È stata 3 giorni in officina ed è la terza volta che lo scrivo, ok la comprensione del testo difficoltosa ma così si esagera :asd:
No real limits of any kind apply here - not even the sky
è diventato un tutt'uno con lo spazio...
PVoutput

#2706 yorkeiser

yorkeiser

    Schiavo

  • Membri
  • PipPipPipPipPipPipPipPip
  • 73311 posts

Posted Yesterday, 13:29

Chiedo venia e licenzio la segretaria. Avvisaci pure quando avrai finito di smontarla e rimontarla, nel frattempo avrai in garage la C3 con la migliore carica di sempre :sisi:


Il sole è giallo

Brava Giovanna, brava

E canto please don't let me be misunderstood mentre parcheggio nel parcheggio l'alfasud


#2707 p.nightmare

p.nightmare

    Dittatore

  • Amministratori
  • 100658 posts

Posted Yesterday, 13:48

cosa c'è da smontare? boh


No real limits of any kind apply here - not even the sky
è diventato un tutt'uno con lo spazio...
PVoutput




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users