mtdcr / pysml

Python library for EDL21 smart meters using Smart Message Language (SML)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Release new version

kroimon opened this issue · comments

Hi!

It would be great if you could release a new version on papi to allow the HA integration to be updated. This would make it possible to use the new SML via HTTP feature for the Tibber Pulse bridge.

commented

Thank you for your interest in pysml and sorry for the long delay.

There's now a new release (0.1.0) on pypi.org, but I advise careful testing before applying this update. It contains a known breaking change:

commit e09d9c704fdc98a15a5f3951fce7b25fe8c3fcc1
Author: Andreas Oberritter <obi@saftware.de>
Date:   Fri May 19 20:54:57 2023 +0200

    sml: Format ID according to DIN 43863-5:2012-04
    
    Attention Home Assistant users: This is a breaking change for serial
    numbers below 10000000.
    
    To keep the old unique_id, apply the following patch before upgrading
    pysml:
    
    -        electricity_id = electricity_id.replace(" ", "")
    +        parts = electricity_id.split(" ")
    +        if len(parts) == 4 and len(parts[2]) == 4:
    +            parts[2] = str(int(parts[2]))
    +        electricity_id = "".join(parts)