From 486f37a45efa925f0e533e007380c6c8fe127ba9 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 22 Mar 2023 14:11:13 +0100 Subject: [PATCH] Support sensor value reported both on `value` as well as `_value` fields. --- .../webapp/src/components/panels/Entities/Sensor.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Sensor.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Sensor.vue index c4861af61..cec9a4de2 100644 --- a/platypush/backend/http/webapp/src/components/panels/Entities/Sensor.vue +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Sensor.vue @@ -13,8 +13,8 @@
- + v-if="computedValue != null"> +
@@ -30,6 +30,14 @@ export default { name: 'Sensor', components: {EntityIcon}, mixins: [EntityMixin], + + computed: { + computedValue() { + if (this.value.value != null) + return this.value.value + return this.value._value + }, + }, }