Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

home-assistant-js-websocket

Package Overview
Dependencies
Maintainers
2
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

home-assistant-js-websocket - npm Package Compare versions

Comparing version 6.1.0 to 6.1.1

12

dist/entities.js

@@ -38,2 +38,5 @@ import { getCollection } from "./collection.js";

const { "+": toAdd, "-": toRemove } = updates.c[entityId];
const attributesChanged = (toAdd === null || toAdd === void 0 ? void 0 : toAdd.a) || (toRemove === null || toRemove === void 0 ? void 0 : toRemove.a);
const attributes = attributesChanged
? Object.assign({}, entityState.attributes) : entityState.attributes;
if (toAdd) {

@@ -58,10 +61,11 @@ if (toAdd.s) {

if (toAdd.a) {
entityState.attributes = Object.assign(Object.assign({}, entityState.attributes), toAdd.a);
Object.assign(attributes, toAdd.a);
}
}
if (toRemove) {
const attributes = Object.assign({}, entityState.attributes);
for (const key in toRemove.a) {
if (toRemove === null || toRemove === void 0 ? void 0 : toRemove.a) {
for (const key of toRemove.a) {
delete attributes[key];
}
}
if (attributesChanged) {
entityState.attributes = attributes;

@@ -68,0 +72,0 @@ }

@@ -932,2 +932,5 @@ (function (global, factory) {

const { "+": toAdd, "-": toRemove } = updates.c[entityId];
const attributesChanged = (toAdd === null || toAdd === void 0 ? void 0 : toAdd.a) || (toRemove === null || toRemove === void 0 ? void 0 : toRemove.a);
const attributes = attributesChanged
? Object.assign({}, entityState.attributes) : entityState.attributes;
if (toAdd) {

@@ -952,10 +955,11 @@ if (toAdd.s) {

if (toAdd.a) {
entityState.attributes = Object.assign(Object.assign({}, entityState.attributes), toAdd.a);
Object.assign(attributes, toAdd.a);
}
}
if (toRemove) {
const attributes = Object.assign({}, entityState.attributes);
for (const key in toRemove.a) {
if (toRemove === null || toRemove === void 0 ? void 0 : toRemove.a) {
for (const key of toRemove.a) {
delete attributes[key];
}
}
if (attributesChanged) {
entityState.attributes = attributes;

@@ -962,0 +966,0 @@ }

@@ -5,3 +5,3 @@ {

"sideEffects": false,
"version": "6.1.0",
"version": "6.1.1",
"description": "Home Assistant websocket client",

@@ -8,0 +8,0 @@ "source": "lib/index.ts",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc