Commit graph

822 commits

Author SHA1 Message Date
Ville Skyttä
f02b6f1119
Huawei LTE SSDP improvements ()
* Recognize more SSDP friendly names as "ours"

* Trigger on SoyeaLink devices

* Pass discovered URL through context, it does not persist via user_input

* Use manufacturer from SSDP

* Actually use serial number if available, update URL for configured

* Remove heuristic friendly name filtering against non-LTE devices
2022-12-14 23:48:25 +01:00
ollo69
9a25e75947
Add integration-type property to androidTV manifest () 2022-12-14 23:41:46 +01:00
Philip Allgaier
3d7a3afca7
Add strings to alert integration () 2022-12-14 21:25:18 +01:00
Aaron Bach
e64973c7cc
Add PurpleAir integration () 2022-12-12 20:32:11 -07:00
Aaron Bach
3d4ee5906d
Add integration for AirVisual Pro ()
* Add integration for AirVisual Pro

* Tests

* A few more redactions

* Loggers

* Consistency

* Remove unnecessary f-string

* Use `entry.as_dict()` in diagnostics

* One call

* Integration types

* Cleanup

* Import cleanup

* Code review

* Code review

* Code review
2022-12-12 14:28:27 -07:00
tronikos
5d31673465
Google Assistant SDK integration ()
* Copy google_sheets to google_assistant_sdk

This is to improve diff of the next commit with the actual implementation.

Commands used:
cp -r homeassistant/components/google_sheets/ homeassistant/components/google_assistant_sdk/
cp -r tests/components/google_sheets/ tests/components/google_assistant_sdk/

find homeassistant/components/google_assistant_sdk/ tests/components/google_assistant_sdk/ -type f | xargs sed -i \
-e 's@google_sheets@google_assistant_sdk@g' \
-e 's@Google Sheets@Google Assistant SDK@g' \
-e 's@tkdrob@tronikos@g'

* Google Assistant SDK integration
Allows sending commands and broadcast messages to Google Assistant.

* Remove unnecessary async_entry_has_scopes check

* Bump gassist-text to fix protobuf dependency
2022-12-09 07:14:43 -08:00
Christian Kündig
b2edf9b598
Set connectable as false for sensirion_ble ()
This is a passive ble integration. Not setting it as false means it won't match properly when using through a passive remote scanner.
2022-12-08 15:23:25 +02:00
Marcel van der Veldt
e2308fd15c
Add matter integration BETA ()
* Add matter base ()

Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>

* Add matter server add-on flow ()

* Add matter server add-on flow

* Fix stale error argument

* Clean docstrings

* Use localhost as default address

* Add matter websocket api foundation ()

* Add matter config entry add-on management ()

* Use matter refactored server/client library ()

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

* Bump python-matter-server to 1.0.6 ()

* Extend matter websocket api ()

* Extend matter websocket api

* Finish docstring

* Fix pin type

* Adjust api after new client

* Adjust api to frontend for now

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-12-01 20:44:56 +01:00
Allen Porter
532ab12a48
Local calendar integration () 2022-11-30 21:20:21 +01:00
Erik Montnemery
e1338adf1a
Allow configuring country and language in core config ()
* Allow configuring country and language in core config

* Add script for updating list of countries

* Use black for formatting

* Fix quoting

* Move country codes to a separate file

* Address review comments

* Add generated/countries.py

* Get default language from owner account

* Remove unused variable

* Add script to generate list of supported languages

* Add tests

* Fix stale docsring

* Use format_python_namespace

* Correct async_user_store

* Improve typing

* Fix with_store decorator

* Initialize language in core store migration

* Fix startup

* Tweak

* Apply suggestions from code review

Co-authored-by: Franck Nijhof <git@frenck.dev>

* Update storage.py

Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-11-24 23:25:50 +01:00
Franck Nijhof
285aff154d
Remove Google Chat/Hangouts integration () 2022-11-24 18:33:13 +01:00
Álvaro Fernández Rojas
f1ffb25d99
Add Airzone DHCP discovery support () 2022-11-23 12:32:23 -07:00
Tom Schneider
27e6b69656
Add yamaha brand configuration ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-11-23 20:19:20 +01:00
G Johansson
b3dd59f202
Add config flow to Scrape ()
* Scrape take 2

* cleanup

* new entity name

* Fix name, add tests

* Use FlowResultType

* Add test abort

* hassfest

* Remove not needed test

* clean

* Remove config entry and implement datacoordinator

* fix codeowners

* fix codeowners

* codeowners reset

* Fix coordinator

* Remove test config_flow

* Fix tests

* hassfest

* reset config flow

* reset strings

* reset sensor

* Reconfig

* Fix tests

* coverage

* Remove coverage

* Remove print

* Add config flow

* Fix config flow

* Add back init

* Add entry to sensor

* float to int

* Fix SelectSelector

* Add tests for config entry to existing

* Test config flow

* Fix test reload

* Fix rebase

* Fix strings

* clean init

* Clean test_sensor

* Align sensor setup entry

* Add error to strings

* review changes

* clean tests

* Add back options flow

* review changes

* update_listener

* Add tests

* Remove duplicate abort

* strings

* sensors to sensor

* review changes

* more review changes

* clarify test payload

* fixture name
2022-11-21 21:39:39 +01:00
Aarni Koskela
38b84620bd
Add support for Sensirion BLE sensors () 2022-11-19 14:26:54 -06:00
J. Nick Koston
4c8850ec7b
Add dhcp support for newer powerwall gateways () 2022-11-17 10:10:55 +01:00
Brynley McDonald
3bfb91d159
Add integration_type for flick_electric ()
* Add integration_type for flick_electric

* Updates from hassfest
2022-11-16 00:27:09 -06:00
J. Nick Koston
f035223599
Make sure the config_flow key is set for brands ()
Fixes https://github.com/home-assistant/frontend/issues/14376
2022-11-15 18:27:59 +01:00
Ernst Klamer
af73afa2e2
Add support for HHCCJCY10 to xiaomi_ble () 2022-11-14 11:18:51 -06:00
J. Nick Koston
50f960097f
Add support for thermobeacon WS 03 aka device 0x18 ()
* Add support for thermobeacon WS 03 aka device 0x18

changelog: https://github.com/Bluetooth-Devices/thermobeacon-ble/compare/v0.3.2...v0.4.0

* empty
2022-11-13 20:30:50 +01:00
Malte Franken
3658c5f673
Add integration_type to nsw_rural_fire_service_feed ()
define integration type
2022-11-13 16:06:33 +01:00
Malte Franken
3089ca06c5
Add integration_type to qld_bushfire ()
define integration type
2022-11-10 08:16:37 +01:00
Aarni Koskela
f3e85b6492
Deduplicate blackening () 2022-11-09 16:58:20 +01:00
Aarni Koskela
ec316e94ed
RuuviTag BLE sensor support () 2022-11-09 08:35:30 -06:00
Ernst Klamer
b72876d369
Add support for BTHome V2 to bthome ()
* Add BTHome v2 support

* Add new sensor types

* Add new sensor types
2022-11-09 15:31:58 +01:00
Malte Franken
b7f3eb77dc
Add integration_type to usgs_earthquakes_feed () 2022-11-09 11:20:27 +01:00
Malte Franken
3edaef63b0
Add integration_type to ign_sismologia ()
define integration type
2022-11-08 14:47:00 +01:00
Erik Montnemery
c3d4a9cd99
Create repairs issue if an outdated currency code is configured ()
* Create repairs issue if an outdated currency code is configured

* Add script for updating list of currencies

* Use black for formatting

* Move currency codes to a separate file

* Address review comments
2022-11-08 07:21:09 +01:00
Robert Hillis
bc146a09db
Add integration_type for some integrations () 2022-11-07 19:39:29 +01:00
puddly
604cd46ec9
Enable SkyConnect config flow and use correct case in USB matching ()
* Ensure `USBCallbackMatcher` uses the appropriate case for each field

* Enable the config flow for the SkyConnect integration

* Update unit test
2022-11-07 17:26:16 +01:00
Mick Vleeshouwer
ff18cece7b
Add Brandt, Hexaom, SIMU & Ubiwizz as virtuals integrations of Overkiz ()
* Match supported brands with Overkiz libs

* Add missing files for mypy
2022-11-07 16:17:56 +01:00
StefanIacobLivisi
902e075d58
Add livisi integration () 2022-11-07 14:40:23 +01:00
Malte Franken
efd60de1ac
Add integration_type to geonetnz_volcano ()
define integration type
2022-11-07 09:01:07 +01:00
Malte Franken
64a508be7b
Add integration_type to geonetnz_quakes ()
define integration type
2022-11-05 11:05:19 +01:00
Renat Sibgatulin
dd5baa6e48
Add air-Q integration (air quality sensors) ()
* Added initial files for air-Q integration

* Allow FIXME comments in pylint (temporary)

Also reintroduce --ignore-missing-annotations=y

* Set up air-q entry to connect to aioairq's API (initial attempt)

Also add necessary constants

* Implement a class for sensors and its update logic

Very early stage, WIP

* Zeroconf and authentication are working

* Complete the bare-bone minimal working version

Specifically, make AirQSensor update its values.

* Handle invalid authentication gracefully

* Handle ClientConnectionError gracefully

* Add field hint for the login form

The key in the schema, which defines the form in
`ConfigFlow.async_show_form` is looked up in both `airq/strings/json`
and `airq/translations/en.json`. I am still not 100% sure how this
lookup is performed. WIP

* Minor cleanups

* Extend sensor list to all supported by SensorDeviceClass

Also manage warming up sensors

* aioairq is published to PyPI and mentioned in requirements

* Reordered constants and list content alphabetically

As required by style guides. Also turned SENSOR_TYPES to a list

* Updated file docstrings for a dev unfamiliar w/homeassistant like myself

* Adding a bit of logging for the integration setup process

* Expose scan interval & smoothing flag

Also streamline test_authentication in config_flow.

* Fix a type annotation mistake

* Use as many constants from homeassistant.const as possible

My only concern is using CONST_IP_ADDRESS = "ip_address" for smth which
stands for both IP address and mDNS...

* Temporarily rollback ConfigFlow.async_step_configure and use defaults

TODO: implement OptionFlowHandler instead

* Define custom Coordinator, w subset of airq config

The latter is then accessed from entity / sensor constructors to define
correct DeviceInfo

* Provide translations to de & fr + minor changes to en

* Provide translations to ru + a minor en changes

* Make translation a little more helpful and polite

* Fix devicename and entry title

* Remove stale commented out code

* Test config_flow

At this point two helper functions which interact with the external
library are not tested

* Clean up unrelated and meant as temporary changes

* Clean up unnecessary comments meant for internal use

* Move fetching config to a dedicated async coordinator method

As opposed to it being a potentially poorly justified step in
async_setup_entry

* Remove zeroconf support since it is not yet ready

* Remove translations other than en

* Remove unnecessary comments, manifest.json entries, and constants

* Improve exception handling

- `_LOGGER` uses `debug` and not `error` levels.
- Drop `ClientConnect` and catch `aiohttop.ClientConnectError` directly
- Drop `Exception` as it is not expected from `aioairq` (remove the
  corresponding test too)

* Drop strings for obsolete errors and steps

Specifically, `unknown` error isn't caught any more. `configure` step
has also been removed.

* Refactor en.json to be consistent with strings.json

* Move target_route from a coordinator argument to a constant

At this point a user cannot configure the target_route route, thus it
does not make sense to expose it half-heartedly in
`AirQCoordinator.__init__`, since it cannot be accessed.

* Fix an async call in `AirQCoordinator.async_setup_entry`

* Refactor underlying aioairq API

- Use `homeassistant.helpers.aiohttp.async_get_clientsession` and pass a
  single persistent session to `aioariq.AirQ.__init__`
- `aioairq.AirQ.fetch_device_info` now returns a `DeviceInfo` object heavily
  inspired and almost compatible with `homeassistant.helpers.entity.DeviceInfo`.
  Make heavier use of this object and define a single `DeviceInfo` in the
  `AirQCoordinator` (instead of recreating the same object for each sensor
  of the device in `sensor.AirQSensor`)
- Drop two helper functions in `config_flow.py` and operate on `aioariq.AirQ`
  methods directly

* Fix the version of aioairq

* Add 15 more sensors + icons

* Remove cnt* & TypPS, change units of health & performance

* Add 12 more sensors

* Add a missing icon

* Gracefully handle device not being available on setup

If the device and the host are not on the same WiFi,
ServerTimeoutError is raised, which is caught by
ClientConnectionError.
If the device is powered off, ClientConnectionError is expected.
In both cases, ConfigEntryNotReady is raised, as prescribed by the docs.
Newer version of aioairq times-out far quicker than the default 5 mins.

* Rename two sensors

* Validate provided IP address / mDNS

aioairq now raises InvalidInput if provided IP / mDNS does not seem
valid. Handle this exception correctly

* Apply suggestions from code review

Clean up the comments and rename the logger

Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Artem Draft <Drafteed@users.noreply.github.com>

* Only fetch device info during the first refresh

- Fetched info is stored in AirQCoordinator.device_info.
- In `AirQSensor.native_value` only multiply by the factor if
  the sensor reading is not None
- Fix the tests for ConfigFlow for aioairq==0.2.3. Specifically
  make the dummy data pass the new validation step upstream
  + add a test which fails it

* Drop custom device classes for now

* Apply suggestions from code review

Co-authored-by: Artem Draft <Drafteed@users.noreply.github.com>

* Only fetch device info during ConfigFlow.async_step_user

Store the result obtained by `airq.fetch_device_info` it in
`config_entry.data`. Pass the entire config entry to `AirQCoordinator`
and build the entire `homeassistant.helpers.entity.DeviceInfo` in the
`AirQCoordinator.__init__`. This makes
`AirQCoordinator._async_fetch_device_info` and overloaded
`AirQCoordinator._async_config_entry_first_refresh` obsolete.

Bump aioairq version.

Turn update_interval from `AirQCoordinator.__init__` argument into a
contestant.

* Custom entity description exposing a hook to modify sensor value

Use a `AirQEntityDescription` with a callable `value_fn` which allows to
change the sensor value retrieved from the device. Note that the
callable does not handle data retrieval itself (even from
`coordinator.data`). Instead it is purely a hook to transform obtained
value.

* Avoid duplicated use of unique_id

Device info is fetched  during the `ConfigFlow.async_user_step`.
`unique_id` is taken from the device info and is **not** stored
in `config_entry.data`. Subsequently `config_entry.unique_id` is
used instead.

* Drop unnecessary try-except

Co-authored-by: Artem Draft <Drafteed@users.noreply.github.com>

* Clarify the use of value_transform_fn

* Refactor the use of lambdas in AirQEntityDescription

Now it is the job of the callable under `value` to get the sensor
reading from the coordinator's data. Factoring this functionality into a
callback decouples  the key of the description from the key of dict,
returned by the API, so `AirQEntityDescription` no longer requires its key
to be set to smth clearly internal (e.g. `nh3_MR100`).

* Use a callback to update native_value

Since all `native_value`s are updated synchronously, it can as well be
done in a callback for better state consistency (right?)

* Revert the description keys to match data keys

Must match given the current way of identifying available sensors. On a
broader scale, they must match to be able to relate the descriptions to
sensors, unless a separate lookup table is maintained.

* Reduce number of loops when adding sensors

Filtering warming up sensors and non-sensor keys can be combined with
adding entities.

* Remove obsolete imports

* Update integrations.json

* Add integration_type

Integration supports multiple devices => hub

Co-authored-by: dl2080 <daniel.lehmann@runbox.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Artem Draft <Drafteed@users.noreply.github.com>
Co-authored-by: Daniel Lehmann <43613560+dl2080@users.noreply.github.com>
Co-authored-by: Martin Selbmann <job@martin-selbmann.de>
2022-11-03 23:13:57 +01:00
Malte Franken
ee4d28000d
Add integration_type to gdacs () 2022-11-03 09:32:40 +01:00
Rami Mosleh
fc3843f5e2
Add config flow to pushbullet ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-11-02 16:11:44 +01:00
Aidan Timson
d6689937a3
Add integration type to OVO Energy () 2022-10-31 20:42:02 +01:00
Aidan Timson
8044b9587a
Add integration type to System Bridge () 2022-10-31 20:41:12 +01:00
aschmitz
a766b41b13
Add basic Aranet integration () 2022-10-30 22:50:46 -05:00
G Johansson
7bd89621ce
Change IoT Class for Min/Max to calculated () 2022-10-29 14:21:28 -04:00
epenet
7feb463a4c
Add integration_type to samsungtv () 2022-10-27 19:18:09 +03:00
Steven Looman
d50795af2b
Move upnp derived sensors to library, be more robust about failing getting some data () 2022-10-26 14:34:44 -05:00
Daniel Gangl
b2b3c47917
Add config flow to zamg () 2022-10-26 18:35:12 +02:00
Marc Mueller
b148cdd64a
Add integration type to fritzbox_callmointor integration () 2022-10-26 18:19:54 +02:00
Raman Gupta
1b3c383558
Add integration_type to vizio, tomorrowio, zwave_js () 2022-10-25 23:31:44 +02:00
Aaron Bach
2af58ad609
Set integration type on codeowned integrations @bachya () 2022-10-25 22:23:54 +02:00
Franck Nijhof
98591cd4b6
Remove hardware and fix raspberry pi brands in integrations.json () 2022-10-25 21:05:04 +02:00
Erik Montnemery
3aa64aaaf1
Mark some integrations as system integrations () 2022-10-25 15:30:46 +02:00
Bram Kragten
36bb0bbc1a
Fix integrations.json creation, make iot_standards a list () 2022-10-25 13:43:40 +02:00