Skip to content

Commit

Permalink
feat: enhance logging
Browse files Browse the repository at this point in the history
  • Loading branch information
inwaar committed Dec 28, 2024
1 parent 888d21d commit bd9527e
Show file tree
Hide file tree
Showing 9 changed files with 667 additions and 71 deletions.
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Example",
"skipFiles": [
"<node_internals>/**"
],
"program": "${file}",
"env": {
"NODE_ENV": "development"
},
"internalConsoleOptions": "openOnSessionStart"
}
]
}
1 change: 1 addition & 0 deletions example/async-await.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const Gree = require('gree-hvac-client');
const client = new Gree.Client({
host: '192.168.7.60',
autoConnect: false,
poll: false,
});

(async () => {
Expand Down
1 change: 0 additions & 1 deletion example/poll-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const Gree = require('gree-hvac-client');

const client = new Gree.Client({
host: '192.168.7.60',
debug: false,
});

client.on('connect', client => {
Expand Down
3 changes: 1 addition & 2 deletions example/set-properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ const Gree = require('gree-hvac-client');

const client = new Gree.Client({
host: '192.168.7.60',
debug: false,
});

client.on('connect', () => {
client.setProperty(Gree.PROPERTY.lights, Gree.VALUE.lights.off);
client.setProperty(Gree.PROPERTY.lights, Gree.VALUE.lights.on);
});

client.on('success', updatedProperties => {
Expand Down
Loading

0 comments on commit bd9527e

Please sign in to comment.