Fix meter lifecycle and MQTT/HA integration bugs #1
Reference in New Issue
Block a user
Delete Branch "fix-attach-meters-detach"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes a batch of meter-lifecycle and MQTT/Home Assistant integration bugs.
attachMeters()— channels orphaned when the meter count shrinks or a pin changes are now detached and driven low (meter reads zero) instead of left driving PWM on the old pin.NULLfor an anonymous connection.online/offline, and discovery includesavailability_topic+ payloads so HA tracks online/offline state.retain: truein discovery) so commanded values survive restarts.<and>inescHtmlto prevent stored XSS via config fields.