Smartplug controled with awattar

need some devices run for at least 3 h a day. So I planed to use the 3 least expensive hours a day. But using the values provide by the awattar plugin this does not seems to be possible.

Having an index (rank) that indicates a ranking of hours would be nice. If rank is 0 it will indicate the cheapest hour of the day, 1 the second cheapest hour, and so on until 23 the most expensive hour of the day.
That way a magic or script might use: if rank <3 do something. And the action will be triggered within the 3 cheapest hours of the day.