Yes, you may be able to deduct the cost of a main shut-off valve as a business expense if you use part of your home only and often for business.
The percentage is based on the square footage of your office relative to the total area of your home. If the shut-off valve directly benefits your home office, a portion of the cost may be deductible. If it benefits your entire home, you can generally allocate a percentage based on the home office deduction.
For more detailed information, you can refer to the IRS Publication 587, Business Use of Your Home.