Commit Graph
104 Commits
Author SHA1 Message Date
Erik Montnemery 231aad7a68 Sort manifests 1 (#87022) 2023-02-08 20:29:44 +01:00
Marc Mueller 63d519c1a8 Spelling updates (#82867) 2022-11-28 16:51:43 +01:00
Sean VigandMartin Hjelmare d49a223a02 Fix updating Amcrest binary sensors (#80365)
* Fix updating Amcrest binary sensors

As detailed in https://bugs.python.org/issue32113, a generator
expression cannot be used with asynchronous components, even that the
resulting elements of the generator are normal objects.  Manually
iterate over the event codes and check if the events have happened.
Escape early on the first event that is triggered such that this is
functionally equivalent to using `any`.

* Update homeassistant/components/amcrest/binary_sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-10-17 10:13:11 +02:00
Sean Vig e7c614a825 Fix audio detection for IP4m-1041 Amcrest camera (#80066) 2022-10-11 14:29:35 +02:00
epenet ff356205bf Use platform constants from root (#78032) 2022-09-08 12:24:45 +02:00
epenet df5f6bdfc1 Use _attr_should_poll in camera entities (#77173) 2022-08-22 20:30:35 +02:00
Sean Vig 08770d015b Change Amcrest event monitor to non-async (#69640) 2022-05-04 10:15:52 -05:00
epenet 246f4e081a Use EntityFeature enum in components (a**) (#69333) 2022-04-05 23:42:05 +02:00
epenet bfd84ba89c Prettify yaml (services.yaml) (#68878) 2022-03-30 09:48:06 +02:00
Sean Vig 38306417ad Bump amcrest version to 1.9.7 (#68055) 2022-03-14 17:36:16 +01:00
Sean Vig 6124081ddc Fix turning amcrest camera on and off (#68050) 2022-03-12 20:42:28 +02:00
Robert Svensson ac11a9b7ff Revert Amcrest change (#66412) 2022-02-12 23:08:23 +01:00
PanicRide 0797533016 New amcrest binary sensor to monitor doorbell button (#66302)
* New binary sensor to monitor doorbell button

* New binary sensor to monitor doorbell button
2022-02-11 23:58:26 +01:00
Richard BensonandFranck Nijhof b90434e8d6 Bump amcrest to 1.9.4 (#66124)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-02-09 10:25:07 +01:00
Sean Vig 50525e25b6 Fix Amcrest service calls (#65717)
Fixes #65522
Fixes #65647
2022-02-06 14:14:44 -08:00
J. Nick Koston 5b755b74fb Add loggers to integration manifest.json (#65083) 2022-01-28 13:37:53 -08:00
Sean Vig 6af7425051 Create tasks to load Amcrest platforms (#64848)
* Create tasks to load Amcrest platforms

* Move closure definition out of for loop
2022-01-24 22:34:18 +01:00
Sean Vig b713a951dd Update the states of the amcrest camera on every update (#56284) 2022-01-22 18:34:36 -10:00
Sean Vig 7781e308cd Migrate amcrest integration to new async API (#56294) 2022-01-22 15:49:45 -10:00
epenetandepenet 665eeb4b27 Explicitely allow Platform enum in discovery helper (#63571)
* Adjust Platform type hint in discovery helper

* Adjust amcrest

* Adjust comfoconnect

* Adjust ecovacs

* Adjust egardia

* Rename arguments

* Convert Platform enum to string explicitely

* Revert "Adjust egardia"

This reverts commit ff7b0d6100.

* Revert "Adjust ecovacs"

This reverts commit 2749045e13.

* Revert "Adjust comfoconnect"

This reverts commit bfff08f7fc.

* Undo argument name change and conversion to string

* Remove comment

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-09 06:06:56 +01:00
Allen PorterandMartin Hjelmare 14e4216e29 Put access to ffmpeg hass.data behind a method (#62570)
* Put access to ffmpeg hass.data behind a method

Move all callers of `hass.data[DATA_FFMPEG]` to a new function that returns the FFMpegManager.

* Update homeassistant/components/ffmpeg/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Remove unnecessary async_ prefix

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-12-21 23:40:43 -08:00
epenetandepenet e4e0dcbae0 Use new BinarySensorDeviceClass enum in amcrest (#61268)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-08 12:13:18 -08:00
Marc Mueller b60b38c6f6 Fix amcrest pylint issue (#60932) 2021-12-03 20:14:21 +01:00
Pedro Rodriguez Tavarez e0562385f1 Implement privacy_mode for amcrest integration (#57210) 2021-12-03 10:00:39 -08:00
Franck Nijhof 6b9c2d8295 Add shorthand attribute support to Camera platform (#59837) 2021-11-25 16:03:53 +01:00
Marc Mueller 5048bad050 Use assignment expressions 05 (#57785) 2021-10-17 19:56:00 +02:00
Sean VigandJoakim Sørensen f18e4bab60 Add resolution to Amcrest camera unique id (#56207)
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
2021-09-30 13:38:18 +02:00
Marc Mueller 565a9fea6b Import Callable from collections.abc (2) (#56776) 2021-09-29 14:06:51 +02:00
Sean Vig 02ba3c6089 Update amcrest version to 1.9.3 (#56348)
This version fixes a bug that affects the current non-async Home Assistant integration
2021-09-18 08:34:51 +02:00
Sean Vig 6d99a7a730 Add unique id to amcrest sensors (#55243)
* Add unique id to amcrest sensors

* Change 'unique_id' to 'serial_number' on api wrapper

* Update unique id's with channel value that can be used in future changes and remove unrelated camera changes
2021-09-17 07:48:17 +02:00
Sean Vig 69ff7a968a Bump amcrest version to 1.9.2 (#56281) 2021-09-16 06:53:40 +02:00
Sean Vig a180c3f813 Fix polling on online Amcrest binary sensor (#56106) 2021-09-12 20:45:52 -07:00
Sean Vig 03df48af9c Bump amcrest version to 1.8.1 (#56058)
The current version of the `amcrest` package has a bug in exposing if
the video stream is enabled, which leads to the substream status being
used to set if the camera is on or off.  The updated version of
`amcrest` fixes this bug.

Fixes #55661
2021-09-10 15:38:01 +02:00
Sean Vig 789f21c427 Fix assignment of amcrest camera model (#55266) 2021-09-07 04:52:45 +02:00
Sean Vig b45c985d58 Remove un-needed asserts on hass in Amecrest (#55244) 2021-08-26 08:34:58 +02:00
Sean VigandMilan Meulemans 6b4e3bca6f Add type annotations to amcrest integration (#54761)
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
2021-08-25 13:24:29 +02:00
Sean Vig 5cbb217318 Update amcrest to use binary sensor entity description (#55092) 2021-08-24 14:06:19 +02:00
Marc Mueller 1f6a70bafd Use EntityDescription - amcrest (#54998) 2021-08-23 22:32:01 +02:00
6cefd558d8 Set unique id to amcrest serial number (#54675)
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Sean Vig <sean.v.775@gmail.com>
2021-08-21 19:58:37 +02:00
Erik Montnemery 4e07ab1b32 Move temperature conversions to sensor base class (1/8) (#48261)
* Move temperature conversions to entity base class (1/8)

* Update integrations a-c

* Leave old temperature conversion until all integrations are migrated

* tweak

* Use contextlib.suppress

* Remove the MeasurableUnitEntity mixin

* Address comments, add tests

* Fix f-string

* Drop deprecation warning from base entity class

* Update with _attr-shorthand

* Fix rebase mistakes

* Fix additional rebase mistakes

* Only report temperature conversion once

* Fix additional rebase mistakes

* Format homeassistant/components/bbox/sensor.py

* Fix check for overidden _attr_state

* Remove test workarounds from implementation

* Remove useless None-check

* Tweaks

* Migrate new sensors a-c

* Update climacell

* Push deprecation of temperature conversion forward

* Override __repr__ in SensorEntity

* Include native_value in SensorEntity attributes

* Pylint

* Black

* Black

* Fix rebase mistakes

* black

* Fix rebase mistakes

* Revert changes in august/sensor.py

* Revert handling of unit converted restored state

* Apply code review suggestion

* Fix arlo test
2021-08-11 10:45:05 +02:00
J. Nick Koston e99576c094 Pass width and height when requesting camera snapshot (#53835) 2021-08-10 19:33:06 -05:00
jan iversen 1d40a6e407 Activate mypy from amcrest and make the needed changes (#54392) 2021-08-10 14:57:57 +02:00
Sean Vigandjan Iversen 673be4f7dd Bump Amcrest version to 1.8.0 (#53784)
* Bump Amcrest version to 1.8.0
* Add codeowner to Amcrest.

Co-authored-by: jan Iversen <jancasacondor@gmail.com>
2021-08-01 00:22:19 +02:00
tkdrobandFranck Nijhof 028a07d86f Wrap up selectors (#50794)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-25 14:45:17 +02:00
Julien "_FrnchFrgg_" RivaudandPascal Vizeli 24a46d91d3 Fix amcrest detection of sensor reset (#50249)
Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2021-05-10 10:49:08 -07:00
tkdrob e92516c072 Add targets and selectors to services (A) (#49818) 2021-05-09 02:21:00 +02:00
Franck Nijhof 055cdc64c0 Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
Julien "_FrnchFrgg_" Rivaud 5a9c3fea70 Enable passing Amcrest/Dahua signals through as HA events (#49004)
Some of the compatible hardware sends event signals that wouldn't map
well to entities, e.g. NTP sync notifications, SIP registering
information, or « doorbell button pressed » events with no « return to
rest state » matching event to have a properly behaved binary sensor.

Instead of only monitoring specific events, subscribe to all of them,
and pass them through (in addition to handling them as before if they
correspond to a configured binary sensor).

Also bump python-amcrest to 1.7.2. Digest of the changes:

* The library now passes through the event data instead of just presence of a
 "Start" member in in.
* Connection to some devices has been fixed by not throwing the towel on
  minor errors.

https://github.com/tchellomello/python-amcrest/compare/1.7.1...1.7.2
2021-04-13 21:33:46 +02:00
Franck Nijhof de569982a4 Fix services for Armcrest & Logi Circle (#49166) 2021-04-13 16:32:39 +02:00
Tobias Sauerwein 2b79c91813 Clean up camera service schema (#49151) 2021-04-13 13:07:05 +02:00