SwitchResource¶
SwitchResource
¶
Multi-port KVM switch and EDID management for PiKVM.
Source code in src/aiopikvm/resources/switch.py
get_state()
async
¶
Get the current switch state.
Returns:
| Type | Description |
|---|---|
SwitchState
|
Current switch state with active port and port list. |
set_active(port)
async
¶
Set the active port.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
port
|
str
|
Port identifier to activate. |
required |
get_edids()
async
¶
create_edid(edid_id, data, *, description='')
async
¶
Create a new EDID profile.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
edid_id
|
str
|
EDID profile identifier. |
required |
data
|
str
|
Raw EDID data as hex string. |
required |
description
|
str
|
Optional human-readable description. |
''
|
Source code in src/aiopikvm/resources/switch.py
change_edid(port, edid_id)
async
¶
Change the EDID profile for a port.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
port
|
str
|
Port identifier. |
required |
edid_id
|
str
|
EDID profile identifier to assign. |
required |
Source code in src/aiopikvm/resources/switch.py
remove_edid(edid_id)
async
¶
Remove an EDID profile.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
edid_id
|
str
|
EDID profile identifier to remove. |
required |