Skip to content

Commit

Permalink
Merge pull request #75 from Jalle19/gen-mismatch
Browse files Browse the repository at this point in the history
Add missing awaits so we can catch errors from parse methods
  • Loading branch information
Jalle19 authored Sep 1, 2024
2 parents 73c7c1d + 242ab5c commit 25808f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sensor/shelly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ export const getSensorData: PowerSensorPollFunction = async (
// Parse the response differently depending on what type of Shelly we're dealing with
switch (sensor.shelly.type as ShellyType) {
case ShellyType.Gen1:
return parseGen1Response(timestamp, circuit, httpResponse)
return await parseGen1Response(timestamp, circuit, httpResponse)
case ShellyType.Gen2PM:
return parseGen2PMResponse(timestamp, circuit, httpResponse)
return await parseGen2PMResponse(timestamp, circuit, httpResponse)
case ShellyType.Gen2EM:
return parseGen2EMResponse(timestamp, circuit, httpResponse)
return await parseGen2EMResponse(timestamp, circuit, httpResponse)
}
} catch (e) {
logError(url, e)
Expand Down

0 comments on commit 25808f8

Please sign in to comment.