Problem with sensor entitie

Why do you need attribute_templates, i would remove it and move state class to upper section (in terms of indentation)

Edit: check here State_class: "measurement" for platform: template - #2 by ardysusilo