A builder who suffered from a skin condition similar to ­psoriasis was taking cannabis to relieve his pain, a court heard.