Skip to content

Commit

Permalink
Try to stopPropagation
Browse files Browse the repository at this point in the history
  • Loading branch information
Olen committed Jul 19, 2024
1 parent 8f53734 commit a6dcfaa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
<div class="battery tooltip" @click="${() => moreInfo(card, card.config.battery_sensor)}">
<div class="battery tooltip" @click="${(e) => { e.stopPropagation(); moreInfo(card, card.config.battery_sensor)}}">
<div class="tip" style="text-align:center;">${state}%</div>
<ha-icon .icon="${icon}" style="color: ${color}"></ha-icon>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
@@ -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");
Expand Down

0 comments on commit a6dcfaa

Please sign in to comment.