You should worry about them. While I don’t understand why you are saving the volume like this (it looks like it will always be the same value as the item at the end?), I do see the problem. You are correct, scope is the problem, and you are not alone with this one coming from DSL to Python.
The fridge_door_volume
on line 9 is in the module’s (file’s) scope.
The fridge_door_volume
on line 13 is in the fridgedoortimer_body
function’s scope.
The fridge_door_volume
on line 29 from the module’s scope.
See this post for an explaination of what is going on and how global
works.