From c0943b69b89f5734f215dcc22fc38127d77a5df8 Mon Sep 17 00:00:00 2001 From: "J.P. Krauss" Date: Wed, 3 Aug 2022 11:47:25 -0700 Subject: [PATCH] Update Energy Package --- packages/energy/energy.yaml | 6 ++++++ packages/energy/energy.yaml.j2 | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/packages/energy/energy.yaml b/packages/energy/energy.yaml index c9519ed..90c5753 100644 --- a/packages/energy/energy.yaml +++ b/packages/energy/energy.yaml @@ -11,18 +11,21 @@ sensor: - name: Total Energy From Grid platform: integration + device_class: energy source: sensor.emporia_vue_net_power_from_grid unit_prefix: k unit_time: h - name: Total Energy To Grid platform: integration + device_class: energy source: sensor.emporia_vue_net_power_to_grid unit_prefix: k unit_time: h - name: Home Total Energy platform: integration + device_class: energy source: sensor.home_power_consumption unit_prefix: k unit_time: h @@ -415,6 +418,7 @@ template: # ----------------------------------------------------------------------------- # Emporia Vue To/From Grid Sensors - name: Emporia Vue Net Power From Grid + device_class: power unit_of_measurement: W state: > {% set net_power = states('sensor.emporia_d937d0_1min')|float %}{{ @@ -422,6 +426,7 @@ template: }} - name: Emporia Vue Net Power To Grid + device_class: power unit_of_measurement: W state: > {% set net_power = states('sensor.emporia_d937d0_1min')|float %}{{ @@ -431,6 +436,7 @@ template: # ----------------------------------------------------------------------------- # Home Total Power Consumption Sensor - name: Home Power Consumption + device_class: power unit_of_measurement: W state: > {{ diff --git a/packages/energy/energy.yaml.j2 b/packages/energy/energy.yaml.j2 index 625a15a..2ddf640 100644 --- a/packages/energy/energy.yaml.j2 +++ b/packages/energy/energy.yaml.j2 @@ -11,18 +11,21 @@ sensor: - name: Total Energy From Grid platform: integration + device_class: energy source: sensor.emporia_vue_net_power_from_grid unit_prefix: k unit_time: h - name: Total Energy To Grid platform: integration + device_class: energy source: sensor.emporia_vue_net_power_to_grid unit_prefix: k unit_time: h - name: Home Total Energy platform: integration + device_class: energy source: sensor.home_power_consumption unit_prefix: k unit_time: h @@ -66,6 +69,7 @@ template: # ----------------------------------------------------------------------------- # Emporia Vue To/From Grid Sensors - name: Emporia Vue Net Power From Grid + device_class: power unit_of_measurement: W state: > {% set net_power = states('sensor.emporia_d937d0_1min')|float %}{{ @@ -73,6 +77,7 @@ template: }} - name: Emporia Vue Net Power To Grid + device_class: power unit_of_measurement: W state: > {% set net_power = states('sensor.emporia_d937d0_1min')|float %}{{ @@ -82,6 +87,7 @@ template: # ----------------------------------------------------------------------------- # Home Total Power Consumption Sensor - name: Home Power Consumption + device_class: power unit_of_measurement: W state: > {{