Unofficial MyEdenred Portugal integration for Home Assistant.
About the download count: the badge above counts downloads of the
myedenred.ziprelease asset across all releases. It measures file downloads — HACS installs, updates and reinstalls all count — and it is not a count of unique users or active installations.
- Balance and transaction sensors for each MyEdenred card
- Config-flow UI setup (username, password and 2FA code received by e-mail)
- Multiple cards supported — add the integration once per card
- Portuguese (PT) country targeting
The repository is not (yet) part of the HACS default repository, so add it once as a custom repository:
- Open HACS in Home Assistant
- Click ⋮ → Custom repositories
- Add the repository URL:
https://github.com/rbaptista1995/MyEdenred - Select category Integration
- Search for MyEdenred and install it
- Restart Home Assistant
Once included in the HACS default repository, MyEdenred can be searched directly in HACS without adding a custom repository.
- Download
myedenred.zipfrom the latest release - Extract its contents into
config/custom_components/myedenred/ - Restart Home Assistant
- Navigate to Settings → Devices & Services and click Add Integration
- Search for MyEdenred
- Enter your credentials
- Enter the 2FA code received by e-mail
- Repeat the procedure for each additional card you own
Add any entity card as usual.
While showing the card's balance on a card is commonplace (any entity card will do), displaying transactions can be more complicated to achieve.
You can use a custom:html-template-card to display your data like this:
type: vertical-stack
cards:
- type: entities
title: Cartão Refeição
entities:
- entity: sensor.edenred_card_XXXXXXX
secondary_info: last-updated
icon: mdi:credit-card
- entity: sensor.edenred_card_XXXXXXX
type: custom:multiple-entity-row
name: Nome Cartão
show_state: false
entities:
- attribute: ownerName
- entity: sensor.edenred_card_XXXXXXX
type: custom:multiple-entity-row
name: Estado Cartão
show_state: false
entities:
- attribute: cardStatus
- type: custom:html-template-card
ignore_line_breaks: true
content: |
<table
style="padding: 0px;border-collapse:separate;
border:solid gray 1px;
border-radius:6px; ">
<tr>
<td colspan="3"><center><font color="#6B8E23" size=4> <b>Últimos Movimentos: </b></center> </font></td>
</tr>
<tr>
</tr>
<tr>
<th style="width:10%;"><u><font color=orange>Data</font></u></th>
<th style="width:65%;"><u><font color=orange>Descrição</font></u></th>
<th style="width:25%;"><u><font color=orange>Valor</font></u></th>
</tr> {% for t in state_attr('sensor.edenred_card_XXXXXXX','transactions') %}
<tr>
<td style="border-top: 1px solid #dddddd; text-align: center;">{{t.date}}</td>
<td style="border-top: 1px solid #dddddd; text-align: center;">{{t.name}}</td>
<td style="border-top: 1px solid #dddddd; text-align: center;"><b>{{t.amount}}</b></td>
</div></td>
</tr>{% endfor}</table>(credits thanks to Vítor Nóbrega).
Another alternative is to use custom:list-card which has the advantage of being able to indicate the number of rows to display:
type: custom:list-card
entity: sensor.edenred_card_XXXXXXX
feed_attribute: transactions
title: MyEdenred Transactions
row_limit: 10
columns:
- title: Data
field: date
- title: Movimento
field: name
- title: Valor
field: amount
postfix: ' €'
style:
- text-align: right
- white-space: nowrapIf you have custom:browser-mod in your system, you can show the transactions in a nice popup window, like this: (this also uses custom:mushroom-entity-card and custom:list-card)
type: custom:mushroom-entity-card
entity: sensor.edenred_card_XXXXXXX
name: Cartão Refeição
tap_action:
action: fire-dom-event
browser_mod:
command: popup
title: MyEdenred Transactions
style:
.: |
:host .content {
width: calc(800px);
align: center;
}
card:
type: custom:list-card
entity: sensor.edenred_card_XXXXXXX
feed_attribute: transactions
row_limit: 20
columns:
- title: Data
field: date
- title: Movimento
field: name
- title: Valor
field: amount
postfix: ' €'
style:
- text-align: right
- white-space: nowrap
style: |
tr {
height: 25px
}Every GitHub release is automatically packaged by CI into a single
myedenred.zip asset containing the integration files. HACS installs and
updates from that asset.
This is a personal project and isn't in any way affiliated with, sponsored or endorsed by MyEdenred Portugal.
All product names, trademarks and registered trademarks in (the images in) this repository are property of their respective owners. All images in this repository are used by the project for identification purposes only.
The author of this project categorically rejects any and all responsibility for the card balance and other data presented by the integration.