Skip to content

Commit

Permalink
Fixed unique ID formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alryaz committed Nov 10, 2020
1 parent 9d4cb7d commit 8b7d68c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/mosoblgaz/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ def name_placeholders(self) -> Mapping[str, str]:
class MOGMeterSensor(MOGEntity):
"""The class for this sensor"""
SENSOR_TYPE = "meter"
UNIQUE_ID_FORMAT = "{sensor_type}_{meter_code}"

def __init__(self, contract: Contract, name_format: str, meter: 'Meter',
default_add: bool = DEFAULT_ADD_METERS):
Expand Down Expand Up @@ -549,6 +550,7 @@ def name_placeholders(self) -> Mapping[str, str]:

class MOGInvoiceSensor(MOGEntity):
SENSOR_TYPE = "invoice"
UNIQUE_ID_FORMAT = "{sensor_type}_{contract_code}_{group_code}"

FRIENDLY_GROUP_NAMES = {
INVOICE_GROUP_VDGO: 'VDGO',
Expand Down

0 comments on commit 8b7d68c

Please sign in to comment.