That way it’s saves on having a tone of repeated code and allow’s you to retain the sensor states in MQTT, saves using input_boolean’s like I first started off with.
I could already see some of my other Sonoff Basic mqtt sensors and can control. Should I expect to see some icon or something on the overview page now this is configured here, or does it just sit in the background (intergrations)?
Regards the spacing, when I use the configurator from Hassio. It gives me a green tick and also when I check config under Server Control. It says configuration is all valid. Maybe you know something I havent learnt yet if you could share.
Thank you for replying. Appreciate the assistance.
So when there is a message on: rf.bridge/tele/RESULT it triggers the python script where I specified all the sensors d:
d = { 'F18D3E':['fronthousepir','ON','false'],
}
p = data.get('payload')
if p is not None:
if p in d.keys():
service_data = {'topic':'rf433/{}'.format(d[p][0]), 'payload':'{}'.format(d[p][1]), 'qos':0, 'retain':'{}'.format(d[p][2])}
else:
service_data = {'topic':'home/unknown', 'payload':'{}'.format(p), 'qos':0, 'retain':'false'}
logger.warning('<rfbridge_demux> Received unknown RF command: {}'.format(p))
hass.services.call('mqtt', 'publish', service_data, False)
Sounds like a silly question, but how could i test this is right?
I used MQTT Lens and subscribed to rf433* to see if any messages are being received, but I get nothing.
Sorry for my silly questions, trying to learn and master this setup.
Cheers.
thank you. for simplification, I have just made it without the dot (rfbridge).
The TOPIC modification. That in the automation or the MQTT broker config settings?
So I can see the demuxer was triggered today, but not the 'front house motion"
@francisp francisp
Well, im think im getting somewhere. I can see that when I trigger one of the rf433 switches that I have in my python_script.rfbridge_demux file, it changes the automation date/time:
rfbridge_demultiplexer Last triggered: September 26, 2019, 9:37 PM
Hooray
After you’ve added python_script: to the configuration file and restarted Home Assistant any changes you make to rfbridge_demux.py will become effective immediately after the file is saved. You won’t need to restart Home Assistant after modifying an existing python_script file or adding a new one. This is very convenient because it saves you time when modifying/testing a python_script (and it’s less disruptive compared to adding/modifying entities).
The following components and platforms could not be set up:
* [python-script](https://home-assistant.io/components/python_script/)
Please check your config.
I did it !!! I did it!! - with all of you legends help.
my pitfall was the folder location I created the ‘python_scripts’ folder.
Once I created in the HA directory and not under a separate folder, both the demux automation and the sensor light automation works.
Thank you ALL for your guidance and patience with me to nutt it out.
Much appreciated.