FraunhoferIOSB / FROST-Python-Client

Python Client Library for FROST.
GNU Lesser General Public License v3.0
8 stars 8 forks source link

UnitOfMeasurement has no __eq__ operator #33

Open securedimensions opened 5 months ago

securedimensions commented 5 months ago

Description

The comparion of two datastreams fails because the property unitOfMeasurement has no __eq__ operator and so the comparion returns false.

Reproducing the error

import frost_sta_client as fsc

c1 = fsc.UnitOfMeasurement('Celsius', 'C', 'https://qudt.org/vocab/unit/DEG_C')
c2 = fsc.UnitOfMeasurement('Celsius', 'C', 'https://qudt.org/vocab/unit/DEG_C')

if c1 != c2:
    print("unitOfMeasurement are not equal")
else:
    print("unitOfMeasurement are equal")