Please format your pasted code so we can see what is wrong.
If you apply the garage_door device class it will change the displayed state to open/closed (the actual state will still be on/off). The garage icon will change from open to closed with the state as well.
https://www.home-assistant.io/integrations/binary_sensor/#device-class