Skip to content
This repository has been archived by the owner on Nov 4, 2023. It is now read-only.

Features request : New element in the screesaver / header item #806

Open
sebyoga opened this issue Jan 4, 2022 · 1 comment
Open

Features request : New element in the screesaver / header item #806

sebyoga opened this issue Jan 4, 2022 · 1 comment

Comments

@sebyoga
Copy link

sebyoga commented Jan 4, 2022

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,

@cgarwood
Copy link
Collaborator

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" },
},

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants