Can coexist sensor.yaml and mqtt.yaml with a sensor subdir?

Hi ,
I am trying to clean up my code and also getting ready for the breaking change on mqtt syntax in the future 2022.12.0.

I merged all my MQTT stuff in mqtt.yaml like the example below
My mqtt.yaml

# SENSORI MQTT
  sensor:
# Sensori T & H Shelly
   - name: "Temperatura Studio"
     state_topic: "shellies/SensoreHstudio/sensor/temperature"
     value_template: "{{ value }}"
     unit_of_measurement: "°C"
     icon: mdi:thermometer

# SWITCH MQTT
  switch:
#Roomba Switch
   - name: "Roomba"
     command_topic: "roomba/commands"
     payload_on: "start"
     payload_off: "stop"

in my config.yaml I added mqtt: !include mqtt.yaml and always seems to work correctly
The problem is that I have also this in my config .

sensor: !include sensor.yaml
mqtt: !include mqtt.yaml
switch: !include switch.yam

Can switch coexist in MQTT and a separate switch.yaml?

Even if I changed MQTT configuration removing - platform:mqtt as requested by 2022.12.0. new breaking changes I keep receiving an error that a " manually configurated sensor mqtt under platform sensor " still exist , but I can’t find it .

this is my sensor.yaml

    language: it
    forecast:
      - 0
    hourly_forecast:
      - 0
      - 1
    monitored_conditions:
      - summary
      - icon
      - temperature
      - sunrise_time
      - sunset_time
      - alerts

  - platform: time_date
    display_options:
      - 'time'
      - 'date'

#System monitor sensor
  - platform: systemmonitor
    resources:
      - type: disk_use_percent
        arg: /
      - type: memory_free
      - type: processor_use
      - type: last_boot

#Life 360 sensor
  - platform: template
    sensors:
      andrea_phone:
        friendly_name: "Batteria Andrea"
        unit_of_measurement: '%'
        value_template: "{{ state_attr('device_tracker.life360', 'battery') }}"
        device_class: battery

  - platform: template
    sensors:
      elisa_phone:
        friendly_name: "Batteria Elisa"
        unit_of_measurement: '%'
        value_template: "{{ state_attr('device_tracker.life360', 'battery') }}"
        device_class: battery

  - platform: template
    sensors:
      neri_phone:
        friendly_name: "Batteria Neri"
        unit_of_measurement: '%'
        value_template: "{{ state_attr('device_tracker.life360', 'battery') }}"
        device_class: battery

  - platform: template
    sensors:
      shelly_em_corrente_ch1:
        friendly_name: "Corrente casa"
        value_template: '{{ (states("sensor.Assorbimento_casa")|float / states("sensor.tensione_condominio")|float)|float|round(1) }}'
        unit_of_measurement: "Ampere"
        icon_template: mdi:current-ac
      shelly_em_corrente_ch2:
        friendly_name: "Corrente condominio"
        value_template: '{{ (states("sensor.Assorbimento_condominio")|float / states("sensor.tensione_condominio")|float)|float|round(1) }}'
        unit_of_measurement: "Ampere"
        icon_template: mdi:current-ac

  - platform: wundergroundpws
    api_key: 
    pws_id: 
    numeric_precision: decimal
    monitored_conditions:
      - temp
      - obsTimeLocal
      - humidity
      - dewpt
      - heatIndex
      - stationID
      - winddir
      - windChill
      - precipTotal
      - precipRate
      - pressure
      - windGust
      - windSpeed
      - precip_1d
      - precip_2d
      - precip_3d
      - precip_4d
      - precip_chance_1d
      - temp_high_1d
      - temp_low_1d
      - weather_1d
      - weather_2d
      - weather_3d
      - weather_4d

  - platform: template
    sensors:
      my_wupws_humidity:
        unit_of_measurement: "%"
        value_template: "{{states('sensor.wupws_humidity') | int }}"

  - platform: filesize
    file_paths:
      - /config/home-assistant_v2.db

  - platform: sun2
    monitored_conditions:
      - sunrise
      - sunset
      - sun_phase

The configuration check is passed but I still receiving the repair alert regarding the MQTT breaking what I am missing?

Thank you
Andrea
mqtt error

I can’t translate the message, but I assume it actually says it’s a manually configured switch, not a manually configured sensor. In any case if you have the SSH & Web Terminal add-on, paste in this command:

grep -rnw '/config/' -e 'platform: mqtt'

That should tell you what files still have the old style of MQTT configuration.

Thank you for your answer. I tried as you suggested but the results is:

andrea@debian:~$ grep -rnw ‘/config/’ -e ‘platform: mqtt’
grep: /config/: No such file or directory

this is the translated message in english

Your manually configured MQTT switch (s) needs attention
This stops working in version 2022.12.0. Please resolve the issue before upgrading.
manually configured MQTT switch found under the switch platform entry.

Move the configuration to the mqtt integration entry and restart Home Assistant to fix this problem. Consult the documentation for more information.

Attention - 11/9/2022

You need to look in your switch.yaml (assuming the switch.yam in your original post was just a pasting error).

Somewhere in there will be an MQTT switch — you need to rewrite that into mqtt.yaml, similar to the Roomba switch you already have.

You said the error was “manually configurated sensor mqtt under platform sensor” — but your screenshot says it’s under “platform switch”.

I am breaking my head.
you are right the error say that i have " sensor MQTT manually configurated under platform sensor"
what does exactly this mean ?

I canceled all the content in the sensor.yaml and the error is still there. I am wondering why the date of the error is 2 days ago

mqtt error

The error doesn’t go away when you fix the issue: you need to clear the log and see if it reappears on reloading…