Skip to content
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// TODO: look into making the mounts compatible with container volumes to work without a local repo
{
"image": "thomasloven/hass-custom-devcontainer",
"onCreateCommand": "sudo chown -R vscode:nvm /usr/local/share/nvm && npm install -g pnpm",
"onCreateCommand": "sudo chown -R vscode:nvm /usr/local/share/nvm && npm install -g pnpm@7.33.6",
"postCreateCommand": "sudo -E container setup && pip install --upgrade homeassistant && pnpm config set store-dir $XDG_DATA_HOME && pnpm install",
"forwardPorts": [8123, 5173],
"mounts": [
Expand Down
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["bug"]
assignees:
- kinghat
body:
- type: markdown
attributes:
value: |
# Prerequisites
1. Check if your [issue](https://github.com/kinghat/tabbed-card/issues) has already been reported.
2. Be reasonably sure your issue is with `tabbed-card` specifically and not another component or home assistant itself.
- type: textarea
id: description
attributes:
label: Description
description: A clear description of what the bug is, steps taken to produce the bug, and what the expected outcome should be. Include screenshots and video for clarity.
validations:
required: true
- type: textarea
id: environment
attributes:
label: Environment
description: What is the operating environemnt where the bug is occurring?
value: |
- OS: [e.g. iOS, Linux]
- Browser: [e.g. chrome, safari]
- Home Assistant Version: [e.g. 2023.9.0]
- Tabbed Card Version: [e.g. 0.3.2]
render: Markdown
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Reproducible configuration
description: Provide a minimal reproducible configuration of your card that demonstrates the bug.
placeholder: |
type: custom:tabbed-card
tabs:
- card:
type: entity
entity: sun.sun
attributes:
label: Sun
render: YAML
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional context
description: Add any other information about the problem here.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Feature Requests
url: https://github.com/kinghat/tabbed-card/discussions/new?category=feature-requests
about: Submit feature requests to our discussion forum.
- name: Help
url: https://github.com/kinghat/tabbed-card/discussions/new?category=q-a
about: Area designated for help iquiries.
10 changes: 9 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"task.allowAutomaticTasks": "on",
"conventionalCommits.scopes": ["editor", "package", "vscode", "devcontainer"]
"conventionalCommits.scopes": [
"editor",
"package",
"vscode",
"devcontainer",
"tabs",
"component",
"repo"
]
}
4 changes: 3 additions & 1 deletion src/tabbed-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ export class TabbedCard extends LitElement {

private async loadCardHelpers() {
this._helpers = await (window as any).loadCardHelpers();

if (!customElements.get("mwc-tab-bar")) this._helpers.importMoreInfoControl("weather")
}

static async getConfigElement(): Promise<LovelaceCardEditor> {
Expand All @@ -70,7 +72,7 @@ export class TabbedCard extends LitElement {
static getStubConfig() {
return {
options: {},
tabs: [{ label: "Sun", card: { type: "entity", entity: "sun.sun" } }],
tabs: [{ card: { type: "entity", entity: "sun.sun" }, attributes: { label: "Sun" } }],
};
}

Expand Down