Support more edl21 devices and sensors (#43603)

* edl21: Handle 1-0:96.50.1*1 and 1-0:96.1.0*255

* edl21: Use 1-0:96.1.0*255 as alternative electricity ID

* edl21: Fix copy-paste error in comments

* edl21: Add active amperage sensors

* edl21: Bump pysml to 0.0.3 to fix format of electricity ID
This commit is contained in:
Andreas Oberritter 2020-12-02 05:50:09 +01:00 committed by GitHub
parent 26892a629d
commit 3efda93875
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 5 deletions

View File

@ -2,6 +2,6 @@
"domain": "edl21", "domain": "edl21",
"name": "EDL21", "name": "EDL21",
"documentation": "https://www.home-assistant.io/integrations/edl21", "documentation": "https://www.home-assistant.io/integrations/edl21",
"requirements": ["pysml==0.0.2"], "requirements": ["pysml==0.0.3"],
"codeowners": ["@mtdcr"] "codeowners": ["@mtdcr"]
} }

View File

@ -77,20 +77,36 @@ class EDL21:
# D=7: Instantaneous value # D=7: Instantaneous value
# E=0: Total # E=0: Total
"1-0:16.7.0*255": "Sum active instantaneous power", "1-0:16.7.0*255": "Sum active instantaneous power",
# C=31: Active amperage L1
# D=7: Instantaneous value
# E=0: Total
"1-0:31.7.0*255": "L1 active instantaneous amperage",
# C=36: Active power L1 # C=36: Active power L1
# D=7: Instantaneous value # D=7: Instantaneous value
# E=0: Total # E=0: Total
"1-0:36.7.0*255": "L1 active instantaneous power", "1-0:36.7.0*255": "L1 active instantaneous power",
# C=56: Active power L1 # C=51: Active amperage L2
# D=7: Instantaneous value
# E=0: Total
"1-0:51.7.0*255": "L2 active instantaneous amperage",
# C=56: Active power L2
# D=7: Instantaneous value # D=7: Instantaneous value
# E=0: Total # E=0: Total
"1-0:56.7.0*255": "L2 active instantaneous power", "1-0:56.7.0*255": "L2 active instantaneous power",
# C=76: Active power L1 # C=71: Active amperage L3
# D=7: Instantaneous value
# E=0: Total
"1-0:71.7.0*255": "L3 active instantaneous amperage",
# C=76: Active power L3
# D=7: Instantaneous value # D=7: Instantaneous value
# E=0: Total # E=0: Total
"1-0:76.7.0*255": "L3 active instantaneous power", "1-0:76.7.0*255": "L3 active instantaneous power",
# C=96: Electricity-related service entries
"1-0:96.1.0*255": "Metering point ID 1",
} }
_OBIS_BLACKLIST = { _OBIS_BLACKLIST = {
# C=96: Electricity-related service entries
"1-0:96.50.1*1", # Manufacturer specific
# A=129: Manufacturer specific # A=129: Manufacturer specific
"129-129:199.130.3*255", # Iskraemeco: Manufacturer "129-129:199.130.3*255", # Iskraemeco: Manufacturer
"129-129:199.130.5*255", # Iskraemeco: Public Key "129-129:199.130.5*255", # Iskraemeco: Public Key
@ -115,7 +131,7 @@ class EDL21:
electricity_id = None electricity_id = None
for telegram in message_body.get("valList", []): for telegram in message_body.get("valList", []):
if telegram.get("objName") == "1-0:0.0.9*255": if telegram.get("objName") in ("1-0:0.0.9*255", "1-0:96.1.0*255"):
electricity_id = telegram.get("value") electricity_id = telegram.get("value")
break break

View File

@ -1692,7 +1692,7 @@ pysmartthings==0.7.6
pysmarty==0.8 pysmarty==0.8
# homeassistant.components.edl21 # homeassistant.components.edl21
pysml==0.0.2 pysml==0.0.3
# homeassistant.components.snmp # homeassistant.components.snmp
pysnmp==4.4.12 pysnmp==4.4.12