Skip to content

Cleanup of HomematicIP Cloud code#15475

Merged
balloob merged 8 commits intohome-assistant:devfrom
worm-ee:cleanup-homematicip_cloud
Jul 18, 2018
Merged

Cleanup of HomematicIP Cloud code#15475
balloob merged 8 commits intohome-assistant:devfrom
worm-ee:cleanup-homematicip_cloud

Conversation

@worm-ee
Copy link
Copy Markdown
Contributor

@worm-ee worm-ee commented Jul 15, 2018

Description:

  • Check if device supports lowBat and shows it only if battery is low and show also a empty battery icon
  • Cleanup device classes
  • Cleanup of sabotage attribute
  • Bug fix alarm_control_panel - lib update and fix of home/away armed

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

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

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

ATTR_MODEL_TYPE: self._device.modelType
}
attr = {ATTR_MODEL_TYPE: self._device.modelType}
if hasattr(self._device, 'lowBat') and self._device.lowBat:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

trailing whitespace

@worm-ee
Copy link
Copy Markdown
Contributor Author

worm-ee commented Jul 15, 2018

@MartinHjelmare What do you think? There is now only information showed if really necessary.

"""Return the icon."""
if hasattr(self._device, 'lowBat') and self._device.lowBat:
return 'mdi:battery-outline'

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.

Return None, if this case is not true.

@worm-ee worm-ee changed the title [WIP] Cleanup of HomematicIP Cloud code Cleanup of HomematicIP Cloud code Jul 16, 2018
@balloob balloob merged commit 9c5bbfe into home-assistant:dev Jul 18, 2018
@ghost ghost removed the in progress label Jul 18, 2018
michaeldavie pushed a commit to michaeldavie/home-assistant that referenced this pull request Jul 31, 2018
* Check if device supports lowBat and shows it only if battery is low

* Show empty battery icon if lowBat is true

* Default return None

* Sabotage attribute and icon if device has this feature

* Bug fix and cleanup

* Use dedicated function for security state

* Cleanup of sensor attributes and icons

* Empty
@balloob balloob mentioned this pull request Aug 3, 2018
girlpunk pushed a commit to girlpunk/home-assistant that referenced this pull request Sep 4, 2018
* Check if device supports lowBat and shows it only if battery is low

* Show empty battery icon if lowBat is true

* Default return None

* Sabotage attribute and icon if device has this feature

* Bug fix and cleanup

* Use dedicated function for security state

* Cleanup of sensor attributes and icons

* Empty
@worm-ee worm-ee deleted the cleanup-homematicip_cloud branch October 7, 2018 08:04
@home-assistant home-assistant locked and limited conversation to collaborators Feb 5, 2019
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.

5 participants