Add tests for Netatmo camera (#46380)
* Add test for Netatmo camera * Improve docstrings * Remove light tests * Remove freezegun from tests * Update camera tests * Remove freezegun dependency * Update tests/components/netatmo/test_camera.py Co-authored-by: Erik Montnemery <erik@montnemery.com> * Update tests/components/netatmo/test_camera.py Co-authored-by: Erik Montnemery <erik@montnemery.com> * Deduplication of the fake webhook payload * Mock pyatmo instead of checking the logs * Clean up * Further deduplication * Assert function arguments * Rename mocked functions * Update .coveragerc Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
parent
aaafe399a1
commit
4ee4d674d8
4 changed files with 210 additions and 2 deletions
|
@ -350,7 +350,7 @@ class NetatmoCamera(NetatmoBase, Camera):
|
|||
def _service_set_camera_light(self, **kwargs):
|
||||
"""Service to set light mode."""
|
||||
mode = kwargs.get(ATTR_CAMERA_LIGHT_MODE)
|
||||
_LOGGER.debug("Turn camera '%s' %s", self._name, mode)
|
||||
_LOGGER.debug("Turn %s camera light for '%s'", mode, self._name)
|
||||
self._data.set_state(
|
||||
home_id=self._home_id,
|
||||
camera_id=self._id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue