Thank you very much!
Despite translating old to new format of a single mqtt sensor is a very simple thing, having a large configuration.yaml ( by large I mean a structured tree of included files ) to translate isn’t that straight forward.
Packages was exactly what I was missing in this forced configuration rewriting, and I think this is what many are missing too (judging from what is asked, or ranted ).
Using packages was optional, and still it is, but it’s gonna be mandatory for some way of organize things out.
In my case, with many dozen of devices, I have spitted my configuration.yaml into topics like that
switch laudry:
- platform: mqtt
bla: bla bla
sensor laudry:
- platform: mqtt
bla: bla bla
other: bla bla
switch living_room:
- platform: mqtt
bla bla bla
sensor living_room:
- platform: mqtt
bla: bla bla
My first, failing, attempt was to convert that into something like
mqtt:
switch laudry:
bla bla bla
sensor laudry:
bla bla bla
switch living_room:
bla bla bla
sensor living_room:
bla bla bla
But while top integration like light
or switch
support key modifier, that’s not supported (yet?) by new MQTT syntax.
Using packages, I was able to keep my original organization into topics (actually improving it) with somethink like into the main configuration.yaml
homeassistant:
packages: !include_dir_merge_named packages/
and many packages with mqtt in they top level like this
laudry:
mqtt:
switch:
bla: bla bla
sensor:
bla: bla bla
I hope this will help other to migrate successfully their configuration as well.