---
title: "Comment by Andreas on \"Tracking expenses in Home Assistant\" | Hashnode"
description: "Hi. This worked for me: last_expense: friendly_name: Last expense unit_of_measurement: € value_template: &gt; {{ state_attr(&#39;sensor.curve_email&#39;,&#39;su"
url: "https://hashnode.com/posts/tracking-expenses-in-home-assistant/5fd8ef6cea368e206535d3f8/comment/5fe87f25999b3f21e3158857"
---

[Discussion](https://hashnode.com/posts/tracking-expenses-in-home-assistant/5fd8ef6cea368e206535d3f8)

Comment [Tracking expenses in Home Assistant](https://hashnode.com/posts/tracking-expenses-in-home-assistant/5fd8ef6cea368e206535d3f8)

[Andreas](https://hashnode.com/@myrulezzz)

[Dec 27, 2020](https://hashnode.com/posts/tracking-expenses-in-home-assistant/5fd8ef6cea368e206535d3f8/comment/5fe87f25999b3f21e3158857)

Hi. This worked for me: last\_expense: friendly\_name: Last expense unit\_of\_measurement: € value\_template: > {{ state\_attr('sensor.curve\_email','subject') | regex\_findall\_index("€\\d+.?\\d+") | replace(" €","") | round(2) }} attribute\_templates: seller: >  
{{ state\_attr('sensor.curve\_email','subject')\[27:1000\] | regex\_findall\_index(".\* on") | replace(" on","")}}

Can you explai how you created your expenses card?
