# Logging variable increment and datetime

**URL:** <https://community.homey.app/t/logging-variable-increment-and-datetime/118188>\
**Category:** Questions & Help\
**Created:** [October 15, 2024, 7:59am UTC](https://community.homey.app/t/logging-variable-increment-and-datetime/118188 "2024-10-15T07:59:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marquetphilippe](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marquetphilippe/32/113699_2.png) [@marquetphilippe](https://community.homey.app/u/marquetphilippe)\
**Post date:** [October 15, 2024, 7:59am UTC](https://community.homey.app/t/logging-variable-increment-and-datetime/118188/1 "2024-10-15T07:59:25Z")

</div>

Hi all,

I am trying to log the usage of wood pellets for my heater. Meaning:  
Every time I put in a new bag, I push a button, and Homey should log the datetime + increase my numerical variable for ‘pellets’ with 1, and decrease my numerical variable for ‘pellet stock’. This will help me to get a reminder when I need to repurchase them, and provide me a historical overview (combined with the weather conditions) of my usage.

I tried using the ‘better logic’ app, but still can’t seem to get this right. Decreasing and increasing the variable is easy - but getting a separate line for each datetime is what I can’t get to work.

Anyone who can help me out?  
Thanks a lot!

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [October 15, 2024, 11:08am UTC](https://community.homey.app/t/logging-variable-increment-and-datetime/118188/2 "2024-10-15T11:08:27Z")

</div>

> [@marquetphilippe](#):
>
> but getting a separate line for each datetime is what I can’t get to work.

Please show your Flow, so someone can help you.

maybe you can use this: [New line in push notification to mobile](https://community.homey.app/t/new-line-in-push-notification-to-mobile/40102)

---

<div class="post-metadata">

**Author:** ![DirkH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkh/32/78952_2.png) [@DirkH](https://community.homey.app/u/DirkH)\
**Post date:** [October 15, 2024, 2:10pm UTC](https://community.homey.app/t/logging-variable-increment-and-datetime/118188/3 "2024-10-15T14:10:52Z")

</div>

Hi @marquetphilippe ,

one easy workaround could be an alternative usage of [PbtH](https://homey.app/en-de/app/com.gruijter.powerhour/Power-by-the-Hour/)  
Currently just an idea. Probably you need a virtual device to use it properly. But there you can also enter the prices and you can easily analyse, what the costs of heating are.  
As PbtH works on the unity kWh, I would propose top take the number of kWh per bag of pellets to get equivalent numbers.
