Feature Request IDE

Hello, I’ve recently started to learn to code and I’ve made huge strides entirely by only writing code in Appdaemon ,so I’m new to programming all together ,but really enjoying it. As a beginner I think it would be a great way to get more people into Appdaemon if we had a better way of interfacing with the code we are writing making it a lot easier. I think Appdeamon is way superior to yaml or nodered because you can absolutely do anything in Appdeamon and there are plenty of resources online that will answer all of your python coding questions.

That being said as a beginner I make a lot of mistakes and I find it quite arduous having the error log window open and the appdaemon main log open and the app itself open, saving it then waiting for it to run then going back and forth between windows trying to figure out what went wrong then starting the whole process over again.

My solution is requesting a version of Home Assistant Config Helper for Appdeamon. Home Assistant Config Helper really makes writing yaml code much easier and I figure someone did the heavy lifting and it wouldn’t take much work to adapt it to Appdaemon. Doesn’t have to be Visual Studio code could be pycharm or whatever.

As a beginner I have no idea how to setup an IDE with Appdaemon (i just access the files using samba). I can’t use any of the linting or debugging because my IDE doesn’t recognize my entities or what “import appdaemon.plugins.hass.hassapi as hass” or any of the Appdaemon api commands.

If someone wanted to adapt Home Assistant Config Helper or if anyone has a better solution for writing code in Appdeamon with an IDE that would be great.

Did you try the visual studio code Python extension already?

1 Like

Yes it does not like my entities or what “import appdaemon.plugins.hass.hassapi as hass” or any of the Appdaemon api commands. Perhaps I just need to hit ignore on all of these. Perhaps there is a way to import this information into VSC so it does recognize it? Perhaps I don’t have linting or anything else properly setup? Hard to tell.

I use Visual Studio Code with the linting plugin, python plugin and black formatting. When I write new code I always tail the error log and the appdaemon log files on the second screen. Works pretty well for me. You can take a look at my pylint file here, this should suppress all the linting errors that AppDaemon creates which can be ignored.

That might work ,but how do i enable the pylintrc file?

I installed the Linting extension and I think then you can choose a plyint file or maybe it’s enough if you put it into the main folder. Can’t remember and can’t check right now as I’m at work.

Yeah I finally got it working.

I logged a request on the GitHub for the Home Assistant Config Helper awhile back to have AppDaemon support added, but it didn’t gain any traction. https://github.com/keesschollaart81/vscode-home-assistant/issues/43

I’m still a novice around creating a VS Code extension, but it definitely seems like it would be possible to add in service and entity auto-completion for AppDaemon to what the extension already does for Home Assistant YAML.

In the meantime, I just use VS Code on my laptop, with AD installed in my Python environment, connected to Home Assistant via Samba. That at least gives me code completion and linting for AD functions.

1 Like