Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.37.0 #2744

Merged
merged 26 commits into from
Jul 19, 2023
Merged

v1.37.0 #2744

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a306bb3
Bump ts-loader from 9.4.2 to 9.4.3 in /src/language-service (#2680)
dependabot[bot] May 24, 2023
d25f8c8
Bump ts-loader from 9.4.2 to 9.4.3 (#2678)
dependabot[bot] May 24, 2023
2164c5e
Bump typescript from 5.0.4 to 5.1.3 (#2688)
dependabot[bot] Jun 2, 2023
79ac6ae
Bump typescript from 5.0.4 to 5.1.3 in /src/language-service (#2689)
dependabot[bot] Jun 2, 2023
538d33e
Bump @types/ws from 8.5.4 to 8.5.5 in /src/language-service (#2697)
dependabot[bot] Jun 9, 2023
7dbf702
Bump @types/ws from 8.5.4 to 8.5.5 (#2696)
dependabot[bot] Jun 9, 2023
73b46da
Bump ts-loader from 9.4.3 to 9.4.4 in /src/language-service (#2713)
dependabot[bot] Jun 29, 2023
600ae60
Bump typescript from 5.1.3 to 5.1.6 in /src/language-service (#2714)
dependabot[bot] Jul 3, 2023
928d01b
Bump actions/setup-node from 3.6.0 to 3.7.0 (#2722)
dependabot[bot] Jul 6, 2023
4f614f4
Bump word-wrap from 1.2.3 to 1.2.4 in /src/language-service (#2740)
dependabot[bot] Jul 19, 2023
8ae518b
Bump word-wrap from 1.2.3 to 1.2.4 (#2739)
dependabot[bot] Jul 19, 2023
349a6ed
Bump @types/node from 16.18.31 to 20.4.2 (#2731)
dependabot[bot] Jul 19, 2023
b92cd3b
Bump @types/node from 18.16.3 to 20.4.2 in /src/language-service (#2730)
dependabot[bot] Jul 19, 2023
82c6fe4
Bump semver from 6.3.0 to 6.3.1 (#2725)
dependabot[bot] Jul 19, 2023
a9d697e
Bump typescript-json-schema from 0.56.0 to 0.59.0 (#2735)
dependabot[bot] Jul 19, 2023
caace1f
Bump typescript-json-schema from 0.56.0 to 0.59.0 in /src/language-se…
dependabot[bot] Jul 19, 2023
adedc37
Bump home-assistant-js-websocket from 8.0.1 to 8.2.0 in /src/language…
dependabot[bot] Jul 19, 2023
d25686b
Bump home-assistant-js-websocket from 8.0.1 to 8.2.0 (#2726)
dependabot[bot] Jul 19, 2023
6722ab6
Bump prettier from 2.8.8 to 3.0.0 in /src/language-service (#2721)
dependabot[bot] Jul 19, 2023
74e5257
Fix missing unique_id in tod sensor (#2694)
timme04 Jul 19, 2023
231afcb
Add supports for filter parameter for blueprint selectors (#2729)
piitaya Jul 19, 2023
4b02fd3
Add condition selector (#2738)
piitaya Jul 19, 2023
4055b24
Update webhook trigger with allowed methods and local only (#2741)
frenck Jul 19, 2023
c5d6d4b
Add persistent notification trigger support (#2742)
frenck Jul 19, 2023
77b6551
Add prefix support to the Text selector (#2743)
frenck Jul 19, 2023
f0d483d
Bump version to v1.37.0
frenck Jul 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-language-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@v3

- name: 🏗 Set up NodeJS
uses: actions/setup-node@v3.6.0
uses: actions/setup-node@v3.7.0
with:
node-version: "16"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-vscode-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
uses: actions/checkout@v3

- name: 🏗 Set up NodeJS
uses: actions/setup-node@v3.6.0
uses: actions/setup-node@v3.7.0
with:
node-version: "16"

Expand Down
208 changes: 110 additions & 98 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-home-assistant",
"displayName": "Home Assistant Config Helper",
"description": " Completion for entity-id's in Home Assistant Configurations",
"version": "1.36.0",
"version": "1.37.0",
"preview": false,
"engines": {
"vscode": "^1.45.1"
Expand Down Expand Up @@ -427,27 +427,27 @@
},
"devDependencies": {
"@types/mocha": "10.0.1",
"@types/node": "16.18.31",
"@types/node": "20.4.2",
"@types/request": "2.48.8",
"@types/vscode": "1.45.1",
"@types/ws": "8.5.4",
"@types/ws": "8.5.5",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.8.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.2",
"prettier": "^2.8.8",
"prettier": "^3.0.0",
"rimraf": "5.0.1",
"ts-loader": "^9.4.2",
"ts-loader": "^9.4.3",
"ts-node": "10.9.1",
"typescript": "^5.0.4",
"typescript-json-schema": "0.56.0"
"typescript": "^5.1.3",
"typescript-json-schema": "0.59.0"
},
"dependencies": {
"axios": "^1.4.0",
"bufferutil": "^4.0.7",
"home-assistant-js-websocket": "^8.0.1",
"home-assistant-js-websocket": "^8.2.0",
"utf-8-validate": "^6.0.3",
"vscode-extension-telemetry": "0.4.5",
"vscode-json-languageservice": "3.9.1",
Expand Down
96 changes: 48 additions & 48 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import TelemetryReporter from "vscode-extension-telemetry";

const extensionId = "vscode-home-assistant";
const telemetryVersion = generateVersionString(
vscode.extensions.getExtension(`keesschollaart.${extensionId}`)
vscode.extensions.getExtension(`keesschollaart.${extensionId}`),
);

let reporter: TelemetryReporter;
Expand All @@ -22,14 +22,14 @@ const documentSelector = [
];

export async function activate(
context: vscode.ExtensionContext
context: vscode.ExtensionContext,
): Promise<void> {
console.log("Home Assistant Extension has been activated!");

reporter = new TelemetryReporter(
extensionId,
telemetryVersion,
"ff172110-5bb2-4041-9f31-e157f1efda56"
"ff172110-5bb2-4041-9f31-e157f1efda56",
);

try {
Expand All @@ -43,7 +43,7 @@ export async function activate(
context.extensionPath,
"out",
"server",
"server.js"
"server.js",
);

const debugOptions = { execArgv: ["--nolazy", "--inspect=6003"] };
Expand All @@ -69,7 +69,7 @@ export async function activate(
"home-assistant",
"Home Assistant Language Server",
serverOptions,
clientOptions
clientOptions,
);

// is this really needed?
Expand All @@ -87,30 +87,30 @@ export async function activate(
const goToSettings = "Go to Settings (UI)";
const optionClicked = await vscode.window.showInformationMessage(
"Please configure Home Assistant (search for 'Home Assistant' in settings).",
goToSettings
goToSettings,
);
if (optionClicked === goToSettings) {
await vscode.commands.executeCommand(
"workbench.action.openSettings2"
"workbench.action.openSettings2",
);
}
});
client.onNotification("configuration_check_completed", async (result) => {
if (result && result.result === "valid") {
await vscode.window.showInformationMessage(
"Home Assistant Configuration Checked, result: 'Valid'!"
"Home Assistant Configuration Checked, result: 'Valid'!",
);
} else {
await vscode.window.showErrorMessage(
`Home Assistant Configuration check resulted in an error: ${result.error}`
`Home Assistant Configuration check resulted in an error: ${result.error}`,
);
}
});
let haOutputChannel: vscode.OutputChannel;
client.onNotification("get_eror_log_completed", (result) => {
if (!haOutputChannel) {
haOutputChannel = vscode.window.createOutputChannel(
"Home Assistant Error Log"
"Home Assistant Error Log",
);
}
haOutputChannel.appendLine(result);
Expand All @@ -121,7 +121,7 @@ export async function activate(
client.onNotification("render_template_completed", (result) => {
if (!haTemplateRendererChannel) {
haTemplateRendererChannel = vscode.window.createOutputChannel(
"Home Assistant Template Renderer"
"Home Assistant Template Renderer",
);
}
haTemplateRendererChannel.clear();
Expand All @@ -140,131 +140,131 @@ export async function activate(
new CommandMappings(
"vscode-home-assistant.reloadAll",
"homeassistant",
"reload_all"
"reload_all",
),
new CommandMappings(
"vscode-home-assistant.scriptReload",
"script",
"reload"
"reload",
),
new CommandMappings("vscode-home-assistant.groupReload", "group", "reload"),
new CommandMappings(
"vscode-home-assistant.homeassistantReloadCoreConfig",
"homeassistant",
"reload_core_config"
"reload_core_config",
),
new CommandMappings(
"vscode-home-assistant.homeassistantRestart",
"homeassistant",
"restart"
"restart",
),
new CommandMappings(
"vscode-home-assistant.automationReload",
"automation",
"reload"
"reload",
),
new CommandMappings(
"vscode-home-assistant.conversationReload",
"conversation",
"reload"
"reload",
),
new CommandMappings("vscode-home-assistant.sceneReload", "scene", "reload"),
new CommandMappings(
"vscode-home-assistant.themeReload",
"frontend",
"reload_themes"
"reload_themes",
),
new CommandMappings(
"vscode-home-assistant.homekitReload",
"homekit",
"reload"
"reload",
),
new CommandMappings(
"vscode-home-assistant.filesizeReload",
"filesize",
"reload"
"reload",
),
new CommandMappings(
"vscode-home-assistant.minMaxReload",
"min_max",
"reload"
"reload",
),
new CommandMappings(
"vscode-home-assistant.genericThermostatReload",
"generic_thermostat",
"reload"
"reload",
),
new CommandMappings(
"vscode-home-assistant.genericCameraReload",
"generic",
"reload"
"reload",
),
new CommandMappings("vscode-home-assistant.pingReload", "ping", "reload"),
new CommandMappings("vscode-home-assistant.trendReload", "trend", "reload"),
new CommandMappings(
"vscode-home-assistant.historyStatsReload",
"history_stats",
"reload"
"reload",
),
new CommandMappings(
"vscode-home-assistant.universalReload",
"universal",
"reload"
"reload",
),
new CommandMappings(
"vscode-home-assistant.statisticsReload",
"statistics",
"reload"
"reload",
),
new CommandMappings(
"vscode-home-assistant.filterReload",
"filter",
"reload"
"reload",
),
new CommandMappings("vscode-home-assistant.restReload", "rest", "reload"),
new CommandMappings(
"vscode-home-assistant.commandLineReload",
"command_line",
"reload"
"reload",
),
new CommandMappings(
"vscode-home-assistant.bayesianReload",
"bayesian",
"reload"
"reload",
),
new CommandMappings(
"vscode-home-assistant.telegramReload",
"telegram",
"reload"
"reload",
),
new CommandMappings("vscode-home-assistant.smtpReload", "smtp", "reload"),
new CommandMappings("vscode-home-assistant.mqttReload", "mqtt", "reload"),
new CommandMappings(
"vscode-home-assistant.rpioGpioReload",
"rpi_gpio",
"reload"
"reload",
),
new CommandMappings("vscode-home-assistant.knxReload", "knx", "reload"),
new CommandMappings(
"vscode-home-assistant.templateReload",
"template",
"reload"
"reload",
),
new CommandMappings(
"vscode-home-assistant.customTemplatesReload",
"homeassistant",
"reload_custom_templates"
"reload_custom_templates",
),
new CommandMappings(
"vscode-home-assistant.hassioAddonRestartGitPull",
"hassio",
"addon_restart",
{ addon: "core_git_pull" }
{ addon: "core_git_pull" },
),
new CommandMappings(
"vscode-home-assistant.hassioHostReboot",
"hassio",
"host_reboot"
"host_reboot",
),
];

Expand All @@ -277,9 +277,9 @@ export async function activate(
serviceData: mapping.serviceData,
});
await vscode.window.showInformationMessage(
`Home Assistant service ${mapping.domain}.${mapping.service} called!`
`Home Assistant service ${mapping.domain}.${mapping.service} called!`,
);
})
}),
);
});

Expand All @@ -302,30 +302,30 @@ export async function activate(
domain,
service: "reload",
});
})
}),
);
await vscode.window.showInformationMessage(
"Home Assistant inputs reload called!"
"Home Assistant inputs reload called!",
);
}
)
},
),
);

context.subscriptions.push(
vscode.commands.registerCommand(
"vscode-home-assistant.homeassistantCheckConfig",
async () => {
await client.sendRequest("checkConfig");
}
)
},
),
);
context.subscriptions.push(
vscode.commands.registerCommand(
"vscode-home-assistant.getErrorLog",
async () => {
await client.sendRequest("getErrorLog");
}
)
},
),
);

context.subscriptions.push(
Expand All @@ -335,8 +335,8 @@ export async function activate(
const editor = vscode.window.activeTextEditor;
const selectedText = editor.document.getText(editor.selection);
await client.sendRequest("renderTemplate", { template: selectedText });
}
)
},
),
);

const fileAssociations = vscode.workspace
Expand Down Expand Up @@ -375,6 +375,6 @@ export class CommandMappings {
public service: string,
public serviceData?: {
[key: string]: any;
}
},
) {}
}
Loading