CA Title 24 vacancy sensor blueprint? Need nested automation

Hey, if your load to turn on is a light, I would recommend this sensor light blueprint.

Very easy to use, with many configurable optional features, used by quite a lot of people (so pretty tested).

Not sure if you can turn on a switch with this, but maybe a scene or simply changing the switch type might work.