Mqtt payload - how to?

Hya,

i’m an absolute beginner learning and would like to have some help, if possible.

I have a device which set state on (1) and off (0), and publish it’s state via mqtt.

This device will also publish a third state, 2, s, i will have 3 states: 0, 1 and 2

0 for idle, 1 for working and 2 for done, and then after notification for done, 0 for idle.

is it possible to get it per payload or have it on HA?

thx in advance.

Somewhat confusing what you are writing, but take a look at the mqtt sensor. :slightly_smiling_face:

Install MQTT Explorer on your pc (there are versions for verious OSes). Look at the data tree in order to get idea how data are organized

Thank you. MQTT Explorer shows it. STATUS 0 or 1 - it’s OK.

On configuration.yaml, i have:

binary_sensor:
  - platform: mqtt
    name: "tc91100"
    unique_id: tc91100
    state_topic: "BSTC91100/VACC/status"
    payload_on: "1"
    payload_off: "0"

And it’s also ok.

What i want is to have a trigger, so when the payload changes from 0 to 1, meaning it’s working, i get a notification that work started and after that, when o again, i also get a notification it ended.

and after this, become ready again for another cycle.