mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-17 06:16:50 +00:00
Add note extended cron syntax note croniter (#19541)
This commit is contained in:
parent
275de96f26
commit
31fe320370
@ -55,8 +55,8 @@ offset:
|
|||||||
type: time
|
type: time
|
||||||
type: integer
|
type: integer
|
||||||
cron:
|
cron:
|
||||||
description: This option is *mutually exclusive* of `cycle` and `offset`. It provides an advanced method of defining when should the counter be reset. It follows common [crontab syntax](https://crontab.guru).
|
description: This option is *mutually exclusive* of `cycle` and `offset`. It provides an advanced method of defining when should the counter be reset. It follows common [crontab syntax](https://crontab.guru) but extended to support more advanced scheduling. See the [croniter](https://github.com/taichino/croniter) library.
|
||||||
required: false
|
required: true
|
||||||
type: string
|
type: string
|
||||||
net_consumption:
|
net_consumption:
|
||||||
description: Set this to True if you would like to treat the source as a net meter. This will allow your counter to go both positive and negative.
|
description: Set this to True if you would like to treat the source as a net meter. This will allow your counter to go both positive and negative.
|
||||||
@ -172,6 +172,20 @@ automation:
|
|||||||
entity_id: utility_meter.monthly_energy
|
entity_id: utility_meter.monthly_energy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Assuming your utility provider cycle is offset from the last day of the month
|
||||||
|
|
||||||
|
- cycles at 17h00 on the last day of the month
|
||||||
|
|
||||||
|
a cron(extended syntax used for last day of month) based utility meter can be used:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
utility_meter:
|
||||||
|
monthly_energy:
|
||||||
|
source: sensor.energy
|
||||||
|
name: Monthly Energy
|
||||||
|
cron: "0 17 L * *"
|
||||||
|
```
|
||||||
|
|
||||||
## Advanced Configuration for DSMR users
|
## Advanced Configuration for DSMR users
|
||||||
|
|
||||||
When using the [DSMR component](/integrations/dsmr) to get data from the utility meter, each tariff (peak and off-peak) has a separate sensor. Additionally, there is a separate sensor for gas consumption. The meter switches automatically between tariffs, so an automation is not necessary in this case. But, you do have to setup a few more instances of the `utility_meter` component.
|
When using the [DSMR component](/integrations/dsmr) to get data from the utility meter, each tariff (peak and off-peak) has a separate sensor. Additionally, there is a separate sensor for gas consumption. The meter switches automatically between tariffs, so an automation is not necessary in this case. But, you do have to setup a few more instances of the `utility_meter` component.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user