mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-29 12:17:01 +00:00
Update history_stats.markdown
This commit is contained in:
parent
bab548dd3a
commit
f1e07f9c01
@ -121,7 +121,7 @@ Depending on the sensor type you choose, the `history_stats` integration can sho
|
||||
|
||||
- **time**: The default value, which is the tracked time, in hours
|
||||
- **ratio**: The tracked time divided by the length of your period, as a percentage
|
||||
- **count**: How many times the tracked entity matched the configured state during the time period. This will count states (for example, how many times a light was in the `on` state during the time period), as opposed to counting state transitions (for example, how many times a light was *turned* `on`). The difference is if the entity was already in the desired state at the start of the time period, that scenario will be counted with this sensor type.
|
||||
- **count**: How many times the tracked entity matched the configured state during the time period. This will count states (for example, how many times a light was in the `on` state during the time period), as opposed to counting state transitions (for example, how many times a light was *turned* `on`). The difference is if the entity was already in the desired state at the start of the time period, that scenario will be counted with this sensor type. If a list of states is provided to the state option, transitions between defined states are considered all part of a single event and do not increment the count.
|
||||
|
||||
{% note %}
|
||||
For a **time** or **count** sensor that uses a time period that does not slide (such as one that resets upon each hour, as opposed to one which considers the trailing 60 minutes), consider using [customization](/docs/configuration/customizing-devices/#customizing-an-entity-in-yaml) to change the `state_class` to `total_increasing` to generate statistics that track the `sum`. This is useful when emulating the behavior of a `utility_meter` helper that has a defined reset cycle. Without intervention, the `state_class` of any `history_stats` sensor will be `measurement` and will therefore generate `average`, `min`, and `max` statistics.
|
||||
|
Loading…
x
Reference in New Issue
Block a user