Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shutdown and safe_mode button #2918

Merged
merged 8 commits into from
Dec 20, 2021
Merged

Add shutdown and safe_mode button #2918

merged 8 commits into from
Dec 20, 2021

Conversation

jsuanet
Copy link
Contributor

@jsuanet jsuanet commented Dec 15, 2021

What does this implement/fix?

New buttons for shutdown and safe_mode, can be used as replacement for shutdown and safe_mode switches.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): fixes

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#1725

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266

Example entry for config.yaml:

button:
  - platform: safe_mode
    name: my_device safe_mode button
  - platform: shutdown
    name: my_device shutdown button

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@probot-esphome
Copy link

Hey there @jsuanet,
Thanks for submitting this pull request! Can you add yourself as a codeowner for this integration? This way we can notify you if a bug report for this integration is reported.
In __init__.py of the integration, please add:

CODEOWNERS = ["@jsuanet"]

And run script/build_codeowners.py

(message by NeedsCodeownersLabel)

@jsuanet jsuanet marked this pull request as ready for review December 15, 2021 18:47
@probot-esphome
Copy link

Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration (shutdown) you are listed as a code owner for? Thanks!
Hey there @paulmonigatti, mind taking a look at this pull request as it has been labeled with an integration (safe_mode) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@jsuanet jsuanet changed the title create shutdown and safe_mode button Add shutdown and safe_mode button Dec 16, 2021
@jsuanet jsuanet requested a review from jesserockz December 19, 2021 20:21
Copy link
Member

@jesserockz jesserockz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@oxan oxan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point we can also deprecate the old switches.

@oxan oxan merged commit f431c74 into esphome:dev Dec 20, 2021
@oxan
Copy link
Member

oxan commented Dec 20, 2021

Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants