Add ability to set preset from UI

This commit is contained in:
Nick Mowen 2022-12-15 10:44:59 -07:00
parent 11639ed25c
commit 4665efa825
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ class OnvifController:
# setup existing presets
presets: list[dict] = ptz.GetPresets({"ProfileToken": profile.token})
for preset in presets:
self.cams[camera_name]["presets"][preset["Name"]] = preset["token"]
self.cams[camera_name]["presets"][preset["Name"].lower()] = preset["token"]
# get list of supported features
ptz_config = ptz.GetConfigurationOptions(request)

View File

@ -42,7 +42,7 @@ export default function CameraControlPanel({ camera = '' }) {
<option value="">Select Preset</option>
{ptz.presets.map((item) => (
<option key={item} value={item}>
{item}
{item.charAt(0).toUpperCase() + item.slice(1)}
</option>
))}
</select>