2022.9.0 - dropping support for configuration by YAML on the long run?

Hello everyone,

Today I updated my homeassistant installation.
I was greeted with those 3 warnings in the settings section:

Opening the messages I see warnings like this:

This stops working in version 2022.11.0. Please address before upgrading.
Configuring Pushover using YAML is being removed.

or

Your manually configured MQTT sensor(s) needs attention
This stops working in version 2022.12.0. Please address before upgrading.

Reading the warnings it feels like Home Assistant wants to remove the configuration by YAML files on the long run and replace everything by configuring in the UI.

This makes me really sad and does not fit my use case of Home Assistant at all.
I am running Home Assistant by docker and configure most of the things by YAML files.
This means I can do cool stuff like defining the pushover API Keys in docker-compose env file and forward it to all the services which require the key.
Additionally I can use git to backup the configuration of all my services and it is a matter of minutes to completely redeploy my wholle smarthome landscape (there are many more pro arguments).

notify:
  - name: "PUSHOVER"
    platform: pushover
    api_key: !secret PUSHOVER_API_KEY
    user_key: !secret PUSHOVER_USER_KEY

In the pushover case I cannot even find the options to modify the API key by UI.

Is my feeling right? Is Home assistant slowly deprecating all the yaml configrations?
This feels like I am losing the control about my configuration management and would make me kind of sad.

Thanks for your answers :slight_smile:

1 Like

Well, the MQTT warning is because the YAML format changed. It’s not going away.

For Pushover, the move to UI over YAML for that kind of integration started a long time ago. There are some incredibly long threads here on the topic.

Well, you can do that anyway - the UI writes to files in .storage/.

See the ADR. The answer is it depends. A large part of this is driven by the desire to make HA more accessible (for better or for worse).

The right format is shown in the documentation for MQTT Sensor. Like this:

mqtt:
  sensor:
    - unique_id: server_room_temperature
      name: "Server room Temperature"
      state_topic: "home/Serverroom/Temperature"
      qos: 0
      unit_of_measurement: "°C"
      device_class: temperature
    - unique_id: server_room_humidity
      name: "Server room Humidity"
      state_topic: "home/Serverroom/Humidity"
      qos: 0
      unit_of_measurement: "%"
      device_class: humidity

Take note that the MQTT Sensors are no longer defined directly under the sensor: domain

sensor:

and are now defined like this

mqtt: 
  sensor:

The platform: mqtt option is no longer used because each MQTT Sensor is under mqtt.

Thank you. I just found out just before your reply but appreciate your help! :grinning:

I’ve changed my yaml configuration so switches and sensors haven been moved to:

mqtt:
  sensor: !include include/mqtt_switch.yaml
  sensor: !include include/mqtt_sensor.yaml

I’ve restarted HA, but after restarting I still see:

2022-10-03 12:34:30.705 WARNING (MainThread) [homeassistant.components.mqtt.mixins] Manually configured MQTT switch(s) found under platform key 'switch', please move to the mqtt integration key, see https://www.home-assistant.io/integrations/switch.mqtt/#new_format
2022-10-03 12:34:31.904 WARNING (MainThread) [homeassistant.components.mqtt.mixins] Manually configured MQTT sensor(s) found under platform key 'sensor', please move to the mqtt integration key, see https://www.home-assistant.io/integrations/sensor.mqtt/#new_format

I expected this message and the UI notification to disappear once I changed the yaml configuration but these messages remain. I now do not know whether my changes have been done correctly.

I have 3 items in my current sensor.yaml which I do not know how to move them to mqtt.yaml. The following three do not have names. Any help would be appreciated.

  • platform: time_date
    display_options:

    • ‘time_date’
  • platform: darksky
    api_key: c541a9213741d9e2d16d30d149d7a6a2
    latitude: **.6569696
    longitude: **.81228279999999
    monitored_conditions:

    • nearest_storm_distance
    • precip_type
    • precip_probability
    • temperature
    • wind_speed
    • wind_bearing
    • humidity
    • visibility
    • icon
  • platform: template
    sensors:
    akerhomegarage_status:
    friendly_name: ‘State of Garage Door’
    value_template: ‘{{ states.cover.********garage.state }}’

The three sensors you posted are based on the following integrations:
Time & Date
DarkSky
Template

None of them is based on MQTT so they should not be moved to mqtt.yaml.

This might be the cace with time and dark sky but my Garadget garage door status uses mqtt to communicate with Home Assistant. I have tried to delete that option out of my sensor.yaml and the status of my garage door no longer appears in home assistant.

None of the sensor configurations you posted are based on MQTT.

Thank you for clarifying my misunderstanding between sensors and mqtt. everything is now working after I moved those 3 to configuration.yaml.