Component Update Rater faster than a Second

Hi there,

I’ve got a PI and was playing around with creating a switch component. It is physically controlled by an external button with an GPIO. The polling interval seem to be minimum 1 second with the yaml configuration. So how do I get HA react much more faster on the status change of my button? Or how do I send out a status change from my component correctly?
Sorry if this are dumb questions, just starting with the development and couldn’t find anything in the documentaion.

BR
Barns

Why not use the GPIO binary sensor? With that you would just create an automation based on the state of that sensor. I have not used it myself, but I would assume it’s implemented in a way that always keeps the sensor up to date without any noticable lag.