func (v *Value) Num() (ret float64) {
	ret, _ = strconv.ParseFloat(v.Value, 64)
	return
}
Num returns the numerical value of this value. If the value is not
a numerical one, 0 is returned.
package vitotrol
import (
	"fmt"
	"strconv"
)
type AttrID uint16
const (
	IndoorTemp             AttrID = 5367    
	OutdoorTemp            AttrID = 5373    
	SmokeTemp              AttrID = 5372    
	BoilerTemp             AttrID = 5374    
	HotWaterTemp           AttrID = 5381    
	HotWaterOutTemp        AttrID = 5382    
	HeatWaterOutTemp       AttrID = 6052    
	HeatNormalTemp         AttrID = 82      
	PartyModeTemp          AttrID = 79      
	HeatReducedTemp        AttrID = 85      
	HotWaterSetpointTemp   AttrID = 51      
	BurnerHoursRun         AttrID = 104     
	BurnerHoursRunReset    AttrID = 106     
	BurnerState            AttrID = 600     
	BurnerStarts           AttrID = 111     
	InternalPumpStatus     AttrID = 245     
	HeatingPumpStatus      AttrID = 729     
	CirculationPumpState   AttrID = 7181    
	PartyMode              AttrID = 7855    
	EnergySavingMode       AttrID = 7852    
	DateTime               AttrID = 5385    
	CurrentError           AttrID = 7184    
	HolidaysStart          AttrID = 306     
	HolidaysEnd            AttrID = 309     
	HolidaysStatus         AttrID = 714     
	Way3ValveStatus        AttrID = 5389    
	OperatingModeRequested AttrID = 92      
	OperatingModeCurrent   AttrID = 708     
	FrostProtectionStatus  AttrID = 717     
	NoAttr                 AttrID = 0xffff  
)
type AttrAccess uint8
const (
	ReadOnly AttrAccess = 1 << iota
	WriteOnly
	ReadWrite AttrAccess = ReadOnly | WriteOnly
)
var AccessToStr = map[AttrAccess]string{
	ReadOnly:  "read-only",
	WriteOnly: "write-only",
	ReadWrite: "read/write",
}
type AttrRef struct {
	Type   VitodataType
	Access AttrAccess
	Name   string
	Doc    string
	Custom bool
}
func (r *AttrRef) String() string {
	return fmt.Sprintf("%s: %s (%s - %s)",
		r.Name, r.Doc, r.Type.Type(), AccessToStr[r.Access])
}
var AttributesRef = map[AttrID]*AttrRef{
	IndoorTemp: {
		Type:   TypeDouble,
		Access: ReadOnly,
		Doc:    "Indoor temperature",
		Name:   "IndoorTemp",
	},
	OutdoorTemp: {
		Type:   TypeDouble,
		Access: ReadOnly,
		Doc:    "Outdoor temperature",
		Name:   "OutdoorTemp",
	},
	SmokeTemp: {
		Type:   TypeDouble,
		Access: ReadOnly,
		Doc:    "Smoke temperature",
		Name:   "SmokeTemp",
	},
	BoilerTemp: {
		Type:   TypeDouble,
		Access: ReadOnly,
		Doc:    "Boiler temperature",
		Name:   "BoilerTemp",
	},
	HotWaterTemp: {
		Type:   TypeDouble,
		Access: ReadOnly,
		Doc:    "Hot water temperature",
		Name:   "HotWaterTemp",
	},
	HotWaterOutTemp: {
		Type:   TypeDouble,
		Access: ReadOnly,
		Doc:    "Hot water outlet temperature",
		Name:   "HotWaterOutTemp",
	},
	HeatWaterOutTemp: {
		Type:   TypeDouble,
		Access: ReadOnly,
		Doc:    "Heating water outlet temperature",
		Name:   "HeatWaterOutTemp",
	},
	HeatNormalTemp: {
		Type:   TypeDouble,
		Access: ReadWrite,
		Doc:    "Setpoint of the normal room temperature",
		Name:   "HeatNormalTemp",
	},
	PartyModeTemp: {
		Type:   TypeDouble,
		Access: ReadWrite,
		Doc:    "Party mode temperature",
		Name:   "PartyModeTemp",
	},
	HeatReducedTemp: {
		Type:   TypeDouble,
		Access: ReadWrite,
		Doc:    "Setpoint of the reduced room temperature",
		Name:   "HeatReducedTemp",
	},
	HotWaterSetpointTemp: {
		Type:   TypeDouble,
		Access: ReadWrite,
		Doc:    "Setpoint of the domestic hot water temperature",
		Name:   "HotWaterSetpointTemp",
	},
	BurnerHoursRun: {
		Type:   TypeDouble,
		Access: ReadOnly,
		Doc:    "Burner hours run",
		Name:   "BurnerHoursRun",
	},
	BurnerHoursRunReset: {
		Type:   TypeDouble,
		Access: WriteOnly,
		Doc:    "Reset the burner hours run",
		Name:   "BurnerHoursRunReset",
	},
	BurnerState: {
		Type:   TypeOnOffEnum,
		Access: ReadOnly,
		Doc:    "Burner status",
		Name:   "BurnerState",
	},
	BurnerStarts: {
		Type:   TypeDouble,
		Access: ReadWrite,
		Doc:    "Burner starts",
		Name:   "BurnerStarts",
	},
	InternalPumpStatus: {
		Type: NewEnum([]string{  
			"off",
			"on",
			"off2",
			"on2",
		}),
		Access: ReadOnly,
		Doc:    "Internal pump status",
		Name:   "InternalPumpStatus",
	},
	HeatingPumpStatus: {
		Type:   TypeOnOffEnum,
		Access: ReadOnly,
		Doc:    "Heating pump status",
		Name:   "HeatingPumpStatus",
	},
	CirculationPumpState: {
		Type:   TypeOnOffEnum,
		Access: ReadOnly,
		Doc:    "Statut pompe circulation",
		Name:   "CirculationPumpState",
	},
	PartyMode: {
		Type:   TypeEnabledEnum,
		Access: ReadWrite,
		Doc:    "Party mode status",
		Name:   "PartyMode",
	},
	EnergySavingMode: {
		Type:   TypeEnabledEnum,
		Access: ReadWrite,
		Doc:    "Energy saving mode status",
		Name:   "EnergySavingMode",
	},
	DateTime: {
		Type:   TypeDate,
		Access: ReadWrite,
		Doc:    "Current date and time",
		Name:   "DateTime",
	},
	CurrentError: {
		Type:   TypeString,
		Access: ReadOnly,
		Doc:    "Current error",
		Name:   "CurrentError",
	},
	HolidaysStart: {
		Type:   TypeDate,
		Access: ReadWrite,
		Doc:    "Holidays begin date",
		Name:   "HolidaysStart",
	},
	HolidaysEnd: {
		Type:   TypeDate,
		Access: ReadWrite,
		Doc:    "Holidays end date",
		Name:   "HolidaysEnd",
	},
	HolidaysStatus: {
		Type:   TypeEnabledEnum,
		Access: ReadOnly,
		Doc:    "Holidays program status",
		Name:   "HolidaysStatus",
	},
	Way3ValveStatus: {
		Type: NewEnum([]string{  
			"undefined",
			"heating",
			"middle position",
			"hot water",
		}),
		Access: ReadOnly,
		Doc:    "3-way valve status",
		Name:   "3WayValveStatus",
	},
	OperatingModeRequested: {
		Type: NewEnum([]string{  
			"off",
			"DHW only",
			"heating+DHW",
			"continuous reduced",
			"continuous normal",
		}),
		Access: ReadWrite,
		Doc:    "Operating mode requested",
		Name:   "OperatingModeRequested",
	},
	OperatingModeCurrent: {
		Type: NewEnum([]string{  
			"stand-by",
			"reduced",
			"normal",
			"continuous normal",
		}),
		Access: ReadOnly,
		Doc:    "Operating mode",
		Name:   "OperatingModeCurrent",
	},
	FrostProtectionStatus: {
		Type:   TypeEnabledEnum,
		Access: ReadOnly,
		Doc:    "Frost protection status",
		Name:   "FrostProtectionStatus",
	},
}
func AddAttributeRef(attrID AttrID, ref AttrRef) {
	ref.Custom = true
	AttributesRef[attrID] = &ref
	AttributesNames2IDs = computeNames2IDs()
	Attributes = computeAttributes()
}
func computeNames2IDs() map[string]AttrID {
	ret := make(map[string]AttrID, len(AttributesRef))
	for attrID, pAttrRef := range AttributesRef {
		ret[pAttrRef.Name] = attrID
	}
	return ret
}
func computeAttributes() []AttrID {
	ret := make([]AttrID, 0, len(AttributesRef))
	for attrID := range AttributesRef {
		ret = append(ret, attrID)
	}
	return ret
}
var AttributesNames2IDs = computeNames2IDs()
var Attributes = computeAttributes()
type Value struct {
	Value string
	Time  Time
}