Broadlink switches broken after upgrade to 2022.4.3

I’ve just upgraded my HA core from 2021.12 to 2022.4.3. As a result of this, all of the switches which I had defined for my two Broadlink devices (RM Pro and RM Mini) are unavailable. I have them defined in configuration.yaml like this:

  - platform: broadlink
    host: 192.168.1.87
    mac: '34:EA:34:C7:87:FA'
    switches:
      photoframe:
        command_on: 'sgSEAwUtBgwGCwYtBgsGLQYsBgsHLAYMBiwGDAYMBS0HCwYtBS0GCwcsBgsHLAYMBgsGLQYLBi0GDAYsBgsGLQcsBgsGDAYtBgsGLQUtBgwGCwYtBgsGLQYLBi0GLAYMBgABTQZZBgwGLAYMBiwGDAYsBwsGLAcsBQwGDAYsBywGCwcsBgwGDAYsBiwGDAYLBywGDAYsBi0GCwcrBwsGLQYMBQwGLQYMBS0GLQUMBi0GCwYtBQwGDAYsBgwGLAcLBiwGDAYtBiwGDAYMBiwGCwYtBiwGDAYLBywGDAYsBgwGLAYtBgsGAAFOBlkGDAUtBgsGLQYLBi0GCwYtBiwGDAYLBywGLAYMBiwGDQYLBi0GLAYMBgsGLQYLBi0GLAYMBiwGDAYsBgwGDAYtBQwGLAcsBgsHLAYMBiwGDAYLBi0GCwYtBgsGLQYLBi0GLQYMBQwGLQYLBi0FLQYMBgwFLQYLBi0GCwcsBiwGDAUAAU4GWQYLBywGCwcsBwsGLQUMBi0GLAYLBwsGLAcsBgwGLAYNBQwGLAYtBgsGDAYsBwsGLAYtBgwGLAYLBywGDAUMBi0GDAYsBi0GCwYsBwwFLQYLBgwGLAcLBiwHCwYtBgsGLQYsBgwGDAYsBgwGLAYsBwsGDAYtBgsGLQUMBi0GLAYMBQABTgZZBgsGLQYMBiwGDAYsBgsHLAYtBgsGDAYsBi0GCwYtBg0FDAYsBi0FDAYMBS0GDAYsBi0GCwYtBgsHLAYLBgwGLQYMBS0GLAYMBi0FDAYsBg0FDAUtBgwGLAYMBiwGDAYtBiwGDAYMBiwGDAUtBi0FDAYMBiwGDAYsBgwGLAYtBgsGAAFOBlkGCwYt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DAYsBgwGLQYLBi0GDAUtBgwFLQYMBiwGAAFPBlkGCwYtBgwGLAYMBi0GCwYtBi0FDAYMBi0FLQYMBiwGDQUMBi0GLAYMBi0GCwYtBgsHCwYtBgwGLAYtBgwGLAYMBi0FDAYMBi0GCwcsBgwGLAYtBgwGCwYtBiwHCwYMBi0GLAYMBgwGLAcLBi0GDAUuBQwGLAcLBi0GDAUtBgwGLAYAAU4GWgUMBi0GCwYtBgwGLQUMBi0GLAYNBQwFLQYtBgsGLQYMBgwGLAcsBgwGLAYMBiwGDAYMBi0GCwYtBiwGDAYtBgwGLAYMBgwGLQUMBi0GDAUtBi0GCwYMBi0GLAYMBgwFLQcsBgwGDAYsBgwGLAcLBi0GCwYtBgwGLAYMBi0GCwYtBgABTgZZBgsHLAYMBi0GCwYtBgsHLQYrBwwGCwYtBiwHCwYtBgwGCwYtBiwHDAUtBgwGLAYMBgwGLAYMBi0GLAYMBiwGDAYtBg0FDAUtBgwGLQYLBi0GLAYMBgwGLAcsBgwGCwYtBi0GDAYLBi0GDAYsBgwGLAcLBi0GCwYtBg0FLAYMBi0FAAFPBlkGDAUtBgwGLAcLBi0GCwcsBiwHDAYLBi0GLAYMBi0FDQYLBi0GLAYMBi0GDAYsBgwGDAUtBgwGLAcsBgwGLAYNBS0GDAYLBi0GDAUtBwsGLAcsBgwGCwYtBi0GCwYMBi0GLQYLBwsGLQYLBi0GDAUtBwsGLAcLBi0GCwcsBgwGLAYAAU8GWQYLBi0GCwcsBgwGLQYLBi0GLQUMBgwGLAYtBgwGLAYNBgsGLQYsBgwGLQYMBS0GDAUMBi0GDAYsBi0GDAYsBgwHLAYMBgsGLQYLBi0GDAYsBi0GDAYMBS0GLQYMBQwGLQYsBwwFDAYtBgsGLQYLBywGDAYsBgwGLQYMBS0GDAYsBgAF3AAAAAA='

Both of my Broadlink devices are detected by the Broadlink integration (I can see them in the Lovelace UI), but the switch definitions are no longer working.

I also have this in my Notifications in the Lovelace UI:

The following integrations and platforms could not be set up:
switch.broadlink

Any idea how I can restore my switch definitions? (I have about 20 of them)

They were deleted in the 2022.3 release, or perhaps it was earlier.
You need to convert it to remote commands I think

When you say “convert it to remote commands” - what exactly does that involve?

Either that you relearn the commands or that you write the JSON needed yourself.
I would learn two commands then write the rest since all the commands are known.
But that is since I feel confident in writing the JSON.
If you don’t feel confident in it then I suggest you don’t attempt it since it could make HA not recover from a restart.

Another option is to write a tool to do the conversion.
But that requires more work I assume.

I’m not blaming you, but I believe the Broadlink switches has been deprecated about a year or something with a warning in the logs.
I understand there is a temptation to just update when you are behind in updates but the notes should be read.

Had the important (to you) breaking changes been presented to you at the update button then this could probably have been avoided.

Sorry to be dumb but which in which file does the JSON you’re referring to reside? Do you mean in configuration.yaml?

Ah Ok I’ve just found an example of the new syntax here:

…so I can continue to configure my switches in configuration.yaml, but need to use the new “name” element in my syntax (and remove the “host” element)

I didn’t know that…
But sure…

I was talking about a json file that is created in the hidden folders when you learn one command with the remote integration

Oh I didn’t know about the json files in the hidden folders.

For some reason my RM Pro won’t learn codes from my Energenie remote control so I didn’t have the option of re-learning codes using the Lovelace UI