Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/home-assistant/core.git. Pull mirroring updated .
  1. Nov 03, 2022
    • Renat Sibgatulin's avatar
      Add air-Q integration (air quality sensors) (#76999) · dd5baa6e
      Renat Sibgatulin authored
      
      * 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: default avatarErik Montnemery <erik@montnemery.com>
      Co-authored-by: default avatarArtem 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: default avatarArtem 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: default avatarArtem 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: default avatardl2080 <daniel.lehmann@runbox.com>
      Co-authored-by: default avatarErik Montnemery <erik@montnemery.com>
      Co-authored-by: default avatarArtem Draft <Drafteed@users.noreply.github.com>
      Co-authored-by: default avatarDaniel Lehmann <43613560+dl2080@users.noreply.github.com>
      Co-authored-by: default avatarMartin Selbmann <job@martin-selbmann.de>
      dd5baa6e
    • J. Nick Koston's avatar
    • mkmer's avatar
      Bump AIOAladdinConnect to 0.1.47 (#81479) · 9c85d22b
      mkmer authored
      9c85d22b
    • J. Nick Koston's avatar
    • Franck Nijhof's avatar
      Merge branch 'master' into dev · bad33da2
      Franck Nijhof authored
      bad33da2
    • Jan Bouwhuis's avatar
      Improve MQTT type hints part 3 (#80542) · b3403d7f
      Jan Bouwhuis authored
      * 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
      b3403d7f
    • Dennis Schroer's avatar
    • J. Nick Koston's avatar
      905005e1
    • hahn-th's avatar
      Add HmIP-WGC to homematicip_cloud integration (#75733) · 918940a0
      hahn-th authored
      * Add HmIP-WGC
      
      * remove unused code
      
      * removed test test_manually_configured_platform
      918940a0
    • Franck Nijhof's avatar
      Update cryptography to 38.0.3 (#81455) · 7556f2b8
      Franck Nijhof authored
      7556f2b8
    • J. Nick Koston's avatar
      Bump aiohomekit to 2.2.14 (#81454) · 454f328a
      J. Nick Koston authored
      454f328a
    • Franck Nijhof's avatar
      08772004
    • Jan Bouwhuis's avatar
      Use _attr_ in MQTT climate (#81406) · 203c83b6
      Jan Bouwhuis authored
      * Use _attr_ in MQTT climate
      
      * Follow up comment
      
      * Do not change code
      203c83b6
    • Rami Mosleh's avatar
      Use DataUpdateCoordinator for glances (#72748) · 328eda04
      Rami Mosleh authored
      * 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
      328eda04
    • Raman Gupta's avatar
      Fix eight sleep client creation (#81440) · 739ed6a6
      Raman Gupta authored
      Fix eight sleep bug
      739ed6a6
    • Malte Franken's avatar
      Add integration_type to gdacs (#81451) · ee4d2800
      Malte Franken authored
      ee4d2800
    • J. Nick Koston's avatar
      Skip flume devices with location missing (#81441) · adf35e5e
      J. Nick Koston authored
      fixes #81438
      adf35e5e
    • Jan's avatar
      Use 'kWh' as unit for 'IEC_ENERGY_COUNTER' (#81427) · 6bd8cf00
      Jan authored
      The standard unit for the 'IEC_ENERGY_COUNTER' type is 'kWh' instead of 'Wh'
      6bd8cf00
    • Austin Brunkhorst's avatar
      Update pysnooz to 0.8.3 (#81428) · 28989754
      Austin Brunkhorst authored
      28989754
    • GitHub Action's avatar
      [ci skip] Translation update · 7995f0e4
      GitHub Action authored
      7995f0e4
  2. Nov 02, 2022
Loading