Skip to content

fixed GetMeterReadingsAsync decode error#2

Open
derekwilson wants to merge 1 commit into
RobThree:masterfrom
derekwilson:fix/GetMeterReadingsAsync-decode-error
Open

fixed GetMeterReadingsAsync decode error#2
derekwilson wants to merge 1 commit into
RobThree:masterfrom
derekwilson:fix/GetMeterReadingsAsync-decode-error

Conversation

@derekwilson
Copy link
Copy Markdown

After an update to the Envoy gateway in early May 2026 it appear that the timestamp for the meter readings is now a decimal value rather than an integer.

The test app was throwing this error

 ---> System.FormatException: One of the identified items was in an invalid format.
   at NEnvoy.Internals.Converters.IntTimestampDateTimeOffsetJsonConverter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) in D:\xfer\code\NEnvoy\NEnvoy\Internals\Converters\IntTimestampDateTimeOffsetJsonConverter.cs:line 15

from this line

var meterreadings = await client.GetMeterReadingsAsync().ConfigureAwait(false);

This change just decodes the timestamp as a decimal, my understanding is that this should also work with the old int format as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant