# Write Time And Date in Function of a virtual MQTT Device

**URL:** <https://community.gladysassistant.com/t/write-time-and-date-in-function-of-a-virtual-mqtt-device/11531>\
**Category:** Scènes\
**Tags:** mqtt, scene\
**Created:** [November 8, 2026, 2:32pm UTC](https://community.gladysassistant.com/t/write-time-and-date-in-function-of-a-virtual-mqtt-device/11531 "2026-11-08T14:32:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/p/278dde/32.png) [@Peter](https://community.gladysassistant.com/u/Peter)\
**Post date:** [November 8, 2026, 2:32pm UTC](https://community.gladysassistant.com/t/write-time-and-date-in-function-of-a-virtual-mqtt-device/11531/1 "2026-11-08T14:32:20Z")

</div>

Hello, I’m new here

I want to store the date and time within a scene,

I have added a virtual MQTT device with the function “Text” as an actor:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/6/e/6e993f90e941d30bbf91ea580bdd37022ad3e185.jpeg)

I have created a scene that retrieves the date and time and sets the date & time as the value of Text(Text):

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/0/a/0aedb60ae86f8d6fa37217e6311a91717faf76a2.jpeg)

Unfortunately, the value is not set:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/7/9/79a5f033af36ab2bc78852ea6f30188ad8551a8f.png)

does anyone have a tip for me?

P.S.: No matter what text I insert (the variable for date & time or even a fixed text) it doesn’t work. The text is not “saved”.

Thanks in advance

Greetings from Germany

Peter

---

<div class="post-metadata">

**Author:** ![mutmut](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/mutmut/32/14064_2.png) [@mutmut](https://community.gladysassistant.com/u/mutmut)\
**Post date:** [November 8, 2026, 3:34pm UTC](https://community.gladysassistant.com/t/write-time-and-date-in-function-of-a-virtual-mqtt-device/11531/2 "2026-11-08T15:34:19Z")

</div>

Hi @Peter and welcome to the forum ☺  
i just tested by sending a message and I receive the date and time.

To store a value in an MQTT variable, you need to use the `Send an MQTT message` function and fill in the topic, a topic you will find in the advanced options of your Text feature and I would also enable the Sensor option:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/8/a/8a95fcd5fcbf94e10c5e1c5aedb21c813089d81e.jpeg)  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/c/d/cd62c3bb6e19a2257bbb9518847a38ac3d01e287.jpeg)
