1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-26 12:43:48 +00:00
Files
esphome/script/extract_automations.py
Javier Peletier ae50a09b4e C++ components unit test framework (#9284)
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>
2025-10-21 22:21:22 +00:00

21 lines
603 B
Python
Executable File

#!/usr/bin/env python3
import json
from helpers import get_all_component_files, get_components_with_dependencies
from esphome.automation import ACTION_REGISTRY, CONDITION_REGISTRY
from esphome.pins import PIN_SCHEMA_REGISTRY
if __name__ == "__main__":
files = get_all_component_files()
components = get_components_with_dependencies(files, True)
dump = {
"actions": sorted(list(ACTION_REGISTRY.keys())),
"conditions": sorted(list(CONDITION_REGISTRY.keys())),
"pin_providers": sorted(list(PIN_SCHEMA_REGISTRY.keys())),
}
print(json.dumps(dump, indent=2))