Skip to content

Conversation

@irobot
Copy link

@irobot irobot commented Sep 9, 2025

The discovery document for light entities declares JSON Schema
payloads.
In this format, color attribute names are abbreviated. Consequently,
without renaming the light entity color attributes, incoming
messages are not parsed correctly.

As an example, here's a command payload, issued by HomeAssistant,
requesting that color be set to the specified hue and saturation values:

{"state":"ON","color":{"h":9.123,"s":67.059}}

Per the current definition of LightColorState we expect hue and
saturation, but we get h and s.

Changes:

  • Rename all LightColorState properties.
  • Ensure platform is strictly "light" for light entities.
  • Make LightColorState's properties public, so that they are accessible.

The discovery document for light entities declares use of JSON Schema payloads.
In this format, color attribute names are abbreviated.

Additionally:

- the platform attribute must be "light" for Light entities
- LightColorState's properties should be public, so that they are accessible
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