diff --git a/README.rst b/README.rst index 5f0d7d6..11ce600 100644 --- a/README.rst +++ b/README.rst @@ -210,43 +210,40 @@ Accessing the telegrams information as attributes directly: telegram.CURRENT_ELECTRICITY_USAGE.unit Out[5]: 'kW' -The telegram object has an iterator, can be used to find all the elements in the current telegram: +The telegram object has an iterator, can be used to find all the information elements in the current telegram: .. code-block:: python - for attr, value in telegram: - print(attr) - - Out[7]: - P1_MESSAGE_HEADER - P1_MESSAGE_TIMESTAMP - EQUIPMENT_IDENTIFIER - ELECTRICITY_USED_TARIFF_1 - ELECTRICITY_USED_TARIFF_2 - ELECTRICITY_DELIVERED_TARIFF_1 - ELECTRICITY_DELIVERED_TARIFF_2 - ELECTRICITY_ACTIVE_TARIFF - CURRENT_ELECTRICITY_USAGE - CURRENT_ELECTRICITY_DELIVERY - LONG_POWER_FAILURE_COUNT - VOLTAGE_SAG_L1_COUNT - VOLTAGE_SAG_L2_COUNT - VOLTAGE_SAG_L3_COUNT - VOLTAGE_SWELL_L1_COUNT - VOLTAGE_SWELL_L2_COUNT - VOLTAGE_SWELL_L3_COUNT - TEXT_MESSAGE_CODE - TEXT_MESSAGE - DEVICE_TYPE - INSTANTANEOUS_ACTIVE_POWER_L1_POSITIVE - INSTANTANEOUS_ACTIVE_POWER_L2_POSITIVE - INSTANTANEOUS_ACTIVE_POWER_L3_POSITIVE - INSTANTANEOUS_ACTIVE_POWER_L1_NEGATIVE - INSTANTANEOUS_ACTIVE_POWER_L2_NEGATIVE - INSTANTANEOUS_ACTIVE_POWER_L3_NEGATIVE - EQUIPMENT_IDENTIFIER_GAS - HOURLY_GAS_METER_READING - + [attr for attr, value in telegram] + Out[11]: + ['P1_MESSAGE_HEADER', + 'P1_MESSAGE_TIMESTAMP', + 'EQUIPMENT_IDENTIFIER', + 'ELECTRICITY_USED_TARIFF_1', + 'ELECTRICITY_USED_TARIFF_2', + 'ELECTRICITY_DELIVERED_TARIFF_1', + 'ELECTRICITY_DELIVERED_TARIFF_2', + 'ELECTRICITY_ACTIVE_TARIFF', + 'CURRENT_ELECTRICITY_USAGE', + 'CURRENT_ELECTRICITY_DELIVERY', + 'LONG_POWER_FAILURE_COUNT', + 'VOLTAGE_SAG_L1_COUNT', + 'VOLTAGE_SAG_L2_COUNT', + 'VOLTAGE_SAG_L3_COUNT', + 'VOLTAGE_SWELL_L1_COUNT', + 'VOLTAGE_SWELL_L2_COUNT', + 'VOLTAGE_SWELL_L3_COUNT', + 'TEXT_MESSAGE_CODE', + 'TEXT_MESSAGE', + 'DEVICE_TYPE', + 'INSTANTANEOUS_ACTIVE_POWER_L1_POSITIVE', + 'INSTANTANEOUS_ACTIVE_POWER_L2_POSITIVE', + 'INSTANTANEOUS_ACTIVE_POWER_L3_POSITIVE', + 'INSTANTANEOUS_ACTIVE_POWER_L1_NEGATIVE', + 'INSTANTANEOUS_ACTIVE_POWER_L2_NEGATIVE', + 'INSTANTANEOUS_ACTIVE_POWER_L3_NEGATIVE', + 'EQUIPMENT_IDENTIFIER_GAS', + 'HOURLY_GAS_METER_READING'] Installation