Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FPGA Device Manager 2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FPGA
FPGA Device Manager 2
Commits
2535603d
Commit
2535603d
authored
4 years ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Work on YAML stuff
parent
21b984d5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1
WIP: Resolve "YAML Generation"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fpga_device_manager/Config.py
+11
-1
11 additions, 1 deletion
fpga_device_manager/Config.py
fpga_device_manager/res/data/device_types.json
+2
-1
2 additions, 1 deletion
fpga_device_manager/res/data/device_types.json
with
13 additions
and
2 deletions
fpga_device_manager/Config.py
+
11
−
1
View file @
2535603d
...
...
@@ -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)
...
...
This diff is collapsed.
Click to expand it.
fpga_device_manager/res/data/device_types.json
+
2
−
1
View file @
2535603d
...
...
@@ -7,7 +7,8 @@
"pins"
:
{
"signal"
:
{
"requires_pwm"
:
false
,
"active_low"
:
false
"active_low"
:
false
,
"action"
:
}
}
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment