I’m having difficulties creating a transform in the dia.yml file for converting the sensor temperature to Fahrenheit.
Looking over the example in the following guide:
I see the following samples:
- Multi-channel operation. Note the use of the built-in functions sum and len provided by Python.
- name: avg_temperature
expr: sum(c) / len(c)
- Unit conversion. Given a temperature in Celsius, convert to Fahrenheit. Note that transforms can use other transforms.
- name: temperature_f
expr: (9.0/5.0) * c + 32
Admittedly, I am new to Python. I have tried various transform entries and came up with the following errors when running dia.py on the ConnectPort unit:
SettingNotFound: “setting ‘instance_list’ not found”
Is a template required when using a transform?
Does a transform entry in the .yml file need to be earlier than the sensor device?
I don’t need an average temperature, just simply change the unit value to fahrenheit and have it show on the web (idigi_dia.html). Is there a better way to accomplish this?
Appreciate any assistance.