-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some wll deserved maintainence (#57)
* dropshadow optional, working devcontainer with HA * fixes * remove stuff * gitignore * Re-add yaml files * re-add yaml
- Loading branch information
1 parent
a2b47e8
commit 35ea56c
Showing
27 changed files
with
1,030 additions
and
784 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM python:3.10-bullseye | ||
|
||
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - && \ | ||
apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y --no-install-recommends \ | ||
python3-dev nodejs bluez libffi-dev libssl-dev libjpeg-dev \ | ||
zlib1g-dev autoconf build-essential libopenjp2-7 \ | ||
libtiff5 libturbojpeg0-dev tzdata libpcap0.8 | ||
|
||
|
||
RUN useradd -rm homeassistant && \ | ||
mkdir /srv/homeassistant && \ | ||
chown homeassistant:homeassistant /srv/homeassistant && \ | ||
cd /srv/homeassistant && \ | ||
python3 -m pip install wheel && \ | ||
pip3 install homeassistant==2023.4.2 | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/*.* | ||
!.gitignore | ||
!*.yaml | ||
|
||
www/custom_cards/*.* | ||
!*.md | ||
blueprints | ||
deps | ||
tts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
# Loads default set of integrations. Do not remove. | ||
default_config: | ||
|
||
# Load frontend themes from the themes folder | ||
frontend: | ||
themes: !include_dir_merge_named themes | ||
|
||
# Text to speech | ||
tts: | ||
- platform: google_translate | ||
|
||
lovelace: | ||
mode: yaml | ||
resources: | ||
- url: /local/custom_cards/canvas-gauge-card.js | ||
type: module | ||
|
||
sensor: | ||
- platform: systemmonitor | ||
resources: | ||
- type: disk_use_percent | ||
arg: /home | ||
- type: memory_use_percent | ||
- type: processor_use | ||
# - type: last_boot | ||
# - type: network_out | ||
# arg: "wlp2s0" | ||
- type: load_1m | ||
#- type: load_5m | ||
#- type: load_15m | ||
|
||
automation: !include automations.yaml | ||
script: !include scripts.yaml | ||
scene: !include scenes.yaml |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
# Use this file to store secrets like usernames and passwords. | ||
# Learn more at https://www.home-assistant.io/docs/configuration/secrets/ | ||
some_password: welcome |
111 changes: 55 additions & 56 deletions
111
.devcontainer/ui-lovelace.yaml → .devcontainer/HA/config/ui-lovelace.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,55 @@ | ||
resources: | ||
- url: http://127.0.0.1:5000/canvas-gauge-card.js?v6 | ||
type: module | ||
views: | ||
- title: Example | ||
cards: | ||
- type: "custom:canvas-gauge-card" | ||
name: Canvas Guage Card Development | ||
card_height: 125 | ||
#background_color: "#000" | ||
entity: sensor.processor_use | ||
gauge: | ||
colorValueBoxBackground: "#000" | ||
borderShadowWidth: 0 | ||
borderOuterWidth: 0 | ||
borderMiddleWidth: 0 | ||
borderInnerWidth: 0 | ||
animationDuration: 1500 | ||
animationRule: linear | ||
borders: false | ||
colorPlate: "#ddd" | ||
height: 210 | ||
highlights: | ||
- color: "rgba(200, 50, 50, .75)" | ||
from: 80 | ||
to: 100 | ||
majorTicks: | ||
- "0" | ||
- "10" | ||
- "20" | ||
- "30" | ||
- "40" | ||
- "50" | ||
- "60" | ||
- "70" | ||
- "80" | ||
- "90" | ||
- "100" | ||
maxValue: 100 | ||
minValue: 0 | ||
minorTicks: 2 | ||
needleCircleInner: false | ||
needleCircleOuter: true | ||
needleCircleSize: 7 | ||
needleType: arrow | ||
needleWidth: 2 | ||
startAngle: 90 | ||
strokeTicks: true | ||
ticksAngle: 180 | ||
type: radial-gauge | ||
valueBox: false | ||
width: 210 | ||
style: | ||
left: 4.2% | ||
top: 9.6% | ||
transform: none | ||
title: Hellströms home | ||
views: | ||
- cards: | ||
- type: "custom:canvas-gauge-card" | ||
card_height: 220 | ||
entity: sensor.processor_use | ||
# dropshadow: false | ||
gauge: | ||
# colorValueBoxBackground: "#000" | ||
borderShadowWidth: 0 | ||
borderOuterWidth: 0 | ||
borderMiddleWidth: 0 | ||
borderInnerWidth: 0 | ||
animationDuration: 1500 | ||
animationRule: linear | ||
borders: false | ||
colorPlate: "#ddd" | ||
# data-width: 400 | ||
# data-height: 400 | ||
height: 400 | ||
# width: 100% | ||
highlights: | ||
- color: "rgba(200, 50, 50, .75)" | ||
from: 80 | ||
to: 100 | ||
majorTicks: | ||
- "0" | ||
- "10" | ||
- "20" | ||
- "30" | ||
- "40" | ||
- "50" | ||
- "60" | ||
- "70" | ||
- "80" | ||
- "90" | ||
- "100" | ||
maxValue: 100 | ||
minValue: 0 | ||
minorTicks: 2 | ||
needleCircleInner: false | ||
needleCircleOuter: true | ||
needleCircleSize: 7 | ||
needleType: arrow | ||
needleWidth: 2 | ||
startAngle: 90 | ||
strokeTicks: true | ||
ticksAngle: 180 | ||
type: radial-gauge | ||
valueBox: false | ||
|
||
style: | ||
left: 4.2% | ||
top: 9.6% | ||
transform: none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is the place where you should copy the card js file. Use the devcontainer vscode task `Deploy` for it. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,21 @@ | ||
// See https://aka.ms/vscode-remote/devcontainer.json for format details. | ||
{ | ||
"name": "Boilerplate 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 | ||
} | ||
} | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine | ||
{ | ||
"name": "Custom card development", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
"build": { | ||
"context": "..", | ||
// Path is relataive to the devcontainer.json file. | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"postCreateCommand": "npm install", | ||
"runArgs": [ | ||
"-v", | ||
"${env:HOME}${env:USERPROFILE}/.ssh:/tmp/.ssh" // This is added so you can push from inside the container | ||
], | ||
"mounts": [ | ||
"source=${localWorkspaceFolder}/.devcontainer/HA/Config,target=/usr/src/config,type=bind,consistency=cached" | ||
] | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "chrome", | ||
"request": "launch", | ||
"name": "Launch Chrome against localhost", | ||
"url": "http://localhost:8123", | ||
"webRoot": "${workspaceFolder}", | ||
"outFiles": [ | ||
"${workspaceFolder}/.devcontainer/HA/config/www/custom_cards/*.js", | ||
"!**/node_modules/**" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"debug.javascript.unmapMissingSources": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "build", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"problemMatcher": [], | ||
"label": "npm: build" | ||
}, | ||
{ | ||
"label": "Deploy", | ||
"type": "shell", | ||
"command": "cp -f dist/canvas-gauge-card.js .devcontainer/HA/config/www/custom_cards/", | ||
"group": "test", | ||
"presentation": { | ||
"reveal": "always", | ||
"panel": "new" | ||
} | ||
}, | ||
{ | ||
"label": "Start HA", | ||
"type": "shell", | ||
"command": "cd /srv/homeassistant && hass -c /usr/src/config", | ||
"group": "test", | ||
"presentation": { | ||
"reveal": "always", | ||
"panel": "new" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.7.0 | ||
0.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "Canvas Gauge Card", | ||
"render_readme": true, | ||
"filename": "canvas-gauge-card.js" | ||
} | ||
{ | ||
"name": "Canvas Gauge Card", | ||
"render_readme": true, | ||
"filename": "canvas-gauge-card.js" | ||
} |
Oops, something went wrong.