I am using a modified Sonoff Basic with Tasmota firmware to control some electric blankets. The modified Sonoff acts like a momentary push-button switch. Simply wire the Sonoff in parallel with the electric blanket’s on off switch. Create an automation in HA to turn the blanket on a hour before bedtime only if it is cold outside and you are home. For some added fun create a routine in Alexa for some voice control. Get into a nice warm bed !
This hack will work with most any blanket with push button on/off switches. Mine have digital controls but use physical push buttons for power and temperature control.
Modify your Sonoff like this…
Flash your Sonoff with Tasmota firmware…
After flashing, use the Sonoff web interface console to set the Tasmato firmware to the following…
PowerOnState 0 - We don’t want the relay coming on when we power up the Sonoff.
PulseTime 10 - Turns the Sonoff into a momentary push button switch.
Test the Sonoff to make sure it is working as expected before proceeding to the next step. The relay should not come on when powered up and the relay should close for 1 second and then open again when activated.
Make sure your blanket is unplugged from mains power. Hack into the electric blanket controller and find the on/off push button. It will probably be mounted on a printed circuit board. Figure out which two pins on the power switch need to be shorted together to turn the blanket on. There will probably be four pins but only two are used in the circuit. Solder a pair of wires (very thin gauge speaker wire or similar) across the on/off switch. Drill a small hole in the back of the controller cover for the wire to exit the controller. Connect the pair of wires to the output of your modified Sonoff.
We could probably get even more creative and have the same Sonoff control the temperature by using a couple of GPIO pins and some simple transistor switches to control the temperature push buttons.