Skip to content

Commit

Permalink
Merge pull request #315 from UI-Lovelace-Minimalist/dev
Browse files Browse the repository at this point in the history
0.0.3
  • Loading branch information
CM000n authored Jan 24, 2022
2 parents 27b4a06 + f18cd92 commit 982ac7c
Show file tree
Hide file tree
Showing 34 changed files with 10,871 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ wget -O - https://get.hacs.xyz | bash -
- To get the best experience with the themes that come with the integration:
- Go to Configuration -> Blueprints
- Create an automation from `System Set Default Theme`, and select what theme you want. And after restart it will be set.
- Restart home assitant to make sure everything is locaded
- Restart home assitant to make sure everything is located
47 changes: 24 additions & 23 deletions .devcontainer/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,27 @@ logger:
#
# Uncomment part below after installing dependencies
#
# # Requirement for popups, install browser mod with hacs
# browser_mod:

# # Install virtual integration with hacs
# virtual:
# light:
# - platform: "virtual"
# name: "Light 1"
# support_color: true
# support_color_temp: true
# support_white_value: true

# - platform: "virtual"
# name: "Light 2"
# support_color: true
# support_color_temp: true
# support_white_value: true

# - platform: "virtual"
# name: "Light 3"
# support_color: true
# support_color_temp: true
# support_white_value: true
## Requirement for popups, install browser mod with hacs
browser_mod:

## Install virtual integration with hacs
virtual:

light:
- platform: "virtual"
name: "Livingroom"
support_color: true
support_color_temp: true
support_white_value: true

sensor:
- platform: "virtual"
name: "Livingroom Temperature"
class: "temperature"
initial_value: 20
initial_availability: true
- platform: "virtual"
name: "Livingroom Humidity"
class: "humidity"
initial_value: 50
initial_availability: true
53 changes: 47 additions & 6 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,58 @@
#!/usr/bin/env bash

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

cd $SCRIPT_DIR/..
# Required to get automations to work
echo "Creatin automations.yaml"
touch /config/automations.yaml

# source: /opt/container/helpers/commons/homeassistant/start.sh
if test -d "custom_components"; then
echo "Symlink the custom component directory"

if test -d "custom_components"; then
rm -R /config/custom_components
fi

ln -sf "$(workspacePath)custom_components/" /config/custom_components || echo "Could not copy the custom_component" exit 1
elif test -f "__init__.py"; then
echo "Having the component in the root is currently not supported"
fi

# Install
echo "Install home assistant"
container install

pip install -r $SCRIPT_DIR/../requirements_dev.txt
echo "Installing Requirements_dev.txt"
pip install -r $(workspacePath)requirements_dev.txt

# Required to get automations to work
touch /config/automations.yaml

# pre-commit
sudo apt update; apt install -y ruby
echo "Install pre-commit dependencies"
sudo apt update; apt install -y ruby vim

echo "Install Pre-Commit in this repo"
pre-commit install

# Custom Cards & Modules
echo "Installing NodeJS"
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
apt-get install -y nodejs


cd /tmp
# Install dependency modules
## Browser mod
echo "Installing Custom Component: Browser Mod"
wget https://github.com/thomasloven/hass-browser_mod/archive/refs/tags/1.5.1.tar.gz -O browser_mod.tar.gz
tar -xvf browser_mod.tar.gz
rm -rf /config/custom_components/browser_mod
mv hass-browser_mod*/custom_components/browser_mod /config/custom_components/browser_mod

## virtual
echo "Installing Custom Component: Virtual"
wget https://github.com/twrecked/hass-virtual/archive/refs/tags/v0.7.5.tar.gz -O virtual.tar.gz
tar -xvf virtual.tar.gz
rm -rf /config/custom_components/virtual
mv hass-virtual*/custom_components/virtual /config/custom_components/virtual
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ repos:
hooks:
- id: "yamllint"
args: ["--format", "parsable", "--strict"]
exclude: ".pre-commit-config.yaml"
# exclude: ".pre-commit-config.yaml"
exclude: |
(?x)^(
.pre-commit-config.yaml
)$
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.30.0
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,13 @@ The same goes for our `custom_cards`. As the number grows, the list would be to
</td>
</tr>
<tr>
<td align="center" style="word-wrap: break-word; width: 45.0; height: 45.0">
<a href=https://github.com/AndyVRD>
<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/>
<br />
<sub style="font-size:10px"><b>AndyVRD</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 45.0; height: 45.0">
<a href=https://github.com/briis>
<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/>
Expand Down Expand Up @@ -333,15 +340,15 @@ The same goes for our `custom_cards`. As the number grows, the list would be to
<sub style="font-size:10px"><b>Martin Nöhrer</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center" style="word-wrap: break-word; width: 45.0; height: 45.0">
<a href=https://github.com/pedrojreis>
<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/>
<br />
<sub style="font-size:10px"><b>Pedro Reis</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center" style="word-wrap: break-word; width: 45.0; height: 45.0">
<a href=https://github.com/jmoransalama>
<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/>
Expand Down
6 changes: 6 additions & 0 deletions custom_components/ui_lovelace_minimalist/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from .const import (
DEFAULT_INCLUDE_OTHER_CARDS,
DEFAULT_LANGUAGE,
DEFAULT_SIDEPANEL_ENABLED,
DEFAULT_SIDEPANEL_ICON,
DEFAULT_SIDEPANEL_TITLE,
DEFAULT_THEME,
Expand All @@ -22,6 +23,7 @@ class UlmConfiguration:
config: dict[str, Any] = field(default_factory=dict)
config_entry: dict[str, str] = field(default_factory=dict)
config_type: ConfigurationType | None = None
sidepanel_enabled: bool = DEFAULT_SIDEPANEL_ENABLED
sidepanel_icon: str = DEFAULT_SIDEPANEL_ICON
sidepanel_title: str = DEFAULT_SIDEPANEL_TITLE
theme_path: str = DEFAULT_THEME_PATH
Expand All @@ -30,6 +32,10 @@ class UlmConfiguration:
include_other_cards: bool = DEFAULT_INCLUDE_OTHER_CARDS
language: str = DEFAULT_LANGUAGE

def to_dict(self) -> dict:
"""Return Dict."""
return self.__dict__

def to_json(self) -> str:
"""Return a json string."""
return asdict(self)
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
Loading

0 comments on commit 982ac7c

Please sign in to comment.