Use python packages in python script?


I want to use an external python package in a python script like this:

from atmos import calculate
RH = hass.states.get('input_slider.keller_humid')
T  = hass.states.get('input_slider.keller_temp') + 273.15
p  = hass.states.get('sensor.yr_pressure')
AH = calculate('AH', RH=RH, p=p, T=T, debug=True)[0]'Absolute Humidity Keller: '+AH+' g/m3')

When calling the script, I get ImportError: __import__ not found. Do I have to install the atmos package in homeassistant somehow?

Best, vrs01

No, it is not supported to include external libraries. If you need full python scripting capabilities please have a look at AppDaemon.


ok good to know! Thanks