Bonjour
il vous faut mettre en place un utility meter
Utility Meter
Instructions on how to integrate the Utility Meter into Home Assistant.
et plus particulierement la configuration avancée
Advanced Configuration
The following configuration shows an example where 2 utility_meters (daily_energy
and monthly_energy
) track daily and monthly energy consumptions.
Both track the same sensor (sensor.energy
) which continuously monitors the energy consumed.
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.
The select.daily_energy
and select.monthly_energy
select entities will track the current tariff and allow changing the tariff.
utility_meter:
daily_energy:
source: sensor.energy
name: Daily Energy
cycle: daily
tariffs:
- peak
- offpeak
monthly_energy:
source: sensor.energy
name: Monthly Energy
cycle: monthly
tariffs:
- peak
- offpeak
YAML
Copy
Assuming your energy provider tariffs are time based according to:
- peak: from 06:08 to 12:38 and 15:38 to 01:08
- offpeak: from 01:08 to 06:08 and 12:38 to 15:38
a time based automation can be used:
automation:
trigger:
- platform: time
at: "01:08:00"
variables:
tariff: offpeak
- platform: time
at: "06:08:00"
variables:
tariff: peak
- platform: time
at: "12:38:00"
variables:
tariff: offpeak
- platform: time
at: "15:38:00"
variables:
tariff: peak
action:
- service: select.select_option
target:
entity_id: select.daily_energy
data:
option: "{{ tariff }}"
- service: select.select_option
target:
entity_id: select.monthly_energy
data:
option: "{{ tariff }}"
vous aurez automatiquement une ségrégation des valeurs de consommation HP HC qui sera intégrable directement dans le module energy de HA