Archived
feat(door): add door_event event entity for pass-through timestamps
Validate YAML Configs / Validate YAML Schema (push) Failing after 11m0s
Validate YAML Configs / Validate YAML Schema (push) Failing after 11m0s
door_status stays at the same value on every pass, so HA never moves last_changed and the logbook cannot show when the door was actually used. An event entity's state is the timestamp of the last occurrence, so a repeated event_type still updates it, and it is not restored across HA restarts — no stale "entering" coming back after a reboot. Both entities are derived from the same advertisement: door_status for the current state, door_event for when it happened. heartbeat: 60s lets the same event_type fire again after 60s, which is once per pass in practice. Also teach scripts/validate.py the event platform, mirroring the app's ConfigValidator rules: event_types required (error), map values missing from event_types, absent decode.map, numeric metadata, and a publish rule whose on_change_only suppresses repeats (warnings). The inherited publish rule (sensor > device > defaults) is now threaded down to sensor validation. Requires HassBle 1.5.0 or newer — event_types is a new key and older versions parse config.yaml in strict mode. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9b937c8840
commit
9e55c585f9
4 files changed
+63
-9
No files matched your search
+1
-1
@@ -409,7 +409,7 @@ obd:
|
||||
```yaml
|
||||
sensors:
|
||||
- key: temperature # 필수 — 기기 내 고유 키
|
||||
platform: sensor # sensor | binary_sensor | text_sensor
|
||||
platform: sensor # sensor | binary_sensor | text_sensor | event
|
||||
device_class: temperature # HA device_class (선택)
|
||||
unit: "°C"
|
||||
state_class: measurement # measurement | total | total_increasing
|
||||
|
||||
Reference in new issue
Block a user