Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HASS status sensor + improve HASS discovery #5139

Merged
merged 1 commit into from
Feb 6, 2019

Conversation

emontnemery
Copy link
Contributor

@emontnemery emontnemery commented Feb 6, 2019

Announce a status sensor for each device as in the below screenshot.

Also improve Hass discovery:

  • Only announce the device in the status sensor, to avoid overflowing the MQTT message buffer
    With this change, full topic and friendly name (32 characters) is supported without any issue for all device types (worst case is RGBW light).
  • In case there is again issue with overflow in the future, add helper try_snprintf_P which:
    • Detects and prints an error message in the log in case the buffer is too small
    • Makes sure invalid JSON is never generated

image

@arendst arendst merged commit 6c934ca into arendst:development Feb 6, 2019
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.

2 participants