• Mobile
  • Social
  • IM
  • Computer
  • Internet
  • Smarthome
  • Travel
  • Mobile
  • Social
  • IM
  • Computer
  • Internet
  • Smarthome
  • Travel
home/knowledge base/Smarthome/HA: Simple automation to switch off the lights
Popular search:facebook, android, Excel

HA: Simple automation to switch off the lights

Napisane przez guru
January 2, 2023

To write an automation to switch off the light every day at 10 PM in YAML, you can use the following syntax:

- id: 'turn_off_light'
alias: Turn off light
description: 'Turn off light every day at 10 PM'
trigger:
- platform: time
at: '22:00:00'
action:
- service: light.turn_off
entity_id: light.bedroom

This automation will turn off the light with the entity ID light.bedroom every day at 10 PM.

Here’s an explanation of each part of the automation:

  • id: A unique ID for the automation.
  • alias: A friendly name for the automation.
  • description: A description of the automation.
  • trigger: The conditions that will cause the automation to be triggered. In this case, the trigger is the time being 10 PM.
  • action: The action that will be performed when the automation is triggered. In this case, the action is to turn off the light with the entity ID light.bedroom.
Tags:home assistantYAML

Was it helpful?

Yes  No
Related Articles
  • What is the AirTag?
  • How to clean your iRobot Roomba?
  • The cleaning robot gets stuck under the furniture – the solution
Leave A Comment Cancel reply

  • English
  • Deutsch (German)
  • Français (French)
  • Español (Spanish)
  • Polski (Polish)
  • Українська (Ukrainian)
Popular Articles
  • Facebook lock – how long?
  • How do I mark important places on Google Maps?
  • The cleaning robot gets stuck under the furniture – the solution
  • How to make a table of contents in Word?
  • How to take a screenshot
KB Categories
  • Mobile
  • Social
  • Computer
  • Internet
  • Smarthome
  • Travel
  • IM
  • android
  • Facebook
  • messenger
  • WhatsApp
  • Office
  • Other
  • iOS

Try To Help ME

Welcome to the website that's here to turn you from a tech-turtle to a tech-ninja! We've got all the information and instructions you need to navigate the wild world of new technologies, with a side of humour to make it less overwhelming.

Whether you're struggling with a stubborn smartphone or trying to figure out how to use that fancy new app, we've got your back (and your funny bone). So come on in, and let's get tech-savvy together!

Tags
#techsolutions #mobilesupport #socialmediamanagement #computersupport #technologytips #mobileappdevelopment #socialmediastrategies #computerrepair #techtroubleshooting #mobilenetworksolutions
Social Media
#socialmedia #socialmediamarketing #instagram #facebook #twitter #linkedin #socialmediahacks #socialmediamanagement #socialmediastrategies #socialmediatips
Social
  • Facebook
  • Twitter
  • Privacy Policy
  • Terms of Use
  • © 2020 naszanasze. All Rights Reserved.

Popular search:facebook, android, Excel
  • English
  • Deutsch (German)
  • Français (French)
  • Español (Spanish)
  • Polski (Polish)
  • Українська (Ukrainian)