Skip to content

Ios notify camera fix#9427

Merged
pvizeli merged 5 commits into
home-assistant:devfrom
rbflurry:ios-notify-camera-fix
Sep 17, 2017
Merged

Ios notify camera fix#9427
pvizeli merged 5 commits into
home-assistant:devfrom
rbflurry:ios-notify-camera-fix

Conversation

@rbflurry
Copy link
Copy Markdown
Contributor

Description:

This is an attempt to fix #8693 I am looking for insight as this is would be a breaking change requiring all message identifiers to be changed to lowercase.

The issue with the current IOS code looks for the camera message type to be lowercase however the HASS ios.py converts all message types to upper. An eaiser fix would be to change the IOS app code to look for uppercase identifiers but I am not sure if the code is maintained anymore or can be updated.

Can any of the more experienced devs chime in?

The IOS app code is here: https://github.com/home-assistant/home-assistant-iOS/blob/f4b7789cbd46c38f9bc1a47fa9186742b24a41df/APNSAttachmentService/NotificationService.swift#L49

Related issue (if applicable): fixes #8693

Forum post. https://community.home-assistant.io/t/ios-actionable-notification-with-camera-image-attached/13581/24

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

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

If the code communicates with devices, web services, or third-party tools:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

else:
expose = False
if explicit_expose:
_LOGGER.warning("The attribute 'emulated_hue' is deprecated and will be removed in a"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

line too long (97 > 79 characters)

if explicit_expose is True or explicit_hidden is False :
expose = True
else:
expose = False
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

indentation is not a multiple of four


explicit_hidden = entity.attributes.get (ATTR_EMULATED_HUE_HIDDEN, None)
if explicit_expose is True or explicit_hidden is False :
expose = True
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

indentation is not a multiple of four

explicit_expose = entity.attributes.get(ATTR_EMULATED_HUE, None)

explicit_hidden = entity.attributes.get (ATTR_EMULATED_HUE_HIDDEN, None)
if explicit_expose is True or explicit_hidden is False :
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

whitespace before ':'

domain = entity.domain.lower()
explicit_expose = entity.attributes.get(ATTR_EMULATED_HUE, None)

explicit_hidden = entity.attributes.get (ATTR_EMULATED_HUE_HIDDEN, None)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

whitespace before '('
line too long (80 > 79 characters)

@pvizeli pvizeli merged commit bda6d2c into home-assistant:dev Sep 17, 2017
@balloob balloob mentioned this pull request Sep 22, 2017
@arsaboo
Copy link
Copy Markdown
Contributor

arsaboo commented Sep 23, 2017

The docs also need to be updated to reflect the changes. It is not clear right now which one should be lowercase and which one should be upper case. Thanks!

fabaff pushed a commit to home-assistant/home-assistant.io that referenced this pull request Sep 24, 2017
fabaff pushed a commit to home-assistant/home-assistant.io that referenced this pull request Sep 26, 2017
jnewland pushed a commit to jnewland/ha-config that referenced this pull request Jan 13, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Mar 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS actionable notification with camera image attached not working

6 participants