Socket
Socket
Sign inDemoInstall

syntex-automation

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

syntex-automation - npm Package Compare versions

Comparing version 1.2.0-b23 to 1.2.0-b24

2

package.json
{
"name": "syntex-automation",
"version": "1.2.0-b23",
"version": "1.2.0-b24",
"description": "An automation system for your smart home",

@@ -5,0 +5,0 @@ "main": "main.js",

@@ -146,2 +146,13 @@ const axios = require('axios');

});
this.EventManager.setInputStream('updateAutomation', { source : this, external : true }, () => {
this.loadAutomation().then((success) => {
if(success)
{
this.logger.log('success', 'automation', 'Automation', '%automation_load_success%!');
}
});
});
}

@@ -606,16 +617,39 @@ }

{
if(block.time != null && block.time.begin != null && block.time.begin.includes(':') && block.time.end != null && block.time.end.includes(':'))
if(block.time != null && block.time.includes(':') && block.operation != null)
{
var now = new Date(), begin = new Date(), end = new Date();
begin.setHours(block.time.begin.split(':')[0]);
begin.setMinutes(block.time.begin.split(':')[1]);
begin.setMinutes(0);
begin.setSeconds(0);
begin.setMilliseconds(0);
end.setHours(block.time.end.split(':')[0]);
end.setMinutes(block.time.end.split(':')[1]);
end.setMinutes(0);
end.setSeconds(0);
end.setMilliseconds(0);
if(block.operation == '>')
{
begin.setHours(block.time.split(':')[0]);
begin.setMinutes(block.time.split(':')[1]);
end.setHours(24);
}
if(block.operation == '<')
{
begin.setHours(0);
end.setHours(block.time.split(':')[0]);
end.setMinutes(block.time.split(':')[1]);
}
if(block.operation == '=')
{
begin.setHours(block.time.split(':')[0]);
begin.setMinutes(block.time.split(':')[1]);
end.setHours(block.time.split(':')[0]);
end.setMinutes(parseInt(block.time.split(':')[1]) + 1);
}
if(now.getTime() > begin.getTime()

@@ -628,3 +662,3 @@ && now.getTime() < end.getTime())

if(block.operation != null && block.id != null && block.letters != null && block.state != null)
if(block.id != null && block.letters != null && block.state != null && block.operation != null)
{

@@ -631,0 +665,0 @@ if(block.operation == '>')

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