I need to use the tangent value of the solar elevation, but in the template testing section of developer tools I get unexpected results. Here is the code:
name: "Solar Shades Light Control Percent"
unique_id: solar_shades_light_control_percent
state: >
{% set tangent = tan(states('sensor.sun_solar_elevation')) %}
{{ states('sensor.sun_solar_elevation') }}
{{ tangent }}
Just now, the solar elevation sensor reports 32.72 and tangent of about 3.66. but the correct tangent of 32.72 is about .64. What is wrong here?