Is there a way to add a link/icon in the markdown card content that user can click to turn on/off a switch/light? I have a markdown card listing all switches/lights have been turned on for 2 hours. I would like to turn off them individually right in the content of the card. Thanks!
The Markdown card is a curious choice for your intended application. Perhaps what will serve you better is to use the Auto-Entities Card (a custom Lovelace card). It can display a filtered list of entities.
Thereâs an example in its documentation for displaying only the lights that are on. The example uses a Glance Card (but you are free to use another type of card) to display the lights that are on. Tapping the Glance Card toggles the lightâs state (i.e. it will turn off the light).
type: custom:auto-entities
show_empty: false
card:
type: glance
title: Lights on
filter:
include:
- domain: light
state: "on" # Remember that "on" and "off" are magic in yaml, and must always be quoted
options:
tap_action:
action: toggle
Thank you. Even though there could be a way that creating an âhttp inâ node in Node red to handle an âhttp getâ to turn off a switch (or do whatever), then put that link into markdown card. Itâs way easier for this needs to use Auto-Entitites Card.