Aqara Vibration Sensor graph vibrationstrength

How can i make a graph of vibration intensity?

I have vibrationstrength available in HA Developer Tools

on: true
temperature: 21
orientation: -2, 75, 14
tiltangle: 14
vibrationstrength: 7
friendly_name: Vibration Panel
device_class: vibration

For example graph in this blog post

It works with sensor template:

# Template Vlastné Vibrácie z Aqara Regal :) 
  - platform: template
        friendly_name: "Vibrace Regal"
        unit_of_measurement: Osc
        value_template: "{{ state_attr('binary_sensor.vibration_regal', 'vibrationstrength') }}"
1 Like

In case someone is pulling your hair like me, that’s how I got it working with version up to date.

   - sensor:
     - name: "Vibration Sensor "
       unique_id: "binary_sensor.vibration_1_strength"
       unit_of_measurement: Osc
       state: "{{ state_attr('binary_sensor.vibration_1', 'vibrationstrength') }}"      
       state_class: measurement