ha_pyscript_modules from entities.entity import entity from entities.ha import HA # or from imports import * ha = HA() ha_external_url = ha.external_url() ent = entity(constants.OFFICE_LIGHTS) # resolves to entities.light.Light instance ent.turn_off()