[Beginner question] Detect different sensor states based on blinking state

As an ESP Home beginner, i’d like to automate my Washing machine state. I currently have done automated it on a single raspberry pi, but i’d like to integrate it into HA. The LED has different states, based on the washing mashine state. I’ve taped an photoresistor to the LED and can read it on the RPi, which i’d like to switch to an ESP.

The washing machine starts blinking when switched on, until i select a program an acutally start the washing process. It is constantly on during the washing process and starts flashing once it’s done util it is switched off. I’d like to have one sensor state that has three different states (switched off, washing, finished). How can i do so? I know there are binary sensors, but how can i have three states instead of just “on / off”?

Have a look at the Digital Signal sensors - particularly the Duty Cycle Sensor. Then trigger on 0%, 50% (or whatever it signals) and 100% with an automation or template sensor in HA.

1 Like