Help to convert a 'rest' config to the new format

Hi, I have the following rest config that is broken since I updated my Home Assistant at the cottage. Can someone help me convert it to the new format please?

sensor:
  - platform: rest
    resource: http://192.168.0.3/weewx/daily.json
    name: weather_station
    json_attributes:
      - current
    value_template: '{{ value_json.hardware }}'

  - platform: template
    sensors:
      inside_temperature:
        friendly_name: Température intérieure
        value_template: "{{ states.sensor.weather_station.attributes.current['insideTemp'] }}"
        unit_of_measurement: '°C'
      outside_temperature:
        friendly_name: Température extérieure
        value_template: "{{ states.sensor.weather_station.attributes.current['outTemp'] }}"
        unit_of_measurement: '°C'

Thanks!

Like this:

rest:
  - resource: http://192.168.0.3/weewx/daily.json
    sensor:
      - name: "Température intérieure"
        unit_of_measurement: "°C"
        device_class: temperature
        state_class: measurement
        value_template: "{{ value_json.current.insideTemp }}"

      - name: "Température extérieure"
        unit_of_measurement: "°C"
        device_class: temperature
        state_class: measurement
        value_template: "{{ value_json.current.outTemp }}"

However, whatever broke your old sensor may still be an issue as that format should still be valid.

Yep, I upgraded two things at once and assumed the wrong… I should know better than to do that. But at least, my sensors are using the new format for that instance of HA now :slight_smile: