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

Complete rewrite - generic card #19

Merged
merged 87 commits into from
Mar 12, 2022
Merged
Show file tree
Hide file tree
Changes from 86 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
cc0dfc1
Modify editor
tmjo Nov 21, 2021
dc96fb5
some fix
tmjo Nov 22, 2021
7e53583
complete rewrite
tmjo Dec 15, 2021
acfe890
fixes
tmjo Dec 16, 2021
e0dfa22
Fix icon margins
tmjo Dec 16, 2021
b4ebe8a
Return string if not found
tmjo Dec 16, 2021
13c9ee2
fixes
tmjo Dec 16, 2021
d66d412
fixes
tmjo Dec 16, 2021
02ceed2
Update README.md
tmjo Dec 16, 2021
d80441f
Update const_easee.js
tmjo Dec 16, 2021
0061c27
conditional
tmjo Dec 17, 2021
3239673
fixes
tmjo Dec 17, 2021
d10301e
Update package-lock.json
tmjo Dec 17, 2021
d7395df
Update charger-card-editor.js
tmjo Dec 17, 2021
cd7286d
Update README.md
tmjo Dec 17, 2021
4ca1da1
Update charger-card.js
tmjo Dec 17, 2021
dd04b38
fixes
tmjo Dec 17, 2021
132a6b5
Update charger-card-editor.js
tmjo Dec 17, 2021
efd1682
Update localize.js
tmjo Dec 18, 2021
2e49fc2
Update const.js
tmjo Dec 18, 2021
16a18a2
Update charger-card.js
tmjo Dec 18, 2021
ee93003
Update README.md
tmjo Dec 18, 2021
a610a6c
Temporarily add js-file for testing
tmjo Dec 18, 2021
b29c4df
Update README.md
tmjo Dec 18, 2021
47f26b4
update styles
tmjo Dec 22, 2021
b7ed21c
fix lint
tmjo Dec 22, 2021
10d49de
fix lint
tmjo Dec 22, 2021
0773946
update readme
tmjo Dec 23, 2021
fe73770
update readme
tmjo Dec 23, 2021
c72403e
Update README.md
tmjo Dec 25, 2021
d9aa8ba
Update localize.js
tmjo Dec 25, 2021
1b2b934
update translations en and nb
tmjo Dec 25, 2021
ed3fee1
add vw e-golf
tmjo Dec 25, 2021
d50aaf7
Update charger-card.js
tmjo Dec 25, 2021
74f19fd
improve debugging
tmjo Dec 25, 2021
8e57191
conditional for toolbar buttons
tmjo Dec 26, 2021
dd3c643
Update const_easee.js
tmjo Dec 26, 2021
1affa76
update templates
tmjo Dec 26, 2021
6af52eb
Update charger-card.js
tmjo Dec 26, 2021
9d20f54
Translations
tmjo Dec 26, 2021
e890544
Fix translations for collapsibles
tmjo Dec 26, 2021
a986cad
Update charger-card.js
tmjo Dec 26, 2021
a3b5158
improve translations
tmjo Dec 26, 2021
3e4d996
improvements
tmjo Dec 26, 2021
bde8cdb
dropdown style
tmjo Dec 26, 2021
d042106
Improve replacement tags
tmjo Dec 26, 2021
be714bf
Update charger-card.js
tmjo Dec 27, 2021
010fb85
Update const.js
tmjo Dec 27, 2021
377936c
Update charger-card-editor.js
tmjo Dec 27, 2021
a0eb4af
Add config details
tmjo Dec 27, 2021
d605be3
fix config details
tmjo Dec 27, 2021
deaa9b5
add vw golf
tmjo Dec 27, 2021
e20632d
Update charger-card-editor.js
tmjo Dec 27, 2021
6163098
update vw e-golf
tmjo Dec 27, 2021
6c790b5
Update translations
tmjo Dec 27, 2021
0dfb761
Create en-GB.json
tmjo Dec 27, 2021
8304bb0
Update const_vwegolf.js
tmjo Dec 27, 2021
6882ea7
Update const_vwegolf.js
tmjo Dec 27, 2021
86ba0b8
Update en.json
tmjo Dec 27, 2021
0ed3b04
Temporary js testfile
tmjo Dec 27, 2021
345487b
adjust services
tmjo Dec 27, 2021
be6cfda
units on stats, status, location and name
tmjo Dec 27, 2021
ba5053b
update easee
tmjo Dec 27, 2021
c48513c
update translations
tmjo Dec 27, 2021
11e584c
Update temporary js file
tmjo Dec 27, 2021
bcc6b2b
Update .gitignore
tmjo Dec 28, 2021
31c1f62
Update ca.json
tmjo Dec 28, 2021
4fc89b8
Update da.json
tmjo Dec 28, 2021
a7c24e5
Update de.json
tmjo Dec 28, 2021
8833ce0
Update en.json
tmjo Dec 28, 2021
96c0549
Update nb.json
tmjo Dec 28, 2021
817ca7c
Update sv.json
tmjo Dec 28, 2021
9c17421
Update charger-card-editor.js
tmjo Dec 28, 2021
4353f00
Update readme.md and contributing.md
tmjo Dec 30, 2021
01f5dcd
Update README.md
tmjo Dec 30, 2021
aeebf26
Update README.md
tmjo Dec 30, 2021
017bdb1
Fix name and location units
tmjo Dec 30, 2021
27754dd
Update temp file
tmjo Dec 30, 2021
2211e53
Update charger-card.js
tmjo Dec 30, 2021
de395b3
Update temp file
tmjo Dec 30, 2021
9b9adc3
Update const_template.js
tmjo Dec 31, 2021
ef37193
Update const_easee.js
tmjo Dec 31, 2021
4b7340d
Add openEVSE for testing
tmjo Dec 31, 2021
5f17923
Update temp-file with openEVSE
tmjo Dec 31, 2021
05153c7
Update const_vwegolf.js
tmjo Dec 31, 2021
529d1f0
Merge branch 'master' into complete_rewrite
tmjo Jan 3, 2022
bfb6e56
Remove paper-button after HA2022.3
tmjo Mar 12, 2022
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 .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules
dist
yarn.lock
yarn.lock
28 changes: 22 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,31 @@ If you plan to contribute back to this repo, please fork & open a PR.

## How to add translation

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

1. Copy `src/translations/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.
2. Import your translation in `src/localize.js` file.
3. Mention your translation in `README.md` file.
4. Test it!
5. Open a PR (only language file and readme are allowed).
6. Find someone to check and approve your PR.

## How to add pre-defined `brand`

1. Copy `const_template.js` file and name it with const underscore brand (for instance `const_easee.js`).
2. Add import of your file in the top of `const.js` and add info about your new template brand in the `const CARDCONFIGTYPES` variable inside `const.js`. Se comments in file for further instructions.
3. Modify your new `const_template.js` file to fit your brand. See comments in template file for further instructions.
- `#ENTITYPREFIX#`: The way it is made to work is that when user specifies the `entity` main sensor, the code will assume alle other sensors contain a part of the name and use to replace you template value with correct entity ids for all other sensors. Use the `#ENTITYPREFIX#` for this value that will be replaced. For instance the main entity is _sensor.CHARGERNAME_status_ given by user, it will assume that a switch in the template will become _switch.CHARGERNAME_smart_charging_ when you define it as _switch.#ENTITYPREFIX#_smart_charging_ in your template.
- `#SERVICEID#`: A replacement used in the service call, typically for a chargerid or something that must be part of the data when calling service of a specific charger. A part of the `const CARDCONFIGTYPES` variable inside `const.js` defines if this is a state, attribute or an entity id for your template.
- `#SERVICEVAL#`: A replacement used in the service call, typically for the value from a dropdown or similar. Use this in the template where for instance a current limit is supposed to be sent to a charger.
- More tags may be added, see comments in template file for further instructions.
4. Mention your brand template in `README.md` file.
5. Test it (preferably have someone else with the same brand test it for you too!)
6. Ask for help in Github issues if you need help with some specifics.
7. Open a PR (only `const.js`, your new `const_template.js` and `README.md` are allowed). Other suggestions or bugfixes should be given in separate PRs.
8. Find someone to check and approve your PR.


## How to run locally

1. Clone this repo to wherever you want:
Expand All @@ -33,4 +49,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.
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 (minimum Ctrl+F5 for hard refresh in Chrome).
494 changes: 419 additions & 75 deletions README.md

Large diffs are not rendered by default.

Loading