Any way to get sensor config data programmatically?

I’m trying to develop custom interface for my MQTT-enabled AC, and made a custom UI state-card with action buttons. Sensor reads AC Fan state from “house/top/ac/fan”, and sends commands from these buttons to change fan speed to “house/top/ac/fan/set”. These values are constant, and If i want to add another AC unit, I have to add another similar state-card with only MQTT topic changed. If i could get Sensor config “state_topic” parameter, my state-card could be more universal, but i can’t find out, is there any way to get sensor’s settings (not state and attributes) in custom UI template?

If I undersood you right, this is easy:

this.stateObj.attributes.state_topic

Thanks, it partially helped. The problem is not all sensor’s settings are exposed to attributes. As far as I see for MQTT sensor, only friendly_name and unit_of_measurement come as attributes, and others don’t. But if I create element by customize section, it appears as attribute, so I can see it in stateObj, thus I will have to create some custom attributes to pass the necessary data to state-card. This is not very good to duplicate information, but it solves the problem.

define your settings on
customize:
all config is exposed there.