Skip to content

Google Assistant: Add support for open/close binary sensors#22674

Merged
balloob merged 3 commits into
devfrom
ga-bin-sens
Apr 3, 2019
Merged

Google Assistant: Add support for open/close binary sensors#22674
balloob merged 3 commits into
devfrom
ga-bin-sens

Conversation

@balloob
Copy link
Copy Markdown
Member

@balloob balloob commented Apr 3, 2019

Description:

Add support for binary sensors that represent open/closed. Allows users to ask "Hey Google, is my X open?"

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 3, 2019

Codecov Report

Merging #22674 into dev will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #22674      +/-   ##
==========================================
+ Coverage   93.83%   93.83%   +<.01%     
==========================================
  Files         449      449              
  Lines       36558    36568      +10     
==========================================
+ Hits        34305    34315      +10     
  Misses       2253     2253
Impacted Files Coverage Δ
homeassistant/components/google_assistant/trait.py 96.36% <100%> (+0.07%) ⬆️
...ssistant/components/google_assistant/smart_home.py 93.1% <100%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1cca25...43aada9. Read the comment docs.

}

calls = async_mock_service(
hass, cover.DOMAIN, cover.SERVICE_SET_COVER_POSITION)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why test a trait about binary_sensor cannot open a cover?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good call. Updated.

@ghost ghost assigned pvizeli Apr 3, 2019
@balloob balloob merged commit 14da2fd into dev Apr 3, 2019
@ghost ghost removed the in progress label Apr 3, 2019
@delete-merged-branch delete-merged-branch Bot deleted the ga-bin-sens branch April 3, 2019 17:21
@dshokouhi
Copy link
Copy Markdown
Member

I think we need to add docs for this PR correct?

jonbeckman pushed a commit to jonbeckman/home-assistant that referenced this pull request Apr 7, 2019
…istant#22674)

* Google Assistant: Add support for binary sensors

* Update test
elupus pushed a commit to elupus/home-assistant that referenced this pull request Apr 16, 2019
…istant#22674)

* Google Assistant: Add support for binary sensors

* Update test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants