Get state from sensors

Yes, I see. This is due to poor knowledge of the English language and Home Assistant. Let me try to explain better. I use GitHub - StephanJoubert/home_assistant_solarman: Home Assistant component for Solarman collectors used with a variety of inverters. to read the modbus registers of my inverter.
You can view the section of interest from line 867 of https://github.com/StephanJoubert/home_assistant_solarman/blob/aed4c7aad3b5c5677671ea2b74e05415a13ff10b/custom_components/solarman/inverter_definitions/sofar_g3hyd.yaml
Hope this can help.
{{ states.sensor.solarman_fault_1 }} return

<template TemplateState(<state sensor.solarman_fault_1=No error;
 id=1744925071, integration=solarman, icon=mdi:wrench, 
friendly_name=Solarman Fault 1 @ 2023-10-18T18:25:05.611277+02:00>)>