EDIT: This assumption is incorrect! Haste 2 is not 580!
There is a better way to identify your haste by using buff_change and the buff id.
Haste and Haste II look like the same buff however they are not, Haste is Buff Id 33 and Haste 2 is 580
You can use the buff_change(name,gain,buff_details) user event to trigger when you gain or lose any buffs. This event will allow you to check the buff you have received or lost by it's id( the id is under buff_detail.id)
this should be a little cleaner then reading the chat log. Let me know if you would like more info on how to use the buff_change(name,gain,buff_details) user event. otherwise happy coding