Added comment to parseDSMRTimestamp.
Some checks failed
Build Docker image / build (push) Has been cancelled
Some checks failed
Build Docker image / build (push) Has been cancelled
This commit is contained in:
parent
a72897655b
commit
dbb8319752
1 changed files with 10 additions and 0 deletions
10
main.go
10
main.go
|
@ -1,3 +1,4 @@
|
||||||
|
// TODO: Make TimescaleDB optional.
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -245,6 +246,15 @@ func mqttMessageHandler(client mqtt.Client, msg mqtt.Message) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// parseDSMRTimestamp parses the timestamp as emitted by the P1 meter
|
||||||
|
// (YYMMDDhhmmssX, where X is S or W for summer- or wintertime).
|
||||||
|
//
|
||||||
|
// More information:
|
||||||
|
// https://github.com/matthijskooijman/arduino-dsmr/blob/master/README.md
|
||||||
|
// https://srolija.medium.com/gos-summer-time-localization-issues-4c8ab702806b
|
||||||
|
// https://github.com/thomasvnl/P1DSMRReader-ESPHome
|
||||||
|
// https://pkg.go.dev/github.com/mijnverbruik/dsmr#Timestamp.Position
|
||||||
|
// https://pkg.go.dev/github.com/mijnverbruik/dsmr#Timestamp
|
||||||
func parseDSMRTimestamp(t string) (time.Time, error) {
|
func parseDSMRTimestamp(t string) (time.Time, error) {
|
||||||
|
|
||||||
// Extract values from timestamp string
|
// Extract values from timestamp string
|
||||||
|
|
Loading…
Reference in a new issue