Skip to content

Conversation

ildar170975
Copy link
Collaborator

A detailed description taken from an updated Readme:
Options decimals defined "card-wide" and/or for some entity are used to set an exact number of decimals according to the following rules:

  1. For states:
    -- if none decimals option is defined - a default presentation is used;
    -- if "card-wide" decimals is defined - this value is used;
    -- if decimals for some entity is defined - this value is used for this entity.

  2. For extrema & average values:
    -- if none decimals option is defined - a default presentation is used;
    -- if "card-wide" decimals is defined - this value is used;
    -- if decimals is defined for the 1st entity - this value is used.

  3. For primary Y-axis labels:
    -- if "card-wide" decimals option is not defined - a default presentation is used;
    -- otherwise - this value is used.

  4. For secondary Y-axis labels:
    -- if "card-wide" decimals & decimals_secondary option are not defined - a default presentation is used;
    -- if "card-wide" decimals option is defined - this value is used;
    -- if "card-wide" decimals_secondary option is defined - this value is used.

Here a "default presentation" will be (under construction) based on a precision settings provided in entity settings, selected language & global number format.

@ildar170975
Copy link
Collaborator Author

Implements #863

@ildar170975 ildar170975 linked an issue Apr 23, 2025 that may be closed by this pull request
@ildar170975 ildar170975 marked this pull request as ready for review April 23, 2025 21:13
zhiayang added a commit to zhiayang/mini-graph-card-yuki that referenced this pull request Sep 3, 2025
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

Successfully merging this pull request may close these issues.

[FR] Separate "decimals" options for each entity

1 participant