# HA Fix Tracked State

**URL:** <https://forum.bondhome.io/t/ha-fix-tracked-state/2257>\
**Category:** Integrations\
**Created:** [February 19, 2021, 12:16am UTC](https://forum.bondhome.io/t/ha-fix-tracked-state/2257 "2021-02-19T00:16:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johnkmcdowell](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@Johnkmcdowell](https://forum.bondhome.io/u/Johnkmcdowell)\
**Post date:** [February 19, 2021, 12:16am UTC](https://forum.bondhome.io/t/ha-fix-tracked-state/2257/1 "2021-02-19T00:16:20Z")

</div>

I use the bond bridge via Home Assistant integration. Overall it works well and I control 9 fans with it.

My question: does anyone know a way to fix tracked state via the API. Periodically the state in the bond gets off (mainly due to “unauthorized” use of a remote) and it needs to be corrected. I would like to update the state from HA rather than having to go through the bond app (lots of menu’s to get there). Any thought/ideas?

---

<div class="post-metadata">

**Author:** ![jpkeenanjr](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.bondhome.io/jpkeenanjr/32/545_2.png) [@jpkeenanjr](https://forum.bondhome.io/u/jpkeenanjr)\
**Post date:** [February 19, 2021, 1:07am UTC](https://forum.bondhome.io/t/ha-fix-tracked-state/2257/2 "2021-02-19T01:07:54Z")

</div>

Check out [Bond Local API](http://docs-local.appbond.com/#tag/Device-State/paths/~1v2~1devices~1%7Bdevice_id%7D~1state/patch)

---

<div class="post-metadata">

**Author:** ![Johnkmcdowell](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@Johnkmcdowell](https://forum.bondhome.io/u/Johnkmcdowell)\
**Post date:** [February 19, 2021, 12:41pm UTC](https://forum.bondhome.io/t/ha-fix-tracked-state/2257/3 "2021-02-19T12:41:48Z")

</div>

Thanks,

I had used the local API in the past and then when the HA integration came out stopped using it. I had looked through the API documentation quickly and did not notice the “Update State Belief” command. I can use that via curl in HA to do what I want. In parallel I will see if I can work with the Bond Integration team to add this as a HA service which would be ideal.

---

<div class="post-metadata">

**Author:** ![bdraco](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@bdraco](https://forum.bondhome.io/u/bdraco)\
**Post date:** [February 20, 2021, 8:53am UTC](https://forum.bondhome.io/t/ha-fix-tracked-state/2257/4 "2021-02-20T08:53:21Z")

</div>

If you open a PR to `core` and ping me, I’d be happy to review it.

It looks like the underlying library will also need an adjustment to be able to patch state : [bond-api/bond.py at master · prystupa/bond-api · GitHub](https://github.com/prystupa/bond-api/blob/master/bond_api/bond.py)

---

<div class="post-metadata">

**Author:** ![Johnkmcdowell](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@Johnkmcdowell](https://forum.bondhome.io/u/Johnkmcdowell)\
**Post date:** [February 20, 2021, 2:31pm UTC](https://forum.bondhome.io/t/ha-fix-tracked-state/2257/5 "2021-02-20T14:31:10Z")

</div>

Thanks @bdraco,

I have not contributed to the code for HA yet, so this is as good an issue as any to start on. I have already put together a workaround using the rest\_command platform but I had to manually put the bond token and device id’s into it. I think it would make sense to add it to the bond device integration itself. It will take me some time to learn the ins and outs of how to fork, test, and PR, but the documentation should show me the way. I will let you know once I have a PR ready for review.

John
