Change mqtt lights to new schema attribute #689
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Repull of #656
Original pull blurb:
This pull is in prep for Homeassistant 0.84 when light.mqtt_json will become a schema for mqtt.light.
As noted in #646 mqtt_json lights are not showing in the mqtt config entry (configuration -> integrations).
light.mqtt_json
is now being incorporated in tolight.mqtt
(This is a breaking change as mqtt_json platform now errors in 0.84).This pull makes the minor change to lights exposed via mqtt discovery to use the new
"schema":
attribute, allowing HA to set them up in the correct manner while also allowing the entities to be added to the entity registry. This will then in turn make them appear in the device registry once that pull is merged from dev to master in 0.84.If used against 0.83.3 the entity will show up in the entity registry correctly but the light will be only a basic light so this has only been tested against the dev branch. Can be tested against master / merged once 0.84 is released.