Custom-chip "My Enedis"¶
The myenedis
you can control a input_number entity
Credits¶
Author: acesyde - 2021 Version: 1.0.0
Changelog¶
1.0.0
Initial releaseWhy not the default chip_power_consumption
¶
- The my enedis integration doesn't split the cost and the consumption in a specific sensor
- All values are in the main sensor under the
attributes
item - Split
Heures Creuses (HC)
andHeures pleines (HP)
Usage¶
- type: "custom:button-card"
template: custom_chip_myenedis
entity: sensor.myenedis_123456789
variables:
ulm_chip_separate_hp_hc: true
Requirements¶
Variables¶
Variable | Default | Required | Notes |
---|---|---|---|
entity | Your MyEnedis Sensor | ||
ulm_chip_separate_hp_hc | false | Separate HC/HC in the chip |
Template code¶
Template Code
custom_chip_myenedis.yaml
---
### Chip Power Consumption ###
custom_chip_myenedis:
template:
- "chips"
variables:
ulm_chip_separate_hp_hc: false
ulm_chip_unit_of_measurement: "[[[ return entity.attributes.unit_of_measurement ]]]"
triggers_update: "all"
label: |
[[[
var result = "💰 " + parseFloat(entity.attributes.daily_cost).toFixed(1) + " €";
if(variables.ulm_chip_separate_hp_hc) {
result += " ☀️ " + parseFloat(entity.attributes.yesterday_HP).toFixed(1) + " " + variables.ulm_chip_unit_of_measurement;
result += " 🌑 " + parseFloat(entity.attributes.yesterday_HC).toFixed(1) + " " + variables.ulm_chip_unit_of_measurement;
} else {
result += " ⚡ " + parseFloat(entity.attributes.yesterday_HCHP).toFixed(1) + " " + variables.ulm_chip_unit_of_measurement;
}
return result;
]]]