# HA MQTT var to var Homey

**URL:** <https://community.homey.app/t/ha-mqtt-var-to-var-homey/135008>\
**Category:** Tutorials\
**Created:** [April 19, 2025, 12:52pm UTC](https://community.homey.app/t/ha-mqtt-var-to-var-homey/135008 "2025-04-19T12:52:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Ellis](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mark_ellis/32/124954_2.png) [@Mark\_Ellis](https://community.homey.app/u/Mark_Ellis)\
**Post date:** [April 19, 2025, 12:52pm UTC](https://community.homey.app/t/ha-mqtt-var-to-var-homey/135008/1 "2025-04-19T12:52:44Z")

</div>

Hi Guy’s, OK, I find homeystripts Goby Gooch. What I want to do is take homeassistant/variable/mode = “Home” from mqtt payload and set the variable Mark in homey to “Home”, as of the result from mqtt payload. Any help much appreciated.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [April 19, 2025, 2:03pm UTC](https://community.homey.app/t/ha-mqtt-var-to-var-homey/135008/2 "2025-04-19T14:03:24Z")

</div>

I’m afraid not many understand what you are asking, or it is just me 🤣🤪😉  
Can you add a description of what you have in mind? Add some links, code snippets?  
Maybe some MQTT Explorer screenshots?

---

<div class="post-metadata">

**Author:** ![Mark\_Ellis](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mark_ellis/32/124954_2.png) [@Mark\_Ellis](https://community.homey.app/u/Mark_Ellis)\
**Post date:** [April 19, 2025, 2:23pm UTC](https://community.homey.app/t/ha-mqtt-var-to-var-homey/135008/3 "2025-04-19T14:23:37Z")

</div>

Hi, sorry it was a bit of a rush, basically I have a variable called “Mode” in Home Assistant which runs through different states of the day, like “Morning”, “Day”, “Evening” etc, I want to share this variable with homey to keep everything in since, so I’ve publish this variable to mqtt and is visible under topic homeassistant/variable/mode with the payload being what the variable “Mode” is set at, which at this time is “Day”, I want to set the same named variable “Mode” in homey to the payload from topic homeassistant/variable/mode in mqtt set by Home Assistant. I hope this is more clear. Regards Mark

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [April 19, 2025, 2:30pm UTC](https://community.homey.app/t/ha-mqtt-var-to-var-homey/135008/4 "2025-04-19T14:30:18Z")

</div>

Better!  
When you have MQTT in place, this should do the trick:

 ![1000046627](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/c/4c8c430b499a238b91a20f0a5fa2d17a60f4f371.jpeg)

The logic card’s selected tag for the topic’s value/payload/message, is a local tag

 ![1000046625](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/e/7ede4efca4a70984f57f982b2130142d9c9b9fdd.jpeg)

---

<div class="post-metadata">

**Author:** ![Mark\_Ellis](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mark_ellis/32/124954_2.png) [@Mark\_Ellis](https://community.homey.app/u/Mark_Ellis)\
**Post date:** [April 19, 2025, 3:20pm UTC](https://community.homey.app/t/ha-mqtt-var-to-var-homey/135008/5 "2025-04-19T15:20:59Z")

</div>

Hi thanks for that, that looks so easy now. Been using Home Assistant for years now, getting my head round this is so different. I want to use the 2 together because homey just hasn’t the devices and complex automations Home Assistant has. So thanks again.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [April 19, 2025, 3:55pm UTC](https://community.homey.app/t/ha-mqtt-var-to-var-homey/135008/6 "2025-04-19T15:55:23Z")

</div>

Yeah it took me quite a while to get MQTT. Just yesterday I discovered that sending data on topic `one/two/three/` results in no data in HA (but the values show up in MQTT Explorer), while it does using `one/two/three` 🫣

I also use best of both: HAmey  
[Here’s](https://community.homey.app/t/tutorial-pro-how-to-integrate-home-assistant-with-homey-pro/92641) an integration tutorial I wrote, once I finally figured it out.

---

<div class="post-metadata">

**Author:** ![Mark\_Ellis](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mark_ellis/32/124954_2.png) [@Mark\_Ellis](https://community.homey.app/u/Mark_Ellis)\
**Post date:** [April 19, 2025, 5:02pm UTC](https://community.homey.app/t/ha-mqtt-var-to-var-homey/135008/7 "2025-04-19T17:02:38Z")

</div>

OMG, all what I’ve been doing with mqtt has just been wiped out. I’ve been doing mqtt 3 day thinking I’ve cracked it now, HAC, making things so much easier, this is a game changer. Thanks for the info. Appreciate it so much

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [April 26, 2025, 3:42pm UTC](https://community.homey.app/t/ha-mqtt-var-to-var-homey/135008/8 "2025-04-26T15:42:37Z")

</div>

> [@Mark\_Ellis](#):
>
> have a variable called “Mode” in Home Assistant

Do you mean a HA entity?  
Then it’s perhaps easier to use the HA community app and add a sensor device to Homey offering several flow trigger.
