Adjust output to compensate for incorrect data

So I have a Wink Relay, connected through the Wink plugin and it’s working perfectly. The issue I have is that the temperature and humidity output is wrong. The hardware does not have any way to be calibrated and all of the Relays have this issue.

Is there any way to correct the output to skew it towards something correct? For example it is 78F and 59% humidity on my weather station and 70.7F and 78% humidity on the Relay right now. If I were to be able to output a new sensor that would subtract 7 and 17 from them respectively it might get them close enough to correct to be useful.

Use a value template to adjust as you want it.

You can use this to create a sensor that mirrors your existing temperature, but removes the amount you desire.

value_template: "{{ states._existing_sensor.state | float - 7.0 }}

I’d suggest having a more complex one perhaps that considers when your value is less than 7 so you dont have a negative number.

value_template: >
            {%- if ((states._existing_sensor.state | float) > 7.0) %}
                {{ states._existing_sensor.state | float - 7.0 }}
            {% else %}
                0
            {% endif %}