button-card icon indicating copy to clipboard operation
button-card copied to clipboard

(help) Use the value of name in javascript?!

Open pickonedev opened this issue 7 months ago • 1 comments

Hi!

It is possible to get the value of the name card with javascript and use it in other details? Something like this?

type: custom:button-card
show_label: true
name: testing
label: >
  [[[
    return this.config.name;
  ]]]

How can I achieve the proper way to get the name's value? I cannot use variables in my project, so I need some other way...

Thanks in advance!

pickonedev avatar May 20 '25 22:05 pickonedev

It should work because "this" keyword catching the all object. It doesn't work in your code?

Shahar17452312 avatar May 29 '25 19:05 Shahar17452312

this._config.name (missing the _)

RomRider avatar Aug 13 '25 15:08 RomRider