Skip to content
Snippets Groups Projects
Commit 2535603d authored by Julian's avatar Julian
Browse files

Work on YAML stuff

parent 21b984d5
No related branches found
No related tags found
1 merge request!1WIP: Resolve "YAML Generation"
......@@ -13,6 +13,7 @@ from fpga_device_manager.Devices import Output
from fpga_device_manager.Inputs import Input
from fpga_device_manager.device_manager import DeviceManager
from fpga_device_manager.exceptions import DeviceInvalidError, InvalidConfigError
from fpga_device_manager.hass import Action, Automation
_output_mgr = DeviceManager(device_class=Output)
_input_mgr = DeviceManager(device_class=Input)
......@@ -207,7 +208,16 @@ def export_yaml(out_file_path: str) -> None:
{'condition': 'time', 'after': '16:00:00', 'before': '23:00:00'}
],
'action': {'service': 'homeassistant.turn_on', 'entity_id': 'group.living_room'}
},
}
output_devices = list(_output_mgr.all_devices())
input_devices = list(_input_mgr.all_devices())
for device in input_devices:
input_ = device.dev_id
target = device.associated_device.dev_id
if device.type is None:
pass
# for filename, text in exports.items():
# filepath = os.file_path.join(out_file_path, filename)
......
......@@ -7,7 +7,8 @@
"pins": {
"signal": {
"requires_pwm": false,
"active_low": false
"active_low": false,
"action":
}
}
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment