API Connection Reset?

Hi

I have a Sonoff RF bridge which has some code in it to trigger lights on the press of an RF button, been working a treat for a couple of years and stopped recently, i suspect maybe recent update

HAS = 2023.4.6
ESPHOME = Firmware: 2023.4.1

Code - https://pastebin.com/1NRwNTbR

HAS Logs each time i press the RF button

Logger: aioesphomeapi.connection
Source: runner.py:179
First occurred: 12:45:44 PM (2 occurrences)
Last logged: 12:45:47 PM

sonoff_rf_bridge01 @ 172.25.0.43: Connection error occurred: Invalid protobuf message: type=35 data=b'\n\x18esphome.rf_code_received\x12\x0c\n\x04sync\x12\x04\xc8\xfc\xff?\x12\x0b\n\x03low\x12\x04\xc8\xfc\xff?\x12!\n\x04high\x12\x19<B\xff?\x8cB\xff?\x19\x00\x00\x00\xe8\xf3#@<\xfd\xff?\xe8W\xff?\x02\x12\x0e\n\x04code\x12\x06\xc8\xfc\xff?01(\x01': Error parsing message
sonoff_rf_bridge01 @ 172.25.0.43: Connection error occurred: Invalid protobuf message: type=35 data=b'\n\x18esphome.rf_code_received\x12\x0c\n\x04sync\x12\x04\xc8\xfc\xff?\x12\x0b\n\x03low\x12\x04\xc8\xfc\xff?\x12!\n\x04high\x12\x19\xdcM\xff?DC\xff?\x19\x00\x00\x00\xe8\xf3#@<\xfd\xff?\x10N\xff?\x02\x12\x0e\n\x04code\x12\x06\xc8\xfc\xff?01(\x01': Error parsing message

++ added HAS logs