How to decode CBOR in a payload format Decoder?

I cannot get your example to decode in the decoder. But it’s not always going to be 48 bits, but depends on the actual value:

So, even when not using JSON, I’d fix the problem at its root cause, and try to get rid of CBOR. Unless your device sends a lot of different types of messages, it’s just too much overhead to use in LoRaWAN. And even if it does send a lot of different messages, then see, e.g., Multiple sensors with different payload decoding TTN and How to best write an application that contains many nodes with different measure data types.

If you really cannot get rid of it, then you’ll need to copy a CBOR helper into the payload format in TTN Console, and use that helper in the Decoder function. See Implementations on the CBOR website.