Skip to content

Commit 982ac7c

Browse files
authored
Merge pull request #315 from UI-Lovelace-Minimalist/dev
0.0.3
2 parents 27b4a06 + f18cd92 commit 982ac7c

34 files changed

+10871
-91
lines changed

.devcontainer/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,4 @@ wget -O - https://get.hacs.xyz | bash -
106106
- To get the best experience with the themes that come with the integration:
107107
- Go to Configuration -> Blueprints
108108
- Create an automation from `System Set Default Theme`, and select what theme you want. And after restart it will be set.
109-
- Restart home assitant to make sure everything is locaded
109+
- Restart home assitant to make sure everything is located

.devcontainer/configuration.yaml

+24-23
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,27 @@ logger:
2323
#
2424
# Uncomment part below after installing dependencies
2525
#
26-
# # Requirement for popups, install browser mod with hacs
27-
# browser_mod:
28-
29-
# # Install virtual integration with hacs
30-
# virtual:
31-
# light:
32-
# - platform: "virtual"
33-
# name: "Light 1"
34-
# support_color: true
35-
# support_color_temp: true
36-
# support_white_value: true
37-
38-
# - platform: "virtual"
39-
# name: "Light 2"
40-
# support_color: true
41-
# support_color_temp: true
42-
# support_white_value: true
43-
44-
# - platform: "virtual"
45-
# name: "Light 3"
46-
# support_color: true
47-
# support_color_temp: true
48-
# support_white_value: true
26+
## Requirement for popups, install browser mod with hacs
27+
browser_mod:
28+
29+
## Install virtual integration with hacs
30+
virtual:
31+
32+
light:
33+
- platform: "virtual"
34+
name: "Livingroom"
35+
support_color: true
36+
support_color_temp: true
37+
support_white_value: true
38+
39+
sensor:
40+
- platform: "virtual"
41+
name: "Livingroom Temperature"
42+
class: "temperature"
43+
initial_value: 20
44+
initial_availability: true
45+
- platform: "virtual"
46+
name: "Livingroom Humidity"
47+
class: "humidity"
48+
initial_value: 50
49+
initial_availability: true

.devcontainer/post-create.sh

+47-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,58 @@
11
#!/usr/bin/env bash
22

3-
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
3+
source /opt/container/helpers/common/paths.sh
4+
mkdir -p /config
45

5-
cd $SCRIPT_DIR/..
6+
# Required to get automations to work
7+
echo "Creatin automations.yaml"
8+
touch /config/automations.yaml
9+
10+
# source: /opt/container/helpers/commons/homeassistant/start.sh
11+
if test -d "custom_components"; then
12+
echo "Symlink the custom component directory"
613

14+
if test -d "custom_components"; then
15+
rm -R /config/custom_components
16+
fi
17+
18+
ln -sf "$(workspacePath)custom_components/" /config/custom_components || echo "Could not copy the custom_component" exit 1
19+
elif test -f "__init__.py"; then
20+
echo "Having the component in the root is currently not supported"
21+
fi
22+
23+
# Install
24+
echo "Install home assistant"
725
container install
826

9-
pip install -r $SCRIPT_DIR/../requirements_dev.txt
27+
echo "Installing Requirements_dev.txt"
28+
pip install -r $(workspacePath)requirements_dev.txt
1029

11-
# Required to get automations to work
12-
touch /config/automations.yaml
1330

1431
# pre-commit
15-
sudo apt update; apt install -y ruby
32+
echo "Install pre-commit dependencies"
33+
sudo apt update; apt install -y ruby vim
1634

35+
echo "Install Pre-Commit in this repo"
1736
pre-commit install
37+
38+
# Custom Cards & Modules
39+
echo "Installing NodeJS"
40+
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
41+
apt-get install -y nodejs
42+
43+
44+
cd /tmp
45+
# Install dependency modules
46+
## Browser mod
47+
echo "Installing Custom Component: Browser Mod"
48+
wget https://github.com/thomasloven/hass-browser_mod/archive/refs/tags/1.5.1.tar.gz -O browser_mod.tar.gz
49+
tar -xvf browser_mod.tar.gz
50+
rm -rf /config/custom_components/browser_mod
51+
mv hass-browser_mod*/custom_components/browser_mod /config/custom_components/browser_mod
52+
53+
## virtual
54+
echo "Installing Custom Component: Virtual"
55+
wget https://github.com/twrecked/hass-virtual/archive/refs/tags/v0.7.5.tar.gz -O virtual.tar.gz
56+
tar -xvf virtual.tar.gz
57+
rm -rf /config/custom_components/virtual
58+
mv hass-virtual*/custom_components/virtual /config/custom_components/virtual

.pre-commit-config.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ repos:
3333
hooks:
3434
- id: "yamllint"
3535
args: ["--format", "parsable", "--strict"]
36-
exclude: ".pre-commit-config.yaml"
36+
# exclude: ".pre-commit-config.yaml"
37+
exclude: |
38+
(?x)^(
39+
.pre-commit-config.yaml
40+
)$
3741
3842
- repo: https://github.com/igorshubovych/markdownlint-cli
3943
rev: v0.30.0

README.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,13 @@ The same goes for our `custom_cards`. As the number grows, the list would be to
298298
</td>
299299
</tr>
300300
<tr>
301+
<td align="center" style="word-wrap: break-word; width: 45.0; height: 45.0">
302+
<a href=https://github.com/AndyVRD>
303+
<img src=https://avatars.githubusercontent.com/u/67138158?v=4 width="30;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=AndyVRD/>
304+
<br />
305+
<sub style="font-size:10px"><b>AndyVRD</b></sub>
306+
</a>
307+
</td>
301308
<td align="center" style="word-wrap: break-word; width: 45.0; height: 45.0">
302309
<a href=https://github.com/briis>
303310
<img src=https://avatars.githubusercontent.com/u/24776272?v=4 width="30;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=Bjarne Riis/>
@@ -333,15 +340,15 @@ The same goes for our `custom_cards`. As the number grows, the list would be to
333340
<sub style="font-size:10px"><b>Martin Nöhrer</b></sub>
334341
</a>
335342
</td>
343+
</tr>
344+
<tr>
336345
<td align="center" style="word-wrap: break-word; width: 45.0; height: 45.0">
337346
<a href=https://github.com/pedrojreis>
338347
<img src=https://avatars.githubusercontent.com/u/28795057?v=4 width="30;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=Pedro Reis/>
339348
<br />
340349
<sub style="font-size:10px"><b>Pedro Reis</b></sub>
341350
</a>
342351
</td>
343-
</tr>
344-
<tr>
345352
<td align="center" style="word-wrap: break-word; width: 45.0; height: 45.0">
346353
<a href=https://github.com/jmoransalama>
347354
<img src=https://avatars.githubusercontent.com/u/16177130?v=4 width="30;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=jmoransalama/>

custom_components/ui_lovelace_minimalist/base.py

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from .const import (
88
DEFAULT_INCLUDE_OTHER_CARDS,
99
DEFAULT_LANGUAGE,
10+
DEFAULT_SIDEPANEL_ENABLED,
1011
DEFAULT_SIDEPANEL_ICON,
1112
DEFAULT_SIDEPANEL_TITLE,
1213
DEFAULT_THEME,
@@ -22,6 +23,7 @@ class UlmConfiguration:
2223
config: dict[str, Any] = field(default_factory=dict)
2324
config_entry: dict[str, str] = field(default_factory=dict)
2425
config_type: ConfigurationType | None = None
26+
sidepanel_enabled: bool = DEFAULT_SIDEPANEL_ENABLED
2527
sidepanel_icon: str = DEFAULT_SIDEPANEL_ICON
2628
sidepanel_title: str = DEFAULT_SIDEPANEL_TITLE
2729
theme_path: str = DEFAULT_THEME_PATH
@@ -30,6 +32,10 @@ class UlmConfiguration:
3032
include_other_cards: bool = DEFAULT_INCLUDE_OTHER_CARDS
3133
language: str = DEFAULT_LANGUAGE
3234

35+
def to_dict(self) -> dict:
36+
"""Return Dict."""
37+
return self.__dict__
38+
3339
def to_json(self) -> str:
3440
"""Return a json string."""
3541
return asdict(self)

custom_components/ui_lovelace_minimalist/cards/simple-weather-card/simple-weather-card-bundle.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

0 commit comments

Comments
 (0)