#Howto send text to the Ulanzi Clock easily

1 messages · Page 1 of 1 (latest)

fleet sentinel
#

Does anybody has knowledge of how to make an automation that easily sends random text messages to my Ulanzi Pixel Clock? My goal is to have an option on my HA Startup screen where I can write the text and send it using another On/Off Helper (?). I tried it myself and I can send a fixed text message using MQTT-Publish with 'ulanzi_clock/notify' in the topic and '{ "text": "text bla bla", "icon": "33602", "rainbow": false, "duration": 10 }' in the message , but if I want to send another different message I need to change the text in the automation every time. So sending text to the clock works but I hope it can be done easier. Thnx !!

distant horizon
#

Make a script

#
ulanzi_text:
  alias: Ulanzi Text
  mode: single
  fields:
    text:
      description: Message to be sent/annouced.
      example: "Hello"
      required: true
      selector:
        text:
          type: text
  sequence:
  - action: mqtt.publish
    data:
      topic: put_your_topic_here
      payload: >
        {{ { "text": text, "icon": "33602", "rainbow": false, "duration": 10 } | to_json }}
fleet sentinel
#

Wow, that works ! Thanks a lot 👊

fleet sentinel
#

Great, I now can even send text to the clock using voice commands in assist 🙂

safe totem
fleet sentinel
#

Thanks a lot. I'm making some progress using Petro's script and meanwhile (in the same script) sending a voice command to the Google Hub next to it saying there is a new message on the Awtrix Ulanzi clock so the message on the clock won't be missed 🤣