mirror of
https://github.com/natekspencer/hacs-oasis_mini.git
synced 2025-11-13 07:33:51 -05:00
Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
802ce0f9a8 | ||
|
|
2f25218df5 | ||
|
|
de36b6ea67 | ||
|
|
4e370d441c | ||
|
|
cf8e744fa4 | ||
|
|
f04438cac8 | ||
|
|
8fbf7664b1 | ||
|
|
5d7176ebaa | ||
|
|
005a621816 | ||
|
|
2feba20b76 | ||
|
|
e2f5727669 | ||
|
|
8650fd597a | ||
|
|
7bef2cbe3b | ||
|
|
5ea472821b | ||
|
|
ab09bde752 | ||
|
|
f49b8ce1d2 | ||
|
|
cbbe8bc10d | ||
|
|
c2c62bb875 | ||
|
|
108b1850b7 | ||
|
|
ffc74a9dcb | ||
|
|
f67aee166a | ||
|
|
4ed6b1701d | ||
|
|
ade3e7c666 | ||
|
|
4c112f2b06 |
@@ -1,8 +1,8 @@
|
||||
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
|
||||
{
|
||||
"name": "Home Assistant integration development",
|
||||
"image": "mcr.microsoft.com/devcontainers/python:1-3.13-bullseye",
|
||||
"postCreateCommand": "sudo apt-get update && sudo apt-get install libturbojpeg0 libpcap0.8 -y",
|
||||
"image": "mcr.microsoft.com/devcontainers/python:1-3.13-bookworm",
|
||||
"postCreateCommand": "scripts/setup",
|
||||
"postAttachCommand": "scripts/setup",
|
||||
"forwardPorts": [8123],
|
||||
"customizations": {
|
||||
@@ -26,7 +26,10 @@
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": "always"
|
||||
},
|
||||
"files.trimTrailingWhitespace": true
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"[python]": {
|
||||
"editor.defaultFormatter": "charliermarsh.ruff"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
10
.pre-commit-config.yaml
Normal file
10
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
# Ruff version.
|
||||
rev: v0.9.10
|
||||
hooks:
|
||||
# Run the linter.
|
||||
- id: ruff
|
||||
args: [--fix]
|
||||
# Run the formatter.
|
||||
- id: ruff-format
|
||||
@@ -32,6 +32,7 @@ AUTOPLAY_MAP = {
|
||||
"2": "5 minutes",
|
||||
"3": "10 minutes",
|
||||
"4": "30 minutes",
|
||||
"5": "24 hours",
|
||||
}
|
||||
|
||||
LED_EFFECTS: Final[dict[str, str]] = {
|
||||
@@ -227,7 +228,7 @@ class OasisMini:
|
||||
"max_brightness": int(values[13]),
|
||||
"wifi_connected": _bit_to_bool(values[14]),
|
||||
"repeat_playlist": _bit_to_bool(values[15]),
|
||||
"autoplay": AUTOPLAY_MAP.get(values[16]),
|
||||
"autoplay": AUTOPLAY_MAP.get(value := values[16], value),
|
||||
}
|
||||
for key, value in status.items():
|
||||
if (old_value := getattr(self, key, None)) != value:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,4 +10,5 @@ cryptography # should already be installed with Home Assistant
|
||||
# Development
|
||||
colorlog
|
||||
pip>=21.0
|
||||
pre-commit
|
||||
ruff
|
||||
@@ -1,9 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo apt-get update && sudo apt-get install libturbojpeg0 libpcap0.8 -y
|
||||
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
python3 -m pip install --requirement requirements.txt --upgrade
|
||||
|
||||
pre-commit install
|
||||
|
||||
mkdir -p config
|
||||
Reference in New Issue
Block a user