Skip to content

Commit

Permalink
Adding Pro3EM support
Browse files Browse the repository at this point in the history
  • Loading branch information
enesbcs committed Mar 26, 2023
1 parent bc3ca2e commit 1ca89c6
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions mqtt_templates_gen2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,43 @@ topic=%discovery_prefix%/sensor/%shelly_id%-3/power/config
payload={"name": "%shelly_id% Power 3", "stat_t": "~status/switch:3", "frc_upd": "false", "enabled_by_default": true, "uniq_id": "%shelly_id%-3-power", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "W", "val_tpl": "{{ value_json.apower }}", "device": {"identifiers": ["%shelly_mac%-3"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-3"}}
topic=%discovery_prefix%/sensor/%shelly_id%-3/energy/config
payload={"name": "%shelly_id% Energy 3", "stat_t": "~status/switch:3", "frc_upd": "false", "enabled_by_default": false, "uniq_id": "%shelly_id%-2-energy", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{ value_json['aenergy'].total|float/60)|round(2) }}", "device": {"identifiers": ["%shelly_mac%-3"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-3"}}

[shellypro3em] # Shelly Pro 3EM
topic=%discovery_prefix%/sensor/%shelly_id%/power/config
payload={"name": "%shelly_id% Total Active Power", "stat_t": "~status/em:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-power", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "W", "val_tpl": "{{ value_json.total_act_power }}", "device": {"identifiers": ["%shelly_mac%"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%"}}
topic=%discovery_prefix%/sensor/%shelly_id%/appower/config
payload={"name": "%shelly_id% Total Apparent Power", "stat_t": "~status/em:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-appower", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "VA", "val_tpl": "{{ value_json.total_aprt_power }}", "device": {"identifiers": ["%shelly_mac%-A"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-A"}}
topic=%discovery_prefix%/sensor/%shelly_id%/energy/config
payload={"name": "%shelly_id% Total Active Energy", "stat_t": "~status/emdata:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-energy", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{ value_json.total_act|round(2) }}", "device": {"identifiers": ["%shelly_mac%"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%"}}
topic=%discovery_prefix%/sensor/%shelly_id%/retenergy/config
payload={"name": "%shelly_id% Total Returned Energy", "stat_t": "~status/emdata:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-retenergy", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{ value_json.total_act_ret|round(2) }}", "device": {"identifiers": ["%shelly_mac%"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%"}}
topic=%discovery_prefix%/sensor/%shelly_id%-A/voltage/config
payload={"name": "%shelly_id% Phase A Voltage", "~": "%shelly_topic%/", "stat_t": "~status/em:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-A-voltage", "qos": 0, "dev_cla": "voltage", "stat_cla": "measurement", "unit_of_meas": "V", "val_tpl": "{{ value_json.a_voltage }}", "device": {"identifiers": ["%shelly_mac%-A"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-A"}}
topic=%discovery_prefix%/sensor/%shelly_id%-A/power/config
payload={"name": "%shelly_id% Phase A Active Power", "stat_t": "~status/em:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-A-power", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "W", "val_tpl": "{{ value_json.a_act_power }}", "device": {"identifiers": ["%shelly_mac%-A"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-A"}}
topic=%discovery_prefix%/sensor/%shelly_id%-A/appower/config
payload={"name": "%shelly_id% Phase A Apparent Power", "stat_t": "~status/em:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-A-appower", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "VA", "val_tpl": "{{ value_json.a_aprt_power }}", "device": {"identifiers": ["%shelly_mac%-A"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-A"}}
topic=%discovery_prefix%/sensor/%shelly_id%-A/energy/config
payload={"name": "%shelly_id% Phase A Total Active Energy", "stat_t": "~status/emdata:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-A-energy", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{ value_json.a_total_act_energy|round(2) }}", "device": {"identifiers": ["%shelly_mac%-A"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-A"}}
topic=%discovery_prefix%/sensor/%shelly_id%-A/retenergy/config
payload={"name": "%shelly_id% Phase A Total Returned Energy", "stat_t": "~status/emdata:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-A-retenergy", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{ value_json.a_total_act_ret_energy|round(2) }}", "device": {"identifiers": ["%shelly_mac%-A"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-A"}}
topic=%discovery_prefix%/sensor/%shelly_id%-B/voltage/config
payload={"name": "%shelly_id% Phase B Voltage", "~": "%shelly_topic%/", "stat_t": "~status/em:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-B-voltage", "qos": 0, "dev_cla": "voltage", "stat_cla": "measurement", "unit_of_meas": "V", "val_tpl": "{{ value_json.b_voltage }}", "device": {"identifiers": ["%shelly_mac%-B"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-B"}}
topic=%discovery_prefix%/sensor/%shelly_id%-B/power/config
payload={"name": "%shelly_id% Phase B Active Power", "stat_t": "~status/em:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-B-power", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "W", "val_tpl": "{{ value_json.b_act_power }}", "device": {"identifiers": ["%shelly_mac%-B"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-B"}}
topic=%discovery_prefix%/sensor/%shelly_id%-B/appower/config
payload={"name": "%shelly_id% Phase B Apparent Power", "stat_t": "~status/em:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-B-appower", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "VA", "val_tpl": "{{ value_json.b_aprt_power }}", "device": {"identifiers": ["%shelly_mac%-B"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-B"}}
topic=%discovery_prefix%/sensor/%shelly_id%-B/energy/config
payload={"name": "%shelly_id% Phase B Total Active Energy", "stat_t": "~status/emdata:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-B-energy", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{ value_json.b_total_act_energy|round(2) }}", "device": {"identifiers": ["%shelly_mac%-B"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-B"}}
topic=%discovery_prefix%/sensor/%shelly_id%-B/retenergy/config
payload={"name": "%shelly_id% Phase B Total Returned Energy", "stat_t": "~status/emdata:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-B-retenergy", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{ value_json.b_total_act_ret_energy|round(2) }}", "device": {"identifiers": ["%shelly_mac%-B"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-B"}}
topic=%discovery_prefix%/sensor/%shelly_id%-C/voltage/config
payload={"name": "%shelly_id% Phase C Voltage", "~": "%shelly_topic%/", "stat_t": "~status/em:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-C-voltage", "qos": 0, "dev_cla": "voltage", "stat_cla": "measurement", "unit_of_meas": "V", "val_tpl": "{{ value_json.c_voltage }}", "device": {"identifiers": ["%shelly_mac%-C"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-C"}}
topic=%discovery_prefix%/sensor/%shelly_id%-C/power/config
payload={"name": "%shelly_id% Phase C Active Power", "stat_t": "~status/em:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-C-power", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "W", "val_tpl": "{{ value_json.c_act_power }}", "device": {"identifiers": ["%shelly_mac%-C"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-C"}}
topic=%discovery_prefix%/sensor/%shelly_id%-C/appower/config
payload={"name": "%shelly_id% Phase C Apparent Power", "stat_t": "~status/em:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-C-appower", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "VA", "val_tpl": "{{ value_json.c_aprt_power }}", "device": {"identifiers": ["%shelly_mac%-C"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-C"}}
topic=%discovery_prefix%/sensor/%shelly_id%-C/energy/config
payload={"name": "%shelly_id% Phase C Total Active Energy", "stat_t": "~status/emdata:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-C-energy", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{ value_json.c_total_act_energy|round(2) }}", "device": {"identifiers": ["%shelly_mac%-C"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-C"}}
topic=%discovery_prefix%/sensor/%shelly_id%-C/retenergy/config
payload={"name": "%shelly_id% Phase C Total Returned Energy", "stat_t": "~status/emdata:0", "enabled_by_default": true, "uniq_id": "%shelly_id%-C-retenergy", "qos": 0, "~": "%shelly_topic%/", "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{ value_json.c_total_act_ret_energy|round(2) }}", "device": {"identifiers": ["%shelly_mac%-C"],"manufacturer": "Shelly","model": "%shelly_model%","name": "%shelly_id%-C"}}

0 comments on commit 1ca89c6

Please sign in to comment.