Skip to content

Add Home Assistant discovery for BLE events - #326

Open
theGressier wants to merge 1 commit into
theengs:developmentfrom
theGressier:feat/mqtt-event-support
Open

Add Home Assistant discovery for BLE events#326
theGressier wants to merge 1 commit into
theengs:developmentfrom
theGressier:feat/mqtt-event-support

Conversation

@theGressier

Copy link
Copy Markdown

Description

Add Home Assistant MQTT Event discovery for event-oriented BLE devices such as the Schneider Electric Odace SFSP introduced by theengs/decoder#707.

  • Map decoder properties with unit: event to the Home Assistant MQTT event platform.
  • Publish the decoder-provided event_types list.
  • Transform incoming values into the required {"event_type": "..."} JSON payload.
  • Reset the entity type for each property and remove a legacy sensor discovery topic when migrating an event property.
  • Suppress repeated identical S520104 advertisements while preserving each distinct button press. The device repeats the same complete advertisement within one radio burst, while a new press changes the trailing event bytes.

Hardware validation was performed with a Schneider Electric Odace SFSP S520104, a Sena UD100 Bluetooth adapter, Debian 11, MQTT, and Home Assistant. Repeated toggle presses are exposed as separate Home Assistant events, and duplicate radio advertisements produce only one event per physical press.

Depends on theengs/decoder#707.

Checklist

  • I have created the pull request against the latest development branch
  • I have added only one feature/fix per PR and the code change compiles without warnings
  • I accept the Developer Certificate of Origin (DCO).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant