I need to seperate out the:
code: 0f1ae7
in order to act on it in my automation. I cannot get the correct verbage in order to do this. Can someone point me in the correct direction?
You can create an automation employing an MQTT Trigger.
If you wish to have the Wire Smoke and Heat detector represented as a sensor entity in Home Assistant, consider creating an MQTT Sensor. Then your automation can use a State Trigger to monitor the state of the sensor.
I dont want the Wire Smoke or Heat detector sensor. In fact I dont know how they are part of this esp32 board. What I want is the result of a RF motion sensor (which is represented by the code: 0f1ae7.
I did try to create a sensor for that like this in my mqtt.yaml file
name: kitchen_pir3
unique_id: kitchen.pir3
state_topic: “omg/OMG/RTL_433toMQTT/Smoke-GS558/30935”
value_template: ‘{{ ‘‘0f1ae7’’ in trigger.payload }}’
device_class: motion
I got the topic from MQTT Explorer
I was referring to it by the name shown in the data you posted. How you want to call it in Home Assistant, and which payload value should be detected, is your choice.
I don’t recommend you use a period in the value for unique_id. Normally the value should be a slug and slugs in Home Assistant are limited to ASCII alphanumeric characters and the underscore character. In all likelihood, Home Assistant is (internally) converting the period into an underscore.
I assume you are aware that the template you created will accept any payload containing the string 0f1ae7. In other words, it’s not looking for an exact match containing only those characters but any string containing that sequence of characters. An exact match would be like this: