TileBoard icon indicating copy to clipboard operation
TileBoard copied to clipboard

Features request : New element in the screesaver / header item

Open sebyoga opened this issue 3 years ago • 1 comments

Hi all,

In the screesaver, i want to load an state of one sensor. For this, i use the HEADER_ITEMS.WEATHER, works but not use friendly.

{
            type: HEADER_ITEMS.WEATHER,
            state: "&binary_sensor.capteur_de_portail.state",
            states: {
              on: "- Portail ouvert",
              off: "- Portail fermé",
            },
            styles: { fontSize: "17px" },
},

Is it possible to create an new item used for show an state with an icon ?

Can you add the possibility to load an state in the : HEADER_ITEMS.CUSTOM_HTML (same has customHtml) ?

{
            type: HEADER_ITEMS.CUSTOM_HTML,
            html: "<b>Alarme de la maison&alarm_control_panel.montevrain_alarm.state</b>",
            styles: { fontSize: "25px" },
},

The &alarm_control_panel.montevrain_alarm.state is printed :/

Thanks you so much :)

Best regards,

sebyoga avatar Jan 04 '22 10:01 sebyoga

Haven't tried it in a HEADER_ITEM but if you use Javascript templates you might be able to do

{
            type: HEADER_ITEMS.CUSTOM_HTML,
            html: `<b>Alarme de la maison ${this.states['alarm_control_panel.montevrain_alarm'].state}</b>`,
            styles: { fontSize: "25px" },
},

cgarwood avatar Jan 19 '22 14:01 cgarwood