mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Update utility_meter documentation for select entity (#22053)
* Update utility_meter documentation for select entity * Update example * Update utility_meter.markdown
This commit is contained in:
parent
22e96900da
commit
e8020aec5c
@ -110,25 +110,6 @@ Calibrate the Utility Meter. Change the value of a given sensor.
|
|||||||
| `entity_id` | no | String or list of strings that point at `entity_id`s of utility_meters.
|
| `entity_id` | no | String or list of strings that point at `entity_id`s of utility_meters.
|
||||||
| `value` | no | Number | Value to calibrate the sensor with |
|
| `value` | no | Number | Value to calibrate the sensor with |
|
||||||
|
|
||||||
### Service `utility_meter.next_tariff`
|
|
||||||
|
|
||||||
Change the current tariff to the next in the list.
|
|
||||||
This service must be called by the user for the tariff switching logic to occur (e.g., using an automation)
|
|
||||||
|
|
||||||
| Service data attribute | Optional | Description |
|
|
||||||
| ---------------------- | -------- | ----------- |
|
|
||||||
| `entity_id` | no | String or list of strings that point at `entity_id`s of utility_meters.
|
|
||||||
|
|
||||||
### Service `utility_meter.select_tariff`
|
|
||||||
|
|
||||||
Change the current tariff to the given tariff.
|
|
||||||
This service must be called by the user for the tariff switching logic to occur (e.g., using an automation)
|
|
||||||
|
|
||||||
| Service data attribute | Optional | Description |
|
|
||||||
| ---------------------- | -------- | ----------- |
|
|
||||||
| `entity_id` | no | String or list of strings that point at `entity_id`s of utility_meters.
|
|
||||||
| `tariff` | no | String that is equal to one of the defined tariffs.
|
|
||||||
|
|
||||||
## Advanced Configuration
|
## Advanced Configuration
|
||||||
|
|
||||||
The following configuration shows an example where 2 utility_meters (`daily_energy` and `monthly_energy`) track daily and monthly energy consumptions.
|
The following configuration shows an example where 2 utility_meters (`daily_energy` and `monthly_energy`) track daily and monthly energy consumptions.
|
||||||
@ -138,7 +119,7 @@ Both track the same sensor (`sensor.energy`) which continuously monitors the ene
|
|||||||
4 different sensors will be created, 2 per utility meter and corresponding to each tariff.
|
4 different sensors will be created, 2 per utility meter and corresponding to each tariff.
|
||||||
Sensor `sensor.daily_energy_peak`, `sensor.daily_energy_offpeak`, `sensor.monthly_energy_peak` and `sensor.monthly_energy_offpeak` will automatically be created to track the consumption in each tariff for the given cycle.
|
Sensor `sensor.daily_energy_peak`, `sensor.daily_energy_offpeak`, `sensor.monthly_energy_peak` and `sensor.monthly_energy_offpeak` will automatically be created to track the consumption in each tariff for the given cycle.
|
||||||
|
|
||||||
`utility_meter.daily_energy` and `utility_meter.monthly_energy` entities will track the current tariff and provide a service to change the tariff.
|
The `select.daily_energy` and `select.monthly_energy` select entities will track the current tariff and allow changing the tariff.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
utility_meter:
|
utility_meter:
|
||||||
@ -165,22 +146,34 @@ Assuming your energy provider tariffs are time based according to:
|
|||||||
|
|
||||||
a time based automation can be used:
|
a time based automation can be used:
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
automation:
|
automation:
|
||||||
trigger:
|
trigger:
|
||||||
- platform: time
|
- platform: time
|
||||||
at: "09:00:00"
|
at: "09:00:00"
|
||||||
|
variables:
|
||||||
|
tariff: "peak"
|
||||||
- platform: time
|
- platform: time
|
||||||
at: "21:00:00"
|
at: "21:00:00"
|
||||||
|
variables:
|
||||||
|
tariff: "offpeak"
|
||||||
action:
|
action:
|
||||||
- service: utility_meter.next_tariff
|
- service: select.select_option
|
||||||
target:
|
target:
|
||||||
entity_id: utility_meter.daily_energy
|
entity_id: utility_meter.daily_energy
|
||||||
- service: utility_meter.next_tariff
|
data:
|
||||||
|
option: "{{ tariff }}"
|
||||||
|
- service: select.select_option
|
||||||
target:
|
target:
|
||||||
entity_id: utility_meter.monthly_energy
|
entity_id: utility_meter.monthly_energy
|
||||||
|
data:
|
||||||
|
option: "{{ tariff }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
Assuming your utility provider cycle is offset from the last day of the month
|
Assuming your utility provider cycle is offset from the last day of the month
|
||||||
|
|
||||||
- cycles at 17h00 on the last day of the month
|
- cycles at 17h00 on the last day of the month
|
||||||
|
Loading…
x
Reference in New Issue
Block a user