Add state_class to the Rest sensor

Many sensors would benefit from the Statistics Graph card but need the state_class to be set, which is currently impossible in the rest sensor.

# Example configuration.yaml entry
  - authentication: basic
    username: "admin"
    password: "password"
    scan_interval: 60
      - name: "Adult Pool Data System"
        state_class: "measurement"

<snipped other settings>

Use customize.yaml.

  state_class: "measurement"

Mmmm, it was not listed as an option in the but it is even possible to add it from the UI.

Thanks for the tip!

Well unfortunately the attribute is removed on loading the new data into the sensor although it is in customize.yaml. We still need this to be added to the rest sensor.

Read Home Energy Management in 2021.8
and also State-based template sensors