* MySensors: Add type annotations
Adds a bunch of type annotations that were created
while understanding the code.
* MySensors: Change GatewayId to string
In preparation for config flow.
The GatewayId used to be id(gateway).
With config flows, every gateway will have its own
ConfigEntry. Every ConfigEntry has a unique id.
Thus we would have two separate but one-to-one related ID systems.
This commit removes this unneeded duplication by using the id of the ConfigEntry
as GatewayId.
* MySensors: Add unique_id to all entities
This allows entities to work well with the frontend.
* MySensors: Add device_info to all entities
Entities belonging to the same node_id will now by grouped as a device.
* MySensors: clean up device.py a bit
* MySensors: Add config flow support
With this change the MySensors can be fully configured from the GUI.
Legacy configuration.yaml configs will be migrated by reading them once.
Note that custom node names are not migrated. Users will have to re-enter
the names in the front-end.
Since there is no straight-forward way to configure global settings,
all previously global settings are now per-gateway. These settings include:
- MQTT retain
- optimistic
- persistence enable
- MySensors version
When a MySensors integration is loaded, it works as follows:
1. __init__.async_setup_entry is called
2. for every platform, async_forward_entry_setup is called
3. the platform's async_setup_entry is called
4. __init__.setup_mysensors_platform is called
5. the entity's constructor (e.g. MySensorsCover) is called
6. the created entity is stored in a dict in the hass object
* MySensors: Fix linter errors
* MySensors: Remove unused import
* MySensors: Feedback from @MartinHjelmare
* MySensors: Multi-step config flow
* MySensors: More feedback
* MySensors: Move all storage in hass object under DOMAIN
The integration now stores everything under hass.data["mysensors"]
instead of using several top level keys.
* MySensors: await shutdown of gateway instead of creating a task
* MySensors: Rename Ethernet to TCP
* MySensors: Absolute imports and cosmetic changes
* MySensors: fix gw_stop
* MySensors: Allow user to specify persistence file
* MySensors: Nicer log message
* MySensors: Add lots of unit tests
* MySensors: Fix legacy import of persistence file name
Turns out tests help to find bugs :D
* MySensors: Improve test coverage
* MySensors: Use json persistence files by default
* MySensors: Code style improvements
* MySensors: Stop adding attributes to existing objects
This commit removes the extra attributes that were being
added to the gateway objects from pymysensors.
Most attributes were easy to remove, except for the gateway id.
The MySensorsDevice class needs the gateway id as it is part of its DevId
as well as the unique_id and device_info.
Most MySensorsDevices actually end up being Entities.
Entities have access to their ConfigEntry via self.platform.config_entry.
However, the device_tracker platform does not become an Entity.
For this reason, the gateway id is not fetched from self.plaform but
given as an argument.
Additionally, MySensorsDevices expose the address of the gateway
(CONF_DEVICE). Entities can easily fetch this information via self.platform,
but the device_tracker cannot. This commit chooses to remove the gateway
address from device_tracker. While this could in theory break some automations,
the simplicity of this solution was deemed worth it.
The alternative of adding the entire ConfigEntry as an argument to MySensorsDevices
is not viable, because device_tracker is initialized by the async_setup_scanner function
that isn't supplied a ConfigEntry. It only gets discovery_info.
Adding the entire ConfigEntry doesn't seem appropriate for this edge case.
* MySensors: Fix gw_stop and the translations
* MySensors: Fix incorrect function calls
* MySensors: Fewer comments in const.py
* MySensors: Remove union from _get_gateway and remove id from try_connect
* MySensors: Deprecate nodes option in configuration.yaml
* MySensors: Use version parser from packaging
* MySensors: Remove prefix from unique_id and change some private property names
* MySensors: Change _get_gateway function signature
* MySensors: add packaging==20.8 for the version parser
* MySensors: Rename some stuff
* MySensors: use pytest.mark.parametrize
* MySensors: Clean up test cases
* MySensors: Remove unneeded parameter from devices
* Revert "MySensors: add packaging==20.8 for the version parser"
This reverts commit 6b200ee01a.
* MySensors: Use core interface for testing configuration.yaml import
* MySensors: Fix test_init
* MySensors: Rename a few variables
* MySensors: cosmetic changes
* MySensors: Update strings.json
* MySensors: Still more feedback from @MartinHjelmare
* MySensors: Remove unused strings
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* MySensors: Fix typo and remove another unused string
* MySensors: More strings.json
* MySensors: Fix gateway ready handler
* MySensors: Add duplicate detection to config flows
* MySensors: Deal with non-existing topics and ports.
Includes unit tests for these cases.
* MySensors: Use awesomeversion instead of packaging
* Add string already_configured
* MySensors: Abort config flow when config is found to be invalid while importing
* MySensors: Copy all error messages to also be abort messages
All error strings may now also be used as an abort reason,
so the strings should be defined
* Use string references
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add support for iCloud 2FA
* Updated dependency for iCloud
* Updated dependency and logic fix
* Added logic for handling incorrect 2FA code
* Bug fix on failing test
* Added myself to codeowners
* Added check for 2FA on setup
* Updated error message
* Run zwave_js scaffold (#44891)
* Add zwave_js basic connection to zwave server (#44904)
* add the basic connection to zwave server
* fix name
* Fix requirements
* Fix things
* Version bump dep to 0.1.2
* fix pylint
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Bump zwave-js-server-python to 0.2.0
* Use zwave js server version check instead of fetching full state (#44943)
* Use version check instead of fetching full state
* Fix tests
* Use 0.3.0
* Also catch aiohttp client errors
* Update docstring
* Lint
* Unignore zwave_js
* Add zwave_js entity discovery basics and sensor platform (#44927)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Complete zwave_js typing (#44960)
* Type discovery
* Type init
* Type entity
* Type config flow
* Type sensor
* Require typing of zwave_js
* Complete zwave_js config flow test coverage (#44955)
* Correct zwave_js sensor device class (#44968)
* Fix zwave_js KeyError on entry setup timeout (#44966)
* Bump zwave-js-server-python to 0.5.0 (#44975)
* Remove stale callback signal from zwave_js (#44994)
* Add light platform to zwave_js integration (#44974)
* add light platform
* styling fix
* fix type hint
* Fix typing
* Update homeassistant/components/zwave_js/const.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/zwave_js/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/zwave_js/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/zwave_js/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/zwave_js/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/zwave_js/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* color temp should be integer
* guard Nonetype error
* Update homeassistant/components/zwave_js/light.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/zwave_js/light.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* some fixes after merging
* add additional guards for None values
* adjustments for rgb lights
* Fix typing
* Fix black
* Bump zwave-js-server-python to 0.6.0
* guard value updated log
* remove value_id lookup as its no longer needed
* fiz sending white value
* Update homeassistant/components/zwave_js/light.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add zwave_js test foundation (#44983)
* Exclude text files from codespell
* Add basic dump fixture
* Add test foundation
* Fix test after rebase
* Exclude jsonl files from codespell
* Rename fixture file type to jsonl
* Update fixture path
* Fix stale docstring
* Add controller state json fixture
* Add multisensor 6 state json fixture
* Update fixtures
* Remove basic dump fixture
* Fix fixtures after library bump
* Update codeowner
* Minor cleanup Z-Wave JS (#45021)
* Update zwave_js device_info (#45023)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Adding switch code for harmony activities
* Working on-off
* Removing poll code for now
* Async updates for current activity
* Update our state based on events
* Notifications we got connected or disconnected
* Remove unncessary constructor arg
* Initial switch tests
* Additional tests for switch transitions
* Test transitions for availability
* Testing switch state changes
* Tests passing
* Final tests
* Updating manifest.
* Correctly mock the return value from a call to the library
* Adding new subscriber classes
* Update class name and location
* Got the refactor working locally.
* Tests passing
* Tracking state changes
* Remove write_to_config_file - this appears to never be read.
It was added far back in the past to account for a harmony library
change, but nothing ever reads that path.
Removing that side effect from tests is a pain - avoid the side effect
completely.
* Connection changes tested
* Clean up temporary code
* Update .coveragerc for harmony component
Specifically exclude untested files instead of the whole module
* Fix linting
* test sending activity change commands by id
* Improving coverage
* Testing channel change commands
* Splitting subscriber logic into it's own class
* Improve coverage and tighten up .coveragerc
* Test cleanups.
* re-add config file writing for harmony remote
* Create fixture for the mock harmonyclient
* Reduce duplication in subscription callbacks
* use async_run_job to call callbacks
* Adding some tests for async behaviors with subscribers.
* async_call_later for delay in marking remote unavailable
* Test disconnection handling in harmony remote
* Early exit if activity not specified
* Use connection state mixin
* Lint fix after rebase
* Fix isort
* super init for ConnectionStateMixin
* Adding @mkeesey to harmony CODEOWNERS
* First implementationof Ondilo component support
* Update manifest toadd pypi pkg dependency
* Update entities name and corrected refresh issue
* Changed percentage unit name
* Corrected merge issues
* Updated coveragerc
* cleaned up code and corrected config flow tests
* Code cleanup and added test for exisitng entry
* Changes following PR comments:
- Inherit CoordinatorEntity instead of Entity
- Merged pools blocking calls into one
- Renamed devices vars to sensors
- Check supported sensor types
- Stop relying on array index position for pools
- Stop relying on attribute position in dict for sensors
* Corrected unit test
* Reformat sensor type check
* Switch to plugwise module and forthcoming changes
* Adjusted according to review
* Fix leaving out domain for tests
* Add tests for exceptions
* Add more tests for exceptions
* Version bump
* Wording on test
* Catch-up with dev
* Add twinkly integration
* Add tests for the Twinkly integration
* Update Twinkly client package to fix typo
* Remove support of configuration.yaml from Twinkly integration
* Add ability to unload Twinkly component from the UI
* Remove dead code from Twinkly
* Fix invalid error namespace in Twinkly for python 3.7
* Fix tests failing on CI
* Workaround code analysis issue
* Move twinkly client init out of entry setup so it can be re-used between entries
* Test the twinkly component initialization
* React to PR review and add few more tests
* Adds self to codeowners for tplink
* Adds retry to update to prevent missing devices
* Runs through isort and corrects async commit
* Runs through black
* Runs through pre-checks
* Corrects and matches var names
* Re-runs through black
* Corrects var name
* Removes the retry loop and in favor of async add
* Cleanup imports
* Removes no longer valid test
* Removes is_ready and only log retry once
* Corrects switch logging vars
* Adds list of entities to add_entities
* Consumes exception for attempt_update
* Consumes specific exception
* Removes unnecessary update
* Reducing back to 2 seconds
* Removes useless return
* Call get_sysinfo for all at once
* Formated black
* Adds missing docstirng
* Corrects docstring
* Update homeassistant/components/tplink/light.py
Co-authored-by: Anders Melchiorsen <amelchio@nogoto.net>
* Corrects sysinfo call
* Adds default for host vars
* Adds log when device responds again
* Revert host alias default
* Removes unncessary host var
* Removes host var
* Get device details from sysinfo
* Use host and alias for log msg
* Gets hosts from smartbulb
* Changes retry logging to debug
* Attempts coverage add
* Removes unused import
* Updates tests for new retry
* Runs through isort
* Removes unneeded try
* Prevents static entries from failing integration
* Format black
* Forces an update after turn on off
* Remove common test
* Revert update after turn_on off
* Adds patch for sleep_time 0
* Returns False when update fails
Co-authored-by: Anders Melchiorsen <amelchio@nogoto.net>
* Add Ruckus Unleashed integration
* Tweak catches to better rely on CoordinatorEntity error handling, rename LoginError to AuthenticationError
* Make router_update be a callback function
* Make name property return hint match the newer value
* Add entity to tracked set when restoring on boot
* Add a device's MAC to the attributes
* Add Modbus cover
* Fix improper commands written for Modbus cover via coil
* Make changes per review comments
* Fix default hub not defined
Since support for multiple hubs was added, the default hub option
was not implemented correctly. Now I added necessary logic to make
it work. First hub in a list will be used as a default hub.
* Move Cover config under Modbus section
* Revert setting up a default hub alias
* Make hub mandatory for Cover
* Add default scan interval
* Read scan_interval from discovery info
* Fix linter error
* Use default scan interval from Cover platform
* Handle polling for Modbus cover directly inside entity
* Move covers under hub config
* Fix for review comment
* Call update() from Cover actuator methods
* Fix time validation
* Scaffold
* Added the en translation
* Modified the name
* Basic functionality for config flow.
* Pulled in enough to validate config flow works.
* Update manifest.json
* initial data polling (water and air temp sensors)
* Adding sensors, debugging update function
* polling updates working
* support for new data format from library
* Updated entity_id, friendly name, conversion for ppm, attributes for hayward display units, MSPSystemID and component systemID
* Fixed errors for PR
* clean up
* Add login exc, check if configured, test login.
* Remove debug print.
* Black formatting, ran isort, update requirements.
* Updated w isort. fix flake8 failures.
* Fix flake8 errors
* Fixed self.attrs to remove invalid self._ values - small change
* Missed on small change - fixing attributes
* Updated naming, updated unit of measure, updated icon, bumped omnilog…
* Updated to fix flake8 issues in __init__.py and config_flow.py
* Updated test_config_flow.py to pass, updated config_flow.py to correct errors in test
* Remove comments in preparation for PR
* update .covezragerc
* Formatting fix
* Rewrote sensors to dynamically add all BOWs, pumps, clorinators. Still to do - add CSAD sensors.
* Rewrote sensors to dynamically add all BOWs, pumps, clorinators. Still to do - add CSAD sensors.
* Added CSAD sensors for pools that have them.
* Added CSAD sensors for pools that have them.
* Fixed CSAD to not create if blank or don't exist, removed broad except usage to pass linting.
* Updated entity naming convention. Fixed linting issues.
* Added device association to the back yard / omnilogic system
* Removed .0 from ppm values when returning imperial values for salt sensor
* Updated to return state = None for water temp when pump is off, handled Chlorinator operatingMode = 2, and added PlatformNotReady check
* Corrected exception from Omnilogic library
* Bumped omnilogic to 0.3.7. Added alarm sensor/data to sensors. Handle pump off condition for ph and orp sensors.
* Bumped omnilogic to 0.3.7. Added alarm sensor/data to sensors. Handle pump off condition for ph and orp sensors.
* Bumped omnilogic to 0.3.7. Added alarm sensor/data to sensors. Handle pump off condition for ph and orp sensors.
* Removed nested_lookup dependency, bumped omnilogic.py to 0.3.8.
* Fixed lint error
* Added logging for sensor creation.
* Fixed linting errors with logging.
* Fixed explicit chaining of raised error. Fixed issue with alarm sensor.
* Fixed manifest.json based on feedback.
* Fixed self.attrs, should_poll, CoordinatorEntity, SCAN_INTERVAL from comments in PR.
* Addressed unique_id, moved data update coordinator, addressed minor other issues from testing
* Created main OmniLogic entity for common items, reworked DataUpdateCoordinator to it's own class.
* Addressed config_schema not used in __init__.py
* Fixed linting issues.
* Addressed several comments, still todo - separate sensor classes.
* Split the Omnilogic Sensors into separate logical classes for simpler logic.
* Fixed snake case lint error for AddAlarms (to add_alarms)
* Addressed config_flow issues from comments.
* Changed addressed ConfigNotReady issue from comments.
* Updated strings.json and generated corrected en.json with translations.
* Updated en.json to standard generated file.
* Added config_flow tests and updated issue with config_flow on cannot_connect
* Added test case for incomplete information entered.
* Compressed logic in the sensor classes to reduce duplication.
* Updated strings.json for polling_interval, added generic exception handling on config flow.
* Removed omnilogic from the .coveragerc omit file.
* Updated test_config_flow to follow recommended pattern.
* Excluded sensor.py from test coverage tests.
* Corected minor issues in test_config_flow from comments
* Fixed linting issues on last commits
* Fixed linting issues.
* Corrected issue when temp state is not available from Omnilogic
* Added omnililogic_common.py from .coveragerc to bypass test coverage check.
* Return false on Login Exception, handle OmniLogicException in config_flow and in tests.
* Handle all exceptions and in config_flow and tests, clarified test naming.
* Broke out test cases per comments.
* Regenerated en.json file.
* Addressed changes from comments in PR.
* Added session and bumped API to 0.4.0, addressed other comments from PR.
* Addressed entitydata (missed earlier).
* Fixed pylint issue
* Added test case for options flow in test_config_flow.py
* Removed super() and used self when calling methods in current class.
* Addressed comments in PR.
* Addressed comments in PR.
* Updated translations file.
* Rewrote data coordinator to output dict for easy searching.
* Updated chlorinator unit when chlorinator is on/off only
* Scaffold
* Added the en translation
* Modified the name
* Basic functionality for config flow.
* Pulled in enough to validate config flow works.
* Update manifest.json
* initial data polling (water and air temp sensors)
* Adding sensors, debugging update function
* polling updates working
* support for new data format from library
* Updated entity_id, friendly name, conversion for ppm, attributes for hayward display units, MSPSystemID and component systemID
* Fixed errors for PR
* clean up
* Add login exc, check if configured, test login.
* Remove debug print.
* Black formatting, ran isort, update requirements.
* Updated w isort. fix flake8 failures.
* Fix flake8 errors
* Fixed self.attrs to remove invalid self._ values - small change
* Missed on small change - fixing attributes
* Updated naming, updated unit of measure, updated icon, bumped omnilog…
* Updated to fix flake8 issues in __init__.py and config_flow.py
* Updated test_config_flow.py to pass, updated config_flow.py to correct errors in test
* Remove comments in preparation for PR
* update .covezragerc
* Formatting fix
* Rewrote sensors to dynamically add all BOWs, pumps, clorinators. Still to do - add CSAD sensors.
* Rewrote sensors to dynamically add all BOWs, pumps, clorinators. Still to do - add CSAD sensors.
* Added CSAD sensors for pools that have them.
* Added CSAD sensors for pools that have them.
* Fixed CSAD to not create if blank or don't exist, removed broad except usage to pass linting.
* Updated entity naming convention. Fixed linting issues.
* Added device association to the back yard / omnilogic system
* Removed .0 from ppm values when returning imperial values for salt sensor
* Updated to return state = None for water temp when pump is off, handled Chlorinator operatingMode = 2, and added PlatformNotReady check
* Corrected exception from Omnilogic library
* Bumped omnilogic to 0.3.7. Added alarm sensor/data to sensors. Handle pump off condition for ph and orp sensors.
* Bumped omnilogic to 0.3.7. Added alarm sensor/data to sensors. Handle pump off condition for ph and orp sensors.
* Bumped omnilogic to 0.3.7. Added alarm sensor/data to sensors. Handle pump off condition for ph and orp sensors.
* Removed nested_lookup dependency, bumped omnilogic.py to 0.3.8.
* Fixed lint error
* Added logging for sensor creation.
* Fixed linting errors with logging.
* Fixed explicit chaining of raised error. Fixed issue with alarm sensor.
* Fixed manifest.json based on feedback.
* Fixed self.attrs, should_poll, CoordinatorEntity, SCAN_INTERVAL from comments in PR.
* Addressed unique_id, moved data update coordinator, addressed minor other issues from testing
* Created main OmniLogic entity for common items, reworked DataUpdateCoordinator to it's own class.
* Addressed config_schema not used in __init__.py
* Fixed linting issues.
* Addressed several comments, still todo - separate sensor classes.
* Split the Omnilogic Sensors into separate logical classes for simpler logic.
* Fixed snake case lint error for AddAlarms (to add_alarms)
* Addressed config_flow issues from comments.
* Changed addressed ConfigNotReady issue from comments.
* Updated strings.json and generated corrected en.json with translations.
* Updated en.json to standard generated file.
* Added config_flow tests and updated issue with config_flow on cannot_connect
* Added test case for incomplete information entered.
* Compressed logic in the sensor classes to reduce duplication.
* Updated strings.json for polling_interval, added generic exception handling on config flow.
* Removed omnilogic from the .coveragerc omit file.
* Updated test_config_flow to follow recommended pattern.
* Excluded sensor.py from test coverage tests.
* Corected minor issues in test_config_flow from comments
* Fixed linting issues on last commits
* Fixed linting issues.
* Corrected issue when temp state is not available from Omnilogic
* Added omnililogic_common.py from .coveragerc to bypass test coverage check.
* Return false on Login Exception, handle OmniLogicException in config_flow and in tests.
* Handle all exceptions and in config_flow and tests, clarified test naming.
* Broke out test cases per comments.
* Regenerated en.json file.
* Addressed changes from comments in PR.
* Added session and bumped API to 0.4.0, addressed other comments from PR.
* Addressed entitydata (missed earlier).
* Fixed pylint issue
* Added test case for options flow in test_config_flow.py
* Removed super() and used self when calling methods in current class.
* Addressed comments in PR.
* Addressed comments in PR.
* Updated translations file.
* Rewrote data coordinator to output dict for easy searching.
* Updated chlorinator unit when chlorinator is on/off only
* Fixed ORP method not being @property, fixed unique_id potential issue. Does not address comments from PR.
* Rewrote coordinator for updated dict structure, rewrote sensors to parse new data structure.
* Added alarms as attributes on all entities which support alarm reporting.
* Updated SENSOR_TYPES to sensor_types to adhere to snake case in pylint.
* Addressed PR comments.
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Removed binary sensor conditions (alarms, on/off sensor types) and added ability for multiple guard conditions
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Updated per comments in PR for Pump Type and removal of force_update().
* Update homeassistant/components/omnilogic/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/omnilogic/common.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Correctly asserting conditions for the login exception case.
* Update .coveragerc
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Mike Hershberger <mike.hershberger@gmail.com>
Co-authored-by: Chad <54695185+chadlyy@users.noreply.github.com>
Co-authored-by: Tim Empringham <tim.empringham@live.ca>
Co-authored-by: djtimca <60706061+djtimca@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Implement local media finder and integrate into cast
* update to media source as a platform
* Tweak media source design
* fix websocket and local source
* fix websocket schema
* fix playing media
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add resolve_media websocket
* Register that shit
* Square brackets
* Sign path
* add support for multiple media sources and address PR review
* fix lint
* fix tests from auto whitelisting config/media
* allow specifying a name on the media source
* add tests
* fix for python 3.7
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* add http back to cast and remove guess_type from executor as there is no i/o
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Opened a new fresh page to clean my mess.
* Solved pylint warnings
* Fixing pylint issue of defining attr outside init.
* Excluded files from being tested by codecov.
* Solved binary sensor error.
* Fixed some stylisation errors.
* Resolved input not updating problem.
* Added port entry to test file.
* Added tests for create_entry.
* Added support for better state management.
* Increased code coverage of config_flow.py & made some tweaks.
* Increased coverage of config_flow.py by adding tests for unknown exceptions.
* A small bugfix.
* Stylised code as per Chris' suggestions.
* Stylised code again.
* Improved quality of test code.
* Added step_id in config flow tests.
* Run scaffold script
* Update version
* Bump version
* Initial commit
* Move meter and ESIID to device attributes
* Update internal to hourly due to api limit
* Format with Black
* Fix typo
* Update tests
* Update description
* Disable Pylint error
* Don't commit translations
* Remove meter number from sensor name
* Allow multiple meters per account
* Move data updates to a DataUpdateCoordinator
* Use setdefault to setup the component
* Move strings to const.py
* Fix tests
* Remove meter last updated attribute
* Bump smart-meter-texas version
* Fix logger call
Co-authored-by: J. Nick Koston <nick@koston.org>
* Remove unneeded manifest keys
Co-authored-by: J. Nick Koston <nick@koston.org>
* Remove icon property
Co-authored-by: J. Nick Koston <nick@koston.org>
* Handle instance where user already setup an account
Co-authored-by: J. Nick Koston <nick@koston.org>
* Remove icon constant
* Fix indentation
* Handle config flow errors better
* Use ESIID + meter number as unique ID for sensor
* Update config flow tests to reach 100% coverage
* Avoid reading meters on startup
Cherrypick @bdraco's suggestion
* Run scaffold script
* Update version
* Bump version
* Initial commit
* Move meter and ESIID to device attributes
* Update internal to hourly due to api limit
* Format with Black
* Fix typo
* Update tests
* Update description
* Disable Pylint error
* Don't commit translations
* Remove meter number from sensor name
* Allow multiple meters per account
* Move data updates to a DataUpdateCoordinator
* Use setdefault to setup the component
* Move strings to const.py
* Fix tests
* Remove meter last updated attribute
* Bump smart-meter-texas version
* Fix logger call
Co-authored-by: J. Nick Koston <nick@koston.org>
* Remove unneeded manifest keys
Co-authored-by: J. Nick Koston <nick@koston.org>
* Remove icon property
Co-authored-by: J. Nick Koston <nick@koston.org>
* Handle instance where user already setup an account
Co-authored-by: J. Nick Koston <nick@koston.org>
* Remove icon constant
* Fix indentation
* Handle config flow errors better
* Use ESIID + meter number as unique ID for sensor
* Update config flow tests to reach 100% coverage
* Remove unnecessary try/except block
This checks for the same exception just prior in execution on L51.
* Remove unused return values
* Add tests
* Improve tests and coverage
* Use more pythonic control flow
* Remove all uses of hass.data
Co-authored-by: J. Nick Koston <nick@koston.org>
* Move DwdWeatherWarningsAPI to a library hosted on PyPI
PyPI library uses new DWD WFS API
WFS API allows a more detailed query with reduced data sent as return
Change CONF_REGION_NAME from Optional to Required because it was never really optional
Set attribute region_state to "N/A" because it is not available via the new API
Add attributes warning_i_parameters and warning_i_color
* Use constants instead of raw strings
Streamline methods state and device_state_attributes
* Wrap api, use UTC time
* Update homeassistant/components/dwd_weather_warnings/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/dwd_weather_warnings/manifest.json
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add config flow to HLK-SW16
* Use entry_id for unique_id
* Add options update capability
* Refactor entry_id under domain
* Remove name from config
* Set options
* Remove options flow
* remove unneccesary else block from validate_input and move domain cleanup to async_unload_entry
* Add tests and config import
* Add back config schema
* Remove config import
* Refactor unload
* Add back config import
* Update coveragerc
* Don't mock validate_input
* Test duplicate configs
* Add import test
* Use patch for timeout test
* Use mock for testing timeout
* Use MockSW16Client for tests
* Check mock_calls count
* Remove unused NameExists exception
* Remove title from strings.json
* Mock setup for import test
* Set PARALLEL_UPDATES for switch
* Move hass.data.setdefault(DOMAIN, {}) to async_setup_entry
* Add new python library
* Update requirements
* Remove old libs
* config flow with client.search_places
* WIP: UI config + weather OK
* WIP: sensors
* WIP: add pressure to weather + available to sensor
* WIP: coordinator next_rain + alert
* Make import step working
* migrate to meteofrance-api v0.0.3
* Create coordinator for rain only if data available in API
* Fix avoid creation of rain sensor when not available.
* Add options flow for forecast mode
* Fix import config causing bug with UI
* Add alert sensor
* Add coastal alerts when available (#5)
* Use meteofrance-api feature branch on Github
* Update unit of next_rain sensor
* Test different type of attibutes
* Typo for attribute
* Next rain sensor device class as timestamp
* Better design for rain entity attributes
* use master branch for meteofrance-api
* time displayed in the HA server timezone.
* fix bug when next_rain_date_locale is None
* Add precipitation and cloud cover sensors
* Add variable to avoid repeating computing
* Apply suggestions from code review
Co-authored-by: Quentame <polletquentin74@me.com>
* Attributes names in const.
* Cleaning
* Cleaning: use current_forecast and today_forecast
* Write state to HA after fetch
* Refactor, Log messages and bug fix. (#6)
* Add messages in log
* Refactor using 'current_forecast'.
* Use % string format with _LOGGER
* Remove inconsistent path
* Secure timestamp value and get current day forecast
* new unique_id
* Change Log message to debug
* Log messages improvement
* Don't try to create weather alert sensor if not in covered zone.
* convert wind speed in km/h
* Better list of city in config_flow
* Manage initial CONF_MODE as None
* Review correction
* Review coorections
* unique id correction
* Migrate from previous config
* Make config name detailed
* Fix weather alert sensor unload (#7)
* Unload weather alert platform
* Revert "Unload weather alert platform"
This reverts commit 95259fdee84f30a5be915eb1fbb2e19fcddc97e4.
* second try in async_unload_entry
* Make it work
* isort modification
* remove weather alert logic in sensor.py
* Refactor to avoid too long code lines
Co-authored-by: Quentin POLLET <polletquentin74@me.com>
* Update config tests to Meteo-France (#18)
* Update meteo_france exception name
* Update MeteoFranceClient name used in tests
* Update 'test_user'
* Make test_user works
* Add test test_user_list
* Make test_import works
* Quick & Dirty fix on exception managment. WIP
* allow to catch MeteoFranceClient() exceptions
* remove test_abort_if_already_setup_district
* bump meteofrance-api version
* We do not need to test Exception in flow yet
* Remove unused data
* Change client1 fixture name
* Change client2 fixture name
* Finish cities step
* Test import with multiple choice
* refactor places
* Add option flow test
Co-authored-by: Quentin POLLET <polletquentin74@me.com>
* Fix errors due to missing data in the API (#22)
* fix case where probability_forecast it not in API
* Workaround for probabilty_forecast data null value
* Fix weather alert sensor added when shouldn't
* Add a partlycloudy and cloudy value options in condition map
* Enable snow chance entity
* fix from review
* remove summary
* Other fix from PR review
* WIP: error if no results in city search
* Add test for config_flow when no result in search
* Lint fix
* generate en.json
* Update homeassistant/components/meteo_france/__init__.py
* Update homeassistant/components/meteo_france/__init__.py
* Update homeassistant/components/meteo_france/__init__.py
* Update homeassistant/components/meteo_france/sensor.py
* Update homeassistant/components/meteo_france/__init__.py
* Update homeassistant/components/meteo_france/__init__.py
* string: city input --> city field
Co-authored-by: Quentin POLLET <polletquentin74@me.com>
* WOLF Smart-set integration
* Removed translations. Changed device class of timestamp. Added new test for unknown exception
* Remove unit_of_measurement from hours sensor
* Code cleanup. Pull Request comments fixes
* ConnectError import change. Removed DEVICE_CLASS_TIMESTAMP
* Add unique id guard with tests. Use common translations. Move device_id resolution to config_flow.
* Remove debug print
* Switch to config flow setup
* Add minimal test for config flow
* Add myself as codeowner and address some review concerns
* Address some further review comments
* 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
* Add support for Numato 32 port USB GPIO boards
Included are a binary_sensor, sensor and switch component
implementations. The binary_sensor interface pushes updates via
registered callback functions, so no need to poll here.
Unit tests are included to test against a Numato device mockup.
* Refactor numato configuration due to PR finding
* Resolve minor review findings
* Bump numato-gpio requirement
* Load numato platforms during domain setup
According to review finding
* Guard from platform setup without discovery_info
According to review finding
* Move numato API state into hass.data
According to review finding.
* Avoid side effects in numato entity constructors
According to review finding
* Keep only first line of numato module docstrings
Removed reference to the documentation. Requested by reviewer.
* Minor improvements inspired by review findings
* Fix async tests
Pytest fixture was returning from the yield too early executing teardown
code during test execution.
* Improve test coverage
* Configure GPIO ports early
Review finding
* Move read_gpio callback to outside the loop
Also continue on failed switch setup, resolve other minor review
findings and correct some error messages
* Bump numato-gpio requirement
This fixes a crash during cleanup. When any device had a communication
problem, its cleanup would raise an exception which was not handled,
fell through to the caller and prevented the remaining devices from
being cleaned up.
* Call services directly
Define local helper functions for better readability.
Resolves a review finding.
* Assert something in every test
So not only coverage is satisfied but things are actually tested
to be in the expected state.
Resolves a review finding.
* Clarify scope of notification tests
Make unit test for hass NumatoAPI independent of Home Assistant (very basic test of notifications).
Improve the regular operations test for notifications.
* Test for hass.states after operating switches
Resolves a review finding.
* Check for wrong port directions
* WIP: Split numato tests to multiple files
test_hass_binary_sensor_notification still fails.
* Remove pytest asyncio decorator
Apears to be redundant. Resolves a review finding.
* Call switch services directly.
Resolves a review finding.
* Remove obsolete inline pylint config
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Improve the numato_gpio module mockup
Resolves a review finding.
* Remove needless explicit conversions to str
Resolves review findings.
* Test setup of binary_sensor callbacks
* Fix test_hass_binary_sensor_notification
* Add forgotten await
Review finding.
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>