Closed stumiles86 closed 1 year ago
@stumiles86 Happy to add it but would need you to send me the contents of the vehicle array so I can see what data is returned when a vehicle supports DEF.
If you enable fordpass debugging by adding the following to your configuration.yaml and then sending me the big json array that shows in the logs (Sanitize your vin) I can get it added in 👍
logger:
default: warning
logs:
custom_components.fordpass: debug
This is what I see on my car that doesn't support DEF, guessing yours will be similar but with the values filled out.
"dieselSystemStatus":{
"exhaustFluidLevel":{
"value":"0.000000",
"status":"LAST_KNOWN",
"timestamp":"01-04-2023 00:17:56"
},
"filterSoot":{
"value":"0",
"status":"CURRENT",
"timestamp":"01-04-2023 00:58:12"
},
"ureaRange":"None",
"metricType":{
"value":"Inactive",
"status":"LAST_KNOWN",
"timestamp":"01-04-2023 00:17:56"
},
"filterRegenerationStatus":{
"value":"DPF_Normal_Operation",
"status":"CURRENT",
"timestamp":"01-04-2023 00:58:12"
}
},
My current AdBlue level is around 12% and this is the relevant code from the log Also my AdBlue Range is 667 Miles. (Shown as ureaRange below)
'dieselSystemStatus': {'exhaustFluidLevel': {'value': '12.400000', 'status': 'CURRENT', 'timestamp': '01-04-2023 17:44:19'}, 'filterSoot': None, 'ureaRange': {'value': '667', 'status': 'CURRENT', 'timestamp': '01-04-2023 17:44:19'}, 'metricType': {'value': 'Inactive', 'status': 'CURRENT', 'timestamp': '01-04-2023 17:44:19'}, 'filterRegenerationStatus': {'value': 'DPF_Normal_Operation', 'status': 'CURRENT', 'timestamp': '01-04-2023 17:44:19'}},
Thanks for adding this. Only issue I have now is if I want to display how many miles range I have the sensor outputs a string like this:
{ "value": "4500", "status": "LAST_KNOWN", "timestamp": "07-25-2023 13:32:10" }
How do I display just the value element?
Thanks for adding this. Only issue I have now is if I want to display how many miles range I have the sensor outputs a string like this:
{ "value": "4500", "status": "LAST_KNOWN", "timestamp": "07-25-2023 13:32:10" }
How do I display just the value element?
I need to rewrite this section but for now you can add a template sensor like below which will extract the value for you.
sensor:
- unique_id: fordpass_dpf_status
state: >
{% set val = states('sensor.fordpass_dieselsystemstatus').replace("'", '"') | from_json %}
{{ val.value }}
I'm really sorry but that sensor didnt work. I get this error when trying to reload home assistant:
also when pasting this code into the template editor i get DPF_Normal_operation not the ureaRange value
I'm really sorry but that sensor didnt work. I get this error when trying to reload home assistant:
also when pasting this code into the template editor i get DPF_Normal_operation not the ureaRange value
The reason you get the error is because it's a template you need to either put it in a separate template.yaml file that you include in your config or if adding direct to configuration.yaml you need to add template: first like below:
template:
- sensor:
- unique_id: fordpass_dpf_status
state: >
{% set val = states('sensor.fordpass_dieselsystemstatus').replace("'", '"') | from_json %}
{{ val.value }}
If you want the UREA range then you will need to change the sensor referenced in the above example to the exhaust fluid level one.
Hope that makes sense :)
Thanks for your help so far but I must be doing something wrong still. It is not pulling the ureaRange value
Thanks for your help so far but I must be doing something wrong still. It is not pulling the ureaRange value
Should look like this 👍
template:
- sensor:
- unique_id: fordpass_dpf_status
state: >
{% set val = state_attr('sensor.fordpass_exhaustfluidlevel', 'ureaRange') %}
{{ val.value }}
Closing old issue for housekeeping
Please reopen if the issue is still present :)
Sorry this isn’t an issue, rather a feature request. Not sure if this is the place for it to go.
Would be nice if I could get a sensor for the Adblue fill level / Range. (Think this is called diesel exhaust fluid elsewhere in the world.)This info is available in the FordPass app so I assume there is an api for it.