Can anyone advise how to call HA services from within lambda functions? I’ve had a hunt around and couldn’t find any examples (and the Native API component page is fairly sparse about the what globals, objects, etc. are available within the lambda functions).
My use case is a rotary encoder modifying a global variable to move a cursor on a screen. I have a separate boolean_sensor which I’m looking to create a lambda action within the on_click trigger. I want to use a switch statement to fire different Home Assistant services depending on the value of the global variable.