Looking for best practices and template efficiency advices (simple example: alert on rain when windows are open)