MQTT zu UART

Hallo,

ich habe da ein Problem . Ich möchte per MQTT Daten senden und diese direkt auf den UART weiterleiten (An dem UART hängt ein Nextion Display).

 - platform: mqtt_subscribe
    name: "send_display"
    id: send_display
    topic: nspanel-demo/sensor/send_display/state
    on_value:
       then:
        - uart.write: id(send_display).state.c_str()
        - uart.write: [0xFF, 0xFF, 0xFF]

Kann mir jemand weiterhelfen wie ich den Topic “nspanel-demo/sensor/send_display/state” empfangen kann und direkt mit dem Zusatz [0xFF, 0xFF, 0xFF] an den uart senden kann.

Danke
Ralf

Hi. Welcome, but this is an English language forum only.

I have a problem. I would like to send data via MQTT and forward it directly to the UART (a Nextion display is attached to the UART).

 - platform: mqtt_subscribe
    name: "send_display"
    id: send_display
    topic: nspanel-demo/sensor/send_display/state
    on_value:
       then:
        - uart.write: id(send_display).state.c_str()
        - uart.write: [0xFF, 0xFF, 0xFF]

Can someone help me how I can receive the topic “nspanel-demo/sensor/send_display/state” and send it directly to the uart with the addition [0xFF, 0xFF, 0xFF].

Thanks
Ralph