Change if [[ "$(sensors)" =~ No* ]]
to if [[ "$(sensors 2>&1)" == No* ]]
The sensors
writes No sensors found
to standard error, not standard output. You can dupe standard error to standard output within the command substitution to get around this. Also as pointed out by that other guy, use glob comparison