mirror of
https://github.com/MickMake/GoSungrow.git
synced 2025-03-26 09:31:43 +01:00
33 lines
1.3 KiB
Go
33 lines
1.3 KiB
Go
package mmMqtt
|
|
|
|
|
|
type Switch struct {
|
|
AvailabilityTopic string `json:"avty_t,omitempty"`
|
|
CommandTopic string `json:"cmd_t"`
|
|
Device Device `json:"dev,omitempty"`
|
|
Icon string `json:"ic,omitempty"`
|
|
JSONAttributesTemplate string `json:"json_attr_tpl,omitempty"`
|
|
JSONAttributesTopic string `json:"json_attr_t,omitempty"`
|
|
Name string `json:"name,omitempty"`
|
|
Optimistic bool `json:"opt,omitempty"`
|
|
PayloadAvailable string `json:"pl_avail,omitempty"`
|
|
PayloadNotAvailable string `json:"pl_not_avail,omitempty"`
|
|
PayloadOff string `json:"pl_off,omitempty"`
|
|
PayloadOn string `json:"pl_on,omitempty"`
|
|
QOS int `json:"qos,omitempty"`
|
|
Retain bool `json:"ret,omitempty"`
|
|
StateOff string `json:"stat_off,omitempty"`
|
|
StateOn string `json:"stat_on,omitempty"`
|
|
StateTopic string `json:"stat_t,omitempty"`
|
|
UniqueID string `json:"uniq_id,omitempty"`
|
|
ValueTemplate string `json:"val_tpl,omitempty"`
|
|
|
|
// CommandFunc func(mqtt.Message, mqtt.Client) `json:"-"`
|
|
// StateFunc func() string `json:"-"`
|
|
//
|
|
// UpdateInterval float64 `json:"-"`
|
|
// ForceUpdateMQTT bool `json:"-"`
|
|
//
|
|
// messageHandler mqtt.MessageHandler
|
|
}
|