websocket backend + frontend patching.

This commit is contained in:
2023-08-30 22:56:58 +02:00
parent e8b77ae69c
commit 64bb737569
17 changed files with 664 additions and 361 deletions
+2 -2
View File
@@ -155,7 +155,7 @@ func (b *Bridge) RefreshAll() ([]lucifer3.Event, error) {
}
}
if res.Type == "device" {
if res.Type == "device" && !strings.HasPrefix(res.Metadata.Archetype, "bridge") {
hwState, hwEvent := res.GenerateEvent(b.host, resources)
if hwState.SupportFlags == 0 {
continue
@@ -219,7 +219,7 @@ func (b *Bridge) ApplyPatches(date time.Time, resources []ResourceData) (eventLi
for _, resource := range resources {
if resource.Owner != nil && resource.Owner.Kind == "device" {
if parent, ok := mapCopy[resource.Owner.ID]; ok {
if parent, ok := mapCopy[resource.Owner.ID]; ok && !strings.HasPrefix(parent.Metadata.Archetype, "bridge") {
hwState, _ := parent.GenerateEvent(b.host, mapCopy)
eventList = append(eventList, hwState)