components = ["browser", "conversation", "script"]
with tempfile.NamedTemporaryFile() as fp:
for comp in components:
fp.write("{}:\n".format(comp).encode("utf-8"))
fp.flush()
self.hass = bootstrap.from_config_file(fp.name)
After Change
files = {
"config.yaml": "".join(
"{}:\n".format(comp)
for comp in components
)
}