Compare commits

..
7 Commits
Author SHA1 Message Date
sirmrak 1652b379e8 Delete .gitea/workflows/test.yml
Update Version / Update Version (push) Successful in 5s
2026-07-24 13:39:32 +03:00
semantic-release 9900ffbf42 chore(release): v1.2.0-beta.4
Update Version / Update Version (push) Successful in 5s
2026-07-22 07:26:36 +00:00
sirmrak 5e5242888a fix: correct prerelease detection in GitHub workflow
Update Version / Update Version (push) Successful in 6s
2026-07-22 10:26:28 +03:00
semantic-release a900385989 chore(release): v1.2.0-beta.3
Update Version / Update Version (push) Successful in 5s
2026-07-22 06:48:12 +00:00
sirmrak 9178687d8a fix: await self._start_lux_cooldown()
Update Version / Update Version (push) Successful in 6s
2026-07-22 09:48:04 +03:00
semantic-release 759f7c4a95 chore(release): v1.2.0-beta.2
Update Version / Update Version (push) Successful in 5s
2026-07-22 06:33:58 +00:00
sirmrak 569f49a470 fix: Dev update
Update Version / Update Version (push) Successful in 6s
2026-07-22 09:33:51 +03:00
6 changed files with 64 additions and 45 deletions
-33
View File
@@ -1,33 +0,0 @@
name: Test Runner
on:
push:
branches:
- main
- master
env:
GIT_SSL_NO_VERIFY: true
jobs:
test:
name: Test Job
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Echo message
run: |
echo "Hello from Gitea Actions!"
echo "Runner is working correctly!"
date
pwd
ls -la
- name: Test Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Check Python version
run: python --version
+18 -6
View File
@@ -113,7 +113,7 @@ jobs:
echo "commits<<EOF" >> $GITHUB_OUTPUT
echo "$COMMITS" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -123,11 +123,15 @@ jobs:
IS_BETA="${{ steps.tag.outputs.is_beta }}"
echo "🚀 Создаём релиз $TAG в GitHub..."
echo "Тип релиза: IS_BETA=$IS_BETA"
# Определяем заголовок
if [ "$IS_BETA" = "true" ]; then
TITLE="Beta Release $TAG"
PRERELEASE_FLAG="--prerelease"
else
TITLE="Release $TAG"
PRERELEASE_FLAG=""
fi
cat > /tmp/release_notes.md << EOF
@@ -136,10 +140,18 @@ jobs:
$COMMITS
EOF
gh release create "$TAG" \
--title "$TITLE" \
--notes-file /tmp/release_notes.md \
--target main \
${IS_BETA:+--prerelease}
# Создаём релиз
if [ -n "$PRERELEASE_FLAG" ]; then
gh release create "$TAG" \
--title "$TITLE" \
--notes-file /tmp/release_notes.md \
--target main \
--prerelease
else
gh release create "$TAG" \
--title "$TITLE" \
--notes-file /tmp/release_notes.md \
--target main
fi
echo "✅ Релиз создан!"
+24
View File
@@ -2,6 +2,30 @@
<!-- version list -->
## v1.2.0-beta.4 (2026-07-22)
### Bug Fixes
- Correct prerelease detection in GitHub workflow
([`5e52428`](https://git.darkmode.duckdns.org/sirmrak/motion_light/commit/5e5242888af5d66e20e95156ac846d7f650a23e3))
## v1.2.0-beta.3 (2026-07-22)
### Bug Fixes
- Await self._start_lux_cooldown()
([`9178687`](https://git.darkmode.duckdns.org/sirmrak/motion_light/commit/9178687d8a74a5a0e537f14dcd828c03ca7da490))
## v1.2.0-beta.2 (2026-07-22)
### Bug Fixes
- Dev update
([`569f49a`](https://git.darkmode.duckdns.org/sirmrak/motion_light/commit/569f49a47072fdb9a7797d16e6670865360c71c1))
## v1.2.0-beta.1 (2026-07-22)
### Features
+1 -1
View File
@@ -1,4 +1,4 @@
"""The Motion Light integration. Test"""
"""The Motion Light integration. Dev"""
import logging
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
+20 -4
View File
@@ -389,7 +389,23 @@ class MotionLightCoordinator(DataUpdateCoordinator):
self._cancel_timer("_lux_cooldown_timer")
self._lux_cooldown_timer = async_call_later(self.hass, self.lux_cooldown, self._lux_cooldown_expired)
self.async_set_updated_data({"state": self._state, "attributes": self.attributes})
def _start_lux_cooldown(self):
"""Start lux cooldown after turning off lights."""
self._lux_cooldown_active = True
if self.lux_cooldown > 0:
if self._lux_cooldown_timer:
self._lux_cooldown_timer()
self._lux_cooldown_timer = async_call_later(
self.hass,
self.lux_cooldown,
self._lux_cooldown_expired,
)
self.logger.info("Lux cooldown started for %d sec", self.lux_cooldown)
self.async_set_updated_data({
"state": self._state,
"attributes": self.attributes,
})
def _cancel_lux_cooldown(self):
if self._lux_cooldown_active:
self._lux_cooldown_active = False
@@ -433,7 +449,7 @@ class MotionLightCoordinator(DataUpdateCoordinator):
await self._update_state(STATE_ON)
return
await self._turn_off_switches()
await self._start_lux_cooldown()
self._start_lux_cooldown()
await self._update_state(STATE_OFF)
async_call_later(self.hass, 1, self._transition_to_idle)
@@ -469,12 +485,12 @@ class MotionLightCoordinator(DataUpdateCoordinator):
async def _turn_off_switches_manual(self):
await self.hass.services.async_call("homeassistant", "turn_off", {"entity_id": self.switch_entities})
await self._start_lux_cooldown()
self._start_lux_cooldown()
await self._update_state(STATE_OFF)
async_call_later(self.hass, 1, self._transition_to_idle)
async def _enter_manual_off_cooldown(self):
await self._start_lux_cooldown()
self._start_lux_cooldown()
await self._update_state(STATE_MANUAL_OFF_COOLDOWN)
if self.manual_off_cooldown > 0:
self._start_timer("_manual_off_cooldown_timer", self.manual_off_cooldown, self._manual_off_cooldown_expired)
+1 -1
View File
@@ -8,5 +8,5 @@
"iot_class": "local_push",
"issue_tracker": "https://github.com/sirmrak/motion_light/issues",
"requirements": [],
"version": "1.2.0-beta.1"
"version": "1.2.0-beta.4"
}