Skip to content

Commit

Permalink
v5.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dckiller51 committed Aug 1, 2021
1 parent c791cf9 commit d5f0498
Show file tree
Hide file tree
Showing 10 changed files with 3,603 additions and 2,749 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to this project will be documented in this file.

## v5.5.0

- Partial integration of bar card options for the body part. (thanks to the contributors of bar-card <https://github.com/custom-cards/bar-card> )
Options = Partial (Does not work = animation, columns, decimal, complementary, direction)
(work = color, height, max, min, positions, severity, target, width)
Severity Options = OK (from, to, color)
Positions Options = OK (icon, name, minmax, value (inside, outside, off))

To know the start, destination, color and target values, open your Mi Fit app on your smartphone.

## v5.0.0

- Conversion to Typescript language (Lit 2)
Expand Down
74 changes: 73 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,80 @@ Add custom buttons and service calls:
entity_id: light.living_room
```

Add custom bar options (To know the start, destination, color and target values, open your Mi Fit app on your smartphone.)

## Options

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| color | string | var(--score-card-color, var(--ha-card-background)) | Color of the bar.
| height | string | 30px | Defines the height of the bar.
| max | number | 100 | Defines maximum value of the bar.
| min | number | 0 | Defines minimum value of the bar.
| positions | object | none | Defines the positions of the card elements. See [Positions Options](#positions-options).
| severity | object | none | A list of severity values. See [Severity Options](#severity-options).
| target | number | none | Defines and enables target marker value.
| width | string | 100% | Defines the width of the bar (**Required** the name must be on `outside`).

## Severity Options

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| from | number | **Required** | Defines from which value the color should be displayed.
| to | number | **Required** | Defines to which value the color should be displayed.
| color | string | **Required** | Defines the color to be displayed.

## Positions Options

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| icon | string | outside | `inside`, `outside`, `off`
| name | string | inside | `inside`, `outside`, `off`
| minmax | string | off | `inside`, `outside`, `off`
| value | string | inside | `inside`, `outside`, `off`

```yaml
type: custom:body-miscale-card
entity: bodymiscale.test
model: false
show_name: true
show_states: true
show_attributes: true
show_toolbar: true
show_body: true
show_buttons: true
entity_row: true
buttons:
user1:
show: true
body:
bmi:
positions:
name: outside
minmax: inside
width: 50%
target: 21
bmi_label:
color: blue
height: 40px
visceral_fat:
severity:
- from: 0
to: 4.99
color: blue
- from: 5
to: 10
color: green
- from: 10.01
to: 15
color: red
target: 15
min: 0
max: 25
```

Translations: Automatic (setting of your homeassistant) or manual
Currently the languages available are `DE`,`EN`,`FR`,`NL`,`PT-BR`, you can contact me to integrate your native language
Currently the languages available are `DE`,`EN`,`FR`,`NL`,`PT-BR`, you can contact me to integrate your native language

```yaml
- type: custom:body-miscale-card
Expand Down
622 changes: 397 additions & 225 deletions dist/body-miscale-card.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "body-miscale-card",
"version": "5.0.0",
"version": "5.5.0",
"description": "Lovelace body-miscale-card",
"keywords": [
"home-assistant",
Expand Down
Loading

0 comments on commit d5f0498

Please sign in to comment.