Home assistant custom component to provide monetary account balance sensors for Bunq
This integration provides access to Bunq:
Version 1.0.0 of the integration was using configuration.yaml
and bunq api key.
This is now fully deprecated. It won’t work anymore.
It was replaced by oauth.
If you are upgrading, before installing version 2.0.0 you should:
2023.6.1+
Simply follow the config flow.
The integration uses oauth.
In order to get the “client id” and the “client secret” follow these steps:
Note:
During the configuration process you will be redirected to https://my.home-assistant.io
.
There, you need to enter the address on which your home assistant can be reached (it can be local ip/dns or external one)
Then click on “Link Account”
oauth is much safer. API keys gives all writes to your accounts (including money transfert).
However, oauth only allow reading.
Each account sensor can show the balance as well as a list of transactions.
You can use the custom card html-template-card to display them.
Example of configuration:
type: "custom:html-template-card"
title: Transactions
ignore_line_breaks: true
content: >
<style>.bunq_table { width:100% } .bunq_table tr:nth-child(even) {background:
var(--material-secondary-background-color)}</style>
<table class="bunq_table">
<tr>
<th>Amount</th> <th>Description</th> <th>Time</th>
</tr>
{% for transaction in state_attr('sensor.bunq_groceries', 'transactions') %}
<tr>
<td style="width: 20%;text-align:right">
{{ transaction.amount }} {{ transaction.currency }}
</td>
<td style="padding:0 0.5em">
{{ transaction.description }}
</td>
<td style="width: 20%;">
{{ strptime(transaction.created, '%Y-%m-%d %H:%M:%S.%f') | relative_time }}
</td>
</tr>
{% endfor %}
</table>