I recently embarked on a DIY project to create a temperature-controlled automation system for my home heating. My goal was to automate my smart plug to turn on when the room temperature drops below 13.5°C and turn off once it reaches 16.5°C. While I’m not a professional, I decided to give it a shot using YAML code for my smart home setup. Here’s the initial code I came up with: yaml automation: !include automations.yaml - alias: ‘Temperature Control’ trigger: platform: numeric_state entity_id: sensor.my_temperature_sensor below: 13.5 action: - service: switch.turn_on entity_id: switch.my_smart_plug - alias: ‘Temperature Control Turn Off’ trigger: platform: numeric_state entity_id: sensor.my_temperature_sensor above: 16.5 action: - service: switch.turn_off entity_id: switch.my_smart_plug However, I encountered an indentation error that kept throwing an error: bad indentation of a mapping entry. I tried troubleshooting using online resources, but nothing seemed to work. After some research, I realized the issue was with the YAML formatting. I adjusted the indentation and structure, and voilà! The automation started working perfectly. This project has been a great learning experience. It not only helped me understand YAML better but also gave me confidence in tackling more complex automations in the future. If anyone else is looking to set up something similar, I’d recommend starting simple, testing each part, and gradually building up. Don’t hesitate to reach out if you need help or have suggestions!