Dimmer going through intermediate brightness value when turning off

I am new to Home Assistant, and am currently trying to develop a smart light automation using AppDaemon. One important feature is for the automation to back off when a light value is manually changed, hence, I need to watch for changes and compare with what was set by the automation last.

I discovered that when turning off a light, I get an additional state report of an intermediate brightness value (say if going from 255 to 0, I would also get e.g. 108 in between). This also happens when changing directly from Home Assistant. I also noticed that it seems like two commands are issued.

Is this related to Home Assistant, or is it maybe the fading of the dimmer (Fibaro Dimmer 2) which reports an intermediate value?

Here is an excerpt from the logs, with the problematic event is the second to last:

17-04-13 18:33:08 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1978717296-5, service_data=entity_id=light.taklys_level_3_0, service=turn_off, domain=homeassistant>
17-04-13 18:33:08 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1978717296-6, service_data=entity_id=['light.taklys_level_3_0'], service=turn_off, domain=light>
17-04-13 18:33:08 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1978717296-6>
17-04-13 18:33:08 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1978717296-5>
17-04-13 18:33:09 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state light.taklys_level_3_0=on; supported_features=1, friendly_name=Taklys Level, location=Kjøkken, power_consumption=2.7, brightness=255.0, node_id=3 @ 2017-04-13T20:33:00.648365+02:00>, new_state=<state light.taklys_level_3_0=off; node_id=3, power_consumption=2.7, supported_features=1, friendly_name=Taklys Level, location=Kjøkken @ 2017-04-13T20:33:09.082344+02:00>, entity_id=light.taklys_level_3_0>
17-04-13 18:33:09 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state light.taklys_level_3_0=off; node_id=3, power_consumption=2.7, supported_features=1, friendly_name=Taklys Level, location=Kjøkken @ 2017-04-13T20:33:09.082344+02:00>, new_state=<state light.taklys_level_3_0=off; node_id=3, power_consumption=38.4, supported_features=1, friendly_name=Taklys Level, location=Kjøkken @ 2017-04-13T20:33:09.082344+02:00>, entity_id=light.taklys_level_3_0>
17-04-13 18:33:10 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state light.taklys_level_3_0=off; node_id=3, power_consumption=38.4, supported_features=1, friendly_name=Taklys Level, location=Kjøkken @ 2017-04-13T20:33:09.082344+02:00>, new_state=<state light.taklys_level_3_0=on; supported_features=1, friendly_name=Taklys Level, location=Kjøkken, power_consumption=38.4, brightness=108.0, node_id=3 @ 2017-04-13T20:33:10.050183+02:00>, entity_id=light.taklys_level_3_0>
17-04-13 18:33:10 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state light.taklys_level_3_0=on; supported_features=1, friendly_name=Taklys Level, location=Kjøkken, power_consumption=38.4, brightness=108.0, node_id=3 @ 2017-04-13T20:33:10.050183+02:00>, new_state=<state light.taklys_level_3_0=off; node_id=3, power_consumption=38.4, supported_features=1, friendly_name=Taklys Level, location=Kjøkken @ 2017-04-13T20:33:10.455000+02:00>, entity_id=light.taklys_level_3_0>