Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f129191a48 | ||
|
|
31237e76d9 | ||
|
|
fc59a786ed | ||
|
|
71cbd70f9e | ||
|
|
f12371e519 | ||
|
|
eae1c9cef2 | ||
|
|
8dff505bb4 | ||
|
|
342a98327d | ||
|
|
d10e83c750 | ||
|
|
0deb61f920 | ||
|
|
563095cbcf | ||
|
|
952feac482 | ||
|
|
7c229b37f2 | ||
|
|
19546a12e6 | ||
|
|
7b9b1030f2 | ||
|
|
13df970b21 | ||
|
|
8069a5d635 | ||
|
|
356b61e6e6 | ||
|
|
3b93a6a16b | ||
|
|
aa7eb0a9d9 | ||
|
|
0888c63b80 | ||
|
|
c6e7b332cf | ||
|
|
7b4fdfe629 | ||
|
|
15dd7e3880 | ||
|
|
28811370e9 | ||
|
|
a1fca2f4d1 | ||
|
|
d479bdb583 | ||
|
|
010a1144c5 | ||
|
|
6cf92d83f0 | ||
|
|
9f7199beab | ||
|
|
a02ae4106b | ||
|
|
6a411cea91 | ||
|
|
4ff72fdb07 | ||
|
|
93d1afd7e0 | ||
|
|
11bf31885e | ||
|
|
8b93ed6187 | ||
|
|
286f84fbb0 | ||
|
|
01a504f0ba |
@@ -6,13 +6,12 @@ on:
|
|||||||
- main
|
- main
|
||||||
- master
|
- master
|
||||||
|
|
||||||
env:
|
|
||||||
GIT_SSL_NO_VERIFY: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-version:
|
update-version:
|
||||||
name: Update Version
|
name: Update Version
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Пропускаем запуск, если коммит сделал сам бот (избегаем бесконечного цикла)
|
||||||
|
if: github.actor != 'gitea-actions[bot]' && github.actor != 'Gitea Actions Bot'
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
@@ -39,9 +38,9 @@ jobs:
|
|||||||
- name: Run semantic-release
|
- name: Run semantic-release
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.PAT_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.PAT_TOKEN }}
|
||||||
PYTHONHTTPSVERIFY: "0"
|
|
||||||
REQUESTS_CA_BUNDLE: ""
|
|
||||||
CURL_CA_BUNDLE: ""
|
|
||||||
run: |
|
run: |
|
||||||
echo "🚀 Запускаем semantic-release..."
|
unset GITHUB_SERVER_URL
|
||||||
|
unset GITHUB_API_URL
|
||||||
|
unset GITHUB_REPOSITORY
|
||||||
|
|
||||||
semantic-release version
|
semantic-release version
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
name: Test and Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
workflow_dispatch: # Позволяет запускать вручную
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Шаг 1: Валидация структуры HA интеграции
|
||||||
|
validate:
|
||||||
|
name: Validate Integration
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Hassfest Validation
|
||||||
|
uses: home-assistant/actions/hassfest@master
|
||||||
|
|
||||||
|
- name: HACS Validation
|
||||||
|
uses: hacs/action@main
|
||||||
|
with:
|
||||||
|
category: "integration"
|
||||||
|
|
||||||
|
# Шаг 2: Запуск тестов (если есть)
|
||||||
|
test:
|
||||||
|
name: Run Tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: validate
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install pytest pytest-homeassistant-custom-component
|
||||||
|
if [ -f requirements_test.txt ]; then pip install -r requirements_test.txt; fi
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
if [ -d "tests" ]; then
|
||||||
|
pytest tests/ --cov=custom_components/motion_light --cov-report=xml
|
||||||
|
else
|
||||||
|
echo "No tests directory found, skipping tests"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Шаг 3: Проверка стиля кода
|
||||||
|
lint:
|
||||||
|
name: Code Quality
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: validate
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
|
||||||
|
- name: Install linters
|
||||||
|
run: |
|
||||||
|
pip install black ruff mypy
|
||||||
|
|
||||||
|
- name: Check code formatting with black
|
||||||
|
run: |
|
||||||
|
black --check custom_components/motion_light/ || echo "Code formatting issues found"
|
||||||
|
|
||||||
|
- name: Check code with ruff
|
||||||
|
run: |
|
||||||
|
ruff check custom_components/motion_light/ || echo "Ruff issues found"
|
||||||
|
|
||||||
|
# Шаг 4: Создание релиза (только если все проверки пройдены)
|
||||||
|
release:
|
||||||
|
name: Create Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [validate, test, lint]
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Get tag info
|
||||||
|
id: tag
|
||||||
|
run: |
|
||||||
|
TAG=${GITHUB_REF#refs/tags/}
|
||||||
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
|
||||||
|
|
||||||
|
if [ -z "$PREV_TAG" ]; then
|
||||||
|
COMMITS=$(git log --pretty=format:"- %s" --reverse)
|
||||||
|
else
|
||||||
|
COMMITS=$(git log ${PREV_TAG}..HEAD --pretty=format:"- %s" --reverse)
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "commits<<EOF" >> $GITHUB_OUTPUT
|
||||||
|
echo "$COMMITS" >> $GITHUB_OUTPUT
|
||||||
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Create GitHub Release
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
|
COMMITS="${{ steps.tag.outputs.commits }}"
|
||||||
|
|
||||||
|
echo "🚀 Создаём релиз $TAG в GitHub..."
|
||||||
|
|
||||||
|
cat > /tmp/release_notes.md << EOF
|
||||||
|
## Изменения в версии $TAG
|
||||||
|
|
||||||
|
$COMMITS
|
||||||
|
EOF
|
||||||
|
|
||||||
|
gh release create "$TAG" \
|
||||||
|
--title "Release $TAG" \
|
||||||
|
--notes-file /tmp/release_notes.md \
|
||||||
|
--target main
|
||||||
|
|
||||||
|
echo "✅ Релиз создан!"
|
||||||
@@ -2,6 +2,86 @@
|
|||||||
|
|
||||||
<!-- version list -->
|
<!-- version list -->
|
||||||
|
|
||||||
|
## v1.0.17 (2026-07-17)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Test
|
||||||
|
([`31237e7`](https://git.darkmode.duckdns.org/sirmrak/motion_light/commit/31237e76d9c770dae4e04fad6d7a0196340a60c5))
|
||||||
|
|
||||||
|
|
||||||
|
## v1.0.16 (2026-07-10)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Test new secrets
|
||||||
|
([`eae1c9c`](https://192.168.200.208:3000/sirmrak/motion_light/commit/eae1c9cef21aa9285a6e5b2174949b6bf2942154))
|
||||||
|
|
||||||
|
|
||||||
|
## v1.0.15 (2026-07-10)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Lux_cooldown_active
|
||||||
|
([`342a983`](https://192.168.200.208:3000/sirmrak/motion_light/commit/342a98327d2297977323e12f84e0dc9bc8b3a49d))
|
||||||
|
|
||||||
|
|
||||||
|
## v1.0.14 (2026-07-09)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Удалены переводы атрибутов из custom_components/motion_light/translations
|
||||||
|
([`563095c`](https://192.168.200.208:3000/sirmrak/motion_light/commit/563095cbcf77d22d02a7176faf5aec6837d18b37))
|
||||||
|
|
||||||
|
|
||||||
|
## v1.0.13 (2026-07-09)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Test validation
|
||||||
|
([`356b61e`](https://192.168.200.208:3000/sirmrak/motion_light/commit/356b61e6e618a423503d44d2f0d9ef96fee0da0d))
|
||||||
|
|
||||||
|
|
||||||
|
## v1.0.12 (2026-07-09)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Test
|
||||||
|
([`0888c63`](https://192.168.200.208:3000/sirmrak/motion_light/commit/0888c63b804be1e5bedd7e72fbfd142dd4f88287))
|
||||||
|
|
||||||
|
|
||||||
|
## v1.0.11 (2026-07-09)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Test
|
||||||
|
([`15dd7e3`](https://192.168.200.208:3000/sirmrak/motion_light/commit/15dd7e3880dad782f502eb70db6aa8ca23f803bc))
|
||||||
|
|
||||||
|
|
||||||
|
## v1.0.10 (2026-07-09)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Test
|
||||||
|
([`010a114`](https://192.168.200.208:3000/sirmrak/motion_light/commit/010a1144c5dc5252831126bfc9592036a7ca2518))
|
||||||
|
|
||||||
|
|
||||||
|
## v1.0.9 (2026-07-09)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Test
|
||||||
|
([`6a411ce`](https://192.168.200.208:3000/sirmrak/motion_light/commit/6a411cea91047e9714519dbb190d5d92252b024a))
|
||||||
|
|
||||||
|
|
||||||
|
## v1.0.8 (2026-07-09)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Тестовый релиз
|
||||||
|
([`11bf318`](https://192.168.200.208:3000/sirmrak/motion_light/commit/11bf31885eb113d02cf5c1558446a4671c1dc202))
|
||||||
|
|
||||||
|
|
||||||
## v1.0.7 (2026-07-09)
|
## v1.0.7 (2026-07-09)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 sirmrak
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
"""The Motion Light integration."""
|
"""The Motion Light integration. Test"""
|
||||||
import logging
|
import logging
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|||||||
@@ -619,6 +619,20 @@ class MotionLightCoordinator(DataUpdateCoordinator):
|
|||||||
"state": self._state,
|
"state": self._state,
|
||||||
"attributes": self.attributes,
|
"attributes": self.attributes,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
def _cancel_lux_cooldown(self):
|
||||||
|
"""Cancel lux cooldown when light is turned on."""
|
||||||
|
if self._lux_cooldown_active:
|
||||||
|
self.logger.debug("Cancelling lux cooldown")
|
||||||
|
self._lux_cooldown_active = False
|
||||||
|
if self._lux_cooldown_timer:
|
||||||
|
self._lux_cooldown_timer()
|
||||||
|
self._lux_cooldown_timer = None
|
||||||
|
self.async_set_updated_data({
|
||||||
|
"state": self._state,
|
||||||
|
"attributes": self.attributes,
|
||||||
|
})
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def _check_lux_periodically(self, _=None):
|
def _check_lux_periodically(self, _=None):
|
||||||
"""Check lux periodically."""
|
"""Check lux periodically."""
|
||||||
@@ -655,7 +669,8 @@ class MotionLightCoordinator(DataUpdateCoordinator):
|
|||||||
if not self._is_any_sensor_active():
|
if not self._is_any_sensor_active():
|
||||||
self.logger.debug("No sensors active, not turning on")
|
self.logger.debug("No sensors active, not turning on")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
self._cancel_lux_cooldown()
|
||||||
triggered_by = self._attributes.get("triggered_by")
|
triggered_by = self._attributes.get("triggered_by")
|
||||||
await self._turn_on_switches()
|
await self._turn_on_switches()
|
||||||
await self._update_state(STATE_ON, triggered_by=triggered_by)
|
await self._update_state(STATE_ON, triggered_by=triggered_by)
|
||||||
@@ -670,7 +685,7 @@ class MotionLightCoordinator(DataUpdateCoordinator):
|
|||||||
await self._update_state(STATE_IDLE)
|
await self._update_state(STATE_IDLE)
|
||||||
self._start_lux_check_timer()
|
self._start_lux_check_timer()
|
||||||
return
|
return
|
||||||
|
self._cancel_lux_cooldown()
|
||||||
triggered_by = self._attributes.get("triggered_by")
|
triggered_by = self._attributes.get("triggered_by")
|
||||||
await self._turn_on_switches()
|
await self._turn_on_switches()
|
||||||
await self._update_state(STATE_ON, triggered_by=triggered_by)
|
await self._update_state(STATE_ON, triggered_by=triggered_by)
|
||||||
@@ -735,6 +750,7 @@ class MotionLightCoordinator(DataUpdateCoordinator):
|
|||||||
|
|
||||||
async def _enter_manual_on(self):
|
async def _enter_manual_on(self):
|
||||||
"""Enter manual_on state."""
|
"""Enter manual_on state."""
|
||||||
|
self._cancel_lux_cooldown()
|
||||||
await self._update_state(STATE_MANUAL_ON)
|
await self._update_state(STATE_MANUAL_ON)
|
||||||
if self.manual_idle_timeout > 0:
|
if self.manual_idle_timeout > 0:
|
||||||
self._reset_manual_idle_timer()
|
self._reset_manual_idle_timer()
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"domain": "motion_light",
|
"domain": "motion_light",
|
||||||
"name": "Motion Light",
|
"name": "Motion Light",
|
||||||
"version": "1.0.7",
|
"codeowners": ["@sirmrak"],
|
||||||
"documentation": "https://github.com/sirmrak/motion_light",
|
"config_flow": true,
|
||||||
"issue_tracker": "https://github.com/sirmrak/motion_light/issues",
|
"dependencies": [],
|
||||||
"dependencies": [],
|
"documentation": "https://github.com/sirmrak/motion_light",
|
||||||
"codeowners": ["@sirmrak"],
|
"iot_class": "local_push",
|
||||||
"requirements": [],
|
"issue_tracker": "https://github.com/sirmrak/motion_light/issues",
|
||||||
"iot_class": "local_push",
|
"requirements": [],
|
||||||
"config_flow": true
|
"version": "1.0.17"
|
||||||
}
|
}
|
||||||
@@ -1,101 +1,85 @@
|
|||||||
{
|
{
|
||||||
"config": {
|
"config": {
|
||||||
"step": {
|
"step": {
|
||||||
"user": {
|
"user": {
|
||||||
"title": "Motion Light",
|
"title": "Motion Light",
|
||||||
"description": "Motion-based lighting control setup",
|
"description": "Motion-based lighting control setup",
|
||||||
"data": {
|
"data": {
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"main_sensors": "Main triggers",
|
"main_sensors": "Main triggers",
|
||||||
"extend_sensors": "Extend sensors (optional)",
|
"extend_sensors": "Extend sensors (optional)",
|
||||||
"switch_entities": "Controlled switches",
|
"switch_entities": "Controlled switches",
|
||||||
"lux_sensor": "Illuminance sensor (optional)",
|
"lux_sensor": "Illuminance sensor (optional)",
|
||||||
"force_stop_sensor": "Force stop sensor (optional)",
|
"force_stop_sensor": "Force stop sensor (optional)",
|
||||||
"force_stop_state": "Force stop sensor state",
|
"force_stop_state": "Force stop sensor state",
|
||||||
"log_level": "Log level"
|
"log_level": "Log level"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": {
|
|
||||||
"step": {
|
|
||||||
"init": {
|
|
||||||
"title": "Motion Light Options",
|
|
||||||
"description": "Change integration parameters",
|
|
||||||
"data": {
|
|
||||||
"main_sensors": "Main triggers",
|
|
||||||
"extend_sensors": "Extend sensors (optional)",
|
|
||||||
"switch_entities": "Controlled switches",
|
|
||||||
"lux_sensor": "Illuminance sensor (optional)",
|
|
||||||
"force_stop_sensor": "Force stop sensor (optional)",
|
|
||||||
"force_stop_state": "Force stop sensor state",
|
|
||||||
"log_level": "Log level"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"entity": {
|
|
||||||
"switch": {
|
|
||||||
"motion_light_enabled": {
|
|
||||||
"name": "Control"
|
|
||||||
},
|
|
||||||
"motion_light_priority_manual": {
|
|
||||||
"name": "Manual priority"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"sensor": {
|
"options": {
|
||||||
"motion_light_status": {
|
"step": {
|
||||||
"name": "Status",
|
"init": {
|
||||||
"state": {
|
"title": "Motion Light Options",
|
||||||
"idle": "Idle",
|
"description": "Change integration parameters",
|
||||||
"detecting": "Detecting",
|
"data": {
|
||||||
"on": "On",
|
"main_sensors": "Main triggers",
|
||||||
"delaying": "Delaying",
|
"extend_sensors": "Extend sensors (optional)",
|
||||||
"active": "Extended",
|
"switch_entities": "Controlled switches",
|
||||||
"off": "Off",
|
"lux_sensor": "Illuminance sensor (optional)",
|
||||||
"manual_on": "Manual on",
|
"force_stop_sensor": "Force stop sensor (optional)",
|
||||||
"manual_off_cooldown": "Manual off cooldown",
|
"force_stop_state": "Force stop sensor state",
|
||||||
"force_stopped": "Force stopped",
|
"log_level": "Log level"
|
||||||
"error": "Error",
|
}
|
||||||
"disabled": "Disabled"
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"switch": {
|
||||||
|
"motion_light_enabled": {
|
||||||
|
"name": "Control"
|
||||||
|
},
|
||||||
|
"motion_light_priority_manual": {
|
||||||
|
"name": "Manual priority"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"attributes": {
|
"sensor": {
|
||||||
"switch_entities": "Controlled switches",
|
"motion_light_status": {
|
||||||
"main_sensors": "Main triggers",
|
"name": "Status",
|
||||||
"extend_sensors": "Extend sensors",
|
"state": {
|
||||||
"lux_sensor": "Illuminance sensor",
|
"idle": "Idle",
|
||||||
"force_stop_sensor": "Force stop sensor",
|
"detecting": "Detecting",
|
||||||
"force_stop_state": "Force stop state",
|
"on": "On",
|
||||||
"force_stop_active": "Force stop active",
|
"delaying": "Delaying",
|
||||||
"active_main_sensors": "Active main triggers",
|
"active": "Extended",
|
||||||
"active_extend_sensors": "Active extend sensors",
|
"off": "Off",
|
||||||
"lux_value": "Current illuminance",
|
"manual_on": "Manual on",
|
||||||
"lux_cooldown_active": "Lux cooldown active",
|
"manual_off_cooldown": "Manual off cooldown",
|
||||||
"lux_check_active": "Lux check active",
|
"force_stopped": "Force stopped",
|
||||||
"triggered_by": "Triggered by",
|
"error": "Error",
|
||||||
"last_motion_time": "Last motion time"
|
"disabled": "Disabled"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"number": {
|
||||||
|
"motion_light_motion_filter": {
|
||||||
|
"name": "Motion filter"
|
||||||
|
},
|
||||||
|
"motion_light_off_delay": {
|
||||||
|
"name": "Off delay"
|
||||||
|
},
|
||||||
|
"motion_light_lux_threshold": {
|
||||||
|
"name": "Lux threshold"
|
||||||
|
},
|
||||||
|
"motion_light_lux_cooldown": {
|
||||||
|
"name": "Lux cooldown"
|
||||||
|
},
|
||||||
|
"motion_light_manual_idle_timeout": {
|
||||||
|
"name": "'Forgot to turn off' timer"
|
||||||
|
},
|
||||||
|
"motion_light_manual_off_cooldown": {
|
||||||
|
"name": "Manual off cooldown"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
"number": {
|
|
||||||
"motion_light_motion_filter": {
|
|
||||||
"name": "Motion filter"
|
|
||||||
},
|
|
||||||
"motion_light_off_delay": {
|
|
||||||
"name": "Off delay"
|
|
||||||
},
|
|
||||||
"motion_light_lux_threshold": {
|
|
||||||
"name": "Lux threshold"
|
|
||||||
},
|
|
||||||
"motion_light_lux_cooldown": {
|
|
||||||
"name": "Lux cooldown"
|
|
||||||
},
|
|
||||||
"motion_light_manual_idle_timeout": {
|
|
||||||
"name": "'Forgot to turn off' timer"
|
|
||||||
},
|
|
||||||
"motion_light_manual_off_cooldown": {
|
|
||||||
"name": "Manual off cooldown"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,101 +1,85 @@
|
|||||||
{
|
{
|
||||||
"config": {
|
"config": {
|
||||||
"step": {
|
"step": {
|
||||||
"user": {
|
"user": {
|
||||||
"title": "Motion Light",
|
"title": "Motion Light",
|
||||||
"description": "Настройка управления освещением по движению",
|
"description": "Настройка управления освещением по движению",
|
||||||
"data": {
|
"data": {
|
||||||
"name": "Название",
|
"name": "Название",
|
||||||
"main_sensors": "Главные триггеры",
|
"main_sensors": "Главные триггеры",
|
||||||
"extend_sensors": "Датчики продления (опционально)",
|
"extend_sensors": "Датчики продления (опционально)",
|
||||||
"switch_entities": "Управляемые выключатели",
|
"switch_entities": "Управляемые выключатели",
|
||||||
"lux_sensor": "Датчик освещённости (опционально)",
|
"lux_sensor": "Датчик освещённости (опционально)",
|
||||||
"force_stop_sensor": "Датчик принудительной остановки (опционально)",
|
"force_stop_sensor": "Датчик принудительной остановки (опционально)",
|
||||||
"force_stop_state": "Состояние датчика принудительной остановки",
|
"force_stop_state": "Состояние датчика принудительной остановки",
|
||||||
"log_level": "Уровень логирования"
|
"log_level": "Уровень логирования"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": {
|
|
||||||
"step": {
|
|
||||||
"init": {
|
|
||||||
"title": "Настройки Motion Light",
|
|
||||||
"description": "Изменение параметров интеграции",
|
|
||||||
"data": {
|
|
||||||
"main_sensors": "Главные триггеры",
|
|
||||||
"extend_sensors": "Датчики продления (опционально)",
|
|
||||||
"switch_entities": "Управляемые выключатели",
|
|
||||||
"lux_sensor": "Датчик освещённости (опционально)",
|
|
||||||
"force_stop_sensor": "Датчик принудительной остановки (опционально)",
|
|
||||||
"force_stop_state": "Состояние датчика принудительной остановки",
|
|
||||||
"log_level": "Уровень логирования"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"entity": {
|
|
||||||
"switch": {
|
|
||||||
"motion_light_enabled": {
|
|
||||||
"name": "Управление"
|
|
||||||
},
|
|
||||||
"motion_light_priority_manual": {
|
|
||||||
"name": "Приоритет ручного"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"sensor": {
|
"options": {
|
||||||
"motion_light_status": {
|
"step": {
|
||||||
"name": "Статус",
|
"init": {
|
||||||
"state": {
|
"title": "Настройки Motion Light",
|
||||||
"idle": "Ожидание",
|
"description": "Изменение параметров интеграции",
|
||||||
"detecting": "Обнаружение",
|
"data": {
|
||||||
"on": "Включено",
|
"main_sensors": "Главные триггеры",
|
||||||
"delaying": "Задержка выключения",
|
"extend_sensors": "Датчики продления (опционально)",
|
||||||
"active": "Продлено",
|
"switch_entities": "Управляемые выключатели",
|
||||||
"off": "Выключено",
|
"lux_sensor": "Датчик освещённости (опционально)",
|
||||||
"manual_on": "Ручное включение",
|
"force_stop_sensor": "Датчик принудительной остановки (опционально)",
|
||||||
"manual_off_cooldown": "Пауза после ручного выкл.",
|
"force_stop_state": "Состояние датчика принудительной остановки",
|
||||||
"force_stopped": "Принудительная остановка",
|
"log_level": "Уровень логирования"
|
||||||
"error": "Ошибка",
|
}
|
||||||
"disabled": "Отключено"
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"switch": {
|
||||||
|
"motion_light_enabled": {
|
||||||
|
"name": "Управление"
|
||||||
|
},
|
||||||
|
"motion_light_priority_manual": {
|
||||||
|
"name": "Приоритет ручного"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"attributes": {
|
"sensor": {
|
||||||
"switch_entities": "Управляемые выключатели",
|
"motion_light_status": {
|
||||||
"main_sensors": "Главные триггеры",
|
"name": "Статус",
|
||||||
"extend_sensors": "Датчики продления",
|
"state": {
|
||||||
"lux_sensor": "Датчик освещённости",
|
"idle": "Ожидание",
|
||||||
"force_stop_sensor": "Датчик принудительной остановки",
|
"detecting": "Обнаружение",
|
||||||
"force_stop_state": "Состояние принудительной остановки",
|
"on": "Включено",
|
||||||
"force_stop_active": "Принудительная остановка активна",
|
"delaying": "Задержка выключения",
|
||||||
"active_main_sensors": "Активные главные триггеры",
|
"active": "Продлено",
|
||||||
"active_extend_sensors": "Активные датчики продления",
|
"off": "Выключено",
|
||||||
"lux_value": "Текущая освещённость",
|
"manual_on": "Ручное включение",
|
||||||
"lux_cooldown_active": "Cooldown люкса активен",
|
"manual_off_cooldown": "Пауза после ручного выкл.",
|
||||||
"lux_check_active": "Проверка люкса активна",
|
"force_stopped": "Принудительная остановка",
|
||||||
"triggered_by": "Активировано",
|
"error": "Ошибка",
|
||||||
"last_motion_time": "Последнее движение"
|
"disabled": "Отключено"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"number": {
|
||||||
|
"motion_light_motion_filter": {
|
||||||
|
"name": "Фильтр движения"
|
||||||
|
},
|
||||||
|
"motion_light_off_delay": {
|
||||||
|
"name": "Задержка выключения"
|
||||||
|
},
|
||||||
|
"motion_light_lux_threshold": {
|
||||||
|
"name": "Порог освещённости"
|
||||||
|
},
|
||||||
|
"motion_light_lux_cooldown": {
|
||||||
|
"name": "Cooldown люкса"
|
||||||
|
},
|
||||||
|
"motion_light_manual_idle_timeout": {
|
||||||
|
"name": "Таймер 'забыл выключить'"
|
||||||
|
},
|
||||||
|
"motion_light_manual_off_cooldown": {
|
||||||
|
"name": "Cooldown ручного выкл."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
"number": {
|
|
||||||
"motion_light_motion_filter": {
|
|
||||||
"name": "Фильтр движения"
|
|
||||||
},
|
|
||||||
"motion_light_off_delay": {
|
|
||||||
"name": "Задержка выключения"
|
|
||||||
},
|
|
||||||
"motion_light_lux_threshold": {
|
|
||||||
"name": "Порог освещённости"
|
|
||||||
},
|
|
||||||
"motion_light_lux_cooldown": {
|
|
||||||
"name": "Cooldown люкса"
|
|
||||||
},
|
|
||||||
"motion_light_manual_idle_timeout": {
|
|
||||||
"name": "Таймер 'забыл выключить'"
|
|
||||||
},
|
|
||||||
"motion_light_manual_off_cooldown": {
|
|
||||||
"name": "Cooldown ручного выкл."
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
+5
-10
@@ -1,29 +1,24 @@
|
|||||||
[tool.semantic_release]
|
[tool.semantic_release]
|
||||||
# Формат тега С префиксом v (для совместимости с существующими тегами)
|
|
||||||
tag_format = "v{version}"
|
tag_format = "v{version}"
|
||||||
|
|
||||||
# Где обновлять версию при релизе
|
|
||||||
version_variables = [
|
version_variables = [
|
||||||
"custom_components/motion_light/manifest.json:version",
|
"custom_components/motion_light/manifest.json:version",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Сообщение коммита
|
|
||||||
commit_message = "chore(release): v{version}"
|
commit_message = "chore(release): v{version}"
|
||||||
|
|
||||||
# Настройки для Gitea
|
# Отключаем создание релиза через API Gitea (релиз будет создаваться в GitHub)
|
||||||
|
upload_to_vcs_release = false
|
||||||
|
|
||||||
[tool.semantic_release.remote]
|
[tool.semantic_release.remote]
|
||||||
type = "gitea"
|
type = "gitea"
|
||||||
# URL вашей Gitea (без trailing slash)
|
domain = "git.darkmode.duckdns.org"
|
||||||
domain = "https://192.168.200.208:3000"
|
api_domain = "git.darkmode.duckdns.org"
|
||||||
# Имя пользователя и репозитория
|
|
||||||
api_path = "/api/v1"
|
|
||||||
|
|
||||||
# Настройки веток
|
|
||||||
[tool.semantic_release.branches.main]
|
[tool.semantic_release.branches.main]
|
||||||
match = "(main|master)"
|
match = "(main|master)"
|
||||||
prerelease = false
|
prerelease = false
|
||||||
|
|
||||||
# Настройки парсера коммитов
|
|
||||||
[tool.semantic_release.commit_parser_options]
|
[tool.semantic_release.commit_parser_options]
|
||||||
allowed_tags = ["feat", "fix", "docs", "style", "refactor", "perf", "test", "chore", "revert"]
|
allowed_tags = ["feat", "fix", "docs", "style", "refactor", "perf", "test", "chore", "revert"]
|
||||||
minor_tags = ["feat"]
|
minor_tags = ["feat"]
|
||||||
|
|||||||
Reference in New Issue
Block a user