Determining and Selecting Fan Speed Number in Dreo Fan Integration

I have seen others mention in a couple posts wanting to use the Fan Speed Number instead of the Fan Speed Percentage to select the fan speed in the Dreo Fan Integration…

Messing around in Developer Tools / Template, I have figured out how to calculate it by pulling the entity attributes, and it works, but not sure how to implement it for selecting anything yet.

{## Get Dreo Fan Speed percentage_step and percentage attributes ##}
{% set my_vars = {
  "speed_percentage_step" : state_attr('fan.dreomax', 'percentage_step'),
  "current_speed" : state_attr('fan.dreomax', 'percentage')
  } %}

{## Caluclate and Display info ##}
The fan is at 
{{ state_attr('fan.dreomax', 'percentage') }}%
Speed Number is
{{ (my_vars.current_speed / my_vars.speed_percentage_step) | round }}

I am fairly new to templates, so this is probably obvious for a lot of people, but I thought this might help others play around with the information.

If anyone knows how to use this information to make a drop down or mobile spinner menu, I would be interested. That is the next piece I am trying to figure out.

1 Like