when i leave out the payload in the automater the automation works
but if i put in the payload (and i really need to do this because i work with the sonoff/tasmoto wifi hub) then the action doesnt work
like you can see below hassio is recieving the messages when i go to developer tools - mqtt- listen to a topic
Message 0 received on tele/hub/RESULT at 2:14 PM:
{
“Time”: “2020-03-06T14:14:05”,
“RfReceived”: {
“Sync”: 7560,
“Low”: 270,
“High”: 730,
“Data”: “92D3B8”,
“RfKey”: “None”
}
}
below is my automation.yaml :
id: ‘1583497473605’
alias: motion gang voor
description: ‘’
trigger:
Please read this topic and format your code correctly otherwise we are not able to help you.
Also your trigger can’t work, because the payload is the whole message but in your trigger you just ask for part of the payload. It would be the best to create an mqtt sensor that extracts the “Data” from your MQTT payload and then use the sensor as the trigger.
The payload is the whole message. It’s just that the examples you read probably had an MQTT topic where only a single value is posted and not a JSON message as in your example.
then in the automation editor i created a new automation
on trigger type i selected : state
then on entity i selected the newly created sensor.mqtt_rf_sensor
i left “From” and “For” empty an on “To” is i put in 92D3B8
Nothing happend when i pussed the button, then i changed it to “92D3B8” and again nothing
Please format the code you post so that others can easily read it and be certain it doesn’t contain syntax errors. You may have noticed that everyone is responding to you with formatted code.
There are two easy ways to format code:
Select the code and click the forum editor’s </> icon.
OR
Enter three consecutive backquotes ``` on a separate line before the code.
Enter three more consecutive backquotes on a separate line after the code.
it looks like hassio isnt recieving the data from my hub all of the time, if im lucky and have pressed the button 10 times or more then maybe the light goes off or not.
looks like there is an extreme delay
im running hassio on a raspberry pi is that maybe the problem? to slow?
Can I squeez that only into one automation w/o creating a sensor?
The reason why I’m asking is only need one rf button. The sensor value would never be changed and the automation is looking for a change.
Idea could be to add the attribute timestemp of the hub. So there would be a change. But dont know how to integrate into the sensor. And yes, I reat the mqtt sensor artical.