Add HomeKit accessories parser

This commit is contained in:
Alexey Khit
2023-09-12 21:04:55 +03:00
parent 861632f92b
commit e5d8170037
3 changed files with 127 additions and 1 deletions
+2
View File
@@ -93,6 +93,8 @@ func (a *Accessory) GetCharacterByID(iid uint64) *Character {
}
type Service struct {
Desc string `json:"description,omitempty"`
Type string `json:"type"`
IID uint64 `json:"iid"`
Primary bool `json:"primary,omitempty"`
+2 -1
View File
@@ -13,13 +13,14 @@ import (
// Value should be omit for PW
// Value may be empty for PR
type Character struct {
Desc string `json:"description,omitempty"`
IID uint64 `json:"iid"`
Type string `json:"type"`
Format string `json:"format"`
Value any `json:"value,omitempty"`
Perms []string `json:"perms"`
//Descr string `json:"description,omitempty"`
//MaxLen int `json:"maxLen,omitempty"`
//Unit string `json:"unit,omitempty"`
//MinValue any `json:"minValue,omitempty"`