Commit Graph

52 Commits (b78e22e01240a843b9df638794111ffd21730316)

Author SHA1 Message Date
epenet 4363852178
Add sensor setup type hints [a-b] (#63319)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 19:18:00 +01:00
epenet cbd3cd4599
Add camera setup type hints (#63277)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 13:22:41 +01:00
epenet 24fc0df4b0
Add alarm_control_panel setup type hints (#63264)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 10:57:25 +01:00
epenet 545e321002
Add init type hints [a] (#63098)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-30 21:17:05 -08:00
epenet f724aea0bb
Ensure service calls are typed [a-j] (#63013)
* Ensure service calls are typed [a-j]

* Adjust apns

* Adjust arlo

Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-30 18:50:51 +01:00
Allen Porter 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
epenet 84141ff3dd
Use new SensorDeviceClass in arlo (#61274)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-08 21:56:05 +01:00
Marc Mueller ff853b2d53
Use assignment expressions 19 (#57968) 2021-10-18 15:54:38 +02:00
Marc Mueller 5048bad050
Use assignment expressions 05 (#57785) 2021-10-17 19:56:00 +02:00
Franck Nijhof f561543e92
Migrate attribution attribute for Arlo (#57504) 2021-10-11 20:40:40 -07:00
Erik Montnemery 2fa07777cd
Warn if unit_of_measurement is set on instances of SensorEntityDescription (#54867)
* Add class BaseEntityDescription without unit_of_measurement

* Refactor according to review comments

* Tweak

* Fix offending integrations

* Fix offending integrations
2021-08-20 15:54:57 +02:00
Marc Mueller 6f70302901
Fix arlo platform schema (#54470) 2021-08-11 08:57:56 -07: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 9b7b787fe4
Remove icon where device_class is defined. (#54323) 2021-08-09 13:13:11 +02:00
jan iversen 6ea50823c1
Use SensorEntityDescription for arlo (#54223)
* Use SensorEntityDescription.
2021-08-09 12:16:35 +02:00
Robert Hillis c865a1876e
Use entity class attributes for arlo (#52681)
* Use entity class attributes for arlo

* revert sensor
2021-07-11 16:45:05 -04:00
Michael dbefa8fac0
Add strict type annotations to alarm_control_panel (#50945)
* Add strict type annotations

* Apply suggestions

* Type code as optional string
2021-05-23 16:51:40 +01: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
Erik Montnemery e0cd7072d6
Migrate integrations a-c to extend SensorEntity (#48210) 2021-03-22 12:37:16 +01:00
Erik Montnemery 6c084ae6ce
Update integrations a-e to override extra_state_attributes() (#47756) 2021-03-11 16:51:03 +01:00
Paul 07461f9a8e
Update pyarlo to 0.2.4 (#44034) 2020-12-08 23:14:55 +01:00
Paulus Schoutsen 0cf3736162
Bump ha-ffmpeg to 3.0.2 (#43597) 2020-11-25 08:45:15 +01:00
springstan d2b1918e9c
Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
Franck Nijhof 53545c984b
Log lines do not end with a full stop (#37527) 2020-07-05 23:04:19 +02:00
Erik Montnemery 6f7f5b4034
Rename AlarmControlPanel to AlarmControlPanelEntity (#34590) 2020-04-25 18:05:28 +02:00
springstan d7e3b0b755
Clean up access to config in various integrations v2 (#33763) 2020-04-07 22:45:56 +02:00
Franck Nijhof 24840b54ac
Add yamllint (in pre-commit and CI) (#33676)
* Add yamllint (in pre-commit and CI)

* Fix linting for all YAML files

* Bump and add it to requirements

* Fix gen_requirements for pre-commit, remove 'v' from version
2020-04-05 10:33:45 +02:00
Paulus Schoutsen 4ebbabcdd1
Unsub dispatcher when removing entity from hass (#33510)
* Unsub dispatcher when removing entity from hass

* Update homeassistant/components/plaato/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/volvooncall/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-02 09:25:33 -07:00
Paulus Schoutsen aaa1d06809
Directly call async_write_ha_state (#33508)
* Directly call async_write_ha_state

* Address comments

* Fix tests
2020-04-01 14:19:51 -07:00
springstan f1a0ca7cd3
Add and use percentage constant (#32094)
* Add and use percentage constant

* Fix pylint error and broken test
2020-02-28 11:46:48 -08:00
Paulus Schoutsen fc0278c91f
Fix Arlo doing I/O in event loop (#32190) 2020-02-25 23:10:43 +01:00
Ville Skyttä 496bd3dddf
Add and use more unit constants (#32122)
* Add and use speed constants

* Add and use meter based volume and area constants

* Add and use more mass unit constants

* Add and use concentration unit constants

* Add and use watts per square meter constant

* Use more time constants

* Use more data constants
2020-02-24 17:52:14 -08:00
springstan 524a1a7587
Use f-strings in integrations starting with "A" (#32110)
* Use f-strings in integrations starting with A

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

* Fix pylint by renaming variable

* Fix nested for loop in f-string for aprs device_tracker

* Break long lines into multiple short lines

* Break long lines into multiple short lines v2
2020-02-23 13:38:05 -08:00
Franck Nijhof a84741392b
Format all manifests with prettier (#30521) 2020-01-06 21:28:23 +01:00
SukramJ 1fde0d18ed Add supported_features to Alarm Control Panel to limit device_actions (#29065)
* Add supported_features to Alarm Control Panel

* mark supported_features abstract

* Add SF to async_register_entity_service

* fix test

* Add missing SF SUPPORT_ALARM_ARM_CUSTOM_BYPASS

* isort

* fix async_register_entity_service

* Update alarm_control_panel.py
2019-11-25 15:42:53 -08:00
Jonas Janz 502f59977a Add description for arlo.update service (#28270) 2019-10-29 11:02:25 +01:00
bouni 5eb781d378 Move imports in arlo component (#27806) 2019-10-17 17:09:47 -07:00
Franck Nijhof c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen a52f96b23a
Add stub services.yaml and make validation mandatory (#23213) 2019-04-18 15:13:35 -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
Rohan Kapoor 6ba9ccf052 Load requirements and dependencies from manifests. Fallback to current `REQUIREMENTS` and `DEPENDENCIES` (#22717)
* Load dependencies from manifests. Fallback to current DEPENDENCIES

* Fix typing

* Ignore typing correctly

* Split out dependency processing to a new method

* Fix tests

* Only pull from manifest if dependencies is non empty

* Inline temporary function

* Fix light tests [skip ci]

* Fix tests/common

* Fix some mqtt tests [skip ci]

* Fix tests and component manifests which have only one platform

* Fix rflink tests

* Fix more tests and manifests

* Readability over shorthand format

* Fix demo/notify tests

* Load dependencies from manifests. Fallback to current DEPENDENCIES

* Load requirements from manifests. Fallback to current REQUIREMENTS

* Fix typing

* Ignore typing correctly

* Split out dependency processing to a new method

* Only pull from manifest if dependencies is non empty

* Inline temporary function

* Fix tests and component manifests which have only one platform

* Fix rflink tests

* Readability over shorthand format

* Clean up requirements

* Use integration to resolve deps/reqs

* Lint

* Lint

* revert a change

* Revert a test change

* Fix types

* Fix types

* Add back cache for load component

* Fix test_component_not_found

* Move light.test and device_tracker.test into test package instead with manifest to fix tests

* Fix broken device_tracker tests

* Add docstrings to __init__

* Fix all of the light tests that I broke earlier

* Embed the test.switch platform to fix other tests

* Embed and fix the test.imagimage_processing platform

* Fix tests for nx584

* Add dependencies from platform file's DEPENDENCIES

* Try to setup component when entity_platform is setting up

Fix tests in helpers folder

* Rewrite test_setup

* Simplify

* Lint

* Disable demo component if running in test

Temp workaround to unblock CI tests

* Skip demo tests

* Fix config entry test

* Fix repeat test

* Clarify doc

* One extra guard

* Fix import

* Lint

* Workaround google tts
2019-04-11 01:26:36 -07:00
Paulus Schoutsen cfe4cf30ad
Add manifests (#22699)
* Add manifests

* Update auto name

* Update codeowners

* Add requirements from platforms

* Minor cleanup

* Incorporate changes from awarecan PR
2019-04-03 21:14:45 -07:00
Pascal Vizeli 7066fb0d10
Fix ffmpeg default extra options (#22682) 2019-04-03 13:46:41 +02:00
Pascal Vizeli a55afa8119 Update ha-ffmpeg 2.0 (#22427) 2019-03-27 07:55:05 +01:00
Paulus Schoutsen 4b1de61110
Use relative imports inside integrations (#22235)
* Use relative imports inside integrations

* Lint

* Fix automation tests

* Fix scene imports
2019-03-20 22:56:46 -07:00
Fabian Affolter cdc4dc3f11
Rename CONF_ATTRIBUTION to ATTRIBUTION (#21069)
* Rename CONF_ATTRIBUTION to ATTRIBUTION

* Update homeassistant/components/sensor/irish_rail_transport.py

Co-Authored-By: fabaff <mail@fabian-affolter.ch>
2019-02-14 22:09:22 +01:00
Fabian Affolter 127c55e0c1
Update file header (#21023)
* Update file header

* Update file header

* Update file header

* Update file header

* Update file header

* Fix lint issues
2019-02-13 21:21:14 +01:00