add resource APIs for the rain sensor