mirror of
https://github.com/Luzifer/tasmota-config.git
synced 2024-12-22 10:41:19 +00:00
Add reader for CurrentCal, PowerCal and VoltageCal
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
c93c521a7a
commit
9ac7aa8c6b
1 changed files with 3 additions and 0 deletions
|
@ -12,13 +12,16 @@ import (
|
|||
type settingExtractor func([]byte) (interface{}, error)
|
||||
|
||||
var extractors = map[string]settingExtractor{
|
||||
"currentcal": func(p []byte) (interface{}, error) { return extractFloatToInt("CurrentCal", p) },
|
||||
"devicename": func(p []byte) (interface{}, error) { return extractGenericJSONValue("DeviceName", p) },
|
||||
"ledstate": func(p []byte) (interface{}, error) { return extractFloatToInt("LedState", p) },
|
||||
"module": extractModule,
|
||||
"otaurl": func(p []byte) (interface{}, error) { return extractGenericJSONValue("OtaUrl", p) },
|
||||
"powercal": func(p []byte) (interface{}, error) { return extractFloatToInt("PowerCal", p) },
|
||||
"teleperiod": func(p []byte) (interface{}, error) { return extractFloatToInt("TelePeriod", p) },
|
||||
"timezone": func(p []byte) (interface{}, error) { return extractGenericJSONValue("Timezone", p) },
|
||||
"topic": func(p []byte) (interface{}, error) { return extractGenericJSONValue("Topic", p) },
|
||||
"voltagecal": func(p []byte) (interface{}, error) { return extractFloatToInt("VoltageCal", p) },
|
||||
}
|
||||
|
||||
func extractSettingValue(setting string, payloadChan chan []byte) (interface{}, error) {
|
||||
|
|
Loading…
Reference in a new issue