Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

mqtt_json platform depreciated in Homeassistant 0.84 #321

Closed
cbrherms opened this issue Dec 13, 2018 · 3 comments · Fixed by #322
Closed

mqtt_json platform depreciated in Homeassistant 0.84 #321

cbrherms opened this issue Dec 13, 2018 · 3 comments · Fixed by #322
Labels
📐Difficulty: Easy This probably will be quite easy to do. ☑️Status: Completed

Comments

@cbrherms
Copy link

cbrherms commented Dec 13, 2018

Operating environment/Installation (Hass.io/Docker/pip/etc.):

All

ESP (ESP32/ESP8266/Board/Sonoff):

All

Affected component:

All components that use the mqtt_json platform as output

Description of problem:
Changes to mqtt lights in homeassistant made mqtt_json platform depreciated, this is now incorporated in to one platform, light.mqtt, with the type of mqtt light configured via a schema.
This should only affect devices set up via mqtt discovery using the old type of config, and users who manually setup their lights in configuration.yaml
Pull that implemented this and describes the change is here: home-assistant/core#18227

Problem-relevant YAML-configuration entries:

Old configuration entry

light:
  - platform: mqtt_json
    command_topic: "home/rgb1/set"

New entry

light:
  - platform: mqtt
    schema: json
    command_topic: "home/rgb1/set"

Traceback (if applicable):


Additional information:

Due to the depreciation above, in HA 0.84.1 devices set up as light produce a warning as still using the old setup via Mqtt discovery

@OttoWinter OttoWinter mentioned this issue Dec 15, 2018
3 tasks
@OttoWinter OttoWinter added 📐Difficulty: Easy This probably will be quite easy to do. ☑️Status: Completed labels Dec 15, 2018
@ghost
Copy link

ghost commented Dec 15, 2018

So it seems like there is still some work ahead for #322, right?
From what I can understand, fixing this directly would only require a minor change to the discovery message format.
Are you working on that? If not, I might look into it, because right now this breaks all my lights.

@OttoWinter
Copy link
Member

@thubot No, it doesn't break any lights - they might have been renamed to light.the_light_2 but that cannot be fixed (HA issue).

The mqtt_json removal is a deprecation and is backwards-compatible for the MQTT protocol (I know, if you look at the PR that implemented it on the HA side you'll see me as a reviewer).

I won't change this to the new "schema" format until something like esphomelib v1.11.0 or even 1.12. The reason is that many users don't immediately update their HA installations and if I upgrade to the newer format it would break it for everybody with older versions of HA.

If I don't change it just yet, it is only a minor annoyance as a warning message gets logged, but lights still work.

@ghost
Copy link

ghost commented Dec 15, 2018

Ah, you're right about the renaming. I missed that, sorry. Seems like I have some UI and group editing to do.

@esphome esphome locked and limited conversation to collaborators Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📐Difficulty: Easy This probably will be quite easy to do. ☑️Status: Completed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants