platform: ads
adsvar: .Unit_00._00QT03.iwDataIN_L2
unit_of_measurement: “kW”
adstype: int
name: ‘Power’
Make sure you intent correctly, add a [period] before the adsvar name [assuming it is a global variable, if not put the POU name first e.g. MAIN.Unit_00.QT03.iwDataIN_L2] and remove the [single quotes] from adsvar name.
ADS was broken last summer but it might be fixed now. Let me know if this helps.
@Troon thanks for the feedback. When you say “smart quotes”, are you referring to the comments (e.g.#AMS NetId Beckhoff CX1000)?
I have never tried commenting in the same line after the actual code but I assumed that it worked. Are you saying that commenting in that way will not work? That is really good to know for future reference. Thanks!
See the difference? The forum has changed the straight quotes into 66-99 style quotes because you didn’t format your original post as code. @zimbrich then copy-pasted those and then formatted as code, but the damage had been done by then.
The smart 66-99 quotes won’t work in templates or YAML config.
Hello,
I would like to join you here.
I have exactly the same problem and am stuck in the same place. I have defined the route in the Beckhoff controller. But how does Home Assistant know which NetID it has itself and which NetID the remote station (TwinCat) has?
Hopefully someone here can explain the configuration (where and how) of Home Assistant/pyADS and post it???
Thank you very much
Best regards