Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cards:
- - cards:
- - elements:
- - type: conditional
- conditions:
- - entity: input_boolean.bodyscale_aurelien_info_toggle
- state: 'on'
- elements:
- - entity: bodymiscale.aurelien
- type: state-label
- attribute: weight
- prefix: 'Poids: '
- suffix: ' kg'
- style:
- top: 45%
- right: 1%
- color: white
- transform: 'translate(0%,-50%)'
- pointer-events: none
- font-size: 15px
- border-right-style: solid
- border-color: 'rgb(34, 154, 210)'
- - entity: bodymiscale.aurelien
- type: state-label
- attribute: height
- prefix: 'Taille: '
- suffix: ' cm'
- style:
- top: 55%
- right: 1%
- color: white
- transform: 'translate(0%,-50%)'
- pointer-events: none
- font-size: 15px
- border-right-style: solid
- border-color: 'rgb(34, 154, 210)'
- - entity: bodymiscale.aurelien
- type: state-label
- attribute: age
- prefix: 'Age: '
- suffix: ' ans'
- style:
- top: 65%
- right: 1%
- color: white
- transform: 'translate(0%,-50%)'
- pointer-events: none
- font-size: 15px
- border-right-style: solid
- border-color: 'rgb(34, 154, 210)'
- - entity: bodymiscale.aurelien
- type: state-label
- attribute: gender
- prefix: 'Genre: '
- style:
- top: 75%
- right: 1%
- color: white
- transform: 'translate(0%,-50%)'
- pointer-events: none
- font-size: 15px
- border-right-style: solid
- border-color: 'rgb(34, 154, 210)'
- - type: conditional
- conditions:
- - entity: input_boolean.bodyscale_siham_info_toggle
- state: 'on'
- elements:
- - entity: bodymiscale.siham
- type: state-label
- attribute: weight
- prefix: 'Poids: '
- suffix: ' kg'
- style:
- top: 45%
- right: 1%
- color: white
- transform: 'translate(0%,-50%)'
- pointer-events: none
- font-size: 15px
- border-right-style: solid
- border-color: 'rgb(34, 154, 210)'
- - entity: bodymiscale.siham
- type: state-label
- attribute: height
- prefix: 'Taille: '
- suffix: ' cm'
- style:
- top: 55%
- right: 1%
- color: white
- transform: 'translate(0%,-50%)'
- pointer-events: none
- font-size: 15px
- border-right-style: solid
- border-color: 'rgb(34, 154, 210)'
- - entity: bodymiscale.siham
- type: state-label
- attribute: age
- prefix: 'Age: '
- suffix: ' ans'
- style:
- top: 65%
- right: 1%
- color: white
- transform: 'translate(0%,-50%)'
- pointer-events: none
- font-size: 15px
- border-right-style: solid
- border-color: 'rgb(34, 154, 210)'
- - entity: bodymiscale.siham
- type: state-label
- attribute: gender
- prefix: 'Genre: '
- style:
- top: 75%
- right: 1%
- color: white
- transform: 'translate(0%,-50%)'
- pointer-events: none
- font-size: 15px
- border-right-style: solid
- border-color: 'rgb(34, 154, 210)'
- - entity: input_boolean.bodyscale_aurelien_info_toggle
- icon: 'mdi:alpha-a-circle'
- style:
- top: 85%
- left: 25%
- transform: 'translate(-50%, 0) scale(1.15, 1.15)'
- '--paper-item-icon-color': white
- '--paper-item-icon-active-color': 'rgb(34, 154, 210)'
- tap_action:
- action: toggle
- title: Aurélien
- type: state-icon
- - entity: input_boolean.bodyscale_siham_info_toggle
- icon: 'mdi:alpha-s-circle'
- style:
- top: 85%
- left: 75%
- transform: 'translate(-50%, 0) scale(1.15, 1.15)'
- '--paper-item-icon-color': white
- '--paper-item-icon-active-color': 'rgb(34, 154, 210)'
- tap_action:
- action: toggle
- title: Siham
- type: state-icon
- image: /local/bodyscale/miscale2.jpg?v=2
- type: picture-elements
- - card:
- entities:
- - entities:
- - attribute: Water
- entity: bodymiscale.aurelien
- unit: '%'
- icon: 'file:water'
- style: |
- :host {
- --paper-item-icon-color:
- {% set water = state_attr('bodymiscale.aurelien', 'Water') | float %}
- {% if 0 < water < 55 %}orange;
- {% elif 55.01 <= water <= 65.1 %}green;
- {% else %}darkgreen;
- {% endif %};
- }
- name: Eau
- type: 'custom:multiple-entity-row'
- - attribute: Visceral fat
- entity: bodymiscale.aurelien
- icon: 'file:visceral_fat'
- style: |
- :host {
- --paper-item-icon-color:
- {% set visceral_fat = state_attr('bodymiscale.aurelien', 'Visceral fat') | float %}
- {% if 0 < visceral_fat < 10 %}green;
- {% elif 10.01 <= visceral_fat <= 15 %}orange;
- {% else %}orangered;
- {% endif %};
- }
- name: Graisse viscérale
- type: 'custom:multiple-entity-row'
- - attribute: Body fat
- entity: bodymiscale.aurelien
- unit: '%'
- icon: 'file:body_fat'
- style: |
- :host {
- --paper-item-icon-color:
- {% set body_fat = state_attr('bodymiscale.aurelien', 'Body fat') | float %}
- {% if 0 < body_fat < 12 %}blue;
- {% elif 12.01 <= body_fat <= 18 %}royalblue;
- {% elif 18.01 <= body_fat <= 23 %}green;
- {% elif 23.01 <= body_fat <= 28 %}orange;
- {% else %}orangered;
- {% endif %};
- }
- name: Graisse corporelle
- type: 'custom:multiple-entity-row'
- - attribute: BMI
- entity: bodymiscale.aurelien
- icon: 'file:bmi'
- style: |
- :host {
- --paper-item-icon-color:
- {% set bmi = state_attr('bodymiscale.aurelien', 'BMI') | float %}
- {% if 0 < bmi < 18.4 %}blue;
- {% elif 18.5 <= bmi <= 25 %}green;
- {% elif 25.01 <= bmi <= 28 %}orange;
- {% elif 28.01 <= bmi <= 32 %}orangered;
- {% else %}red;
- {% endif %};
- }
- name: IMC
- type: 'custom:multiple-entity-row'
- - attribute: Muscle mass
- entity: bodymiscale.aurelien
- unit: kg
- icon: 'file:muscle_mass'
- style: |
- :host {
- --paper-item-icon-color:
- {% set muscle_mass = state_attr('bodymiscale.aurelien', 'Muscle mass') | float %}
- {% if 0 < muscle_mass < 49.40 %}orangered;
- {% elif 49.41 <= muscle_mass <= 59.50 %}green;
- {% else %}darkgreen;
- {% endif %};
- }
- name: Muscle
- type: 'custom:multiple-entity-row'
- - attribute: Protein
- entity: bodymiscale.aurelien
- unit: '%'
- icon: 'file:protein'
- style: |
- :host {
- --paper-item-icon-color:
- {% set protein = state_attr('bodymiscale.aurelien', 'Protein') | float %}
- {% if 0 < protein < 16 %}orangered;
- {% elif 16.01 <= protein <= 20 %}green;
- {% else %}darkgreen;
- {% endif %};
- }
- name: Protéine
- type: 'custom:multiple-entity-row'
- - attribute: Basal metabolism
- entity: bodymiscale.aurelien
- unit: kcal
- icon: 'file:basal_metabolism'
- style: |
- :host {
- --paper-item-icon-color: green;
- }
- name: Métabolisme de base
- type: 'custom:multiple-entity-row'
- - attribute: Bone mass
- entity: bodymiscale.aurelien
- unit: kg
- icon: 'file:bone_mass'
- style: |
- :host {
- --paper-item-icon-color:
- {% set bone_mass = state_attr('bodymiscale.aurelien', 'Bone mass') | float %}
- {% if 0 < bone_mass < 2 %}orangered;
- {% elif 2.01 <= bone_mass <= 4.20 %}green;
- {% else %}darkgreen;
- {% endif %};
- }
- name: Masse osseuse
- type: 'custom:multiple-entity-row'
- - attribute: Metabolic age
- entity: bodymiscale.aurelien
- unit: ans
- icon: 'file:metabolic_age'
- style: |
- :host {
- --paper-item-icon-color: green
- }
- name: Age corporel
- type: 'custom:multiple-entity-row'
- - attribute: Ideal
- entity: bodymiscale.aurelien
- unit: kg
- icon: 'file:ideal'
- style: |
- :host {
- --paper-item-icon-color:
- {% set ideal = state_attr('bodymiscale.aurelien', 'weight') | float %}
- {% if 0 < ideal < 57.30 %}blue;
- {% elif 57.31 <= ideal <= 77.40 %}green;
- {% elif 77.41 <= ideal <= 86.70 %}orange;
- {% elif 86.71 <= ideal <= 99.10 %}orangered;
- {% else %}red;
- {% endif %};
- }
- name: Poids idéal
- type: 'custom:multiple-entity-row'
- - attribute: Body type
- entity: bodymiscale.aurelien
- icon: 'file:body_type'
- style: |
- :host {
- --paper-item-icon-color:
- {% set body_type = state_attr('bodymiscale.aurelien', 'Body type') %}
- {% if body_type == "Skinny" %}blue;
- {% elif body_type == "Balanced-skinny" %}royalblue;
- {% elif body_type == "Skinny-muscular" %}royalblue;
- {% elif body_type == "Balanced" %}green;
- {% elif body_type == "Balanced-muscular" %}green;
- {% elif body_type == "Lack-exerscise" %}orange;
- {% elif body_type == "Thick-set" %}orangered;
- {% elif body_type == "Obese" %}red;
- {% elif body_type == "Overweight" %}red;
- {% else %}white;
- {% endif %};
- }
- name: Corpulence
- type: 'custom:multiple-entity-row'
- head: bodymiscale.aurelien
- type: 'custom:fold-entity-row'
- show_header_toggle: false
- title: Aurélien Score du corps
- type: entities
- conditions:
- - entity: input_boolean.bodyscale_aurelien_info_toggle
- state: 'on'
- type: conditional
- - card:
- entities:
- - entities:
- - attribute: Water
- entity: bodymiscale.siham
- icon: 'file:water'
- unit: '%'
- style: |
- :host {
- --paper-item-icon-color:
- {% set water = state_attr('bodymiscale.siham', 'Water') | float %}
- {% if 0 < water < 45 %}orange;
- {% elif 45.01 <= water <= 60.1 %}green;
- {% else %}darkgreen;
- {% endif %};
- }
- name: Eau
- type: 'custom:multiple-entity-row'
- - attribute: Visceral fat
- entity: bodymiscale.siham
- icon: 'file:visceral_fat'
- style: |
- :host {
- --paper-item-icon-color:
- {% set visceral_fat = state_attr('bodymiscale.siham', 'Visceral fat') | float %}
- {% if 0 < visceral_fat < 10 %}green;
- {% elif 10.01 <= visceral_fat <= 15 %}orange;
- {% else %}orangered;
- {% endif %};
- }
- name: Graisse viscérale
- type: 'custom:multiple-entity-row'
- - attribute: Body fat
- entity: bodymiscale.siham
- unit: '%'
- icon: 'file:body_fat'
- style: |
- :host {
- --paper-item-icon-color:
- {% set body_fat = state_attr('bodymiscale.siham', 'Body fat') | float %}
- {% if 0 < body_fat < 12 %}blue;
- {% elif 12.01 <= body_fat <= 18 %}royalblue;
- {% elif 18.01 <= body_fat <= 23 %}green;
- {% elif 23.01 <= body_fat <= 28 %}orange;
- {% else %}orangered;
- {% endif %};
- }
- name: Graisse corporelle
- type: 'custom:multiple-entity-row'
- - attribute: BMI
- entity: bodymiscale.siham
- icon: 'file:bmi'
- style: |
- :host {
- --paper-item-icon-color:
- {% set bmi = state_attr('bodymiscale.siham', 'BMI') | float %}
- {% if 0 < bmi < 18.4 %}blue;
- {% elif 18.5 <= bmi <= 25 %}green;
- {% elif 25.01 <= bmi <= 28 %}orange;
- {% elif 28.01 <= bmi <= 32 %}orangered;
- {% else %}red;
- {% endif %};
- }
- name: IMC
- type: 'custom:multiple-entity-row'
- - attribute: Muscle mass
- entity: bodymiscale.siham
- unit: kg
- icon: 'file:muscle_mass'
- style: |
- :host {
- --paper-item-icon-color:
- {% set muscle_mass = state_attr('bodymiscale.siham', 'Muscle mass') | float %}
- {% if 0 < muscle_mass < 36.50 %}orangered;
- {% elif 36.51 <= muscle_mass <= 42.60 %}green;
- {% else %}darkgreen;
- {% endif %};
- }
- name: Muscle
- type: 'custom:multiple-entity-row'
- - attribute: Protein
- entity: bodymiscale.siham
- unit: '%'
- icon: 'file:protein'
- style: |
- :host {
- --paper-item-icon-color:
- {% set protein = state_attr('bodymiscale.siham', 'Protein') | float %}
- {% if 0 < protein < 16 %}orangered;
- {% elif 16.01 <= protein <= 20 %}green;
- {% else %}darkgreen;
- {% endif %};
- }
- name: Protéine
- type: 'custom:multiple-entity-row'
- - attribute: Basal metabolism
- entity: bodymiscale.siham
- unit: kcal
- icon: 'file:basal_metabolism'
- style: |
- :host {
- --paper-item-icon-color: green;
- }
- name: Métabolisme de base
- type: 'custom:multiple-entity-row'
- - attribute: Bone mass
- entity: bodymiscale.siham
- unit: kg
- icon: 'file:bone_mass'
- style: |
- :host {
- --paper-item-icon-color:
- {% set bone_mass = state_attr('bodymiscale.siham', 'Bone mass') | float %}
- {% if 0 < bone_mass < 2 %}orangered;
- {% elif 2.01 <= bone_mass <= 4.20 %}green;
- {% else %}darkgreen;
- {% endif %};
- }
- name: Masse osseuse
- type: 'custom:multiple-entity-row'
- - attribute: Metabolic age
- entity: bodymiscale.siham
- unit: ans
- icon: 'file:metabolic_age'
- style: |
- :host {
- --paper-item-icon-color: green
- }
- name: Age corporel
- type: 'custom:multiple-entity-row'
- - attribute: Ideal
- entity: bodymiscale.siham
- unit: kg
- icon: 'file:ideal'
- style: |
- :host {
- --paper-item-icon-color:
- {% set ideal = state_attr('bodymiscale.siham', 'weight') | float %}
- {% if 0 < ideal < 51 %}blue;
- {% elif 51.01 <= ideal <= 69 %}green;
- {% elif 69.01 <= ideal <= 77 %}orange;
- {% elif 77.01 <= ideal <= 88 %}orangered;
- {% else %}red;
- {% endif %};
- }
- name: Poids idéal
- type: 'custom:multiple-entity-row'
- - attribute: Body type
- entity: bodymiscale.siham
- icon: 'file:body_type'
- style: |
- :host {
- --paper-item-icon-color:
- {% set body_type = state_attr('bodymiscale.siham', 'Body type') %}
- {% if body_type == 'Skinny' %}blue;
- {% elif body_type == 'Balanced-skinny' %}royalblue;
- {% elif body_type == 'Skinny-muscular' %}royalblue;
- {% elif body_type == 'Balanced' %}green;
- {% elif body_type == 'Balanced-muscular' %}green;
- {% elif body_type == 'Lack-exerscise' %}orange;
- {% elif body_type == 'Thick-set' %}orangered;
- {% elif body_type == 'Obese' %}red;
- {% elif body_type == 'Overweight' %}red;
- {% else %}white;
- {% endif %};
- name: Corpulence
- type: 'custom:multiple-entity-row'
- head: bodymiscale.siham
- type: 'custom:fold-entity-row'
- show_header_toggle: false
- title: Siham Score du corps
- type: entities
- conditions:
- - entity: input_boolean.bodyscale_siham_info_toggle
- state: 'on'
- type: conditional
- type: vertical-stack
- type: vertical-stack
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement