Skip to content

Commit

Permalink
feat: Add MQTT entities based on amridm information coming from my rp…
Browse files Browse the repository at this point in the history
…i with SDR. Add additional properties to the OpenEVSE total energy sensor to enable energy monitoring.
  • Loading branch information
TonyApuzzo committed Aug 28, 2021
1 parent 2e35dd3 commit ef453b1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
3 changes: 3 additions & 0 deletions configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ logger:
# Enables the frontend
frontend:

# Enable energy management
energy:

lovelace:
mode: storage
dashboards:
Expand Down
2 changes: 1 addition & 1 deletion packages/chromecast01.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Emulated Roku to Chromecast to be able to control the Chromecast using a Harmony Remote
#

automation old:
automation chromecast01:
- id: ha_em_chromecast_play
trigger:
- platform: event
Expand Down
13 changes: 13 additions & 0 deletions packages/energy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sensor:
- platform: mqtt
state_topic: !secret ENERGY_METER_01_TOPIC
name: "Electric Meter"
unique_id: electric_meter_01
unit_of_measurement: kWh
device_class: energy
state_class: measurement
availability_topic: amr/status/availability
last_reset_topic: amr/status/last_reset
value_template: "{{ value_json.Message.Consumption }}"
json_attributes_template: "{{ value_json.Message | tojson }}"
json_attributes_topic: "amr/reading/SCM/4/60155156/message"
5 changes: 4 additions & 1 deletion packages/openevse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,13 @@ sensor:
- platform: mqtt
name: "OpenEVSE Total Energy"
unique_id: openevse_total_energy_01
icon: mdi:gauge-full
state_topic: !secret OPENEVSE_T_WH
state_class: measurement
device_class: energy
unit_of_measurement: "kWh"
unit_of_measurement: kWh
last_reset_topic: amr/status/last_reset
value_template: >-
{{- value|float / 1000 | round(2) -}}
Expand Down

0 comments on commit ef453b1

Please sign in to comment.