Help with mqtt configuration

Hello, my mqtt amp sensor is not working anymore in HA because of the new version but I dont know exactly what to do to fix it, so if it’s possible I need some help with the new config

sensor:
  - platform: cert_expiry
    host: home-assistant.io
  - platform: mqtt
    state_topic: "Power/Status"
    name: Amperaje
    icon: mdi:current-ac
    unit_of_measurement: "A"
    value_template: '{{ value_json.A }}'
  - platform: mqtt
    state_topic: "Power/Status"
    name: Consumo Actual
    icon: mdi:power-plug
    unit_of_measurement: "W"
    value_template: '{{ value_json.W }}'
  - platform: mqtt
    state_topic: "Power/Status"
    icon: mdi:power-plug
    name: KW/h
    unit_of_measurement: "KW/h"
    value_template: '{{ value_json.KWh }}'
  - platform: systemmonitor
    resources:
      - type: disk_use_percent
        arg: /config
      - type: memory_free

Can you rewrite your post using the code tag </>, it is unreadable.

Done, sorry

You need to move to the new mqtt domain.

mqtt:
  sensor:
    - name: Amperaje
      state_topic: "Power/Status"
      icon: mdi:current-ac
      unit_of_measurement: "A"
      value_template: '{{ value_json.A }}'
      unique_id: amperaje_mqtt_sensor
    - name: Consumo Actual
      state_topic: "Power/Status"
      icon: mdi:power-plug
      unit_of_measurement: "W"
      value_template: '{{ value_json.W }}'
      unique_id: consumo_actual_mqtt_sensor

and so on

1 Like