This seems to have been asked many times before, but none of the options have worked out for me so far and it seems like this should be something simple.
Card type: Entities card
I have a card with various entities (switches & lights) on it. For one of the rows I don’t want the toggle to appear – no control of it – I just want it to display the state (on or off).
I’ve tried a bunch of things, and these are what I want to avoid (because I think it should be simpler than having to do these options):
switch template thing (not sure how to do this anyway)
using the restriction card on the entry
using a separate card (like a glance card) or whatever; I just want to show one row on an entity card
This seems close and seems like it should work - display an attribute like “state”:
type: entities
entities:
- entity: light.hallway_hue_pendant
name: Hue pendant
- entity: switch.small_trees_on_off
name: Small hallway trees
- type: attribute
entity: switch.small_trees_on_off
attribute: status
prefix: "state: "
name: Tree switch state
title: Hallway
show_header_toggle: false
state_color: true
The display to the right of the attribute row is “Tree switch state state: --” always.
Hoping someone has a good idea here for this. Also, other things that didn’t seem to work:
type: button
tap_action: none
Somehow trying to add a line like: control:none or something like that - didn’t work.
Hi, thank you for the reply. I think as a newbie I’m going to need some additional advice on how to implement that. I looked through the configuration.xml and other files & directories and didn’t see anything about templates. Also, under the automations section there’s a scripts tab, is that where I need to add a file?
It doesn’t work directly in the card, so I know this isn’t correct:
You may disable a toggle by using card-mod.
So it shows a state (on/off) but you cannot change it.
Goto card-mod thread → 1st post → link at the bottom → styles for toggle.