Compare commits

..
9 Commits
Author SHA1 Message Date
semantic-release f129191a48 chore(release): v1.0.17
Update Version / Update Version (push) Successful in 5s
2026-07-17 08:07:41 +00:00
sirmrak 31237e76d9 fix: Test
Update Version / Update Version (push) Successful in 6s
2026-07-17 10:58:44 +03:00
sirmrak fc59a786ed Обновить pyproject.toml
Update Version / Update Version (push) Successful in 5s
2026-07-17 10:57:53 +03:00
sirmrak 71cbd70f9e Обновить .gitea/workflows/update_version.yml
Update Version / Update Version (push) Successful in 8s
2026-07-17 10:57:16 +03:00
semantic-release f12371e519 chore(release): v1.0.16
Update Version / Update Version (push) Successful in 5s
2026-07-10 09:09:57 +00:00
sirmrak eae1c9cef2 fix: Test new secrets
Update Version / Update Version (push) Successful in 6s
2026-07-10 12:09:50 +03:00
semantic-release 8dff505bb4 chore(release): v1.0.15
Update Version / Update Version (push) Successful in 5s
2026-07-10 06:49:05 +00:00
sirmrak 342a98327d fix: lux_cooldown_active
Update Version / Update Version (push) Successful in 7s
2026-07-10 09:48:56 +03:00
sirmrak d10e83c750 Добавить LICENSE
Update Version / Update Version (push) Successful in 5s
2026-07-09 22:28:37 +03:00
7 changed files with 70 additions and 32 deletions
+2 -25
View File
@@ -6,13 +6,11 @@ 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' if: github.actor != 'gitea-actions[bot]' && github.actor != 'Gitea Actions Bot'
permissions: permissions:
contents: write contents: write
@@ -41,29 +39,8 @@ jobs:
env: env:
GITEA_TOKEN: ${{ secrets.PAT_TOKEN }} GITEA_TOKEN: ${{ secrets.PAT_TOKEN }}
run: | run: |
echo "🧹 Сбрасываем конфликтующие переменные Gitea Actions..."
unset GITHUB_SERVER_URL unset GITHUB_SERVER_URL
unset GITHUB_API_URL unset GITHUB_API_URL
unset GITHUB_REPOSITORY unset GITHUB_REPOSITORY
echo "🔐 Записываем оригинальный Root CA от mkcert из секретов..." semantic-release version
echo "${{ secrets.LOCAL_ROOT_CA }}" > /tmp/rootCA.crt
# Проверка на случай, если секрет забыли настроить
if [ ! -s /tmp/rootCA.crt ]; then
echo "❌ Ошибка: Секрет LOCAL_ROOT_CA пуст. Проверьте настройки репозитория!"
exit 1
fi
echo "✅ Root CA успешно прочитан."
# Находим, где конкретно Python (библиотека certifi) хранит свои сертификаты
CERTIFI_PATH=$(python3 -c "import certifi; print(certifi.where())")
echo "Путь к bundle Python: $CERTIFI_PATH"
# Внедряем корневой сертификат mkcert в конец доверенного списка Python
cat /tmp/rootCA.crt >> "$CERTIFI_PATH"
echo "✅ Root CA от mkcert добавлен в доверенные для Python!"
echo "🚀 Запускаем semantic-release..."
semantic-release version
+24
View File
@@ -2,6 +2,30 @@
<!-- 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) ## v1.0.14 (2026-07-09)
### Bug Fixes ### Bug Fixes
+21
View File
@@ -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 -1
View File
@@ -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
+18 -2
View File
@@ -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 -1
View File
@@ -8,5 +8,5 @@
"iot_class": "local_push", "iot_class": "local_push",
"issue_tracker": "https://github.com/sirmrak/motion_light/issues", "issue_tracker": "https://github.com/sirmrak/motion_light/issues",
"requirements": [], "requirements": [],
"version": "1.0.14" "version": "1.0.17"
} }
+3 -3
View File
@@ -7,13 +7,13 @@ version_variables = [
commit_message = "chore(release): v{version}" commit_message = "chore(release): v{version}"
# ВАЖНО: не создаём релиз в Gitea (релиз будет в GitHub) # Отключаем создание релиза через API Gitea (релиз будет создаваться в GitHub)
upload_to_vcs_release = false upload_to_vcs_release = false
[tool.semantic_release.remote] [tool.semantic_release.remote]
type = "gitea" type = "gitea"
domain = "192.168.200.208:3000" domain = "git.darkmode.duckdns.org"
api_domain = "192.168.200.208:3000" api_domain = "git.darkmode.duckdns.org"
[tool.semantic_release.branches.main] [tool.semantic_release.branches.main]
match = "(main|master)" match = "(main|master)"