• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
smart switch for guests 3D Printer File Image 1
smart switch for guests 3D Printer File Image 2
smart switch for guests 3D Printer File Image 3
smart switch for guests 3D Printer File Thumbnail 1
smart switch for guests 3D Printer File Thumbnail 2
smart switch for guests 3D Printer File Thumbnail 3

smart switch for guests

haptic3D avatarhaptic3D

May 19, 2026

makerworld-icon
DescriptionCommentsTags

Description

All smart home enthusiasts will know the issue - you have visitors and they are helplessly looking for a light switch, instead of admiring the level of automation that you have acomplished!

Nevermind, here is my solution.

 

I am running Home Assistant and the easiest way to set up a custom smart device is using ESPHome. 

Add the provided code below to the bare configuration code of your connected ESP32 D1-Mini and upload it.

Solder the push button between GND pin, the resistor and pin IO27 or whichever pin you decided on using. Just remember to update your code accordingly.

 

What I used:

https://amzn.eu/d/0c0x6rg0

https://amzn.eu/d/0c2IX5pa

 

For the look I have spray-painted the parts. Then, insert the pre-soldered ESP32, the switch and glue the two halves of the case together.

 

This switch ads a little fun to switching!

 

Here the code, just copy/paste:

 

switch:

  - platform: template

    name: "Toggle State"

    id: toggle_state

    optimistic: true

    restore_mode: RESTORE_DEFAULT_OFF


 

binary_sensor:

  - platform: gpio

    pin:

      number: GPIO27

      mode:

        input: true

        pullup: true

      inverted: true        # gedrückt = ON

    name: "Taster"

    id: taster

    filters:

      - delayed_on: 20ms    # Entprellung

    on_press:

      then:

        - switch.toggle: toggle_state

    # Optional: langer Druck als separate Aktion

    on_click:

      - min_length: 1000ms

        max_length: 3000ms

        then:

          - logger.log: "Langer Druck erkannt"

 

MembershipConsider supporting me with a membership - this will give me the boost and motivation to upload even more designs! Every single supporter matters to me - and makes me invest even more time, sweat and filament, to bring you the designs you are waiting for. Also, as a member you are able to request changes to my models for your very own purpose and needs!

License:

MakerWorld Exclusive License

Related Models

Cable Corners... keep cables in corners! preview image

Cable Corners... keep cables in corners!

muzz64 profile image

muzz64

30,988

Design Moon Lamp preview image

Design Moon Lamp

Frank Deschner profile image

Frank Deschner

22,726

LIE DETECTOR using Subconscious Movement preview image

LIE DETECTOR using Subconscious Movement

Model Magic profile image

Model Magic

1,265

SHARKZ... Fun Multipurpose Clips / Holders / Pegs with moving jaws that bite! preview image

SHARKZ... Fun Multipurpose Clips / Holders / Pegs with moving jaws that bite!

muzz64 profile image

muzz64

24,678

Moon Lamp (Commercial Use Allowed) preview image

Moon Lamp (Commercial Use Allowed)

Artificial World profile image

Artificial World

3,054

Keychain with Embedded NFC tag preview image

Keychain with Embedded NFC tag

tweakad profile image

tweakad

958

Fish Fossilz preview image

Fish Fossilz

muzz64 profile image

muzz64

23,521

v3 - Google Home Mini Speaker Housing - Retro Modern - with Swappable Face Plates preview image

v3 - Google Home Mini Speaker Housing - Retro Modern - with Swappable Face Plates

Jordan Proctor Designs profile image

Jordan Proctor Designs

2,683