Skip to content

chime: Support playing motion test sound#46

Merged
tchellomello merged 1 commit into
python-ring-doorbell:masterfrom
vickyg3:master
Sep 23, 2017
Merged

chime: Support playing motion test sound#46
tchellomello merged 1 commit into
python-ring-doorbell:masterfrom
vickyg3:master

Conversation

@vickyg3

@vickyg3 vickyg3 commented Sep 20, 2017

Copy link
Copy Markdown
Collaborator

Changes the test_sound property to be a function.

Fixes Issue #28.

Please let me know if this change needs to be backward compatible. I can make it another property in that case. (Also thanks for the pointer on mitmproxy, worked like a charm!)

Changes the test_sound property to be a function. Fixes Issue python-ring-doorbell#28.
@mention-bot

Copy link
Copy Markdown

@vickyg3, thanks for your PR! By analyzing the history of the files in this pull request, we identified @tchellomello to be a potential reviewer.

@coveralls

coveralls commented Sep 20, 2017

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling a22a380 on vickyg3:master into 84e0a6c on tchellomello:master.

2 similar comments
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling a22a380 on vickyg3:master into 84e0a6c on tchellomello:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling a22a380 on vickyg3:master into 84e0a6c on tchellomello:master.

Comment thread ring_doorbell/const.py
# chime test sound kinds
KIND_DING = 'ding'
KIND_MOTION = 'motion'
CHIME_TEST_SOUND_KINDS = (KIND_DING, KIND_MOTION)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's make a list instead a map

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm sorry, but can you please explain what the key and value of the map would be?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

CHIME_TEST_SOUND_KINDS = [KIND_DING, KIND_MOTION]

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Why does it have to be a list? What i've used is a tuple which is basically an immutable list (not a map). Which is exactly what we need here.

Comment thread ring_doorbell/__init__.py
return False
url = API_URI + TESTSOUND_CHIME_ENDPOINT.format(self.account_id)
self._ring.query(url, method='POST')
self._ring.query(url, method='POST', extra_params={"kind": kind})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't this be expanded to the "ringtone" the user selected to play?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It probably should be. But i'll leave that to a follow-up. Don't have my phone set-up to do the proxy again right now. :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes make sense.. You got a good point!!

@tchellomello tchellomello merged commit fb8edf6 into python-ring-doorbell:master Sep 23, 2017
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants