1
mirror of https://github.com/home-assistant/core synced 2024-07-30 21:18:57 +02:00
Commit Graph

55769 Commits

Author SHA1 Message Date
J. Nick Koston
089c4a7da2
Bump bluetooth-adapters to 0.7.0 (#81576)
changelog: https://github.com/Bluetooth-Devices/bluetooth-adapters/releases/tag/v0.7.0
2022-11-05 10:44:05 +01:00
Raman Gupta
9a747bafa3
Use enums instead of deprecated constants (#81591) 2022-11-05 10:33:56 +01:00
GitHub Action
0311063c44 [ci skip] Translation update 2022-11-05 00:28:23 +00:00
Shay Levy
59ec52a079
Fix Shelly Plus HT missing battery entity (#81564) 2022-11-04 18:29:00 +02:00
J. Nick Koston
ca905a8c05
Bump dbus-fast to 1.71.0 (#81541)
performance improvements

changelog: https://github.com/Bluetooth-Devices/dbus-fast/compare/v1.67.0...v1.71.0
2022-11-04 15:29:15 +01:00
javicalle
52c80b7c5b
Add Tuya Backlight mode configuration (#81218)
* Tuya backlight configuration

* fix codespell
2022-11-04 09:54:19 -04:00
J. Nick Koston
2e92a0d1c2
Bump oralb-ble to 0.10.2 (#81537)
Fixes some more missing pressure mappings

changelog: https://github.com/Bluetooth-Devices/oralb-ble/compare/v0.10.1...v0.10.2
2022-11-04 14:42:37 +01:00
Nyro
ddbfed354e
Add Overkiz AtlanticPassAPCDHW (#78665)
* Add Overkiz AtlanticPassAPCDHW

* Remove unnecessary line

* Improve atlantic pass_apcdhw for operation and target temprature

* Remove async_execute_commands

* Fix small code issues for Overkiz AtlanticPassAPCDHW

* Update homeassistant/components/overkiz/const.py

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>

* Update homeassistant/components/overkiz/water_heater_entities/atlantic_pass_apc_dhw.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/overkiz/water_heater_entities/atlantic_pass_apc_dhw.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Fix small issues

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>
Co-authored-by: Quentame <polletquentin74@me.com>
2022-11-04 10:42:58 +01:00
Nyro
1a5eeb2db1
Add Overkiz AtlanticPassAPCHeatingAndCoolingZone (#78659)
* Add Overkiz AtlanticPassAPCHeatingAndCoolingZone

* Fix commands instanciations to be simpler

* Update AtlanticPassAPCHeatingAndCoolingZone to show temperature and fix HA threads

* Simplify async_execute_commands in order to receive simpler list

* Fix get and set temperature in derogation or auto mode

* Remove hvac_action from AtlanticPassAPCHeatingAndCoolingZone

* Remove unused lines

* Update async_execute_commands to work like async_execute_command
Implement cancel for multiple commands

* Improve to use preset_home for internal scheduling

* Remove async_execute_commands

* Improvement for AtlanticPassAPCHeatingAndCoolingZone

* Update homeassistant/components/overkiz/climate_entities/__init__.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_heating_and_cooling_zone.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_heating_and_cooling_zone.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/overkiz/const.py

Co-authored-by: Quentame <polletquentin74@me.com>

Co-authored-by: Quentame <polletquentin74@me.com>
2022-11-04 10:21:30 +01:00
J. Nick Koston
93072d8ac5
Bump dbus-fast to 1.67.0 (#81517)
Bump dbus to 1.67.0

The bleak BlueZ clients use the negotiate_unix_fd path
which was not optimized but is now.  (The scanners already
used a fast path)

changelog: https://github.com/Bluetooth-Devices/dbus-fast/compare/v1.64.0...v1.67.0
2022-11-04 06:34:23 +01:00
GitHub Action
c7fc51cfa5 [ci skip] Translation update 2022-11-04 00:29:52 +00:00
krazos
71c18ec527
Fix errant reference to "Solar.Forecast" in "Forecast.Solar" config options (#81252)
Fix errant reference to Solar.Forecast

Config options string referred to "Solar.Forecast".  That reference has been corrected to "Forecast.Solar".
2022-11-03 23:23:42 +01:00
Renat Sibgatulin
dd5baa6e48
Add air-Q integration (air quality sensors) (#76999)
* 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
J. Nick Koston
08936e4041
Bump oralb-ble to 0.10.1 (#81491)
fixes #81489

changelog: https://github.com/Bluetooth-Devices/oralb-ble/compare/v0.10.0...v0.10.1
2022-11-03 20:35:05 +01:00
mkmer
9c85d22bab
Bump AIOAladdinConnect to 0.1.47 (#81479) 2022-11-03 15:39:02 +01:00
J. Nick Koston
cd5901e0d0
Fix HomeKit thermostat to take priority over fans (#81473) 2022-11-03 14:49:12 +01:00
Franck Nijhof
bad33da2c1
Merge branch 'master' into dev 2022-11-03 13:13:35 +01:00
Jan Bouwhuis
b3403d7fca
Improve MQTT type hints part 3 (#80542)
* Improve typing debug_info

* Improve typing device_automation

* Improve typing device_trigger

* Improve typing fan

* Additional type hints device_trigger

* Set fan type hints to class level

* Cleanup and mypy

* Follow up and missed hint

* Follow up comment
2022-11-03 13:06:53 +01:00
Dennis Schroer
dcd1ab7ec3
Update energyflip-client dependency to 0.2.2 (#81426) 2022-11-03 12:53:58 +01:00
J. Nick Koston
905005e1e8
Bump dbus-fast 1.64.0 (#81462)
- Performance improvements

changelog: https://github.com/Bluetooth-Devices/dbus-fast/compare/v1.61.1...v1.64.0
2022-11-03 12:51:38 +01:00
hahn-th
918940a0c6
Add HmIP-WGC to homematicip_cloud integration (#75733)
* Add HmIP-WGC

* remove unused code

* removed test test_manually_configured_platform
2022-11-03 12:03:49 +01:00
Franck Nijhof
7556f2b84e
Update cryptography to 38.0.3 (#81455) 2022-11-03 11:18:25 +01:00
J. Nick Koston
454f328a36
Bump aiohomekit to 2.2.14 (#81454) 2022-11-03 11:14:01 +01:00
Franck Nijhof
08772004b3
Fix SSDP failure to start on missing URLs (#81453) 2022-11-03 11:13:23 +01:00
Jan Bouwhuis
203c83b6f0
Use _attr_ in MQTT climate (#81406)
* Use _attr_ in MQTT climate

* Follow up comment

* Do not change code
2022-11-03 10:58:37 +01:00
Rami Mosleh
328eda044a
Use DataUpdateCoordinator for glances (#72748)
* use DataUpdateCoordinator for glances

add tests to increase coverage

fix test_config_flow.py

fix codecov/patch

remove unused const, minor tweaks

remove invalid_auth test as it is not implemented

fix type hints

* change to async_forward_entry_setups

* Use Dataupdatecoordinator for glances

* minor fixex

* minor fixes

* minor fix

* remove support_versions const

* coe cleanup

* address comments

* fix sensor native_value

* Rename entry to entry_data in `get_api`

* Remove whitespace in sensor name
2022-11-03 10:02:25 +01:00
Raman Gupta
739ed6a6c8
Fix eight sleep client creation (#81440)
Fix eight sleep bug
2022-11-03 09:43:48 +01:00
Malte Franken
ee4d28000d
Add integration_type to gdacs (#81451) 2022-11-03 09:32:40 +01:00
J. Nick Koston
adf35e5ec2
Skip flume devices with location missing (#81441)
fixes #81438
2022-11-03 08:51:08 +01:00
Jan
6bd8cf0072
Use 'kWh' as unit for 'IEC_ENERGY_COUNTER' (#81427)
The standard unit for the 'IEC_ENERGY_COUNTER' type is 'kWh' instead of 'Wh'
2022-11-03 08:27:46 +01:00
Austin Brunkhorst
28989754cd
Update pysnooz to 0.8.3 (#81428) 2022-11-03 03:10:07 +01:00
GitHub Action
7995f0e414 [ci skip] Translation update 2022-11-03 00:28:45 +00:00
rappenze
1beab96946
Replace deprecated unit constants in fibaro sensor (#81425) 2022-11-02 23:02:44 +01:00
Franck Nijhof
1f0073f450
2022.11.0 (#81423) 2022-11-02 21:47:47 +01:00
Jan Bouwhuis
bda7e416c4
Improve MQTT type hints part 2 (#80529)
* Improve typing camera

* Improve typing cover

* b64 encoding can be either bytes or a string.
2022-11-02 20:33:46 +01:00
Jan Bouwhuis
b4ad03784f
Improve MQTT type hints part 1 (#80523)
* Improve typing alarm_control_panel

* Improve typing binary_sensor

* Improve typing button

* Add misssed annotation

* Move CONF_EXPIRE_AFTER to _setup_from_config

* Use CALL_BACK type

* Remove assert, improve code style
2022-11-02 20:33:18 +01:00
Franck Nijhof
f14a84211f
Bumped version to 2022.11.0 2022-11-02 20:29:00 +01:00
Bram Kragten
1ea0d0e47f
Update frontend to 20221102.1 (#81422) 2022-11-02 20:28:05 +01:00
Allen Porter
28832e1c2e
Bump gcal_sync to 2.2.3 (#81414) 2022-11-02 20:28:02 +01:00
Daniel Hjelseth Høyer
970fd9bdba
Update adax library to 0.1.5 (#81407) 2022-11-02 20:27:57 +01:00
Bram Kragten
76819d81be
Update frontend to 20221102.1 (#81422) 2022-11-02 20:25:31 +01:00
epenet
9afabc17ae
Use attr in mqtt sensor (#81402) 2022-11-02 19:50:11 +01:00
epenet
d385a85ccb
Cleanup schema validation in scrape sensor (#81419) 2022-11-02 18:46:03 +01:00
epenet
466365c8de
Fix Renault charging power sensor (#81412) 2022-11-02 18:07:51 +01:00
Allen Porter
e1be63f26c
Bump gcal_sync to 2.2.3 (#81414) 2022-11-02 17:57:23 +01:00
Poltorak Serguei
7af0f16f79
Rework Z-Wave.Me to group entities of one physical devices (#78553)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Dmitry Vlasov <kerbalspacema@gmail.com>
2022-11-02 17:53:10 +01:00
G Johansson
93d74cafdc
Fix late review comments for Scrape (#81259)
* Review comments from #74325

* Remove moved test

* Fix init

* Handle no data

* Remove print

* Fix tests

* PlatformNotReady if no data

* Recover failed platform setup

* Fix broken test

* patch context

* reset test init

* Move to platform

* asyncio gather

* Remove duplicate code
2022-11-02 17:52:36 +01:00
epenet
442c5ccc06
Use attr in mqtt fan (#81401)
* Use attr in mqtt fan

* Fix is_on
2022-11-02 16:25:18 +01:00
Rami Mosleh
fc3843f5e2
Add config flow to pushbullet (#74240)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-11-02 16:11:44 +01:00
Franck Nijhof
71920cd687
Update spotipy to 2.21.0 (#81395) 2022-11-02 15:02:09 +01:00