First problem I see, the syntax is incorrect. Look at the docs closely.
sensor:
This map key should be the plural sensors not sensor.
Second problem I see is the naming of the entity, no capital letters are allowed. See the configuration troubleshooting docs.
Bathroom_Fan:
This should be bathroom_fan. Personally, I’d call it bathroom_fan_motion.
The rest of it looks OK to me, but you’ll have to fix those problems and try again. I would also suggest adding device_class: motion, like in this example (though I’m noticing that example code is not great because the sensor entity name is in all caps…). It gives you an appropriate icon and changes the color and icon depending on the sensor state.
All the example code blocks have a “Copy” button, so it’s convenient to copy the code, paste it into your config, then modify the relevant parts. Less likely to make an error that way.
Another suggestion, it also helps to include any of the error messages you see along with you post.
I told you the same thing in the PM you sent me two days ago.
I don’t mind helping but I don’t think it will be thru PM any more. You keep jumping back & forth between topics and confusing the issues with different code from those topics without specifying when you switch.
I think if you put everything in one thread it will be easier for you (and us) to keep track of what we are trying to help you with at the time.
But on the other hand you are going to have to start figuring this stuff out on your own. you keep asking the same questions over and over again and I keep giving you the same answers over and over again.
Do you even leave your RPi on all the time yet or do you still not even trust HA to run securely on your network for extended periods of time?