home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.7k stars 30.83k forks source link

Warning with 2023.6.1: Configuring Command Line sensor using YAML has moved #94377

Closed MadMonkey87 closed 1 year ago

MadMonkey87 commented 1 year ago

The problem

I've just upgraded to the latest HA Core and got welcomed with a warning: image I guess this is related to the following entries in my config.yaml:

sensor:
  - platform: openweathermap_all
    api_key: XXXXXXXXXXXXXXXXXXXXXX
    latitude: XXXXXXXX
    longitude: XXXXXXX
  - platform: min_max
    entity_ids:
      - sensor.multisensor_11
      - sensor.multisensor_4
      - sensor.multisensor_9
      - sensor.air_quality_sensor
      - sensor.temperature_261
      - sensor.multisensor_7
      - sensor.multisensor_2
      - sensor.multisensor_3
    name: Temperatur EG+OG
    round_digits: 2
    type: median
  - platform: min_max
    entity_ids:
      - sensor.multisensor_11_2
      - sensor.multisensor_4_2
      - sensor.multisensor_9_2
      - sensor.air_quality_sensor_2
    name: Luftfeuchtigkeit EG+OG

I only found this documentation which is not really helpful: https://www.home-assistant.io/integrations/sensor/

Is there any other documentation? How do I migrate? For the min_max platform I guess I could use the GUI but for other custom integration this is not possible

What version of Home Assistant Core has the issue?

core-2023.6.1

What was the last working version of Home Assistant Core?

core-2023.5.x

What type of installation are you running?

Home Assistant OS

Integration causing the issue

sensor

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

sensor:
  - platform: openweathermap_all
    api_key: XXX
    latitude: XXX
    longitude: XXX
  - platform: min_max
    entity_ids:
      - sensor.multisensor_11
      - sensor.multisensor_4
      - sensor.multisensor_9
      - sensor.air_quality_sensor
      - sensor.temperature_261
      - sensor.multisensor_7
      - sensor.multisensor_2
      - sensor.multisensor_3
    name: Temperatur EG+OG
    round_digits: 2
    type: median
  - platform: min_max
    entity_ids:
      - sensor.multisensor_11_2
      - sensor.multisensor_4_2
      - sensor.multisensor_9_2
      - sensor.air_quality_sensor_2
    name: Luftfeuchtigkeit EG+OG
    round_digits: 2
    type: median
  - platform: min_max
    entity_ids:
      - sensor.multisensor_11
      - sensor.multisensor_4
      - sensor.multisensor_9
      - sensor.air_quality_sensor
    name: Temperatur OG
    round_digits: 2
    type: median
  - platform: min_max
    entity_ids:
      - sensor.multisensor_11_2
      - sensor.multisensor_4_2
      - sensor.multisensor_9_2
      - sensor.air_quality_sensor_2
      - sensor.humidity_260
      - sensor.multisensor_7_2
      - sensor.multisensor_2_2
      - sensor.multisensor_3_2
    name: Luftfeuchtigkeit OG
    round_digits: 2
    type: median
  - platform: min_max
    entity_ids:
      - sensor.temperature_261
      - sensor.multisensor_7
      - sensor.multisensor_2
      - sensor.multisensor_3
    name: Temperatur EG
    round_digits: 2
    type: median
  - platform: min_max
    entity_ids:
      - sensor.humidity_260
      - sensor.multisensor_7_2
      - sensor.multisensor_2_2
      - sensor.multisensor_3_2
    name: Luftfeuchtigkeit EG
    round_digits: 2
    type: median
  - platform: min_max
    entity_ids:
      - sensor.multisensor_1
      - sensor.multi_sensor_5_3
    name: Temperatur UG
    round_digits: 2
    type: median
  - platform: min_max
    entity_ids:
      - sensor.multisensor_1_2
      - sensor.multi_sensor_5
    name: Luftfeuchtigkeit UG
    round_digits: 2
    type: median
  - platform: systemmonitor
    resources:
      - type: disk_use_percent
        arg: /config
      - type: disk_use
      - type: disk_free
      - type: memory_use_percent
      - type: memory_use
      - type: memory_free
      - type: swap_use_percent
      - type: swap_use
      - type: swap_free
      - type: load_1m
      - type: load_5m
      - type: load_15m
      #- type: network_in
      #  arg: eth0
      #- type: network_out
      #  arg: eth0
      #- type: throughput_network_in
      #  arg: eth0
      #- type: throughput_network_out
      #  arg: eth0
      - type: processor_use
      #- type: processor_temperature
      - type: last_boot
  - platform: command_line
    name: Board Temperature
    command: 'cat /sys/class/thermal/thermal_zone0/temp'
    unit_of_measurement: '°C'
    value_template: '{{ value | multiply(0.001) }}'
  - platform: command_line
    name: SoC Temperature
    command: 'cat /sys/class/thermal/thermal_zone1/temp'
    unit_of_measurement: '°C'
    value_template: '{{ value | multiply(0.001) }}'
  - platform: command_line
    name: Wireless Module Temperature
    command: 'cat /sys/class/thermal/thermal_zone2/temp'
    unit_of_measurement: '°C'
    value_template: '{{ value | multiply(0.001) }}'
  - platform: luxtronik
    sensors:
      - group: calculations
        id: ID_WEB_Temperatur_TVL
        friendly_name: Vorlauf
        icon: mdi:thermometer
      - group: calculations
        id: ID_WEB_Temperatur_TRL
        friendly_name: Rücklauf
        icon: mdi:thermometer
      - group: calculations
        id: ID_WEB_Sollwert_TRL_HZ
        icon: mdi:thermometer
        friendly_name: Rücklauf Soll
      #- group: calculations
      #  id: ID_WEB_Temperatur_TRL_ext
      #  icon: mdi:thermometer
      - group: calculations
        id: ID_WEB_Temperatur_THG
        icon: mdi:thermometer
        friendly_name: Heissgas
      - group: calculations
        id: ID_WEB_Temperatur_TA
        icon: mdi:thermometer
        friendly_name: Aussentemperatur
      - group: calculations
        id: ID_WEB_Mitteltemperatur
        icon: mdi:thermometer
        friendly_name: Mitteltemperatur
      - group: calculations
        id: ID_WEB_Temperatur_TBW
        icon: mdi:thermometer
        friendly_name: Warmwasser
      #- group: calculations
      #  id: ID_WEB_Einst_BWS_akt
      #  icon: mdi:thermometer
      - group: calculations
        id: ID_WEB_Temperatur_TWE
        icon: mdi:thermometer
        friendly_name: Wärmequelle Eingang
      #- group: calculations
      #  id: ID_WEB_Temperatur_TWA
      #  icon: mdi:thermometer
      #- group: calculations
      #  id: ID_WEB_Temperatur_TFB1
      #  icon: mdi:thermometer
      #- group: calculations
      #  id: ID_WEB_Sollwert_TVL_MK1
      #  icon: mdi:thermometer
      #- group: calculations
      #  id: ID_WEB_Temperatur_RFV
      #  icon: mdi:thermometer
      #- group: calculations
      #  id: ID_WEB_Temperatur_TFB2
      #  icon: mdi:thermometer
      #- group: calculations
      #  id: ID_WEB_Sollwert_TVL_MK2
      #  icon: mdi:thermometer
      #- group: calculations
      #  id: ID_WEB_Temperatur_TSK
      #  icon: mdi:thermometer
      #- group: calculations
      #  id: ID_WEB_Temperatur_TSS
      #  icon: mdi:thermometer
      #- group: calculations
      #  id: ID_WEB_Temperatur_TEE
      #  icon: mdi:thermometer
      - group: calculations
        id: ID_WEB_AnzahlFehlerInSpeicher
        friendly_name: Fehler
      #- group: calculations
      #  id: ID_WEB_HauptMenuAHP_Stufe
      #- group: calculations
      #  id: ID_WEB_HauptMenuAHP_Temp
      #- group: calculations
      #  id: ID_WEB_Sollwert_TVL_MK3
      #- group: calculations
      #  id: ID_WEB_Temperatur_TFB3
      #- group: calculations
      #  id: ID_WEB_Temperatur_RFV2
      #- group: calculations
      #  id: ID_WEB_Temperatur_RFV3
      #- group: calculations
      #  id: ID_WEB_AnalogIn
      - group: calculations
        id: ID_WEB_WMZ_Heizung
        friendly_name: Wärmemenge Heizung
      - group: calculations
        id: ID_WEB_WMZ_Brauchwasser
        friendly_name: Wärmemenge Warmwasser
      #- group: calculations
      #  id: ID_WEB_WMZ_Schwimmbad
      - group: calculations
        id: ID_WEB_WMZ_Seit
        friendly_name: Wärmemenge seit
      #- group: calculations
      #  id: ID_WEB_WMZ_Durchfluss
      - group: calculations
        id: ID_WEB_AnalogOut1
        friendly_name: Analog Ausgang 1
      - group: calculations
        id: ID_WEB_AnalogOut2
        friendly_name: Analog Ausgang 2
      #- group: calculations
      #  id: ID_WEB_Temp_Lueftung_Zuluft
      #- group: calculations
      #  id: ID_WEB_Temp_Lueftung_Abluft
      # - group: calculations
      #   id: ID_WEB_Zaehler_BetrZeitSolar
      - group: calculations
        id: ID_WEB_AnalogOut3
        friendly_name: Analog Ausgang 3
      - group: calculations
        id: ID_WEB_AnalogOut4
        friendly_name: Analog Ausgang 4
      - group: calculations
        id: ID_WEB_Durchfluss_WQ
        friendly_name: Durchfluss Wärmequelle
      # - group: calculations
      #  id: ID_WEB_LIN_ANSAUG_VERDAMPFER
      #- group: calculations
      #  id: ID_WEB_LIN_ANSAUG_VERDICHTER
      - group: calculations
        id: ID_WEB_LIN_UH
        friendly_name: Überhitzung
      - group: calculations
        id: ID_WEB_LIN_UH_Soll
        friendly_name: Überhitzung Soll
      - group: calculations
        id: ID_WEB_LIN_HD
        friendly_name: Hochdruck Sensor
      - group: calculations
        id: ID_WEB_LIN_ND
        friendly_name: Niederdruck Sensor
      # - group: calculations
      #   id: ID_WEB_SEC_Qh_Soll
      # - group: calculations
      #   id: ID_WEB_SEC_Qh_Ist
      - group: calculations
        id: ID_WEB_SEC_TVL_Soll
        friendly_name: Temperaturvorlauf Soll
      # - group: calculations
      #   id: ID_WEB_SEC_Software
      - group: calculations
        id: ID_WEB_SEC_BZ
        friendly_name: Betriebszustand SEC Board
      #- group: calculations
      #  id: ID_WEB_SEC_VWV
      #- group: calculations
      #  id: ID_WEB_SEC_VD
      #- group: calculations
      #  id: ID_WEB_SEC_VerdEVI
      #- group: calculations
      #  id: ID_WEB_SEC_AnsEVI
      #- group: calculations
      #  id: ID_WEB_SEC_UEH_EVI
      #- group: calculations
      #  id: ID_WEB_SEC_UEH_EVI_S
      #- group: calculations
      #  id: ID_WEB_SEC_KondTemp
      #- group: calculations
      #  id: ID_WEB_SEC_FlussigEx
      #- group: calculations
      #  id: ID_WEB_SEC_UK_EEV
      #- group: calculations
      #  id: ID_WEB_SEC_EVI_Druck
      #- group: calculations
      #  id: ID_WEB_SEC_U_Inv
      #- group: calculations
      #  id: ID_WEB_Temperatur_THG_2
      #- group: calculations
      #  id: ID_WEB_Temperatur_TWE_2
      #- group: calculations
      #  id: ID_WEB_LIN_ANSAUG_VERDAMPFER_2
      #- group: calculations
      #  id: ID_WEB_LIN_ANSAUG_VERDICHTER_2
      #- group: calculations
      #  id: ID_WEB_LIN_VDH_2
      #- group: calculations
      #  id: ID_WEB_LIN_UH_2
      #- group: calculations
      #  id: ID_WEB_LIN_UH_Soll_2
      #- group: calculations
      #  id: ID_WEB_LIN_HD_2
      #- group: calculations
      #  id: ID_WEB_LIN_ND_2
      #- group: calculations
      #  id: ID_WEB_HDin_2
      #- group: calculations
      #  id: ID_WEB_AVout_2
      #- group: calculations
      #  id: ID_WEB_VBOout_2
      #- group: calculations
      #  id: ID_WEB_VD1out_2
      #- group: calculations
      #  id: ID_WEB_LIN_VDH_out_2
      #- group: calculations
      #  id: ID_WEB_Switchoff2_file_Nr0
      #- group: calculations
      #  id: ID_WEB_Switchoff2_file_Nr1
      #- group: calculations
      #  id: ID_WEB_Switchoff2_file_Nr2
      #- group: calculations
      #  id: ID_WEB_Switchoff2_file_Nr3
      #- group: calculations
      #  id: ID_WEB_Switchoff2_file_Nr4
      #- group: calculations
      #  id: ID_WEB_Switchoff2_file_Time0
      #- group: calculations
      #  id: ID_WEB_Switchoff2_file_Time1
      #- group: calculations
      #  id: ID_WEB_Switchoff2_file_Time2
      #- group: calculations
      #  id: ID_WEB_Switchoff2_file_Time3
      #- group: calculations
      #  id: ID_WEB_Switchoff2_file_Time4
      #- group: calculations
      #  id: ID_WEB_RBE_RT_Ist
      #- group: calculations
      #  id: ID_WEB_RBE_RT_Soll
      #- group: calculations
      #  id: ID_WEB_Temperatur_BW_oben
      #- group: calculations
      #  id: ID_WEB_Code_WP_akt_2
      #- group: calculations
      #  id: ID_WEB_Freq_VD
      #- group: calculations
      #  id: ID_WEB_LIN_UH_2
      - group: calculations
        id: Heat_Output
        friendly_name: Erzeugte Wärmeleistung
      - group: calculations
        id: ID_WEB_HZIO_VEN
        friendly_name: Ventilator Drehzahl
      #- group: visibilities
      #  id: ID_Visi_NieAnzeigen
      #- group: visibilities
      #  id: ID_Visi_ImmerAnzeigen
      #- group: visibilities
      #  id: ID_Visi_Heizung
      #- group: visibilities
      #  id: ID_Visi_Brauwasser
      #- group: visibilities
      #  id: ID_Visi_Schwimmbad
      #- group: visibilities
      #  id: ID_Visi_Kuhlung
      #- group: visibilities
      #  id: ID_Visi_Lueftung
      #- group: visibilities
      #  id: ID_Visi_MK1
      #- group: visibilities
      #  id: ID_Visi_MK2
      #- group: visibilities
      #  id: ID_Visi_ThermDesinfekt
      #- group: visibilities
      #  id: ID_Visi_Zirkulation
      #- group: visibilities
      #  id: ID_Visi_KuhlTemp_SolltempMK1
      #- group: visibilities
      #  id: ID_Visi_KuhlTemp_SolltempMK2
      #- group: visibilities
      #  id: ID_Visi_KuhlTemp_ATDiffMK1
      #- group: visibilities
      #  id: ID_Visi_KuhlTemp_ATDiffMK2
      #- group: visibilities
      #  id: ID_Visi_Service_Information
      #- group: visibilities
      #  id: ID_Visi_Service_Einstellung
      #- group: visibilities
      #  id: ID_Visi_Service_Sprache
      #- group: visibilities
      #  id: ID_Visi_Service_DatumUhrzeit
      #- group: visibilities
      #  id: ID_Visi_Service_Ausheiz
      #- group: visibilities
      #  id: ID_Visi_Service_Anlagenkonfiguration
      #- group: visibilities
      #  id: ID_Visi_Service_IBNAssistant
      #- group: visibilities
      #  id: ID_Visi_Service_ParameterIBNZuruck
      #- group: visibilities
      #  id: ID_Visi_Temp_Vorlauf
      #- group: visibilities
      #  id: ID_Visi_Temp_Rucklauf
      #- group: visibilities
      #  id: ID_Visi_Temp_RL_Soll
      #- group: visibilities
      #  id: ID_Visi_Temp_Ruecklext
      #- group: visibilities
      #  id: ID_Visi_Temp_Heissgas
      #- group: visibilities
      #  id: ID_Visi_Temp_Aussent
      #- group: visibilities
      #  id: ID_Visi_Temp_BW_Ist
      #- group: visibilities
      #  id: ID_Visi_Temp_BW_Soll
      #- group: visibilities
      #  id: ID_Visi_Temp_WQ_Ein
      #- group: visibilities
      #  id: ID_Visi_Temp_Kaltekreis
      #- group: visibilities
      #  id: ID_Visi_Temp_MK1_Vorlauf
      #- group: visibilities
      #  id: ID_Visi_Temp_MK1VL_Soll
      #- group: visibilities
      #  id: ID_Visi_Temp_Raumstation
      #- group: visibilities
      #  id: ID_Visi_Temp_MK2_Vorlauf
      #- group: visibilities
      #  id: ID_Visi_Temp_MK2VL_Soll
      #- group: visibilities
      #  id: ID_Visi_Temp_Solarkoll
      #- group: visibilities
      #  id: ID_Visi_Temp_Solarsp
      #- group: visibilities
      #  id: ID_Visi_Temp_Ext_Energ
      #- group: visibilities
      #  id: ID_Visi_IN_ASD
      #- group: visibilities
      #  id: ID_Visi_IN_BWT
      #- group: visibilities
      #  id: ID_Visi_IN_EVU
      #- group: visibilities
      #  id: ID_Visi_IN_HD
      #- group: visibilities
      #  id: ID_Visi_IN_MOT
      #- group: visibilities
      #  id: ID_Visi_IN_ND
      #- group: visibilities
      #  id: ID_Visi_IN_PEX
      #- group: visibilities
      #  id: ID_Visi_IN_SWT"
      #- group: visibilities
      #  id: ID_Visi_OUT_Abtauventil
      #- group: visibilities
      #  id: ID_Visi_OUT_BUP
      #- group: visibilities
      #  id: ID_Visi_OUT_FUP1
      #- group: visibilities
      #  id: ID_Visi_OUT_HUP
      #- group: visibilities
      #  id: ID_Visi_OUT_Mischer1Auf
      #- group: visibilities
      #  id: ID_Visi_OUT_Mischer1Zu
      #- group: visibilities
      #  id: ID_Visi_OUT_Ventilation
      #- group: visibilities
      #  id: ID_Visi_OUT_Ventil_BOSUP
      #- group: visibilities
      #  id: ID_Visi_OUT_Verdichter1
      #- group: visibilities
      #  id: ID_Visi_OUT_Verdichter2
      #- group: visibilities
      #  id: ID_Visi_OUT_ZIP
      #- group: visibilities
      #  id: ID_Visi_OUT_ZUP
      #- group: visibilities
      #  id: ID_Visi_OUT_ZWE1
      #- group: visibilities
      #  id: ID_Visi_OUT_ZWE2_SST
      #- group: visibilities
      #  id: ID_Visi_OUT_ZWE3
      #- group: visibilities
      #  id: ID_Visi_OUT_FUP2
      #- group: visibilities
      #  id: ID_Visi_OUT_SLP
      #- group: visibilities
      #  id: ID_Visi_OUT_SUP
      - group: parameters
        id: ID_Einst_WK_akt
        friendly_name: Einstellung Abweichung Heizung
      - group: parameters
        id: ID_Einst_BWS_akt
        friendly_name:  Einstellung Warmwasser
      - group: parameters
        id: ID_Ba_Hz_akt
        friendly_name: Modus Heizung
      - group: parameters
        id: ID_Ba_Bw_akt
        friendly_name: Modus Warmwasser

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (sensor) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `sensor` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign sensor` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


sensor documentation sensor source (message by IssueLinks)

MadMonkey87 commented 1 year ago

My bad, it's not the sensor platform but "command_line". I just needed to change this:

sensor:
  - platform: command_line
    name: Board Temperature
    command: 'cat /sys/class/thermal/thermal_zone0/temp'
    unit_of_measurement: '°C'
    value_template: '{{ value | multiply(0.001) }}'
  - platform: command_line
    name: SoC Temperature
    command: 'cat /sys/class/thermal/thermal_zone1/temp'
    unit_of_measurement: '°C'
    value_template: '{{ value | multiply(0.001) }}'
  - platform: command_line
    name: Wireless Module Temperature
    command: 'cat /sys/class/thermal/thermal_zone2/temp'
    unit_of_measurement: '°C'
    value_template: '{{ value | multiply(0.001) }}'

to this:

command_line:
  - sensor:
        name: Board Temperature
        command: 'cat /sys/class/thermal/thermal_zone0/temp'
        unit_of_measurement: '°C'
        value_template: '{{ value | multiply(0.001) }}'
  - sensor:
        name: SoC Temperature
        command: 'cat /sys/class/thermal/thermal_zone1/temp'
        unit_of_measurement: '°C'
        value_template: '{{ value | multiply(0.001) }}'
  - sensor:
        name: Wireless Module Temperature
        command: 'cat /sys/class/thermal/thermal_zone2/temp'
        unit_of_measurement: '°C'
        value_template: '{{ value | multiply(0.001) }}'