diff --git a/src/components/EntitySelection.vue b/src/components/EntitySelection.vue new file mode 100644 index 0000000..c13b01c --- /dev/null +++ b/src/components/EntitySelection.vue @@ -0,0 +1,51 @@ + + \ No newline at end of file diff --git a/src/components/PiComponent.vue b/src/components/PiComponent.vue index 12d21d8..d27a7f9 100644 --- a/src/components/PiComponent.vue +++ b/src/components/PiComponent.vue @@ -44,28 +44,7 @@

{{ controllerType }} appearance

-
- - -
- -
- - -
+
@@ -122,7 +101,6 @@ @@ -184,8 +162,7 @@ - @@ -205,13 +182,13 @@ import ServiceCallConfiguration from "@/components/ServiceCallConfiguration.vue" import {ObjectUtils} from "@/modules/common/utils"; import AccordeonComponent from "@/components/accordeon/BootstrapAccordeon.vue"; import AccordeonItem from "@/components/accordeon/BootstrapAccordeonItem.vue"; +import EntitySelection from "@/components/EntitySelection.vue"; let $HA = null; let $SD = null; const serverUrl = ref("") const accessToken = ref("") -const domain = ref("") const entity = ref("") const serviceShortPress = ref({}) @@ -239,7 +216,6 @@ const haError = ref("") const controllerType = ref("") - onMounted(() => { window.connectElgatoStreamDeckSocket = (inPort, inPropertyInspectorUUID, inRegisterEvent, inInfo, inActionInfo) => { $SD = new StreamDeck(inPort, inPropertyInspectorUUID, inRegisterEvent, inInfo, inActionInfo); @@ -266,7 +242,6 @@ onMounted(() => { let settings = Settings.parse(actionInfo.payload.settings); - domain.value = settings["display"]["domain"] entity.value = settings["display"]["entityId"] enableServiceIndicator.value = settings["display"]["enableServiceIndicator"] || settings["display"]["enableServiceIndicator"] === undefined; hideIcon.value = settings["display"]["hideIcon"]; @@ -288,12 +263,6 @@ const isHaSettingsComplete = computed(() => { return serverUrl.value && accessToken.value }) - -const domainEntities = computed(() => { - return availableEntities.value.filter((entity) => entity.domain === domain.value) -}) - - const entityAttributes = computed(() => { let currentEntityState = currentStates.value.find((state) => state.entityId === entity.value) if (currentEntityState && currentEntityState.attributes) { @@ -376,7 +345,6 @@ function saveSettings() { controllerType: controllerType.value, display: { - domain: domain.value, entityId: entity.value, useCustomTitle: useCustomTitle.value, buttonTitle: buttonTitle.value, diff --git a/src/components/ServiceCallConfiguration.vue b/src/components/ServiceCallConfiguration.vue index f30a14f..2350074 100644 --- a/src/components/ServiceCallConfiguration.vue +++ b/src/components/ServiceCallConfiguration.vue @@ -34,20 +34,10 @@
- -
- - -
+ +