* Prepare test code for complex devices.
push entity_id to conftest, to make it common for all devices.
Add device to base_setup.
* Add test coverage for modbus switch (coil part).
* Update .coveragerc
* Update .coveragerc
Co-authored-by: Chris Talkington <chris@talkingtontech.com>
* cleanup goalzero code
* more cleanup
* mroe cleanup
* log defined exception to error
* return None if not configured
* return False if not configured
* Added missing unit for signal strength
* Added one more unit
* Replaced string with variable
* Fixed wrong import
* Fix import
* Replaced string with variable
* Fixed wrong import
* Apply suggestions from code review
* Black
* Again a fix :-(
* iSort
* iSort after merge
Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
* Add service that can clean up by deCONZ orphaned entries from device and entity registry
* Fix existing tests
* Add new test
* Add some inline comment to the service
* Update zha.permit schema to support install code
* Move install code to core helpers
* QR code converter for enbrighten
* Fix schemas
* Update test for permit service
* Refactor zha.permit to accept install codes
* Test zha.permit from QR code
* Fix regex for Embrighten QR code
* Add regex for Aqara QR codes
* Add Consciot regex for QR code
* Reuse test params for WS tests
* ZHA WS permit command with install code
* Tests for zha.permit WS service
* Refactor zha.permit and zha.remove service to use ATTR_IEEE for the address
* Make pylint happy
* Deprecate only ieee_address param for now
* Add test coverage of binary sensor.
Update conftest to be generic.
* Pass total config structure to run_base_test.
Simple devices like sensor/switch do only have one entry in the
dict array, whereas e.g. switch have multiple entries.
* Use STATE_ON / _OFF for binary_sensor test.
* Update coveragerc
Only exclude files that uses a third party library.
* Remove modbus/* from coveragerc
* Remove modbus from .coveragerc
* Update .coveragerc
Co-authored-by: Chris Talkington <chris@talkingtontech.com>
* Use set not list
* Events are not entities
* Don't await unload_events
* Remove checks of entities content in tests
* List to set comprehension
* Why is it so hard to remember that sets arent parenthesis...
* Store all entities in dict
* Use stored unique id to select if to create entity or not
* Remove unnecessary init
* Change so same physical sensor doesnt try to create multiple battery sensors
Change so groups get created properly
* Add controls in tests that entities are logged correctly
* 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>
* Add more units and device classes
* Battery level is a value beteen 0 and 9 where 9 indicate full
Actual 0 battery can't occur since since then we would get to signal
* Adjust tests
* Add wind direction and adjust rain rate
* Adjust data types to be None rather than empty string
* Set counter values to count unit
* Forgotten unit
Since most of the json serialize work for the websocket was done
multiple times for the same message, we can avoid the overhead
of serializing the same message many times (once per websocket
client) with a cache.
* Add binary_sensor for cloud connectivity to HomematicIP Cloud
* Fix Test
* Remove device_class
* Switch from _device to _home
* Switch from _device to _home for sensor
* Added UniFi Uptime sensor
Added the UniFi uptime data as a sensor. Untested.
* Update sensor.py
Updated code as a result of the tests.
* Changed timestamp format and device class
Converted state to iso timestamp and changed device class to DEVICE_CLASS_TIMESTAMP.
* Updated unit of measurement to None
* Added import
* Update homeassistant/components/unifi/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Removed whitespace
* Added the uptime sensors option to the config flow
* All the unit tests should be there now
* Whoops
* Fixed translation
* Properly formatted the code
* Flake8 really has angel eyes
* Black should also be satisfied now
* Should have satisfied all static code analysis tools
* Fixed add uptime sensor function
* Fixed overintendation
* Fixed unit tests
* Made a spelling mistake during editing of unit tests
* Test verifies if utc time is correct
* Converted to iso format
* Converted unit test to iso format
* Unit test sensor json had the wrong uptime name
* Added options_updated handler
* Fixed remove sensors unit test
* Update homeassistant/components/unifi/sensor.py
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
* Update homeassistant/components/unifi/sensor.py
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
* Update test_device_tracker.py
Removed uptime from the devices
* Fixed black formatting issue
* I think the code coverage should be good now
* Trying to add the sensors again
* Using signals to hopefully trigger the controller to add them again
* Forgot import
* Sorted components
* fixed isort comments
* Removed CLASS and DEVICE_CLASS
* Added TYPE again
* Removed double underscores
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
* Prompt to reauth when the august password is changed or token expires
* augment missing config flow coverage
* augment test coverage
* Adjust test
* Update homeassistant/components/august/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* block until patch complete
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Move setup without devices
* Remove not needed tests
* Move set temp test
* Move set temp cool mode test
* Run black
* Move test target temperature
* Move test current temperature
* Move test current humidity
* Move test hvac mode
* Move test hvac modes
* Move test fan modes
* Move test service fan modes
* Move test fan state
* Move test supported features
* Move test idle state
* Move test humidity invalid state
* Move test humidity without state
* Move test device cool
* Rename test
* Move test set mode service
* Clean imports
* Clean strings
* Only load climate platform for climate tests
The HomeKit spec does not permit the color temp characteristic
being exposed when color (hue, sat) is present. Since
Home Assistant will still send color temp values, we need to
convert them to hue, sat values for HomeKit
* add unique_id to canary alarm_control_panel
* Update test_alarm_control_panel.py
* Update alarm_control_panel.py
* Apply suggestions from code review
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Refactor zeroconf setup to be async
Most of the setup was calling back to async because
we were setting up listeners. Since we only need
to jump into the executor to create the zeroconf
instance, its much faster to setup in async.
In testing this cut the setup time in half
or better.
* partial revert to after_deps
* Add support for events from Loitering guard and Motion guard
* Improve naming of events originating from applications Fence guard and VMD4 (Loitering guard and motion guard also benefit from this)
* 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>