Rotary encoder dimming

Component: https://esphome.io/components/sensor/rotary_encoder.html

https://www.amazon.com/Taiss-KY-040-Encoder-15×16-5-Arduino/dp/B07F26CT6B/ref=sr_1_7?dchild=1&keywords=arduino+rotary+encoder&qid=1600494599&sr=8-7

I dont’t have a circuit diagram, but you have my config. You should be able to get all pins from there.