There are many parts to home automation but the main need is to be able to turn something on or off. Without that the rest is meaningless. Let us start with a simple light switch that you can control manually. The off position we will call zero and the on position we will call the one state.
Of course the purpose of home automation is for you not to have to manually turn off or on a switch. So we can get an electronic part known as a switching transistor to do the job for us with the help of a computing device that we can program. These diagrams are way over simplified to make things simpler. We could ask the computer to turn off all the leds with a command like out 888,0 and if any leds were on, they would immediately turn off.
The again, we could issue a command to turn them all on with out 888,255
Then you would want to turn them off and on individually also. Then you would either write some code or have a pre-written program to do it for you and have appliances turn on or off at your will. Of course once you have your programming arranged, you can control the leds or any kind of home appliance or anything else at will. That is when interesting things can start happening if you want them to.
In the real world. you probably would not be building any electronics. You could purchase network based control boxes. Most of the devices would be controlled by the time of day or manually controlled like a remote stereo system.
Many single sensors are cause and affect such as a garage door opener where the system waits for the detection of the controller and the proper security sequence. or you could have multiple sensors that work independently but cause the same affect such as a fire alarm or a security system
But let use get a bit more sophisticated. you could add a variety of sensors, but the most common might be the temperature sensor for control of your heating cooling system. The same idea could probably be adapted to a sous vide cooking system.
Now things have become a bit more complicated with additional sensors and control devices required. Also requires more complicated programming. You can see where systems can become very expensive.
We have only scratched the surface when it comes to sensors. That is part 1 for now,