Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

this doesnt belong in render

Vincentfc2f6bbffd97
diff --git a/ui/component/or-attribute-card/src/index.ts b/ui/component/or-attribute-card/src/index.ts
index d78f54ddd..12e181c35 100644
--- a/ui/component/or-attribute-card/src/index.ts
+++ b/ui/component/or-attribute-card/src/index.ts
@@ -69,6 +69,11 @@ export class OrAttributeCard extends LitElement {
}
private getData = () => {
+ connectedCallback() {
+ super.connectedCallback();
+ this.getData();
+ }
+
this.getAssetById(this.assetId)
.then((data) => {
console.log(data);
@@ -90,8 +95,6 @@ export class OrAttributeCard extends LitElement {
protected render() {
console.log("vars ready", this.assetId, this.attributeName);
- this.getData();
-
if (this.assetId === "" || this.attributeName === "") {
return html`
<div class="panel">