Hey everyone, I wanted to share my recent experience with AppDaemon 3 and some light automation I’ve been working on. It’s been a bit of a learning curve, but I’m really happy with how things turned out!
First, I decided to upgrade from AppDaemon 2 to version 3. I uninstalled the old version and installed AppDaemon 3 using pip3. I created a new configuration folder at /home/pi/conf and set the permissions correctly. But when I tried to start AppDaemon, I encountered an error: IsADirectoryError: [Errno 21] Is a directory: '/home/pi/conf'. At first, I was a bit confused because the folder seemed correctly set up. After some research, I realized that the command I was using was incorrect. I needed to specify the configuration file within the folder, not the folder itself. Once I fixed that, AppDaemon started without issues!
Next, I focused on setting up some light automation. I wanted the lights to turn on when motion is detected, but only if it’s dark enough. I created a binary sensor for luminance and confirmed it works as expected. I also set up the motion detection sensor and tested it. Everything seemed to be in order, but the automation wasn’t triggering. I spent a lot of time checking my YAML configuration and even tried using a numeric state for the lux value, but nothing worked.
After some frustration, I decided to break down the problem. I checked the state of the binary sensor and the motion sensor separately. Both were working correctly. Then, I looked into the automation conditions. I realized that the way I structured the conditions might be the issue. I simplified the automation to only check the motion sensor and the binary sensor one at a time. Once I confirmed each part worked individually, I combined them again. This time, it worked perfectly!
I also wanted to share a tip for anyone setting up similar automations. Make sure to test each component separately before combining them. It might seem tedious, but it saves a lot of time in the long run. Plus, using the state sensor and relative_time function can help you troubleshoot issues more effectively.
I’m really happy with how this project turned out. It’s been a great way to learn more about AppDaemon and Home Assistant’s automation capabilities. If anyone has questions or needs help with similar setups, feel free to reach out! The community here is amazing, and I’ve learned so much from all of you.
Cheers and happy automating! ![]()