Skip to content

Commit

Permalink
Merge pull request #1579 from UI-Lovelace-Minimalist/release
Browse files Browse the repository at this point in the history
Merge release with main
  • Loading branch information
wilbiev authored Dec 27, 2024
2 parents 292532e + 9892489 commit 2864b6b
Show file tree
Hide file tree
Showing 66 changed files with 564 additions and 400 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/automatic-custom-card-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
docit:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
- name: "Copy and rename README.md files"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "⤵️ Check out code from GitHub"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "⚙️ Set up Python"
uses: "actions/setup-python@v4"
with:
python-version: 3.8
python-version: 3.11
- name: "⚙️ Set up Ruby"
uses: "ruby/setup-ruby@v1"
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

steps:
- name: "Checkout repository"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"

# Initializes the CodeQL tools for scanning.
- name: "Initialize CodeQL"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/hacs-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "validation"
uses: "home-assistant/actions/hassfest@master"

Expand All @@ -22,7 +22,7 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "validation"
uses: "hacs/action@main"
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "⤵️ Check out code from GitHub"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "\U0001F680 Run Labeler"
uses: "crazy-max/ghaction-github-labeler@v4"
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
deploy:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/checkout@v4"
with:
node-version: "16.x"
node-version: "20.x"
- uses: "actions/setup-python@v4"
with:
python-version: "3.11"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Check out repository"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"

- name: "Get version"
id: "version"
Expand Down
4 changes: 2 additions & 2 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ default: true
MD001: false

MD024:
allow_different_nesting: true
siblings_only: true

MD025: false

Expand Down Expand Up @@ -48,7 +48,7 @@ no-emphasis-as-heading: false
first-line-h1: false

code-block-style:
style: ["fenced"]
style: "fenced"

proper-names:
names: []
Expand Down
22 changes: 11 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ci:

repos:
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: "v4.2.0"
rev: "v5.0.0"
hooks:
- id: "check-executables-have-shebangs"
- id: "check-json"
Expand All @@ -30,7 +30,7 @@ repos:
- id: "mixed-line-ending"

- repo: "https://github.com/adrienverge/yamllint.git"
rev: "v1.26.3"
rev: "v1.35.1"
hooks:
- id: "yamllint"
args: ["--format", "parsable", "--strict"]
Expand All @@ -41,13 +41,13 @@ repos:
)$
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.31.1
rev: v0.43.0
hooks:
- id: markdownlint
args: ["--fix"]

- repo: "https://github.com/jumanjihouse/pre-commit-hook-yamlfmt"
rev: "0.1.1"
rev: "0.2.3"
hooks:
- id: "yamlfmt"
args:
Expand All @@ -63,23 +63,23 @@ repos:
exclude: ".*"

- repo: "https://github.com/mattlqx/pre-commit-search-and-replace"
rev: "v1.0.5"
rev: "v1.1.8"
hooks:
- id: "search-and-replace"

- repo: "https://github.com/asottile/pyupgrade"
rev: "v2.31.1"
rev: "v3.19.1"
hooks:
- id: "pyupgrade"
args: ["--py39-plus"]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort

- repo: "https://github.com/psf/black"
rev: "22.3.0"
rev: "24.10.0"
hooks:
- id: "black"
args:
Expand All @@ -89,7 +89,7 @@ repos:
files: '^((custom_components|tests)/.+)?[^/]+\.py$'

- repo: "https://github.com/PyCQA/flake8"
rev: "4.0.1"
rev: "7.1.1"
hooks:
- id: "flake8"
additional_dependencies:
Expand All @@ -99,7 +99,7 @@ repos:
files: '^(custom_components/.+)?[^/]+\.py$'

- repo: "https://github.com/PyCQA/bandit"
rev: "1.7.4"
rev: "1.8.0"
hooks:
- id: "bandit"
args:
Expand All @@ -108,7 +108,7 @@ repos:
# - "--configfile=bandit.yaml"
<<: *python-files-with-tests
- repo: https://github.com/codespell-project/codespell.git
rev: "v2.1.0"
rev: "v2.3.0"
hooks:
- id: codespell
files: "(.*.md|translations/en.json)"
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
It's kind of hard to explain what this is, so let's call it a "theme" (in quotation marks). But one thing is for sure, it is very nice! Taking the exceptional work of tben as a basis, this repository is aimed to ease installation and maintenance of his wonderful work. You can use this interpretation of a SmartHomeUI more or less like a theme in HomeAssistant.

<img src="https://raw.githubusercontent.com/UI-Lovelace-Minimalist/UI/main/docs/assets/img/example_home.png" width="200"> <img src="https://raw.githubusercontent.com/UI-Lovelace-Minimalist/UI/main/docs/assets/img/example_temperature.png" width="200"> <img src="https://raw.githubusercontent.com/UI-Lovelace-Minimalist/UI/main/docs/assets/img/example_consumption.png" width="200"> <img src="https://raw.githubusercontent.com/UI-Lovelace-Minimalist/UI/main/docs/assets/img/example_localisation.png" width="200">
<img src="https://raw.githubusercontent.com/UI-Lovelace-Minimalist/UI/main/docs/assets/img/example_home.png" width="200" alt="example-image1" > <img src="https://raw.githubusercontent.com/UI-Lovelace-Minimalist/UI/main/docs/assets/img/example_temperature.png" width="200" alt="example-image2" > <img src="https://raw.githubusercontent.com/UI-Lovelace-Minimalist/UI/main/docs/assets/img/example_consumption.png" width="200" alt="example-image3" > <img src="https://raw.githubusercontent.com/UI-Lovelace-Minimalist/UI/main/docs/assets/img/example_localisation.png" width="200" alt="example-image4" >

## Wiki for documentation

Expand All @@ -28,6 +28,7 @@ Take a look here: [https://ui-lovelace-minimalist.github.io/UI/](https://ui-love

Table of content from the WIKI
<br>

<table>
<tr>
<th style="width: 33%;">Setup</th>
Expand Down Expand Up @@ -103,5 +104,5 @@ The same goes for our `custom_cards`. As the number grows, the list would be to

### Contributions

>This is a living project and all input is very welcome! If you configured and designed a card, that you would like to share, please feel free to do so! We are happy to include your contribution so others can use it as well!
This project uses pre-commit for consistent and clean code. If possible, please make sure that you also use pre-commit for local development before creating a pull request.
> This is a living project and all input is very welcome! If you configured and designed a card, that you would like to share, please feel free to do so! We are happy to include your contribution so others can use it as well!
> This project uses pre-commit for consistent and clean code. If possible, please make sure that you also use pre-commit for local development before creating a pull request.
5 changes: 3 additions & 2 deletions custom_cards/custom_card_camera/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Custom Camera Card
hide:
- toc
---

<!-- markdownlint-disable MD046 -->

# Custom-card "Camera"
Expand All @@ -21,7 +22,7 @@ Version: 1.0.0

<details>
<summary>1.0.1</summary>
Added variable to passthough aspect ratio to the picture entity card. Fix minor issues with title.
Added variable to passthrough aspect ratio to the picture entity card. Fix minor issues with title.
</details>
<details>
<summary>1.0.0</summary>
Expand All @@ -39,7 +40,7 @@ Initial release.
ulm_custom_card_camera_title: true
ulm_custom_card_camera_name: "name"
ulm_custom_card_camera_label: "label"
ulm_custom_card_camera_aspect_ratio: '16:9'
ulm_custom_card_camera_aspect_ratio: "16:9"
```
## Variables
Expand Down
14 changes: 8 additions & 6 deletions custom_cards/custom_card_httpedo13_sun/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Sun Card Custom-card
hide:
- toc
---

<!-- markdownlint-disable MD046 -->

# Custom-card "Sun"
Expand All @@ -24,6 +25,7 @@ Initial release
## Requirements

This card uses:

<table>
<tr>
<th>Component / card</th>
Expand All @@ -49,23 +51,23 @@ This card uses:
## Usage

```yaml
- type: custom:button-card
template: custom_card_httpedo13_sun
variables:
language: 'it'
- type: custom:button-card
template: custom_card_httpedo13_sun
variables:
language: "it"
```
## Variables
The same sun card config.
| Name | Accepted values | Description | Default |
|---------------|----------------------|--------------------------------------|-----------------------------------------------------|
| ------------- | -------------------- | ------------------------------------ | --------------------------------------------------- |
| darkMode | `boolean` | Changes card colors to dark or light | Home assistant dark mode state |
| language | `string`<sup>1</sup> | Changes card language | Home assistant language or english if not supported |
| showAzimuth | `boolean` | Displays azimuth in the footer | `false` |
| showElevation | `boolean` | Displays elevation in the footer | `false` |
| timeFormat | `'12h'`/`'24h'` | Displayed time format | Locale based on Home assistant language |
| title | `string` | Card title | Doesn't display a title by default | |
| title | `string` | Card title | Doesn't display a title by default |

(<sup>1</sup>) Supported languages: `da`, `de`, `en`, `es`, `et`, `fi`, `fr`, `hu`, `it`, `nl`, `pl`, `pt-BR`, `ru`, `sl`, `sv`
3 changes: 3 additions & 0 deletions custom_cards/custom_card_imswel_medias/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Initial release
## Requirements

This card needs the following to function correctly:

| Component | Required |
| ----------------------------------------------------------------------------------------- | ---------------------------------- |
|[Plex Recently Added](https://github.com/NemesisRE/sensor.plex_recently_added) | Yes for **`Media Library Card`** |
Expand All @@ -40,6 +41,7 @@ This card needs the following to function correctly:
**Media Library Card** for [Plex Recently Added](https://github.com/NemesisRE/sensor.plex_recently_added) :

![example-image-plex](../../docs/assets/img/custom_card_imswel_medias/medias_library_plex.png)<br>

| Variable | Default | Required | Notes |
| ----------------------------- | ------- | -------- | ----------------------------------------------------------------------- |
| ulm_custom_card_imswel_medias_index | 1 | Yes | The index of the item in your **Plex library** to show. |
Expand All @@ -58,6 +60,7 @@ This card needs the following to function correctly:
![example-image-radarr](../../docs/assets/img/custom_card_imswel_medias/medias_upcoming_radarr.png)
![example-image-sonarr](../../docs/assets/img/custom_card_imswel_medias/medias_upcoming_sonarr.png)<br>
| Variable | Default | Required | Notes |
| ----------------------------- | ------- | -------- | -------------------------------------------------------------------------------------------------------- |
| ulm_custom_card_imswel_medias_index | 1 | Yes | The index of the item in your **Radarr/Sonarr library** to show. |
Expand Down
3 changes: 2 additions & 1 deletion custom_cards/custom_card_nik_clock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ title: Tablet Clock Card
hide:
- toc
---

<!-- markdownlint-disable MD046 -->

# Custom-card "Tablet clock Card"

This is a `custom-card` that shows the currenct time and Date. This is designed for a tablet or big monitor.
This is a `custom-card` that shows the current time and Date. This is designed for a tablet or big monitor.

![Screenshot](../../docs/assets/img/custom_card_nik_clock.png)

Expand Down
3 changes: 1 addition & 2 deletions custom_cards/custom_card_nik_door/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ hide:

# Custom-card "Minimal Door Lock"

This is a `custom-card` that shows the currenct state of your Lock and allows you to open and close it showing the state with a Minimal Design.
This is a `custom-card` that shows the current state of your Lock and allows you to open and close it showing the state with a Minimal Design.

![Screenshot](../../docs/assets/img/custom_card_nik_door.png)

Expand Down Expand Up @@ -36,7 +36,6 @@ To have the Minimalist cards and custom cards installed
## Usage

```yaml

- type: "custom:button-card"
template: "custom_card_nik_door"
entity: "sensor.nuki_blindato_door_security_state"
Expand Down
10 changes: 5 additions & 5 deletions custom_cards/custom_card_person_info_small/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ The `custom_card_person_info_small` is based on `card_person_info`.
| ulm_card_person_driving_entity | | :material-close: | Set a binary sensor that depicts when this person is driving |
| ulm_card_person_battery_entity | | :material-close: | Set a battery level sensor |
| ulm_card_person_battery_state_entity | | :material-close: | Set a battery state sensor (eg the battery state sensor from the home assistant companion app will have the states "charging" or "discharging") |
| ulm_card_battery_battery_level_danger | 15 | :material-close: | Changes the color of the Icon, if the battery level falls below the provided value. Must be higher than ulm_card_battery_battery_level_waring
| ulm_card_battery_battery_level_waring | 30 | :material-close: | Changes the color of the Icon, if the battery level falls below the provided value.
| ulm_card_battery_color_battery_level_danger | var(--google-red) | :material-close: | Color of icon if battery level is within the 'danger' zone.
| ulm_card_battery_color_battery_level_warning | var(--google-yellow) | :material-close: | Color of icon if battery level is within the 'warning' zone.
| ulm_card_battery_color_battery_level_ok | var(--google-green) | :material-close: | Color of icon if battery level is not within the 'danger' or 'warning' zone.
| ulm_card_battery_battery_level_danger | 15 | :material-close: | Changes the color of the Icon, if the battery level falls below the provided value. Must be higher than ulm_card_battery_battery_level_waring |
| ulm_card_battery_battery_level_waring | 30 | :material-close: | Changes the color of the Icon, if the battery level falls below the provided value. |
| ulm_card_battery_color_battery_level_danger | var(--google-red) | :material-close: | Color of icon if battery level is within the 'danger' zone. |
| ulm_card_battery_color_battery_level_warning | var(--google-yellow) | :material-close: | Color of icon if battery level is within the 'warning' zone. |
| ulm_card_battery_color_battery_level_ok | var(--google-green) | :material-close: | Color of icon if battery level is not within the 'danger' or 'warning' zone. |

## Usage

Expand Down
6 changes: 3 additions & 3 deletions custom_cards/custom_template_shogun160_battery_info/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ This is an template to add the battery level to every ui minimalist card

## Variables

| Variable | Default | Required | Notes |
| -------------------------------------------- | ------- | -------- | ------------------------------------------------------------------------ |
| ulm_battery_entity | | No | The entity to represent the battery_level
| Variable | Default | Required | Notes |
| ------------------ | ------- | -------- | ----------------------------------------- |
| ulm_battery_entity | | No | The entity to represent the battery_level |

## Usage with battery or battery_level attribute from entity

Expand Down
3 changes: 3 additions & 0 deletions custom_components/ui_lovelace_minimalist/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@
from homeassistant.core import HomeAssistant
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.loader import async_get_integration
import voluptuous as vol

from .base import UlmBase
from .const import DOMAIN, NAME
from .enums import ConfigurationType, UlmDisabledReason

_LOGGER: logging.Logger = logging.getLogger(__package__)

CONFIG_SCHEMA = vol.Schema({DOMAIN: vol.Schema({})}, extra=vol.ALLOW_EXTRA)


async def async_initialize_integration(
hass: HomeAssistant,
Expand Down
Loading

0 comments on commit 2864b6b

Please sign in to comment.