# FlowToken already exists

**URL:** <https://community.homey.app/t/flowtoken-already-exists/90896>\
**Category:** Developers\
**Created:** [October 3, 2023, 8:59pm UTC](https://community.homey.app/t/flowtoken-already-exists/90896 "2023-10-03T20:59:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Kalrsson](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kalrsson/32/48872_2.png) [@Peter\_Kalrsson](https://community.homey.app/u/Peter_Kalrsson)\
**Post date:** [October 3, 2023, 8:59pm UTC](https://community.homey.app/t/flowtoken-already-exists/90896/1 "2023-10-03T20:59:18Z")

</div>

I have a HomeyScript that sets/updates three tags. This script is then run in Advanced Flows, before assigning the three tags to three separate virtual devices.

Lately, I have noticed that the tags are not really updated. It feels like the tags are cached in some weird way.

Therefore, I have decided to first delete the tags in my script, and after that create them again. Result? My virtual devices are now always updated correctly.

```auto
await tag('Tibber-todays-sold-electricity-kr', null);
await tag('Tibber-todays-sold-electricity-kwh', null);
await tag('Tibber-todays-sold-electricity-updatetime', null);
await wait(500);
await tag('Tibber-todays-sold-electricity-kr', totalProfit);
await tag('Tibber-todays-sold-electricity-kwh', totalProduction);
await tag('Tibber-todays-sold-electricity-updatetime', latestUpdateTime);

```

So far, so good, but now the script sometimes throws an error:

> A FlowToken with ID homey:app:com.athom.homeyscript:Tibber-todays-sold-electricity-kr already exists.

The script runs every hour, and it might happen once per day.

Any idea why and how I can prevent it from happening?
