I have seen both ways. Some topics say it’s mdi-fire other mdi:fire. Now I’m not sure which one is correct.
I’ve tried both to no avail.
I have similar issues with the binary_sensor icons.
I can’t show icons with a dash in the name:
mdi-exclamation (works)
mdi-check (works)
mdi-lightbulb (works)
mdi-car-tire-alert (doesn’t work)
mdi-wiper-wash (doesn’t work)
Unless you are using Lovelace UI I believe you have to use a template switch to define the icon change. Template switch will still work for Lovelace. I haven’t made the jump yet so can’t help with that side.