I haven't done it myself as I always use C# triggering. But, I find that approach clumsy for simple tasks. I have meant to look into it but I've never had a project that needed it, so it has slipped down the priorities.
FWIW - I highly recommend pseudo code for anything more than a single logic statement. There is NO way I would try to code anything without knowing my overall goal. Once a logical progression is determined, fleshing it out with real code in whatever language is selected is really easy. Also, if the code needs to be ported to a different platform (different HA software, different language, etc) you are already 85% of the way there! I lost my pseudo code for the Advanced Smart Lights (ASL) code which is annoying. I was considering porting it to Python since I find it easier to code in than Gene's C# implementation. If I had it still, I'd probably have made something for Home Assistant or Domoticz just to give it a try.