Welcome! Please format your post correctly: use the </> button to format code, otherwise spacing and quote style are screwed up.
code and XML etc should look like this with "straight quotes"
not like this with “smart quotes”
Paste in the full XML from the matrix switch, and your current sensor configuration.
Then we have something to work with…
It’s looking very similar to my answer here, though.