Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ou est le template ‹ button_raspberry › et ‹ button_hassos › #10

Open
thibautbrico opened this issue May 23, 2021 · 0 comments
Open

Comments

@thibautbrico
Copy link

Je voudrais reprendre la même carte sur la Surveillance(du rpi4) et de hassos
Pour cela j’ai installé la « decluttering-card » et trouvé le code lovelace:

  • type: horizontal-stack
    cards:

  • template: button_raspberry
    type: « custom:decluttering-card »
    variables:

  • entity: « sensor.cpu_temp »

  • icon: « mdi:raspberry-pi »

  • name: RasPi 4

  • colorstyle: « [[[
    if (entity.state == ‹ OL ›) return ‹ lime ›;
    if (entity.state == ‹ OB ›) return ‹ yellow ›;
    if (entity.state == ‹ LB ›) return ‹ magenta ›;
    if (entity.state == ‹ OB LB ›) return ‹ red ›;
    if (entity.state == ‹ OL LB ›) return ‹ cyan ›;
    else return ‹ deepskyblue ›;
    ]]] »

  • tempfield: « [[[
    return ${Math.round(states['sensor.cpu_temp'].state)}°C
    ]]] »

  • cpufield: « [[[
    return CPU: ${states['sensor.processor_use'].state}%
    ]]] »

  • ramfield: « [[[
    return RAM: ${states['sensor.memory_use_percent'].state}%
    ]]] »

  • sdfield: « [[[
    return SSD: ${states['sensor.disk_use_percent'].state}%
    ]]] »

  • cpustyle: « [[[
    if (states[‹ sensor.processor_use ›].state < 40) return ‹ lime ›;
    if (states[‹ sensor.processor_use ›].state >= 60 && states[‹ sensor.processor_use ›].state < 80) return ‹ red ›;
    else return ‹ orange ›;
    ]]] »

  • ramstyle: « [[[
    if (states[‹ sensor.memory_use_percent ›].state < 40) return ‹ lime ›;
    if (states[‹ sensor.memory_use_percent ›].state >= 60 && states[‹ sensor.memory_use_percent ›].state < 80) return ‹ red ›;
    else return ‹ orange ›;
    ]]] »

  • sdstyle: « [[[
    if (states[‹ sensor.disk_use_percent ›].state < 40) return ‹ lime ›;
    if (states[‹ sensor.disk_use_percent ›].state >= 60 && states[‹ sensor.disk_use_percent ›].state < 80) return ‹ red ›;
    else return ‹ orange ›;
    ]]] »

  • type: custom:decluttering-card
    template: button_hassos

Le probléme est que je n’arrive pas à trouver le template ‹ button_raspberry › et ‹ button_hassos ›
Merci de vos réponses

@thibautbrico thibautbrico changed the title OU est OU est le template ‹ button_raspberry › et ‹ button_hassos › May 23, 2021
@thibautbrico thibautbrico changed the title OU est le template ‹ button_raspberry › et ‹ button_hassos › Ou est le template ‹ button_raspberry › et ‹ button_hassos › May 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant