Replies: 2 comments 2 replies
-
... IMHO: no need to provide 'odometer', 'climater', 'wakeup' or 'maxcurrent'... for 'status' you must create a own ha template entry where you return the state: A, B or C based on the evcc documentation... return A when DISCONNECTED |
Beta Was this translation helpful? Give feedback.
-
I just found some additional (detailed) info how to deal with the status: Additional Template Sensor is need to provide EVCC vehicle statusWe need to create a HA sensor that will provide the status of charging - this will be A, B, C, D, E, F as described in the evcc documentation.
The original evcc code can be found here. Here is the section just for your reference: // Status implements the api.ChargeState interface
func (v *Provider) Status() (api.ChargeStatus, error) {
status := api.StatusNone
res, err := v.statusG()
if err == nil {
switch res.Metrics.XevPlugChargerStatus.Value {
case "DISCONNECTED":
status = api.StatusA // disconnected
case "CONNECTED":
status = api.StatusB // connected, not charging
case "CHARGING", "CHARGINGAC":
status = api.StatusC // charging
default:
err = fmt.Errorf("unknown charge status: %s", res.Metrics.XevPlugChargerStatus.Value)
}
}
return status, err
} From the original Ford evcc integration it looks like that we only needs to provide status A, B or C and we can get this from the HA sensor status from Create the template sensor
As alternative, you can add the following code to your template section of the - unique_id: template.uid_fordpass_[YOUR-VIN-HERE]_evcc_code
sensor:
- name: 'fordpass [YOUR-VIN-HERE] EVCC Charging code'
unique_id: 'uid_fordpass_[YOUR-VIN-HERE]_evcc_charging_code'
icon: mdi:state-machine
state: >
{% set val = states('sensor.fordpass_[YOUR-VIN-HERE]_elvehcharging')|upper %}{% if val == 'DISCONNECTED' -%}A{% elif val == 'CONNECTED' -%}B{% elif val == 'CHARGING' or val == 'CHARGINGAC' -%}C{%- else %}UNKNOWN{%- endif %} Check if the status of the new template sensor is workingMake sure that the new created sensor |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone!
I am trying to create a new vehicle in EVCC with the use of the sensors which I received from another sensor.
From looking at the example provided at "HA_AS_EVCC_SOURCE.md" I could fill in like 50% of it.
However, since my HTTP knowledge is very lacking, I was wondering how I can get the remaining ones filled in (maxcurrent, wakeup, status, climater). I can not use the GET method for that, but something else. I guess.
Could anyone support me with this? All sensors are comming from https://github.com/andreadegiovine/homeassistant-stellantis-vehicles
Beta Was this translation helpful? Give feedback.
All reactions