This is the Python script
d = { '2B470A':['Front Door','ON','true'],
'2B470E':['Front Door','OFF','true'],
'2B520A':['Basement Door','ON','false'],
'2B520E':['Basement Door','OFF','false'],
'2C630A':['Kitchen Door','ON','false'],
'2C630E':['Kitchen Door','OFF','false'],
'2C8B0A':['Garage Side Door','ON','false'],
'2C8B0E':['Garage Side Door','OFF','false'],
'2EC50A':['Guest Room Left Window','ON','false'],
'2EC50E':['Guest Room Left Window','OFF','false'],
'2D610A':['Guest Room Middle Window','ON','false'],
'2D610E':['Guest Room Middle Window','OFF','false'],
'2C6D0A':['Guest Room Right Window','ON','false'],
'2C6D0E':['Guest Room Right Window','OFF','false'],
'2FA00A':['Living Room Left Window','ON','false'],
'2FA00E':['Living Room Left Window','OFF','false'],
'2B870A':['Living Room Right Window','ON','false'],
'2B870E':['Living Room Right Window','OFF','false'],
'2F850A':['Guest Bedroom Window','ON','false'],
'2F850E':['Guest Bedroom Window','OFF','false'],
'D58911':['Basement Flood Sensor','ON','false'],
'34270A':['Garage Door','ON','false'],
'34270E':['Garage Door','OFF','false'],
'31370A':['Crawl Space Door','ON','false'],
'31370E':['Crawl Space Door','OFF','false'],
'30120A':['Mail Box','ON','false'],
'30120E':['Mail Box','OFF','false']
}
p = data.get('payload')
if p is not None:
if p in d.keys():
service_data = {‘topic’:‘home/{}’.format(d[p][0]), ‘payload’:’{}’.format(d[p][1]), ‘qos’:0, ‘retain’:’{}’.format(d[p][2])}
else:
service_data = {‘topic’:‘home/unknown’, ‘payload’:’{}’.format§, ‘qos’:0, ‘retain’:‘false’}
logger.warning(’<rfbridge_demux> Received unknown RF command: {}’.format§)
hass.services.call(‘mqtt’, ‘publish’, service_data, False)