From a6dcfaa02a396b3c278c79e1e11e71e1cb44ac3d Mon Sep 17 00:00:00 2001 From: Ola Thoresen Date: Fri, 19 Jul 2024 14:10:10 +0200 Subject: [PATCH] Try to stopPropagation --- package.json | 2 +- src/utils/attributes.ts | 2 +- src/utils/utils.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 69c114b..4900371 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flower-card", - "version": "2024.7.8", + "version": "2024.7.9", "description": "Custom flower card for https://github.com/Olen/homeassistant-plant", "keywords": [ "home-assistant", diff --git a/src/utils/attributes.ts b/src/utils/attributes.ts index 278019c..5b185fb 100644 --- a/src/utils/attributes.ts +++ b/src/utils/attributes.ts @@ -32,7 +32,7 @@ export const renderBattery = (card: FlowerCard) => { const { icon, color } = levels.find(({ threshold }) => state > threshold) || { icon: "mdi:battery-alert-variant-outline", color: "red" }; return html` -
+
${state}%
diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 5c0feae..63ad997 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -1,6 +1,7 @@ import { HomeAssistant, fireEvent } from "custom-card-helpers"; import { default_show_bars } from "./constants"; import FlowerCard from "../flower-card"; +import eventOptions from 'lit-element'; export const getConfigElement = (): HTMLElement => { return document.createElement("flower-card-editor");