Home Assistant - Python Scripts

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 12

  • @tse7889
    @tse7889 Месяц назад +3

    Nice, thanks. Need something more complex actually. Need to start custom server to listen socket on specific port. And then start sending messages (via mqtt) with statuses. Works already fine on any Linux machines but I'd prefer to intergrate it with HA. My HA installed as an image for PI. So probably I'll need to setup new container instead to get access to real python... oh wish me luck

  • @dandavuk
    @dandavuk 3 месяца назад

    This was really impressive & informative - thanks David!

  • @Anonymous-V-0.5
    @Anonymous-V-0.5 2 дня назад

    Big Thx

  • @sohamshah4666
    @sohamshah4666 4 месяца назад +1

    Will try the same . keep Going

  • @anishshrestha9969
    @anishshrestha9969 2 месяца назад

    Thanks for this. Very informative.
    I've added few python libraries through requirements.txt, would you know where these python libraries are installed? I could not locate it. Thanks

    • @techwithdavidolding
      @techwithdavidolding  Месяц назад

      I can see a few of the libraries that I defined set within this folder /home/dolding/HomeAssistant/config/pyscript/modules.
      However I can't see anything relating to openai and other libraries that I'm using.
      Check that /modules folder for yourself to see if that's where your libraries are getting stored.
      hacs-pyscript.readthedocs.io/en/latest/reference.html#importing
      I wonder if the missing libraries in my case is because I've already installed some of them globally prior to setting up this integration.

  • @Electronieks
    @Electronieks Месяц назад

    What if u want to install package in python such as beautifullsoup and runs homeassistant os without docker?

    • @techwithdavidolding
      @techwithdavidolding  Месяц назад +1

      Yep you can do that.
      The instructions would still be the same.
      Setup your Home Assistant OS --> Install HACS --> Install Pyscript --> write your custom scripts

  • @chrgeorgeson
    @chrgeorgeson Месяц назад

    LOL waaaay to complex.

    • @techwithdavidolding
      @techwithdavidolding  Месяц назад

      Yeah there's quite a bit to this method.
      There's an easier alternative where you can edit your scripts directly in the HA console -- www.home-assistant.io/integrations/python_script/
      This method is great for simple python scripts but doesn't appear to support 3rd party libraries which leaves you very limited in what you can do.