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

Update GA workflows - update pre-commit - fixes source code #1578

Merged
merged 37 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f102e4f
Create custom_card_person_info_small.yaml
imaginelenses Jul 4, 2023
e328a85
Create README.md
imaginelenses Jul 4, 2023
627c7c8
Added custom_card_person_info_small images.
imaginelenses Jul 4, 2023
e306b29
Fixed style
imaginelenses Jul 4, 2023
956c04b
Actually fixed style
imaginelenses Jul 4, 2023
dd4383a
Disabled Markdown lint and fixed title
imaginelenses Jul 4, 2023
a712677
Update card_vacuum.yaml - add support for lawn mower
tieskuh Mar 8, 2024
00b1ba5
Add custom_card_iAbadia_battery_chip
iAbadia Apr 1, 2024
bb8a823
Added support to Olen lovelace-flower-card fork
AthAshino Jul 16, 2024
f25ab91
pre-commit hooks
Jul 27, 2024
4d508e2
fix: correct button light card medium button documentation
DavidSchischke Aug 11, 2024
8ff8a25
Merge pull request #1567 from UI-Lovelace-Minimalist/release
wilbiev Dec 21, 2024
ef9c76b
Sync updates release
wilbiev Dec 21, 2024
e25ac7c
Merge pull request #1568 from UI-Lovelace-Minimalist/wilbie-fix-2
wilbiev Dec 21, 2024
0cc7b89
Update custom cards 23122024
wilbiev Dec 23, 2024
6f44fa0
Merge branch 'main' into add-custom-card-battery-chip
wilbiev Dec 23, 2024
e42d143
Custom card updates and fixes
wilbiev Dec 23, 2024
c8e2e91
Merge pull request #1571 from UI-Lovelace-Minimalist/wilbie-fix-cards
wilbiev Dec 23, 2024
e67bd5a
Update docs
wilbiev Dec 23, 2024
315a7e0
Merge pull request #1572 from UI-Lovelace-Minimalist/automated_custom…
wilbiev Dec 23, 2024
e6b3ca1
Merge pull request #1479 from iAbadia/add-custom-card-battery-chip
wilbiev Dec 23, 2024
347c943
Merge branch 'main' into main
wilbiev Dec 23, 2024
3b91bcf
Merge pull request #1523 from AthAshino/main
wilbiev Dec 23, 2024
db74954
Update docs
wilbiev Dec 23, 2024
e15d870
Merge pull request #1574 from UI-Lovelace-Minimalist/automated_custom…
wilbiev Dec 24, 2024
ecdeeb7
Merge branch 'main' into main
wilbiev Dec 24, 2024
7d7e8e4
Merge pull request #1328 from imaginelenses/main
wilbiev Dec 24, 2024
a51240d
Merge branch 'main' into patch-4
wilbiev Dec 25, 2024
fd59c79
Merge pull request #1474 from tieskuh/patch-4
wilbiev Dec 25, 2024
3b7c248
Merge branch 'main' into fix-light-card-button-docu
wilbiev Dec 25, 2024
153378e
Merge pull request #1529 from DavidSchischke/fix-light-card-button-docu
wilbiev Dec 25, 2024
292532e
Merge pull request #1577 from UI-Lovelace-Minimalist/release
wilbiev Dec 25, 2024
289b3c5
Fixes source code, upgrade workflows - pre-commit
wilbiev Dec 25, 2024
3e05c40
Fix translation files - updated pre-commit
wilbiev Dec 25, 2024
d358075
Fix markdownlint - updated pre-commit
wilbiev Dec 25, 2024
f672c22
Fix files - updated pre-commit
wilbiev Dec 25, 2024
842aa72
Fix spelling mistake
wilbiev Dec 27, 2024
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 .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.
14 changes: 8 additions & 6 deletions custom_cards/custom_card_alarm_time/card_alarm_time.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,11 @@ card_alarm_time:
type: "custom:button-card"
template: "widget_icon"
tap_action:
action: "call-service"
service: "input_datetime.set_datetime"
service_data:
action: "perform-action"
perform_action: "input_datetime.set_datetime"
target:
entity_id: "[[[ return variables.ulm_card_alarm_time_datetime ]]]"
data:
time: >
[[[
var timestamp = states[variables.ulm_card_alarm_time_datetime].attributes.timestamp;
Expand Down Expand Up @@ -259,10 +260,11 @@ card_alarm_time:
type: "custom:button-card"
template: "widget_icon"
tap_action:
action: "call-service"
service: "input_datetime.set_datetime"
service_data:
action: "perform-action"
perform_action: "input_datetime.set_datetime"
target:
entity_id: "[[[ return variables.ulm_card_alarm_time_datetime ]]]"
data:
time: >
[[[
var timestamp = states[variables.ulm_card_alarm_time_datetime].attributes.timestamp;
Expand Down
47 changes: 24 additions & 23 deletions custom_cards/custom_card_bar_card/custom_card_bar_card.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,27 @@ custom_card_bar_card:
name: "off"
min: "[[[ return variables.ulm_custom_card_bar_card_min ]]]"
max: "[[[ return variables.ulm_custom_card_bar_card_max ]]]"
style: |-
bar-card-currentbar {
border-radius: 0px !important;
right: 0;
}
bar-card-backgroundbar {
border-radius: 0px !important;
right: 0;
}
#states {
padding: 0;
height: 35px;
}
bar-card-background {
height: 35px !important;
}
bar-card-indicator {
left: 10px;
}
bar-card-value {
font-weight: bold;
font-size: 12px;
}
card_mod:
style: |-
bar-card-currentbar {
border-radius: 0px !important;
right: 0;
}
bar-card-backgroundbar {
border-radius: 0px !important;
right: 0;
}
#states {
padding: 0;
height: 35px;
}
bar-card-background {
height: 35px !important;
}
bar-card-indicator {
left: 10px;
}
bar-card-value {
font-weight: bold;
font-size: 12px;
}
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
18 changes: 9 additions & 9 deletions custom_cards/custom_card_chromecast/custom_card_chromecast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ card_media_player_chromecast_with_controls:
type: "custom:button-card"
template: "widget_icon"
tap_action:
action: "call-service"
service: "media_player.toggle"
service_data:
action: "perform-action"
perform_action: "media_player.toggle"
target:
entity_id: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
icon: "mdi:power"
item2:
Expand All @@ -60,9 +60,9 @@ card_media_player_chromecast_with_controls:
template: "widget_icon"
entity: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
tap_action:
action: "call-service"
service: "media_player.media_play_pause"
service_data:
action: "perform-action"
perform_action: "media_player.media_play_pause"
target:
entity_id: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
icon: "mdi:pause"
state:
Expand All @@ -75,9 +75,9 @@ card_media_player_chromecast_with_controls:
type: "custom:button-card"
template: "widget_icon"
tap_action:
action: "call-service"
service: "media_player.toggle"
service_data:
action: "perform-action"
perform_action: "media_player.toggle"
target:
entity_id: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
icon: "mdi:video-input-hdmi"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ custom_card_eraycetinay_elapsed_time:

let text = '';
if(entity.attributes.has_date) {
text += days > 0 ? days + ' ' + (days > 1 ? variables.custom_card_eraycetinay_elapsed_time_days : variables.custom_card_eraycetinay_elapsed_time_day) +' ' : '';
text += days > 0 ? days + ' ' + (days > 1 ? variables.ulm_custom_card_eraycetinay_elapsed_time_days : variables.ulm_custom_card_eraycetinay_elapsed_time_day) +' ' : '';
}
if(entity.attributes.has_time) {
text += hours > 0 ? hours + ' ' + (hours > 1 ? variables.custom_card_eraycetinay_elapsed_time_hours : variables.custom_card_eraycetinay_elapsed_time_hour) +' ' : '';
text += hours > 0 ? hours + ' ' + (hours > 1 ? variables.ulm_custom_card_eraycetinay_elapsed_time_hours : variables.ulm_custom_card_eraycetinay_elapsed_time_hour) +' ' : '';
}
if(entity.attributes.has_time && !entity.attributes.has_date) {
text += minutes > 0 ? minutes + ' ' + (minutes > 1 ? variables.custom_card_eraycetinay_elapsed_time_minutes : variables.custom_card_eraycetinay_elapsed_time_minute) +' ' : '';
text += minutes > 0 ? minutes + ' ' + (minutes > 1 ? variables.ulm_custom_card_eraycetinay_elapsed_time_minutes : variables.ulm_custom_card_eraycetinay_elapsed_time_minute) +' ' : '';
}

text = text.length ? text += variables.custom_card_eraycetinay_elapsed_time_ago : variables.custom_card_eraycetinay_elapsed_time_justnow;
text = text.length ? text += variables.ulm_custom_card_eraycetinay_elapsed_time_ago : variables.ulm_custom_card_eraycetinay_elapsed_time_justnow;
return text;
]]]
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
ulm_custom_card_eraycetinay_elapsed_time_language_variables:
variables:
custom_card_eraycetinay_elapsed_time_day: "Tag"
custom_card_eraycetinay_elapsed_time_days: "Tage"
custom_card_eraycetinay_elapsed_time_hour: "Stunde"
custom_card_eraycetinay_elapsed_time_hours: "Stunden"
custom_card_eraycetinay_elapsed_time_minute: "Minute"
custom_card_eraycetinay_elapsed_time_minutes: "Minuten"
custom_card_eraycetinay_elapsed_time_ago: "her"
custom_card_eraycetinay_elapsed_time_justnow: "Jetzt"
ulm_custom_card_eraycetinay_elapsed_time_day: "Tag"
ulm_custom_card_eraycetinay_elapsed_time_days: "Tage"
ulm_custom_card_eraycetinay_elapsed_time_hour: "Stunde"
ulm_custom_card_eraycetinay_elapsed_time_hours: "Stunden"
ulm_custom_card_eraycetinay_elapsed_time_minute: "Minute"
ulm_custom_card_eraycetinay_elapsed_time_minutes: "Minuten"
ulm_custom_card_eraycetinay_elapsed_time_ago: "her"
ulm_custom_card_eraycetinay_elapsed_time_justnow: "Jetzt"
Loading
Loading