Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tmjo/charger-card
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.9
Choose a base ref
...
head repository: tmjo/charger-card
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on May 2, 2021

  1. Update en.json

    Add more "reason_for_no_current" for charger substatus.
    tmjo committed May 2, 2021
    Copy the full SHA
    6328f66 View commit details
  2. Minor changes

    - Move stats css to method
    - Fix reason for no current not showing if not translated, will now show default state if translation is not available.
    tmjo committed May 2, 2021
    Copy the full SHA
    1ae63ed View commit details
  3. Update styles.js

    Try to fix some css bummers.
    tmjo committed May 2, 2021
    Copy the full SHA
    a711527 View commit details
  4. Bump

    tmjo committed May 2, 2021
    Copy the full SHA
    0885e46 View commit details

Commits on May 11, 2021

  1. Update package-lock.json

    Update to fix vulnerability in lodash
    tmjo committed May 11, 2021
    Copy the full SHA
    b4fb3b0 View commit details
  2. Update dependencies

    npm update
    tmjo committed May 11, 2021
    Copy the full SHA
    4b64d4b View commit details
  3. Revert "Update dependencies"

    This reverts commit 4b64d4b.
    tmjo committed May 11, 2021
    Copy the full SHA
    75a70c9 View commit details
  4. Bump

    tmjo committed May 11, 2021
    Copy the full SHA
    2dd196c View commit details

Commits on Jul 28, 2021

  1. German translation added

    DeerMaximum authored and DeerMaximum committed Jul 28, 2021
    Copy the full SHA
    b2eab99 View commit details
  2. Added translation to README

    DeerMaximum authored and DeerMaximum committed Jul 28, 2021
    Copy the full SHA
    6eca59e View commit details

Commits on Aug 1, 2021

  1. Update package-lock.json

    tmjo committed Aug 1, 2021
    Copy the full SHA
    3c021aa View commit details
  2. Merge pull request #11 from DeerMaximum/master

    Translation: German
    tmjo authored Aug 1, 2021
    Copy the full SHA
    8fc5d2d View commit details
  3. Copy the full SHA
    8341ded View commit details
  4. Bump

    tmjo committed Aug 1, 2021
    Copy the full SHA
    464388b View commit details

Commits on Oct 23, 2021

  1. Add Danish translation

    dykandDK authored Oct 23, 2021
    Copy the full SHA
    492bbfa View commit details
  2. Add Danish translation

    dykandDK authored Oct 23, 2021
    Copy the full SHA
    169496a View commit details
  3. Add Danish translation

    Added information about Danish translation and updated HACS installation instructions.
    dykandDK authored Oct 23, 2021
    Copy the full SHA
    33a9acd View commit details

Commits on Nov 9, 2021

  1. fix for missing actions toolbar

    Svetoslav Batchovski committed Nov 9, 2021
    Copy the full SHA
    b364ee5 View commit details
  2. Merge pull request #13 from dykandDK/master

    Added Danish translation
    tmjo authored Nov 9, 2021
    Copy the full SHA
    a4d502c View commit details
  3. Merge pull request #15 from sveba/master

    fix for missing actions toolbar
    tmjo authored Nov 9, 2021
    Copy the full SHA
    a800c40 View commit details
  4. Update package-lock.json

    tmjo committed Nov 9, 2021
    Copy the full SHA
    17feb19 View commit details
  5. Bump

    tmjo committed Nov 9, 2021
    Copy the full SHA
    2057fc0 View commit details

Commits on Nov 16, 2021

  1. Copy the full SHA
    b9762d1 View commit details
  2. Copy the full SHA
    96c6ef5 View commit details
  3. Copy the full SHA
    a324cd3 View commit details
  4. Copy the full SHA
    5123ce7 View commit details

Commits on Nov 17, 2021

  1. Copy the full SHA
    adac1c7 View commit details

Commits on Nov 19, 2021

  1. Merge pull request #17 from gerardag/master

    feat: added translations for Catalan
    tmjo authored Nov 19, 2021
    Copy the full SHA
    2e1f6a3 View commit details
  2. Updated dependencies

    tmjo committed Nov 19, 2021
    Copy the full SHA
    027567d View commit details
  3. Bump

    tmjo committed Nov 19, 2021
    Copy the full SHA
    cda5818 View commit details

Commits on Nov 21, 2021

  1. Modify editor

    tmjo committed Nov 21, 2021
    Copy the full SHA
    cc0dfc1 View commit details

Commits on Nov 22, 2021

  1. fix: fix attribute access in getEntityAttribute

    The getEntityAttributes is already returning the attributes dict.
    alandtse committed Nov 22, 2021
    Copy the full SHA
    d2e1d00 View commit details
  2. some fix

    tmjo committed Nov 22, 2021
    Copy the full SHA
    dc96fb5 View commit details

Commits on Dec 15, 2021

  1. complete rewrite

    tmjo committed Dec 15, 2021
    Copy the full SHA
    7e53583 View commit details

Commits on Dec 16, 2021

  1. fixes

    tmjo committed Dec 16, 2021
    Copy the full SHA
    acfe890 View commit details
  2. Fix icon margins

    tmjo committed Dec 16, 2021
    Copy the full SHA
    e0dfa22 View commit details
  3. Return string if not found

    tmjo committed Dec 16, 2021
    Copy the full SHA
    b4ebe8a View commit details
  4. fixes

    tmjo committed Dec 16, 2021
    Copy the full SHA
    13c9ee2 View commit details
  5. fixes

    tmjo committed Dec 16, 2021
    Copy the full SHA
    d66d412 View commit details
  6. Update README.md

    tmjo committed Dec 16, 2021
    Copy the full SHA
    02ceed2 View commit details
  7. Update const_easee.js

    tmjo committed Dec 16, 2021
    Copy the full SHA
    d80441f View commit details

Commits on Dec 17, 2021

  1. conditional

    tmjo committed Dec 17, 2021
    Copy the full SHA
    0061c27 View commit details
  2. fixes

    tmjo committed Dec 17, 2021
    Copy the full SHA
    3239673 View commit details
  3. Update package-lock.json

    tmjo committed Dec 17, 2021
    Copy the full SHA
    d10301e View commit details
  4. Update charger-card-editor.js

    tmjo committed Dec 17, 2021
    Copy the full SHA
    d7395df View commit details
  5. Update README.md

    tmjo committed Dec 17, 2021
    Copy the full SHA
    cd7286d View commit details
  6. Update charger-card.js

    tmjo committed Dec 17, 2021
    Copy the full SHA
    4ca1da1 View commit details
  7. fixes

    tmjo committed Dec 17, 2021
    Copy the full SHA
    dd04b38 View commit details
  8. Update charger-card-editor.js

    tmjo committed Dec 17, 2021
    Copy the full SHA
    132a6b5 View commit details

Commits on Dec 18, 2021

  1. Update localize.js

    tmjo committed Dec 18, 2021
    Copy the full SHA
    efd1682 View commit details
Showing with 15,446 additions and 5,152 deletions.
  1. +4 −0 .devcontainer/configuration.yaml
  2. +32 −0 .devcontainer/devcontainer.json
  3. +9 −0 .devcontainer/ui-lovelace.yaml
  4. +14 −0 .eslintrc.js
  5. +0 −13 .eslintrc.json
  6. +2 −0 .gitattributes
  7. +1 −0 .github/FUNDING.yml
  8. +42 −0 .github/ISSUE_TEMPLATE/bug_report.md
  9. +19 −0 .github/ISSUE_TEMPLATE/feature_request.md
  10. +20 −0 .github/workflows/build.yml
  11. +30 −0 .github/workflows/release.yml
  12. +4 −3 .gitignore
  13. +7 −0 .prettierrc.js
  14. +0 −3 .prettierrc.json
  15. +13 −0 .vscode/extensions.json
  16. +12 −0 .vscode/tasks.json
  17. +0 −76 CODE_OF_CONDUCT.md
  18. +14 −9 CONTRIBUTING.md
  19. +1 −1 LICENSE.md → LICENSE
  20. +445 −82 README.md
  21. +10 −0 elements/formfield.js
  22. +8 −0 elements/ignore/select.js
  23. +1 −0 elements/ignore/switch.js
  24. +1 −0 elements/ignore/textfield.js
  25. +53 −0 elements/select.js
  26. +17 −0 elements/switch.js
  27. +18 −0 elements/textfield.js
  28. +3 −3 hacs.json
  29. +4,535 −2,450 package-lock.json
  30. +49 −40 package.json
  31. +24 −0 rollup-plugins/ignore.js
  32. +43 −0 rollup.config.dev.js
  33. +41 −26 rollup.config.js
  34. +197 −0 src/action-handler-directive.ts
  35. +0 −308 src/charger-card-editor.js
  36. +0 −1,299 src/charger-card.js
  37. +1,057 −0 src/charger-card.ts
  38. +0 −134 src/const.js
  39. +86 −0 src/const.ts
  40. +448 −0 src/editor.ts
  41. +28 −0 src/index.d.ts
  42. +24 −0 src/internals.ts
  43. +0 −52 src/localize.js
  44. +124 −0 src/localize/languages/ca.json
  45. +123 −0 src/localize/languages/da.json
  46. +183 −0 src/localize/languages/de.json
  47. +189 −0 src/localize/languages/en-GB.json
  48. +189 −0 src/localize/languages/en.json
  49. +189 −0 src/localize/languages/fr.json
  50. +171 −0 src/localize/languages/nb.json
  51. +190 −0 src/localize/languages/nl.json
  52. +118 −0 src/localize/languages/sv.json
  53. +73 −0 src/localize/localize.ts
  54. +238 −446 src/styles.js
  55. +509 −0 src/templates/const_easee.ts
  56. +383 −0 src/templates/const_ocpp.ts
  57. +268 −0 src/templates/const_openevse.ts
  58. +552 −0 src/templates/const_template.ts
  59. +207 −0 src/templates/const_tesla_custom.ts
  60. +288 −0 src/templates/const_vwegolf.ts
  61. +270 −0 src/templates/const_wallbox.ts
  62. +552 −0 src/templates/const_zaptec.ts
  63. +0 −69 src/translations/en.json
  64. +0 −69 src/translations/nb.json
  65. +0 −69 src/translations/sv.json
  66. +93 −0 src/types.ts
  67. +22 −0 tsconfig.json
  68. +3,203 −0 yarn.lock
4 changes: 4 additions & 0 deletions .devcontainer/configuration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
default_config:
lovelace:
mode: yaml
demo:
32 changes: 32 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"name": "Charger Card Development",
"image": "ludeeus/container:monster",
"context": "..",
"appPort": ["5000:5000", "9123:8123"],
"postCreateCommand": "npm install",
"runArgs": [
"-v",
"${env:HOME}${env:USERPROFILE}/.ssh:/tmp/.ssh" // This is added so you can push from inside the container
],
"extensions": [
"github.vscode-pull-request-github",
"eamodio.gitlens",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"bierner.lit-html",
"runem.lit-plugin",
"auchenberg.vscode-browser-preview",
"davidanson.vscode-markdownlint",
"redhat.vscode-yaml"
],
"settings": {
"files.eol": "\n",
"editor.tabSize": 4,
"terminal.integrated.shell.linux": "/bin/bash",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true
}
}
9 changes: 9 additions & 0 deletions .devcontainer/ui-lovelace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
resources:
- url: http://127.0.0.1:5000/charger-card.js
type: module
views:
- cards:
- type: custom:charger-card
name: Charger Card Development
entity: sun.sun
test_gui: true
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
parserOptions: {
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: "module" // Allows for the use of imports
},
extends: [
"plugin:@typescript-eslint/recommended" // Uses the recommended rules from the @typescript-eslint/eslint-plugin
],
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
}
};
13 changes: 0 additions & 13 deletions .eslintrc.json

This file was deleted.

2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [tmjo]
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---

<!-- READ THIS FIRST:
- If you need additional help with this template please refer to https://www.home-assistant.io/help/reporting_issues/
- Make sure you are running the latest version of Home Assistant before reporting an issue: https://github.com/home-assistant/home-assistant/releases
- Provide as many details as possible. Do not delete any text from this template!
-->

**Checklist:**

- [ ] I updated to the latest version available
- [ ] I cleared the cache of my browser

**Release with the issue:**

**Last working release (if known):**

**Browser and Operating System:**

<!--
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.
-->

**Description of problem:**

<!--
Explain what the issue is, and how things should look/behave. If possible provide a screenshot with a description.
-->

**Javascript errors shown in the web inspector (if applicable):**

```
```

**Additional information:**
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature request
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# name: 'Build'

# on:
# push:
# branches:
# - master
# pull_request:
# branches:
# - master

# jobs:
# build:
# name: Test build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - name: Build
# run: |
# npm install
# npm run build
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# name: Release

# on:
# release:
# types: [published]

# jobs:
# release:
# name: Prepare release
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1

# # Build
# - name: Build the file
# run: |
# cd /home/runner/work/charger-card/charger-card
# npm install
# npm run build

# # Upload build file to the releas as an asset.
# - name: Upload zip to release
# uses: svenstaro/upload-release-action@v1-release

# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: /home/runner/work/charger-card/charger-card/dist/charger-card.js
# asset_name: charger-card.js
# tag: ${{ github.ref }}
# overwrite: true
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
yarn.lock
/node_modules/
/.rpt2_cache/
package-lock.json
/dist
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: true,
printWidth: 120,
tabWidth: 2,
};
3 changes: 0 additions & 3 deletions .prettierrc.json

This file was deleted.

13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"recommendations": [
"github.vscode-pull-request-github",
"eamodio.gitlens",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"bierner.lit-html",
"runem.lit-plugin",
"auchenberg.vscode-browser-preview",
"davidanson.vscode-markdownlint",
"redhat.vscode-yaml"
]
}
12 changes: 12 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start",
"problemMatcher": [],
"label": "npm: start",
"detail": "rollup -c --watch"
}
]
}
76 changes: 0 additions & 76 deletions CODE_OF_CONDUCT.md

This file was deleted.

23 changes: 14 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
# Contributing

If you plan to contribute back to this repo, please fork & open a PR.


## How to add a brand
See Wiki on [how to add a brand](https://github.com/tmjo/charger-card/wiki/How-to-add-template-for-new-brand). Follow the instructions and open a PR. If you do not have the knowledge to do all this, please join up with some fellow charger friends that share your needs and do it together.


## How to add translation

Only native speaker can translate to specific language.
Only native speaker should translate to specific language.

1. Copy `src/translations/en.json` file and name it with appropriate language code.
1. Copy `src/localize/languages/en.json` file and name it with appropriate language code.
2. Translate only keys in this file, not values.
3. Import your translation in `src/localize.js` file.
4. Mention your translation in `README.md` file.
5. Open a PR.
6. Find someone to check and approve your PR.
3. Import your translation in `src/localize/localize.ts` file and add it to _const languages_. Both are at the top of the file, see how others did it.
4. Mention your translation in `README.md` file under translations.
5. Test that everything works fine!
6. Open a PR.

## How to run locally

1. Clone this repo to wherever you want:
1. Clone this repo to wherever you want (typically to the config/www folder of HA or your HA dev container)
```sh
git clone https://github.com/tmjo/charger-card.git
```

2. Go into the repo folder:
```sh
cd charger-card
@@ -34,3 +38,4 @@ Only native speaker can translate to specific language.
5. Add `http://localhost:5000/charger-card.js` to your Lovelace resources.

Now you can make changes to files in `src` folder. Development server will automatically rebuild on changes. Lovelace will load resource from development server. Refresh the browser to see changes. Make sure cache is cleared or disabled.

2 changes: 1 addition & 1 deletion LICENSE.md → LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Custom cards for Home Assistant
Copyright (c) 2020 Custom cards for Home Assistant

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Loading