Hero7777
(Helge Röhrbein)
1
Hello there, i have a problem with RF Code receiving through a sonoff RF-Bridge.
In my configuration.yaml i have the following:
binary_sensor:
- platform: mqtt
name: ‘treppenaufgang_unten’
state_topic: ‘tele/Bridge2/RESULT’
value_template: >-
{% if value_json.RfReceived.Data == ‘551096’ %} {{‘ON’}}
{% endif %}
off_delay: 5
Now i have thought, if the code 551096 (motion Sensor) comes, the “treppenaufgang_unten” becomes “ON” but nothing happens.
I am a beginner, please excuse, if there a topic on an other place…
Greetings and many thanks for help…
at9
(Adam)
2
Have a read of this. Strategy 2 works great for me.
Hero7777
(Helge Röhrbein)
3
Thanks for your answer, i have changed my code to this:
binary_sensor:
- platform: mqtt
name: ‘Treppenaufgang_unten’
state_topic: ‘tele/Bridge2/RESULT’
value_template: >-
{% if value_json.RfReceived.Data == ‘551096’ %}
{{‘ON’}}
{% else %}
{{states(‘binary_sensor.treppenaufgang_unten_motion’) | upper}}
{% endif %}
off_delay: 15
device_class: motion
It is ok, but now i have the problem to change the switch to go on.
I have try a solution over the automations, but there i cannot use an entity…
Have you an idea for me?
Hero7777
(Helge Röhrbein)
4
Ok, now it is ok, i have found a solution. Sometimes i helps, if here comes not a solution in time…
Thanks to you all…