0.10.10 — light/cover error handling, event unsubscribe, number JSON-decode guard
No breaking changes. Requires boschshcpy==0.4.9.
Findings from a full code review, fixed in three passes:
light.py/cover.py:LightSwitch,MotionDetectorLight,RelayLight
(turn on/off) and all fourcover.pywrite actions (open/close/set
position/stop, including tilt) now catchSHCExceptionand raise a
translatedHomeAssistantError, matching the pattern every other
write-capable platform already had since 0.10.6.cover.py's optimistic
state (is_opening/target_position) is now only set after the device
write succeeds, so a failed write no longer leaves the UI stuck showing a
state change that never happened.cover.py:ShutterControlCover.current_cover_positionno longer
reports a stale HA-side target position while a Shutter-II device is being
moved from the Bosch app or a physical switch — it now uses the live
device-reported position wheneveroperation_stateisOPENING/CLOSING.event.py:UniversalSwitchEvent,LightControlButtonEvent,
SHCScenarioEvent,MotionDetectorEvent,SmokeDetectionSystemEvent, and
SmokeDetectorEventnow unregister their callbacks on entity removal
(async_will_remove_from_hass) — previously left subscribed indefinitely.number.py: all setters now catchjson.JSONDecodeErrorfrom a
malformed-but-200-OK write response, matchingDimmerConfigNumber's
existing handling; the remainingexcept (SHCException, SHCConnectionError)
tuples acrossselect.py/number.py/switch.py/binary_sensor.py/
alarm_control_panel.py/__init__.pyare simplified toexcept SHCException(boschshcpy 0.4.9 madeSHCConnectionErrora subclass, see
0.10.9's changelog entry).- Two copy-paste doc fixes (
logbook.py,alarm_control_panel.py) and a
round of comment condensing flagged by the new comment-length CI gate. binary_sensor.py/cover.py/light.py:*Service.Stateenum
comparisons switched from==/!=tois/is not— matches the
identity-comparison conventionha-core's custom mypy plugin enforces on
these same platforms there, ahead of eventually migrating them.binary_sensor.py/sensor.py:MotionDetectionSensor,
OccupancyDetectionSensor,TamperSensor, and
NextSetpointTemperatureSensornow declare_unrecorded_attributesfor
their timestamp-valuedextra_state_attributes(last_motion_detected,
last_occupancy_change,last_tamper_time,next_change_at) — previously
every state write added a new recorder DB row even when nothing
user-visible changed, since each of those values is unique per event.