evcc-io/meter/homematic/types.go
Markus Thierolf 5332148fc1
Some checks failed
Release / call-build-workflow (push) Has been cancelled
Release / Publish Docker :release (push) Has been cancelled
Release / Publish Github & APT release (push) Has been cancelled
Add Homematic pluggable switch (#3758)
2022-07-07 22:56:18 +02:00

27 lines
743 B
Go

package homematic
import (
"encoding/xml"
)
// Homematic CCU XML-RPC types
// https://homematic-ip.com/sites/default/files/downloads/HM_XmlRpc_API.pdf
// https://homematic-ip.com/sites/default/files/downloads/HMIP_XmlRpc_API_Addendum.pdf
type Param struct {
CCUBool string `xml:"value>boolean,omitempty"`
CCUFloat float64 `xml:"value>double,omitempty"`
CCUInt int64 `xml:"value>i4,omitempty"`
CCUString string `xml:"value>string,omitempty"`
}
type MethodCall struct {
XMLName xml.Name `xml:"methodCall"`
MethodName string `xml:"methodName"`
Params []Param `xml:"params>param,omitempty"`
}
type MethodResponse struct {
XMLName xml.Name `xml:"methodResponse"`
Value Param `xml:"params>param,omitempty"`
}