Commit Graph

21 Commits (0dc8fb497b1162c08286dfd03f54da3d237f38dd)

Author SHA1 Message Date
J. Nick Koston e99576c094
Pass width and height when requesting camera snapshot (#53835) 2021-08-10 19:33:06 -05:00
Franck Nijhof 2ed386f9e6
Migrate to async_get_current_platform everywhere (#50034) 2021-05-03 09:34:28 -07:00
J. Nick Koston c820dd4cb5
Have pylint warn when user visible log messages do not start with capital letter or end with a period (#48064)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-19 09:26:36 -05:00
Sergio Conde Gómez 2c74befd4f
Fix foscam to work again with non-admin accounts and make RTSP port configurable again (#45975)
* Do not require admin account for foscam cameras.

Foscam cameras require admin account for getting the MAC address,
requiring an admin account in the integration is not desirable as
an operator one is good enough (and a good practice).

Old entries using the MAC address as unique_id are migrated to the
new unique_id format so everything is consistent.

Also fixed unhandled invalid responses from the camera in the
config flow process.

* Make RTSP port configurable again as some cameras reports wrong port

* Remove periods from new log lines

* Set new Config Flow version to 2 and adjust the entity migration

* Create a proper error message for the InvalidResponse exception

* Change crafted unique_id to use entry_id in the entity

* Abort if same host and port is already configured

* Fix entry tracking to use entry_id instead of unique_id

* Remove unique_id from mocked config entry in tests
2021-02-05 22:39:31 +01:00
joe248 b4af17e02d
Add service to move camera to PTZ preset (#43083) 2021-01-27 15:43:36 +01:00
Sergio Conde Gómez 2e42a862b0
Remove service and config schemas from foscam (#45154) 2021-01-15 18:24:31 +01:00
Sergio Conde Gómez 83b210061d
Add config_flow and stream selection to foscam (#41429)
* Add config_flow and stream selection to foscam

* Simplify config_flow steps

* Make debug log entry more useful

* Deprecate config and platform schemas

* Simplify config loading

* Add config flow testing

* Remove unneeded CONFIG_SCHEMA deprecation

* Improve test coverage

* Unload service by tracking loaded entries

* Address comment

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-01-13 16:09:05 +01:00
Paulus Schoutsen 935ec59c56
Migrate foscam to use entity platform entity services (#43775) 2020-12-01 09:28:30 +01:00
springstan ad102b3840
Use f-strings in integrations starting with "F"and"G" (#32150)
* Use f-strings in integrations starting with F

* Use f-strings in tests for integrations starting with F

* Use f-strings in integrations starting with G

* Use f-strings in tests for integrations starting with G

* Fix pylint error

* Fix broken test
2020-02-24 17:54:20 -08:00
Bas Nijholt ca0fad2cbb Sort imports according to PEP8 for components starting with "F" (#29766) 2019-12-09 14:14:40 +01:00
Sergio Conde Gómez f6b8cffeaf Add PTZ support to Foscam camera component (#27238)
* Add PTZ support to Foscam camera component

* Address review comments:

 - Move service to foscam domain
 - Use `dict[key]` for required schema keys or with defaults
 - Fix sync operations in async context
 - Remove excessive logging

* Fix import order

* Move all the initialization to setup_platform and fix motion detection status logic

* Move function dictionary out of the function.

* Change user input to lowercase snake case

* Change user input to lowercase snake case

* Fix service example value

* Omit foscam const module from code coverage tests

* Add myself to foscam codeowners
2019-10-07 13:17:43 +02:00
Franck Nijhof 9c9c921922 Use Python3 new super syntax sugar (#26890) 2019-09-24 15:38:20 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen 1de0a0bbb9
Convert stream source to method (#23905)
* Convert stream source to method

* Use async with
2019-05-23 09:45:30 -07:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Chris Helming 2b490e4486 Add optional rtsp_port for Foscam (#22786)
* add optional rtsp port for config

* getting rid of default=None

* removing vol.Any
2019-04-05 23:02:38 -04:00
Chris Helming 82a1c0d0e8 Update Foscam stream for newer models (#22744)
* Update Foscam to support stream source

* Removing spaces and tabs

* Changing to Python3-style string formatting

* Adding '_media_port' to hopefully cover other models

* changing logic for success and return none

* Update Foscam stream for newer models

* change if to or
2019-04-04 23:40:47 -07:00
Tobias Sauerwein 048b100eea Clean up docstrings (#22679)
* Clean up docstrings

* Fix long lines

* Fix more docstrings

* Fix more docstrings

* Fix more docstrings
2019-04-03 17:40:03 +02:00
Chris Helming 429e2cdde8 Return 0 for failed Foscam streams (#22651)
* Update Foscam to support stream source

* Removing spaces and tabs

* Changing to Python3-style string formatting

* Adding '_media_port' to hopefully cover other models

* changing logic for success and return none
2019-04-02 09:59:38 -07:00
Chris Helming f6e9dd4832 Update Foscam component to support stream source (#22568)
* Update Foscam to support stream source

* Removing spaces and tabs

* Changing to Python3-style string formatting

* Adding '_media_port' to hopefully cover other models
2019-03-30 21:01:58 -07:00
Paulus Schoutsen f5076188ef
Consolidate all platforms that have no tests (#22096)
* Consolidate

* Fix tests

* Update imports

* Fix import

* Use importlib because integration and package share name

* Fix more tests

* Update .coveragerc and CODEOWNERS
2019-03-16 20:44:05 -07:00