Hi; I am using Strategy 2.
Home Assistant 2022.10.5 Supervisor 2022.10.2 Operating System 9.3 Frontend 20221010.0 - latest
running haos_generic-aarch64-9.3.qcow2 virtual machine under ubuntu-aarch64 (Cheap TV box). Host mqtt.
Newly flashed tasmota RF bridge, including RF. Attempting to integrate two four button RF pendants.
getting this error (have spent a week debugging, researching and reading this thread for clues), to no avail:
“Invalid config for [automation]: Unable to determine action @ data[‘action’][1]. Got None Unable to determine action @ data[‘action’][2]. Got None Unable to determine action @ data[‘action’][3]. Got None Unable to determine action @ data[‘action’][4]. Got None. (See /config/configuration.yaml, line 19).”
I suspect hass version has changed something.
configuration.yaml: automation: “!include_dir_merge_list automations” plus “python_script:”
python_scripts/rfbridge_demux.py (codes are correct from tasmota console, XX’s replace actual codes):
# From: https://community.home-assistant.io/t/sonoff-rf-bridge-strategies-for-receiving-data/108181
# 433Mhz 4 button pendants. Buttons on both pendants maps to same event
d = { 'XXCE21':['button_a','ON','false'],
'XXF161':['button_a','ON','false'],
'XXCE22':['button_b','ON','false'],
'XXF162':['button_b','ON','false'],
'XXCE28':['button_c','ON','false'],
'XXF168':['button_c','ON','false'],
'XXCE24':['button_d','ON','false'],
'XXF164':['button_d','ON','false']
}
p = str(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])}
logger.info('<rfbridge_demux> Received RF command: {}'.format(p))
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)
automations/pendant.yaml:
- id: rfbridge_demultiplexer
alias: 'rfbridge_demultiplexer'
trigger:
- platform: mqtt
topic: tele/sonoff-rfbridge-1/RESULT
action:
- service: python_script.rfbridge_demux
data_template:
payload: '{{trigger.payload_json.RfReceived.Data}}'
- platform: mqtt
name: 'Button_A'
state_topic: 'home/button_a'
off_delay: 1
- platform: mqtt
name: 'Button1_B'
state_topic: 'home/button_b'
off_delay: 1
- platform: mqtt
name: 'Button_C'
state_topic: 'home/button_c'
off_delay: 1
- platform: mqtt
name: 'Button_D'
state_topic: 'home/button_d'
off_delay: 1
I suspect the issue is in the Button_X definitions which are somehow incorrect.
Need some more experienced eyes on this…
Thanks; Bill