I’ve recently embarked on a project to integrate my bathroom fan with a Shelly 1 smart switch, and I’m thrilled to share my journey and success with the community. After some trial and error, I managed to create a seamless setup that not only monitors the fan’s status but also allows me to control it remotely. Here’s how I did it and what you can learn from my experience.The Challenge: My bathroom fan is controlled by a traditional light switch that also activates the fan with a built-in delay. While this setup works, I wanted to add smart functionality to monitor the fan’s status and control it independently of the light. The goal was to use the Shelly 1 to track whether the fan was on or off and allow me to toggle it via the Shelly app or Home Assistant.The Setup: 1. Hardware Installation: - I located the existing wiring for the fan, which included a live (brown) wire, a neutral (blue) wire, and a switched live (black) wire from the light switch. - I connected the live and neutral wires directly to the Shelly 1’s L and N terminals. - The switched live wire from the light switch was connected to the Shelly 1’s SW terminal.2. Configuration in Shelly App: - I set the Shelly 1 to “Toggle Switch” mode to mimic the behavior of the physical switch. - This configuration ensures that pressing the switch in the app toggles the fan’s state without affecting the light.3. Integration with Home Assistant: - I added the Shelly 1 to my Home Assistant setup using the Shelly integration. - I created automations to turn the fan on when the bathroom light is turned on and off after a set period, ensuring energy efficiency.Challenges and Solutions: - Initial Connectivity Issues: The Shelly 1 wasn’t responding to the light switch initially. I realized that the wiring configuration needed adjustment to ensure proper communication. Rechecking the connections and verifying the correct phase alignment resolved this.- Independent Control: Ensuring that the fan could be controlled independently of the light required careful setup in Home Assistant. I used templates and conditions to create rules that respected both devices’ states.Results: The integration has been a game-changer. I can now monitor and control the fan remotely, which is especially useful when I’m away or want to ensure proper ventilation without manually checking the bathroom. The setup has also added a layer of energy efficiency by automating the fan’s operation based on the light’s state.Tips for Others: - Plan Your Wiring: Ensure you understand your existing wiring setup before integrating a smart switch. This prevents unexpected behavior and ensures smooth operation.- Test Incrementally: After making any changes, test each component individually to isolate and resolve issues quickly.- Leverage Home Assistant’s Flexibility: Use automations and templates to create custom behaviors that meet your specific needs.This project has reignited my enthusiasm for smart home automation, and I’m excited to tackle more projects in the future. If anyone has questions or needs advice on similar setups, feel free to reach out!