Thanks very much for pointing this out! Much cleaner yaml-wise to use than the template for converting switches to lights.
As an aside and wishful thinking - if only there was a “Fan_Light” platform to remap ceiling fans that are imported as dimmable lights to fans with multiple speeds. I have a fan template that solves this remapping now but it is a quite complex bit of yamlleese.