issue-51-telegram work in progress

This commit is contained in:
Nigel Dokter 2023-02-11 09:44:54 +01:00
parent 3ae06f88b7
commit eab90e7049
2 changed files with 1 additions and 24 deletions

View File

@ -1,23 +0,0 @@
import unittest
import datetime
import pytz
from dsmr_parser import telegram_specifications
from dsmr_parser import obis_name_mapping
from dsmr_parser import obis_references as obis
from dsmr_parser.objects import CosemObject, MbusDevice
from dsmr_parser.objects import MBusObject
from dsmr_parser.objects import ProfileGenericObject
from dsmr_parser.parsers import TelegramParser
from test.example_telegrams import TELEGRAM_V4_2, TELEGRAM_V5_TWO_MBUS
from decimal import Decimal
class DeviceObjectTest(unittest.TestCase):
def test_tmp(self):
parser = TelegramParser(telegram_specifications.V5)
telegram = parser.parse(TELEGRAM_V5_TWO_MBUS)
# print('val: ', telegram.HOURLY_GAS_METER_READING)
device = MbusDevice()

View File

@ -336,7 +336,7 @@ class TelegramTest(unittest.TestCase):
mbus_device_1 = mbus_devices[0] mbus_device_1 = mbus_devices[0]
self.assertEqual(mbus_device_1.EQUIPMENT_IDENTIFIER_GAS.value, None) self.assertEqual(mbus_device_1.EQUIPMENT_IDENTIFIER_GAS.value, None)
print()
self.assertEqual(mbus_device_1.HOURLY_GAS_METER_READING.value, Decimal('0')) self.assertEqual(mbus_device_1.HOURLY_GAS_METER_READING.value, Decimal('0'))
mbus_device_2 = mbus_devices[1] mbus_device_2 = mbus_devices[1]