Hi everyone,
since there is an option on the recent release (02.2023) to create a group unsing sensors as members, I would like to create one sensor group os current power consuption (SUM).
However, I have a custom sensor which is doing this since a few months:
# ******** STROM akt.
- platform: template # Leistungsaufnahme aktuell in W (Sum of all known consumption values)
sensors:
energy_consumption_current_w:
friendly_name: Stromverbrauch akt. [W]
unique_id: sensor_energy_consumption_current_w
unit_of_measurement: "W"
icon_template: "mdi:flash"
device_class: energy
value_template: "{{ (states ('sensor.energy_consumption_base_w') | float(2) | round (1)
+ states ('sensor.bogenlampe_power_2') | float(2) | round (1)
+ states ('sensor.wohnzimmerstrom_power_3') | float(2) | round (1)
+ states ('sensor.kaffeemaschine_power') | float(2) | round (1)
+ states ('sensor.tasmota_buro_energy_power') | float(2) | round (1)
+ states ('sensor.tasmota_drucker_tasmota_energy_power') | float(2) | round (1)
+ states ('sensor.tasmota_desk_energy_power') | float(2) | round (1)
+ states ('sensor.zirkulationspumpe_power') | float(2) | round (1)
+ states ('sensor.bambuslicht_power_4') | float(2) | round (1)
+ states ('sensor.tasmota_serverpark_energy_power') | float(2) | round (1)
+ states ('sensor.tasmota_wama_energy_power') | float(2) | round (1) )
+ states ('sensor.ofen_tasmota_energy_power') | float(2) | round (1)
| float(2) | round (1) }}"
Is it possible to migrate the old (custom) to the new (group) sensor using the same UID without loosing data (of the custom sensor)?
From my experience the ID will be changed if there is another one with the same UID (e.g. by appending _2
)