Skip to content

Commit bb40ff1

Browse files
committedNov 22, 2020
Initial draft commit for refactoring
1 parent 04f85d2 commit bb40ff1

38 files changed

+4145
-1324
lines changed
 

‎.devcontainer/configuration.yaml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
default_config:
2+
lovelace:
3+
mode: yaml
4+
demo:
5+
climate:
6+
- platform: generic_thermostat
7+
name: test
8+
heater: input_boolean.office_heater
9+
target_sensor: sensor.office_feels_temp
10+
11+
sensor:
12+
- platform: template
13+
sensors:
14+
office_feels_temp:
15+
unit_of_measurement: "°C"
16+
value_template: "17"
17+
18+
input_boolean:
19+
office_ac:
20+
office_heater:

‎.devcontainer/devcontainer.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
2+
{
3+
"name": "Boilerplate Card Development",
4+
"image": "ludeeus/container:monster",
5+
"context": "..",
6+
"appPort": ["5000:5000", "9123:8123"],
7+
"postCreateCommand": "npm install",
8+
"runArgs": [
9+
"-v",
10+
"${env:HOME}${env:USERPROFILE}/.ssh:/tmp/.ssh" // This is added so you can push from inside the container
11+
],
12+
"extensions": [
13+
"github.vscode-pull-request-github",
14+
"eamodio.gitlens",
15+
"dbaeumer.vscode-eslint",
16+
"esbenp.prettier-vscode",
17+
"bierner.lit-html",
18+
"runem.lit-plugin",
19+
"auchenberg.vscode-browser-preview",
20+
"davidanson.vscode-markdownlint",
21+
"redhat.vscode-yaml"
22+
],
23+
"settings": {
24+
"files.eol": "\n",
25+
"editor.tabSize": 4,
26+
"terminal.integrated.shell.linux": "/bin/bash",
27+
"editor.formatOnPaste": false,
28+
"editor.formatOnSave": true,
29+
"editor.formatOnType": true,
30+
"files.trimTrailingWhitespace": true
31+
}
32+
}

‎.devcontainer/ui-lovelace.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
resources:
2+
- url: http://127.0.0.1:5000/thermostat-dark-card.js
3+
type: module
4+
views:
5+
- cards:
6+
- type: custom:thermostat-dark-card
7+
name: Living
8+
entity: climate.test
9+
test_gui: true

‎.eslintrc.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
3+
parserOptions: {
4+
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
5+
sourceType: "module" // Allows for the use of imports
6+
},
7+
extends: [
8+
"plugin:@typescript-eslint/recommended" // Uses the recommended rules from the @typescript-eslint/eslint-plugin
9+
],
10+
rules: {
11+
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
12+
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
13+
}
14+
};

‎.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [ciotlosm]

‎.github/ISSUE_TEMPLATE/bug_report.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
<!-- READ THIS FIRST:
10+
- If you need additional help with this template please refer to https://www.home-assistant.io/help/reporting_issues/
11+
- Make sure you are running the latest version of Home Assistant before reporting an issue: https://github.com/home-assistant/home-assistant/releases
12+
- Provide as many details as possible. Do not delete any text from this template!
13+
-->
14+
15+
**Checklist:**
16+
17+
- [ ] I updated to the latest version available
18+
- [ ] I cleared the cache of my browser
19+
20+
**Release with the issue:**
21+
22+
**Last working release (if known):**
23+
24+
**Browser and Operating System:**
25+
26+
<!--
27+
Provide details about what browser (and version) you are seeing the issue in. And also which operating system this is on. If possible try to replicate the issue in other browsers and include your findings here.
28+
-->
29+
30+
**Description of problem:**
31+
32+
<!--
33+
Explain what the issue is, and how things should look/behave. If possible provide a screenshot with a description.
34+
-->
35+
36+
**Javascript errors shown in the web inspector (if applicable):**
37+
38+
```
39+
40+
```
41+
42+
**Additional information:**
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: feature request
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

‎.github/workflows/build.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Build'
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
name: Test build
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v1
17+
- name: Build
18+
run: |
19+
npm install
20+
npm run build

‎.github/workflows/release.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
release:
9+
name: Prepare release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
14+
# Build
15+
- name: Build the file
16+
run: |
17+
cd /home/runner/work/lovelace-thermostat-dark-card/lovelace-thermostat-dark-card
18+
npm install
19+
npm run build
20+
21+
# Upload build file to the releas as an asset.
22+
- name: Upload zip to release
23+
uses: svenstaro/upload-release-action@v1-release
24+
25+
with:
26+
repo_token: ${{ secrets.GITHUB_TOKEN }}
27+
file: /home/runner/work/lovelace-thermostat-dark-card/lovelace-thermostat-dark-card/dist/thermostat-dark-card.js
28+
asset_name: thermostat-dark-card.js
29+
tag: ${{ github.ref }}
30+
overwrite: true

‎.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/node_modules/
2+
/.rpt2_cache/
3+
package-lock.json
4+
/dist
5+
.DS_Store

‎.prettierrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
semi: true,
3+
trailingComma: 'all',
4+
singleQuote: true,
5+
printWidth: 120,
6+
tabWidth: 2,
7+
};

‎.vscode/extensions.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"recommendations": [
3+
"github.vscode-pull-request-github",
4+
"eamodio.gitlens",
5+
"dbaeumer.vscode-eslint",
6+
"esbenp.prettier-vscode",
7+
"bierner.lit-html",
8+
"runem.lit-plugin",
9+
"auchenberg.vscode-browser-preview",
10+
"davidanson.vscode-markdownlint",
11+
"redhat.vscode-yaml"
12+
]
13+
}

‎.vscode/launch.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "pwa-chrome",
9+
"request": "launch",
10+
"name": "Launch Chrome against localhost",
11+
"url": "http://localhost:8080",
12+
"webRoot": "${workspaceFolder}"
13+
}
14+
]
15+
}

‎.vscode/tasks.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "start",
7+
"problemMatcher": [],
8+
"label": "npm: start",
9+
"detail": "rollup -c --watch"
10+
}
11+
]
12+
}

0 commit comments

Comments
 (0)
Please sign in to comment.