One minute
Fix myAudi app notification
Intro
The myAudi app initially had a really cool feature that sent notifications to my phone upon the car being fully charged. It functioned for a few months but ceased to work after a certain update. Restoring this feature is something I wanted to do for some time now and I finally got around to it.
I’ve successfully imitated the function using Home Assistant.
Installing audi-connect integration
The first step is to install the audi-connect
integration through HACS
. Once that is installed, I can login to the integration and get access to the audi API.
Adding ntfy
In order to send custom notifications within Home Assistant, I can make use of ntfy
. This is easily added in the configuration.yaml
file:
# Add ntfy
notify:
- name: ntfy
platform: rest
method: POST_JSON
data:
topic: <TOPIC>
title_param_name: title
message_param_name: message
resource: https://ntfy.sh
Creating the automation
The new ntfy
service can be used by just adding a new entry inside the automations.yaml
file. I made it so that the notification is send out once the battery is at 95% capacity.
alias: Percentage Sensor Notification
trigger:
platform: state
entity_id: sensor.audi_a3_sportback_tfsi_e_state_of_charge
condition:
condition: numeric_state
entity_id: sensor.audi_a3_sportback_tfsi_e_state_of_charge
above: 99
action:
- service: notify.ntfy
data: {
message: "100%",
title: "Audi opgeladen"
}
And that’s it! My notifications are working again.