Skip to content

Commit

Permalink
Updated pacakges to last version. Made README.md more clear.
Browse files Browse the repository at this point in the history
  • Loading branch information
guyluz11 committed Jan 20, 2023
1 parent db50cc1 commit 9ef1c2b
Show file tree
Hide file tree
Showing 3 changed files with 794 additions and 925 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ $ npm i esphome-native-api
const { Client } = require('esphome-native-api');
const client = new Client({
host: '<esp host or ip>',
port: 6053
port: 6053,
// password: '', // Insert password if you have any
});

client.connect();
Expand All @@ -27,7 +28,7 @@ client.on('newEntity', entity => {
console.log('New entity:', entity);

// enable light
if (entity.name === 'Light') {
if (entity.type === 'Light') {
entity.setState(true);
}
});
Expand Down
Loading

0 comments on commit 9ef1c2b

Please sign in to comment.