Forum Samochody Elektryczne
Fora
Nowe posty
Search forums
Pokaż najnowsze
Nowe posty
New media
New media comments
New resources
Najnowsze aktywności
Media
Nowe multimedia
Nowe komentarze
Search media
Resources
Najnowsze recenzje
Search resources
Log in
Register
What's new
Szukaj...
Szukaj...
Szukaj tylko w tytułach
By:
Nowe posty
Search forums
Menu
Log in
Register
Install the app
Install
Forum Samochody Elektryczne
Fora
CITROEN
Citroen e-C4 Forum • Citroen eC4 / ë-C4
ładowanie w taniej taryfie
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Napisz odpowiedź
Message
[QUOTE="Tomasz Gorbaczuk, post: 69909, member: 1619"] Dobry pomysł z tym harmonogramem aktywnych opcji, dorobię to. Ja przygodę z HA rozpocząłem w tym wątku :) Grzebię w necie i przerabiam gotowce. sensor czasu ładowania mam taki: e2008_charding_estymacja_czasu: friendly_name: "Estymacja czasu ładowania" unique_id: c249f813-62dc-474d-bb9f-f94220636f87 value_template: >- {% set value = state_attr('sensor.peugeot_e2008', 'energy')[0].charging.status %} {% if value == 'InProgress' %} {% set value = state_attr('sensor.peugeot_e2008', 'energy')[0].charging.remaining_time %} {% if value.find("H") > 0 %} {% set hr = value[value.find("T")+1:value.find("T")+ 3] %} {% if hr[1:2] == "H" %} {% set hr = "0" + hr[0] %} {% endif %} {% else %} {% set hr = "00" %} {% endif %} {% if value.find("M") > 0 %} {% set mn = value[value.find("M")-2:value.find("M")] %} {% if mn[0:1] == "H" or mn[0:1] == "T" %} {% set mn = "0" + mn[1] %} {% endif %} {% else %} {% set mn = "00" %} {% endif %} {% set result = hr + ":" + mn %} {% if result == "00:00" %} {{ result }} {% else %} {{ as_datetime((now() + timedelta( hours = int(hr), minutes = int(mn) )).isoformat()).strftime("%H:%M") }} {% endif %} {% else %} --:-- {% endif %} icon_template: "mdi:timer-outline" aby zadziałał musisz mieć też: ( w tym samym pliku, /config/sensor.yaml) # Peugeot e2008 - platform: rest name: peugeot_e2008 resource: [URL]http://192.168.2.184:5000/get_vehicleinfo/TwójVIN?from_cache=1[/URL] scan_interval: 60 timeout: 30 value_template: 'OK' json_attributes: - energy - battery - kinetic - timed_odometer - last_position - preconditionning Wrzucaj konkretne pytania, jak będę umiał to pomogę. [/QUOTE]
Verification
Wyślij odpowiedź
Forum Samochody Elektryczne
Fora
CITROEN
Citroen e-C4 Forum • Citroen eC4 / ë-C4
ładowanie w taniej taryfie
Top