OpenLEADR / openleadr-python

Python library for OpenADR
https://openleadr.org/docs
Apache License 2.0
133 stars 51 forks source link

Missing dtstart in the report payload #88

Closed 00javad00 closed 2 years ago

00javad00 commented 3 years ago

According to OpenADR 2.0b Profile Specification: Payloads containing a Non-Metadata report MUST include the following optional payload elements: • dtstart • Intervals • reportName – the same value as used as the metadata report from which the report is derived, except for without the METADATA prefix. therefore dtstart must be added to the report payload when it is created or updated. i.e.:

report = objects.Report(created_date_time=datetime.now(timezone.utc),
                        report_name=report_name,
                        dtstart=datetime.now(timezone.utc),
                        duration=report_duration,
                        report_specifier_id=report_specifier_id,
                        data_collection_mode=data_collection_mode)

oadrReport:dtstart element is the start time of the overall report and is inherited by the first interval in the report. If both the oadrReport:dtstart element and interval dtstart element values are present in the payload, then oadrReport:dtstart element MUST equal the dtstart element value of the first interval.

stan-janssen commented 2 years ago

Thanks, should be fixed now.