Skip to content

Commit

Permalink
Update Invalid rename message format expected to be proper json (Koen…
Browse files Browse the repository at this point in the history
…kk#3397)

* Update Invalid rename message format expected to be proper json

The example in the 'Invalid rename message format expected' error message, was not proper JSON and missing the last string end

* Updates

Co-authored-by: Koen Kanters <[email protected]>
  • Loading branch information
pkolmann and Koenkk authored Apr 20, 2020
1 parent c0ed4aa commit e1f9a39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.associations": {
"*.yaml": "home-assistant"
}
}
3 changes: 2 additions & 1 deletion lib/extension/legacy/bridgeLegacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ class BridgeLegacy extends Extension {
}

rename(topic, message) {
const invalid = `Invalid rename message format expected {old: 'friendly_name', new: 'new_name} got ${message}`;
const invalid =
`Invalid rename message format expected {"old": "friendly_name", "new": "new_name"} got ${message}`;

let json = null;
try {
Expand Down

0 comments on commit e1f9a39

Please sign in to comment.