* Initial commit for Dexcom integration
* Dexcom config flow testing
* Clarify errors during setup
* Resolve minor test issues
* Update sensor availability, resolve linting issues
* Add sensor tests
* Remove title due to 0.109, add abort
* >94.97% codecov/patch
* Move .translations/ to translations/
* Add constants for servers and unit of measurements
* Bump pydexcom version
* Updated domain schema, Dexcom creation
* Support for different units of measurement
* Update tests
* Remove empty items from manifest
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Raise UpdateFailed if fetching new session fails
* Switch everything over to required
* Simplify state information
* Simplify async_on_remove
* Pydexcom package now handles fetching new session
* Only allow config flow
* Remove ternary operator
* Bump version, pydexcom handling session refresh
* Using common strings
* Import from test.async_mock
* Shorten variable names
* Resolve tests after removing yaml support
* Return false if credentials are invalid
* Available seems to handle if data is empty
* Now using option flow, remove handling import
* Add fixture for JSON returned from API
* Overhaul testing
* Revise update options
* Bump pydexcom version
* Combat listener repetition
* Undo update listener using callback
* Change sensor availability to use last_update_success
* Update sensor availability and tests
* Rename test
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* add support for config flow for Plum Lightpad integration
* add support for config flow for Plum Lightpad integration (remove unintended change to requirements_test_all.txt)
* add support for config flow for Plum Lightpad integration (fix lint issues)
* add support for config flow for Plum Lightpad integration (PR feedback)
* add support for config flow for Plum Lightpad integration (fix lint)
* Update homeassistant/components/plum_lightpad/__init__.py
use debug instead of info for logging
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/plum_lightpad/strings.json
switch to use generated references instead of hard-coded strings
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/plum_lightpad/strings.json
switch to use references instead of hard-coded string
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/plum_lightpad/strings.json
removing translated title per suggestion
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/plum_lightpad/strings.json
removing per suggestion
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* remove unnecessary deepcopy
* remove unnecessary logging warning, since ignoring is expected for configuration.yaml scenario
* switch to hass.loop.create_task per PR feedback
* show login errors when configuring integration via UI (PR feedback)
* disable wrongly flag pylint violation
* add except handler to handle connection errors when setting up config flow entry
* address PR feedback regarding exception handling
* Update homeassistant/components/plum_lightpad/config_flow.py
use helper instead of custom code/message-id
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Now supports Hydrawise API v1.4
* Removed dependency and codeowners name.
* Update CODEOWNERS to include hydrawise
* Changes made from review comments.
* Clean up update.
* Added device class for timestamp and switch. Consolodate methods to parent class.
* Cap next_cycle at 2 years to prevent time overflow.
* Addressed review comments.
* Updated DEVICE_MAP and icon() based on review comments.
* Refactor / update Awair integration
This commit does a few things, all in service of making the Awair
integration more modern and reliable. Specifically we do the following:
- Update to python_awair 0.1.1
- Begin using config entries / flow for setting up the integration.
- YAML support is completely removed.
- The integration now allows adding multiple Awair accounts, should a
user wish to do so (I found it _very_ useful in development).
- Group various Awair sensors into devices, using the device registry.
- Renames various sensors and treats the "dust" sensor as a particulate sensor.
- Device update rate-limits are no longer dynamically calculated; the
Awair API now separates rate-limits on a per-device basis.
- Supports sound pressure and illuminance sensors found on some Awair devices.
- We report the "awair index" for certain sensors as part of device_state_attributes.
The "index" is a subjective measure of whether or not a sensor reading
is "good" or "bad" (and to what extent). It's a component of the Awair
score, and it is useful on its own as an input for those who wish to
do things like "display this color if the value is 'bad'".
This is a breaking change, and requires updates to documentation and a
warning in the README. The breaking changes in detail, are:
- Support for all YAML configuration is removed, and users will need to
re-add the integration via the UI.
- We no longer support overriding device discovery via manual
configuration of device UUIDs. This was previously supported because
the Awair API had severe limits on the device list endpoints; however
those have since been removed.
- Gen 1 devices no longer show a "dust" sensor; rather we create a PM2.5
sensor and a PM10 sensor and just keep the values in sync. This better
reflects the sensor capabilities: it can detect particles in a range
from 2.5 -> 10, but cannot differentiate between sizes.
- Sensors are renamed as follows:
- "sensor.devicename_co2" -> "sensor.devicename_carbon_dioxide"
- "sensor.devicename_voc" -> "sensor.devicename_volatile_organic_compounds"
- "sensor.devicename_score" -> "sensor.devicename_air_quality_index"
- I've chosen to call the "Awair Score" an "air quality index" sensor,
because fundamentally the "Awair Score" and other air quality indices
(such as CAQI) do the same thing: they calculate a value based on a
variety of other inputs.
Under the hood, the integration has seen some improvements:
- We use the DataUpdateCoordinator class to handle updates, rather than
rolling our own update class.
- The code no longer tracks availability based on a timestamp returned
from the Awair service; we assert that if we have received a response
and the response has data for our device, then we are available (and
otherwise, not available). We don't need to test the actual Awair API
so heavily.
- Test coverage has been expanded to handle a variety of products that
Awair produces, not just the one I happen to own.
- Test coverage no longer concerns itself with testing behavior that is
now handled by the DataUpdateCoordinator; nor is it concerned with
ensuring that the overall component sets up and registers properly.
These are assumed to be well-tested functionaity of the core and not
things we need to re-test ourselves.
Finally - between library updates and integration updates, this
integration is well-positioned to support future updates. I have a
proof-of-concept patch for device automations, and the underlying
library now supports subclassing authentication (which clears the way
for us to use OAuth authentication for Awair).
* Wrap test fixture in mock_coro
Truthfully I'm not sure why this was passing on my local dev
environment, but I was developing with python 3.8 before. After
installing python 3.7, I was able to reproduce the CI failures and fix
them.
* Fix broken tests after #34901 and/or #34989
* Do not rename sensors so broadly
We're going to keep the sensors named as they were before, pending the
outcome of any decisions around the air_quality component and what names
should be standardized for air-quality-like devices.
If standardized names are selected (which does seem likely), then we
will update this integration to match them - at which point, it would be
a breaking change.
But for now, we'll keep names mostly identical to what users had before.
Notable in this commit is that we generate the entity_id ourselves,
rather than just allowing it to be auto-generated from the name
attribute. This allows us to provide more human friendly names, while
keeping the old format for entity ids. For example, given an Awair
device called "Living Room", we'll generate an entity id of
"sensor.living_room_voc" but show set the name of the device to "Living
Room Volatile organic compounds".
* Support import from config.yaml
We'll create a config entry from config.yaml the first time we're
loaded, and then defer to it from then on.
We ignore all keys other than the access_token, since we no longer need
to deal with per-account rate-limits (rather, everything is per-device
now).
* Add myself to CODEOWNERS
Since I wrote the initial integration, and now this re-write, it feels
appropriate for me to take care of the integration along with `danielsjf`.
* Remove name mangling
* Update homeassistant/components/awair/manifest.json
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/awair/config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/awair/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/awair/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Address some review feedback
* Set up reauth flow in a job, rather than awaiting
* Remove unnecessary title string
* Remove unnecessary config schema checking
As pointed out in review, because this comes in via import from
`configuration.yaml`, we can rely on the `PLATFORM_SCHEMA` validation instead.
* Fix tests
* Set unique_id appropriately for legacy devices
For users who have had this integration already installed (and who have
updated their home assistant installation sometime in recent history),
we want to ensure that unique_id's are set to the same thing as before,
to facilitate the upgrade process.
To do that, we add an additional property to the `SENSOR_TYPES` dict
(`ATTR_UNIQUE_ID`) which allows us to map modern sensor names from
python_awair to what older versions called them - ie: `humidity` ->
`HUMID`. We then use that value when constructing the unique ID. This
should allow users to upgrade and not lose configuration even if entity
IDs would otherwise change (because we have changed the name format that
generates entity IDs).
One note is that for the gen1 `DUST` sensor, we have to treat it
differently. This integration used to call that a "PM2.5" sensor, but
the unique_id generated would be something like `awair_12345_DUST`. So
we special-case that sensor, and do the same thing. We do not need to
special-case the PM10 sensor for gen1 devices, because we didn't create
a PM10 sensor in the past (we do now, because the "DUST" sensor is
really a hybrid PM2.5/PM10 sensor).
* Patch async_setup_entry for two tests
* Update awair config_flow to require / use an email address for unique_id
Also, only start one re-auth flow.
* Add a few more tests, try to get coverage up.
* Add another test
* Move attribution to device_state_attributes
* Don't require email
* Switch from Union[dict, None] to Optional[dict]
* Use a mock where requested
* Fix missing constant rename
* Use async_create_task
* Bump test coverage a bit for config_flow
* s/CONF_UNIQUE_ID/UNIQUE_ID/g
* Add warning about deprecated platform config
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add config_flow to the dunehd integration
* Add tests
* Run gen_requirements_all
* Fix pylint error
* Better hostname validation
* Build device info in the class
* Update plugwise async, config_flow and multi entity
* Update battery percentage
* Fix yamllint on services
* Fix yamllint on services
* Fix formatting for pyupgrade
* Update homeassistant/components/plugwise/__init__.py
Co-Authored-By: Robert Svensson <Kane610@users.noreply.github.com>
* Add try/except on setup
* Bump module version, battery version and valve position
* Removing sensor, switch, water_heater for later (child) PRs
* Catchup and version bump
* Remove title from strings.json
* Readd already reviewd await try/except
* Readd already reviewed config_flow
* Fix pylint
* Fix per 0.109 translations
* Remove unused import from merge
* Update plugwise async, config_flow and multi entity
* Update battery percentage
* Fix yamllint on services
* Fix yamllint on services
* Bump module version
* Bump module version, battery version and valve position
* Removing sensor, switch, water_heater for later (child) PRs
* Catchup and version bump
* Remove title from strings.json
* Fix pylint
* Fix per 0.109 translations
* Translations and config_flow, module version bump with required changes
* Translations and config_flow, module version bump with required changes
* Fix requirements
* Fix requirements
* Fix pylint
* Fix pylint
* Update homeassistant/components/plugwise/__init__.py
Improvement
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/plugwise/__init__.py
Improvement
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/plugwise/__init__.py
Improvement
Co-authored-by: J. Nick Koston <nick@koston.org>
* Include configentrynotready on import
* Update __init__.py
* DataUpdateCoordinator and comment non-PR-platforms
* Fix reqs
* Rename devices variable in favor of entities
* Rework updates with DataUpdateCoordinator
* Peer review
* Peer review second part
* Cleanup comments and redundant code
* Added required config_flow test
* Peer review third part
* Update service was replaced by DataUpdateCoordinator
* Corrected testing, version bump for InvalidAuth, move uniq_id
* Remove according to review
* Await connect (py38)
* Remove unneccesary code
* Show only when multiple
* Improve config_flow, rename consts
* Update homeassistant/components/plugwise/climate.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/plugwise/climate.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Process review comments
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add support for Elexa Guardian water valve controllers
* Zeroconf + cleanup
* Sensors and services
* API registration
* Service bug fixes
* Fix bug in cleanup
* Tests and coverage
* Fix incorrect service description
* Bump aioguardian
* Bump aioguardian to 0.2.2
* Bump aioguardian to 0.2.3
* Proper entity inheritance
* Give device a proper name
* Code review
* Migrate to pyinsteon from insteonplm
* Rename devices entities
* Print ALDB even if not loaded
* Add relay to name map
* Change insteonplm to pyinsteon
* Update requirements_all correctly
* Code review updates
* async_set_speed receive std speed value
* default speed to std medium value
* Call async methods for fan on/off
* Comment await required in loop
* Remove emtpy and add codeowner
* Make services async and remove async_add_job call
* Remove extra logging
* New device as async task and aldb load in loop
* Place lock in context bloxk
* Limiting lock to min
* Remove .env file
* First cut of Rollease Acmeda Pulse Hub integration.
* Acmeda integration improvements:
- Moved common code into a base entity
- Battery level sensor added
- Localisation now working
* Added requirement for aiopulse now that it has been uploaded to PyPI.
* Exclude acmeda integration from coverage check as it relies on a hub being present.
* Fix Travis CI build issues.
* Remove unused constants.
* Remove unused group logic from cover.py
* Removed commented code from base.py
* Remove sensors (battery entities) on removal of hub.
* Remove unused groups from sensor.py
* Acmeda device and entity update made fully asynchronous using subscriptions to remove need for config polling.
* Updated aiopulse version dependency.
Removed non-functional battery charging indication.
* Rationalised common code to update entities into helpers.py
* Fix linting issue.
* Correct additional CI pylint errors.
* Index config_entries by entry_id.
Move entity loading and unloading to __init__.py
Add entry_id to dispatcher signal
Removed now unused polling code hub
Added config_flow unit tests
* Tweak to integration config_entry title.
* Bumped aiopulse module to 0.3.2.
Reduced verbosity of aiopulse module.
* Changed to using direct write of device state.
Removed old style async_step_init config_flow step.
* Remove superfluous battery_level and device_state_attributes from battery entity.
* Removal of unused strings.
Removal of unused create_config_flow helper.
Removal of stale comment.
* Remove use of shared container to track existing enities.
Moved removal and deregistration of entities to base class through use of dispatch helper.
* Fixed strings.json
* Fix incorrect use of remove instead of pop on dict.
* Add support for tilting covers, bump aiopulse version number.
* Bump aiopulse version to v0.3.4.
Fixed bug in cover supported_features.
* Bumped aiopulse version to 0.4.0
Update acmeda .coveragerc exclusions
* Removed already configured hub check from __init__.py async_setup_entry
Removed passing in hass reference to base entity class
Renamed entity async_reset to async_will_remove_from_hass
Changed device_info and properties
Migrated to CoveEntity from CoverDevice
Added dispatched_connect cleanup on hub removal
Removed unused entries from manifest
Removed override of battery icon
Renamed translations folder
* Reversed unintended change to .coveragerc
* Fixed config flow for multi-hub discovery.
* Acmeda enhancements as requested by MartinHjelmare
* Force import to connect to hub to retrieve id prior to creating entry
* Remove YAML configuration support.
* Tidied up config_flow and tests:
- removed unnecessary steps
- fixed typos
* Removed storage of hub in config_flow.
* Add config flow to gogogate2 component.
* Using a more stable gogogate api.
* Getting config flows working better by using different downstream library.
* Fixing options not getting default values.
Adding availability to cover entity.
* Simplifying return types of function.
* Address PR feedback.
* Making user config flow not abort.
* Using DataUpdateCoordinator.
* Addressing PR feedback.
* Using standard method for using hass.data
* Split auth fail test into separate tests.
* Add config flow to pi-hole
* Add config flow tests
* Change PlatformNotReady to ConfigEntryNotReady
* Improve config flow
* Add @shenxn as codeowner
* Use entity_id as unique id
* Remove .get with [] for required fields
* Remove unique id from config flow
* Replace some strings with references
* Fix api_key string
* Fix service api_key check
* Remove unused DuplicatedNameException
* New forked_daapd component
* Bunch of changes
Add config flow and zeroconf
Add zones on callback when added by server
Add password auth
Add async_play_media for TTS
Add media_image_url
Add support for pipe control/input from librespot-java
Improve update callbacks
* Refactor as per code review suggestions
Move config_flow connection testing to pypi library (v0.1.4)
Remove use of ForkedDaapdData class
Decouple Master and Zone data and functions
Add updater class to manage websocket and entity updates
* More changes as per code review
Avoid direct access to entities in tests
Bump pypi version
Mark entities unavailable when websocket disconnected
Move config tests to test_config_flow
Move full url creation from media_image_url to library
Move updater entity from master to hass.data
Remove default unmute volume option
Remove name from config_flow
Remove storage of entities in hass.data
Use async_write_ha_state
Use signal to trigger update_options
Use unittest.mock instead of asynctest.mock
* Yet more changes as per code review
Add more assertions in tests
Avoid patching asyncio
Make off state require player state stopped
Only send update to existing zones
Split up some tests
Use events instead of async_block_till_done
Use sets instead of lists where applicable
Wait for pause callback before continuing TTS
* Remove unnecessary use of Future()
* Add pipes and playlists as sources
* Add support for multiple servers
Change config options to add max_playlists+remove use_pipe_control
Create Machine ID in test_connection and also get from zeroconf
Modify hass.data storage
Update host for known configurations
Use Machine ID in unique_ids, entity names, config title, signals
* Use entry_id as basis for multiple entries
* Use f-strings and str.format, abort for same host
* Clean up check for same host
* Add integration for wiffi devices
wiffi devices are DIY board manufactured by stall.biz.
Several devices are available, e.g. a weather station (weatherman), an
indoor environmental sensor (wiffi-wz) and some more.
This intgration has been developed using a weatherman device, but should
also work for other devices from stall.biz.
* Fix pylint warning
* Use WIFFI / STALL WIFFI instead of wiffi to be consistent with stall.biz
* Don't update disabled entities.
* fix complains
- move wiffi specific code to pypi
- remove yaml configuration code
* incorporate various suggestions from code review
* fix remaining comments from Martin
* fix comments
* add tests for config flow
* fix comments
* add missing requirements for tests
* fix pylint warnings
* fix comments
* fix comments
remove debug log
rename .translations to translations
* rebase and adapt to latest dev branch
* Update homeassistant/components/wiffi/config_flow.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/wiffi/config_flow.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* fix missing import
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Move opengarage code to separate library
* Move opengarage code to separate library
* Move opengarage code to separate library
* remove unique_id
* style
* Initial commit for BSBLan Climate component
The most basic climate functions work.
* Delete manifest 2.json
wrongly added to commit
* fix incorrect name
current_hvac_mode
* update coverage to exclude bsblan
* sorted and add configflow
* removed unused code, etc
* fix hvac, preset mix up
now it sets hvac mode to none and preset to eco
* fix naming
* removed commented code and cleaned code that isn't needed
* Add test for the configflow
* Update requirements
fixing some issues in bsblan Lib
* Update coverage file to include configflow bsblan
* Fix hvac preset is not in hvac mode
rewrote how to handle presets.
* Add passkey option
My device had a passkey so I needed to push this functionality to do testing
* Update constants
include passkey and added some more for device indentification
* add passkey for configflow
* Fix use discovery_info instead of user_input
also added passkey
* Fix name
* Fix for discovery_info[CONF_PORT] is None
* Fix get value CONF_PORT
* Fix move translation to new location
* Fix get the right info
* Fix remove zeroconf and fix the code
* Add init for mockConfigEntry
* Fix removed zeroconfig and fix code
* Fix changed ClimateDevice to ClimatEntity
* Fix log error message
* Removed debug code
* Change name of device.
* Remove check
This is done in the configflow
* Remove period from logging message
* Update homeassistant/components/bsblan/strings.json
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add passkey
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add integration for Flick Electric NZ
* Start adding Config Flow and external API
* Second Wave of Config Flow and API implementation
* Fix test (errors is None instead of blank array?)
* Don't update sensor if price is still valid
* Add input validation
* Fix linting for DOMAIN
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Remove platform schema (config is by entries only)
* Don't catch AbortFlow exception
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update test
* Re-arrange try-catch in config flow
* Fix linting in sensor.py
* Staticly define list of components
* Fix test exceptions
* Fix _validate_input not being awaited
* Fix tests
* Fix pylint logger
* Rename test and remove print debug
* Add test for duplicate entry
* Don't format string in log function
* Add tests __init__ file
* Remove duplicate result assignment
* Add test for generic exception handling
* Move translations folder
* Simplify testing
* Fix strings/translation
* Move to "flick_electric" as domain
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Initial version.
* Tests.
* Refactored tests.
* Update requirements_all
* Increase test coverage. Catch exception.
* Update .coveragerc
* Fix lint msg.
* Tweak test (more to force CI build).
* Update based on PR comments.
* Change unique_id to use stable string.
* Add Universal Powerline Bus "link" support.
* Fix missed call.
* Revert botched merge.
* Update homeassistant/components/upb/light.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Three changes.
Update service schema to require one of brightness/brightness_pct.
Fix bug in setting brightness to zero.
Replace async_update_status and replace with async_update.
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add config flow to songpal
* Add config flow to songpal
* Add songpal to migrated service in discovery
* Improve songpal/set_sound_setting service
* Remove songpal config flow from .coveragerc omit
* Bump python-songpal to 0.12 and fix exception handling
* Revert "Improve songpal/set_sound_setting service"
This reverts commit 9be076ab52e21f268322572c36709a17d41db771.
* Code style fix
* Add connections to device_info
* Fix pylint
* Ignore braava tv
* Fix test warning
* Add @shenxn as codeowner
* Remove model from configuration data
* Get name from device in user step
* Add unload entry support
* Delete translations as it will get generated as part of CI
* Code cleanup
* Fix typo
* Remove _show_setup_form
* Change configuration from media_player to songpal
Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
* ISY994 Structure updates in prep for PyISYv2 (Part 1)
- Correct node categorization.
- Move constants to separate file.
- Consolidate Logging to Constants file.
- Use Home Assistant Constants where possible.
- Use string literals where possible.
- Rename "domain" to "platform" in most places.
- Add additional device support (NODE_FILTER updates).
* Update categorize_programs per review
* add @shbatm as codeowner for ISY994 integration