System monitor not working

here is my system monitor code, it was working fine until yesterday. Since then I added fr24 tracking graphs using the code in this at the end of the configuration file. what I am doing wrong? thread FlightRadar24 as an Add-On? - #21 by yousaf465

#sensors
sensor systemmonitor:  
  - platform: systemmonitor
    resources:
    - type: processor_use
    - type: disk_use_percent
      arg: "/"
    - type: disk_free
      arg: "/"
    - type: memory_use_percent
    - type: network_in
      arg: eth0
    - type: throughput_network_in
      arg: eth0
    - type: network_out
      arg: eth0
    - type: throughput_network_out
      arg: eth0
    - type: processor_temperature
    - type: last_boot
# OPTIONAL CPU Raspberry Pi Temp
  - platform: command_line
    name: CPU Temp
    command: "cat /sys/class/thermal/thermal_zone0/temp"
    unit_of_measurement: "°C"
    value_template: '{{ value | multiply(0.001) | round(2)  }}'

Try removing the systemonitor from the first line and put all your sensors below the single sensor: header.

found the solution, instead of simple “sensor” I used “sensor fr24:” before rest:

# ADS-B System / Flightradar 24

homeassistant:
  customize:
    sensor.fr24_feeder:
      hidden: true
    sensor.fr24_feeder_aircraft_tracked:
      icon: mdi:airplane
    sensor.fr24_feeder_aircraft_uploaded:
      icon: mdi:airplane
    sensor.fr24_feeder_radar_code:
      icon: mdi:radar

binary_sensor:
  - platform: template
    sensors:
      fr24_feeder_receiver_connected:
        friendly_name: Receiver Connected
        value_template: '{{ is_state_attr("sensor.fr24_feeder", "rx_connected", "1") }}'
        device_class: connectivity
      fr24_feeder_link_connected:
        friendly_name: Link Connected
        value_template: '{{ is_state_attr("sensor.fr24_feeder", "feed_status", "connected") }}'
        device_class: connectivity

sensor fr24:
  - platform: rest
    name: FR24 Feeder
    resource: http://f1c878cb-adsb-multi-portal-feeder:8754/monitor.json
    value_template: '{{ value_json.feed_alias }}'
    method: GET
    scan_interval: 60
    json_attributes:
      - rx_connected
      - feed_status
      - d11_map_size
      - feed_num_ac_tracked
      - build_version
      - feed_alias
  - platform: template
    sensors:
      fr24_feeder_radar_code:
        friendly_name: Radar Code
        value_template: '{{ states.sensor.fr24_feeder.attributes["feed_alias"] }}'
      fr24_feeder_aircraft_tracked:
        friendly_name: Aircraft Tracked
        value_template: '{{ states.sensor.fr24_feeder.attributes["d11_map_size"] | round(0) }}'
        unit_of_measurement: 'aircrafts'
      fr24_feeder_aircraft_uploaded:
        friendly_name: Aircraft Uploaded
        value_template: '{{ states.sensor.fr24_feeder.attributes["feed_num_ac_tracked"] | round(0) }}'
        unit_of_measurement: 'aircrafts'
      fr24_feeder_version:
        friendly_name: Version
        value_template: '{{ states.sensor.fr24_feeder.attributes["build_version"] }}'

Ok, you did not even show this code in your original post.

My recommendation is to either use packages, split all sensors into a separate file or put all sensors under a single sensor: header instead of creating multiple sensor xxx: headers.

It’s more structured and let’s you easily find stuff.

1 Like

this code was linked in my original post (linked to fr24 thread).
I did try once to put all sensors under a single sensor: header, but coding skills are very limited. Still learning the basic indentation in YAML, which is why I try to use Visual studio over samba.
Actually, I have almost completed my HA setup, no more sensors are planned until I upgrade to an SSD setup.
except for the gas meter, which I will install using manual reading.