Show which background detector is active in GUI

This commit is contained in:
Julian Stirling 2025-11-17 16:25:18 +00:00
parent 1f2099e46f
commit 3ebc4578d3

View file

@ -5,6 +5,9 @@
<li> <li>
<a class="uk-accordion-title" href="#">Configure</a> <a class="uk-accordion-title" href="#">Configure</a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<h4 v-if="backgroundDetectorName" class="detector-name">
{{ backgroundDetectorName }}
</h4>
<input-from-schema <input-from-schema
v-if="backgroundDetectorStatus" v-if="backgroundDetectorStatus"
v-model="backgroundDetectorStatus.settings" v-model="backgroundDetectorStatus.settings"
@ -59,6 +62,7 @@ export default {
data() { data() {
return { return {
backgroundDetectorStatus: undefined, backgroundDetectorStatus: undefined,
backgroundDetectorName: undefined,
animate: false, animate: false,
}; };
}, },
@ -90,6 +94,7 @@ export default {
this.modalNotify(`Current image is ${label} (${r.output[1]})`); this.modalNotify(`Current image is ${label} (${r.output[1]})`);
}, },
readSettings: async function () { readSettings: async function () {
this.backgroundDetectorName = await this.readThingProperty("camera", "detector_name");
this.backgroundDetectorStatus = await this.readThingProperty( this.backgroundDetectorStatus = await this.readThingProperty(
"camera", "camera",
"background_detector_status", "background_detector_status",
@ -106,3 +111,8 @@ export default {
}, },
}; };
</script> </script>
<style scoped lang="less">
.detector-name {
margin-bottom: 0.5rem;
}
</style>