* Initial commit after scaffold setup
* Add initial config flow
* Create initial entity
* Ready for testing
* Can browse, no result yet
* Further improvements. Browsing is working.
Now need to work on proper stream URL
* Two valid URLs. Do not play in HA
* First working version for music
* Add thumbnail
* Includes Artist->Album hierarchy
* Add sorting of artists, albums and tracks
* Remove code for video libraries
* Improved code styling
* Optimize configuration flow
* Fix unit tests for config flow
* Fix import order
* Conform to style requirements
* Use empty string as media type for non playables
* 100% code coverage config_flow
* Type async_get_media_source
* Final docsctring fix after rebase
* Add __init__ and media_source files to .coveragerc
* Fix testing issues after rebase
* Fix string format issues and relative const import
* Remove unused manifest entries
* Raise ConfigEntry exceptions, not log errors
* Upgrade dependency to avoid WARNING on startup
* Change to builtin tuple and list (deprecation)
* Log broad exceptions
* Add strict typing
* Further type fixes after rebase
* Retry when cannot connect, otherwise fail setup
* Remove unused CONFIG_SCHEMA
* Enable strict typing checks
* FlowResultDict -> FlowResult
* Code quality improvements
* Resolve mypy.ini merge conflict
* Use unique userid generated by Jellyfin
* Update homeassistant/components/jellyfin/config_flow.py
Remove connection class from config flow
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* Minor changes for additional checks after rebase
* Remove title from string and translations
* Changes wrt review
* Fixes based on rebase and review suggestions
* Move client initialization to separate file
* Remove persistent_notification, add test const.py
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* Bring greeneye_monitor to 99% coverage.
* Pass monitor into listeners on Monitors
* Updates for changes in `dev`, create mock monitor
* Remove logging left in after debugging
* Remove xfails now that #58764 has merged
* Add binary_sensor to venstar to track alerts
* Add binary_sensor.py to coveragerc
* Apply suggestions from code review by alengwenus
Co-authored-by: Andre Lengwenus <alengwenus@gmail.com>
* Fixup black any mypy complaints
* Yank the typing, it makes everything complain
Co-authored-by: Andre Lengwenus <alengwenus@gmail.com>
* Add config_flow to Environment Canada
* Add unique_id
* Remove erroneous directory.
* Tests working!!
* Add back setup.
* First cut of import.
* Temp
* Tweak names.
* Import config.yaml.
* Clean up imports.
* Import working! Some refactor to clean it up.
* Add import test.
* Small optimization.
* Fix comments from code review.
* Remove CONF_NAME and config_flow for it.
* Fixup strings to match new config_flow.
* Fixes for comments from last review.
* Update tests to match new import code.
* Clean up use of CONF_TITLE; fix lint error on push.
* Phew. More cleanup on import. Really streamlined now!
* Update tests.
* Fix lint error.
* Fix lint error, try 2.
* Revert unique_id to use location as part of ID.
* Fix code review comments.
* Fix review comments.
* Refactor Xiaomi vacuum with sensors.
This is the first step into refactoring xiaomi vacuum attributes into sensors.
What is missing are some switches and binary sensors etc.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Use generic sensor for Xiaomi vacuum sensors.
By using HA coordinator, the generic Xiaomi sensor class can be used with these
coordinators to get the status sensors from vacuum. This also means now that
sensors are available as soon as HA starts, which is a nice plus.
Now the only reason to create a subclass of the generic sensors is when custom
value parsing needs to be done.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Working vacuum sensors via 1 coordinator.
Vacuum needs a custom coordinator to ensure that it fetches all the needed data
and puts it in a dict. From this dict the sensors will then get their data
accordingly.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Remove vacuum setup method in sensor
Sensor is generic enough that vacuum does not require its own setup method.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Don't auto register generic sensors.
Let the user decide which sensor is useful for them and enable them.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Remove converted attributes from xiaomi vacuum.
The attributes that have been converted so far should be removed from the vacuum
attributes list.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Fetch data from vacuum sequentially.
It seems some vacuums do not like parallel requests. The requests that came
before are ignored.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Refactor vacuum sensors to its own container.
By moving vacuum sensors to its own container, there is no more key collisions.
This in turns means that there is need for the split hack to ensure key names
are correct.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* fixup! fix bad rebase.
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Fix sensor naming and default registration.
Use proper names for sensors, no need to include from which device status it
came.
Registration of the sensor by default has been parameterised. If the param is
not set, the sensor is not registered.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Make vacuum platform also use coordinator for its data.
By using the coordinator for data in vacuum platfrom, removes the cases where
request gets ignored during the case where the requests are done concurrently by
separate platforms.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Add binary sensor for vacuum
Add binary sensor for waterbox, mop, and water shortage.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Added proper icons to sensors.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Refactor sensors to use dataclass.
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Make vacuum use coordinator for its data.
This commit also insures that the binary sensors are only registered for devices
that include a mop.
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Minor refactoring
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Update data from coordinator after running command.
This is is to have a faster status change when executing a command like changing
fan speeds. If a manual refresh is not triggered. Worst case scenario it will
take 10s for the new fan speed to be reported in HA.
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Refresh within coroutine is ok.
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Move logging to _handle_coordinator_update
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Use internal state attribute.
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Fix vacuum typing
* Fix tests constants
* Fix vacuum inconsistent return values
* Fix vacuum state update
* Fix vacuum tests
* Remove impossible cases
* Parametrize custom services test
* Move goto test
* Move clean segment test
* Move clean single segment test
* Test service pause
* Include vacuum in coverage
* Delint
* Fix vacuum sensor dict collision.
This also prevents collision for unique id. As the key is used to construct
unique ids.
* Use f strings as dict keys
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add Amber Electric integration
* Linting
* Fixing some type hinting
* Adding docstrings
* Removing files that shouldn't have been changed
* Splitting out test helpers
* Testing the price sensor
* Testing Controlled load and feed in channels
* Refactoring mocks
* switching state for native_value and unit_of_measurement for native_unit_of_measurement
* Fixing docstrings
* Fixing requiremennts_all.txt
* isort fixes
* Fixing pylint errors
* Omitting __init__.py from test coverage
* Add missing config_flow tests
* Adding more sensor tests
* Applying suggested changes to __init.py__
* Refactor coordinator to return the data object with all of the relevent data already setup
* Another coordinator refactor - Better use the dictionary for when we build the sensors
* Removing first function
* Refactoring sensor files to use entity descriptions, remove factory
* Rounding renewable percentage, return icons correctly
* Cleaning up translation strings
* Fixing relative path, removing TODO
* Coordintator tests now accept new (more accurate) fixtures
* Using a description placeholder
* Putting missing translations strings back in
* tighten up the no site error logic - self._site_id should never be None at the point of loading async_step_site
* Removing DEVICE_CLASS, replacing the units with AUD/kWh
* Settings _attr_unique_id
* Removing icon function (it's already the default)
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Adding strings.json
* Tighter wrapping for try/except
* Generating translations
* Removing update_method - not needed as it's being overriden
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Fixing tests
* Add missing description placeholder
* Fix warning
* changing name from update to update_data to match async_update_data
* renaming [async_]update_data => [async_]update_price_data to avoid confusion
* Creating too man renewable sensors
* Override update method
* Coordinator tests use _async_update_data
* Using $/kWh as the units
* Using isinstance instead of __class__ test. Removing a zero len check
* Asserting self._sites in second step
* Linting
* Remove useless tests
Co-authored-by: jan iversen <jancasacondor@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Modernize dlna_dmr component: configflow, test, types
* Support config-flow with ssdp discovery
* Add unit tests
* Enforce strict typing
* Gracefully handle network devices (dis)appearing
* Fix Aiohttp mock response headers type to match actual response class
* Fixes from code review
* Fixes from code review
* Import device config in flow if unavailable at hass start
* Support SSDP advertisements
* Ignore bad BOOTID, fix ssdp:byebye handling
* Only listen for events on interface connected to device
* Release all listeners when entities are removed
* Warn about deprecated dlna_dmr configuration
* Use sublogger for dlna_dmr.config_flow for easier filtering
* Tests for dlna_dmr.data module
* Rewrite DMR tests for HA style
* Fix DMR strings: "Digital Media *Renderer*"
* Update DMR entity state and device info when changed
* Replace deprecated async_upnp_client State with TransportState
* supported_features are dynamic, based on current device state
* Cleanup fully when subscription fails
* Log warnings when device connection fails unexpectedly
* Set PARALLEL_UPDATES to unlimited
* Fix spelling
* Fixes from code review
* Simplify has & can checks to just can, which includes has
* Treat transitioning state as playing (not idle) to reduce UI jerking
* Test if device is usable
* Handle ssdp:update messages properly
* Fix _remove_ssdp_callbacks being shared by all DlnaDmrEntity instances
* Fix tests for transitioning state
* Mock DmrDevice.is_profile_device (added to support embedded devices)
* Use ST & NT SSDP headers to find DMR devices, not deviceType
The deviceType is extracted from the device's description XML, and will not
be what we want when dealing with embedded devices.
* Use UDN from SSDP headers, not device description, as unique_id
The SSDP headers have the UDN of the embedded device that we're interested
in, whereas the device description (`ATTR_UPNP_UDN`) field will always be
for the root device.
* Fix DMR string English localization
* Test config flow with UDN from SSDP headers
* Bump async-upnp-client==0.22.1, fix flake8 error
* fix test for remapping
* DMR HA Device connections based on root and embedded UDN
* DmrDevice's UpnpDevice is now named profile_device
* Use device type from SSDP headers, not device description
* Mark dlna_dmr constants as Final
* Use embedded device UDN and type for unique ID when connected via URL
* More informative connection error messages
* Also match SSDP messages on NT headers
The NT header is to ssdp:alive messages what ST is to M-SEARCH responses.
* Bump async-upnp-client==0.22.2
* fix merge
* Bump async-upnp-client==0.22.3
Co-authored-by: Steven Looman <steven.looman@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Move parts of ssdp to async_upnp_client
* Fix test for environments with multiple sources
* Fix sonos tests
* More fixes/changes
* More fixes
* Use async_upnp_client==0.21.0
* Pylint/test fixes
* More changes after review
* Fix tests
* Improve testing
* Fix mypy
* Fix yamaha_musiccast tests?
* Changes after review
* Pylint
* Reduce calls to combined_headers
* Update to async_upnp_client==0.21.1
* Update to async_upnp_client==0.21.2
* use as_dict
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add data update coordinator to the Tautulli integration
* update .coveragerc
* Add guard for UpdateFailed
* Apply suggestions from code review
Co-authored-by: Chris Talkington <chris@talkingtontech.com>
* ignore issues
Co-authored-by: Chris Talkington <chris@talkingtontech.com>
* Add sensor platform
* Add extra_state_attributes
* Add more constants
* Add sensor.py to .coveragerc file
* Use native value
* Suggested change
* Move SENSOR_TYPES to sensor platform
* Add domain as prefix to the signal
* Use TractiveEntity class
* Add model.py to .coveragerc file
* Clean up files
* Add entity_class attribute to TractiveSensorEntityDescription class
* TractiveEntity inherits from Entity
* Suggested change
* Define _attr_icon as class attribute
Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>
* Add fjäråskupan sensor
* Update homeassistant/components/fjaraskupan/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Type the return value of constructor
* Update __init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add 100% test coverage for Uptime Robot
* Update tests/components/uptimerobot/test_binary_sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add more typehints
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
Co-authored-by: Teemu R. <tpr@iki.fi>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* config flow and coordinator
* comply with pylint
* Remove pylint errors
* Update test coverage yale smart alarm
* Update test config_flow
* Fix test already configured
* Second try test already configured
* Fixes config flow and tests
* Conform pylint errors coordinator
* Fix various review remarks
* Correct entity unique id
* Fix unique id and migrate entries
* Remove lock code
* Remove code from test
* Expand code coverage config flow test
* Add more constants
* Add test new requirements
* Minor corrections
* Resolve conflict alarm schema
* Change logger
* Changed from review
* Fix isort error
* Fix flake error
* Ignore mypy errors
* Corrections from PR review no 2
* Corrections from PR review no 3
* Added tests and fix pylint error
* Corrections from PR review no 4
* Corrections from PR review no 5
* Corrections from PR review no 6
* Corrections from PR review no 6_2
* Corrections from PR review no 7
* Corrections from PR review no 8
* Minor last changes for PR
* Update homeassistant/components/yale_smart_alarm/coordinator.py
Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
* Upgrade honeywell from platform to integration
* Add codeowner and run code formatter
* Add sensors for current indoor temp and humidity
* Fix tests and away temp
* Spring cleaning of honeywell tests
* Add config flow to honeywell integration
* Add config flow test
* Tie in honeywell service update
* Simplify config flow and add import
* Remove unnecessary platform schema
* Clean up based on PR comments
* Use new helper method
* Force single device and fix linter errors
* Address PR feedback
* Update translations
* Change string key and remove logger message
* Always add first device
* Fix test assertion
* Put PLATFORM_SCHEMA back
* Skip code coverage check on honeywell init
* add some tests for honeywell
* Make retry async
* Make device private
* Use _attr_ instead of properties
* Code cleanup from PR feedback
* Fix test and cleanup code
* Make description better
Co-authored-by: Matt Zimmerman <mdz@alcor.net>
* Add switch platform to Fritz
* Fix tests
* Pylint
* Small fix
* Bump fritzprofiles to fix log level and identifier
* Fix different WiFi networks with same name
* Changed exposed attributes
* Moved to extra_state
* Remove redundant lambda
* Add missing wait
* Removed identifiers
* Update homeassistant/components/fritz/switch.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/fritz/switch.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add mapping dict
* Device Profile disabled by default
* Heavy cleanup
* Tweak
* Bug fix
* Update homeassistant/components/fritz/switch.py
Co-authored-by: Aaron David Schneider <aaron.schneider@nbi.ku.dk>
* Fix port forward switching + small log improvement
* Cleanup from old approach
* Handle port mapping hot removal (from device)
* Minor fixes
* Typying
* Removed lambda call
* Last missing strict typing
* Split get entities
* Func rename
* Move FritzBoxBaseSwitch to switch.py
* Removed lambda
* Update homeassistant/components/fritz/common.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/fritz/common.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/fritz/switch.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/fritz/switch.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/fritz/switch.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/fritz/switch.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Fixes after applying comments
* Remvoed redundant try block
* Removed broad-except
* Optimized async/sync switch
* Update homeassistant/components/fritz/switch.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/fritz/switch.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/fritz/switch.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Address remaining comments
* Optimize return list
* More optimization for return lists
* Some missing strict typing
* Redundant typing
* Update homeassistant/components/fritz/switch.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Wrong if
* Introduce const for profile status
* Update homeassistant/components/fritz/switch.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/fritz/switch.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Fix mypy
* Switch back to get_local_ip()
* Address latest comments
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Aaron David Schneider <aaron.schneider@nbi.ku.dk>
* Initial commit for new musiccast integration
* Add zone support
* Get/set volume level
* Remove volume step
* Create custom MusicCastData type
* Create MusicCastDevice
* Fix await
* Add power and mute control
* Implement all basic media_player parts
* Support input switching
* Add duration/position support
* Add advanced tuner functions
* Basic media browser
* Add layer in media browser to see all available list_infos
* Added join/unjoin services and group informations. Known issue: You can not link zone 2 to main at the moment (WIP)
* Many fixes to make multiple zones and grouping work. Next step: implement error handling and remove debugging information
* WIP: Added Multizone Support and allows clients to directly jump from one group to another. Known issue: If a server tries to join a group as client, he has to close his group first. Sometimes the device that was a server previously jumps out of the group directly after joining.
* Updated group management to make it wait for the updated group information before performing the next actions - Timeouts after 1 second, then polls the distribution data. If the data are still not updated, there will be one retry before an Exception is thrown. Extended the state attributes for clients to make them return group details from their servers (leads to inactive group management buttons for the client). Added documentation and restructured the code.
* Make the service handle function name for group specific service calls unique
* Added service descriptions for set_sleep_timer, set_alarm, recall_netusb_preset, store_netusb_preset
* Added data entries for alarm specific values and a netusb preset list. Implemented fetching function for clock and netusb presets.
* Registered and implemented services for set_sleep_timer, set_alarm, recall_netusb_preset, store_netusb_preset. The set_alarm service works with a special mediaplayer alarm lovelace card, I am currently working on.
The NetUSB Presets are also available using the media browser. Maybe we could also add the Tuner presets in the future for both setting up the alarm and recalling them via service and media browser.
* Removed some debug prints
* Moved MusicCast Integration to the aiomusiccast library. This library supports media browsers with multiple pages. Added ssdp support for the discovery
* Minor fix in the group management and tidied up a bit
* Updated manifest of yamaha musiccast
* Update library
* Minor fix in the media browser. get_distribution_num does not have to be async, so it has been changed. Adjusted the client join function to turn on the client before joining a group - the musiccast app does so, so hopefully this fixes the rare errors when adding a turned off client to a group. Some reformating and by hooks fixed most of the requirements of the hooks. Known exception from this: mypy throws an error for line 116.
* Removed some old out commented code. Fixed some error handling, when the user enters a non reachable or non yamaha host in the manual setup. Fixed linting/styling errors. Implemented tests to bring the coverage for the config flow to 100%.
* Fixed linting/styling errors. Return a DeviceInfo object instead of a dict.
* Fixed linting/styling errors. Added a new error type to the translations.
* In the yamaha API the system_id is equal to the serial number in the DLNA description. Due to that it was possible to configure a device twice, because the serial number from the yamaha API was different. This issue was fixed.
* Updated tests and added a test for adding a device manually, which is already present in the system
* Remove print statements
* Fix sleep timer service call
* Fix yamllint error
* Shrink PR down to just new library + config flow with discovery
* Add __init__.py to .coveragerc
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
* Implement suggestions from code review
* Improve identifiers and connections, remove event loop parameter
* Add coordinator back
* Better exception handling
* Fix unique id in ssdp step
* Remove abc.ABC from MusicCasteDeviceEntity
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/yamaha_musiccast/config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Replace the repeat mode mapping from mc to ha by a generic solution
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* add coordinator to the super call of the mediaplayer
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* add the coordinator to the init function of the MusicCastEntity
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Pass the coordinator from the MusicCastEntity init function to the CoordinatorEntity init function
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* merged _handle_config_flow into async_step_user
* reformated the exception handling of the user step. In the case that the device already exists, the AbortFlow will be raised.
* Removed model from the config entry. It was neither set nor used anymore.
* Fixed the test for the config flow.
* Use async_write_ha_state instead of schedule_update_ha_state.
* Add default value for the system ID gotten in the user step
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/yamaha_musiccast/test_config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Added a fixture to avoid IO in the test_user_input_device_not_found test
* Use absolute imprt to import data_entry_flow.
* Use local vars for host and serial_number in async_step_user.
* Remove ip_address and zone_id properties.
* Use device id for the unique ID of an entity instead of the macs
* Removed entry_id from the MusicCastEntity init function.
* Updated strings and English translation.
* don't set the coordinator in the mediaplayer init.
* Implemented legacy configuration.yaml support for existing configurations.
* Added tests for the newly added config flow step.
* Use device_id as identifier
* Fix an accidentally relative import
* Fix pylint warnings
* use logger.error instead of logger.exception in the import step.
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Use CONF_HOST instead of 'host'
* Only support the import from configuration.yaml if no config entries are setup for musiccast. If there are already config entries in HA and none of them is a representation of a config given in configuration.yaml (e.g. config added after the first import), an error will be logged.
* Update homeassistant/components/yamaha_musiccast/media_player.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Readded PLATFORM_SCHEMA for configuration.yaml
* Raise an exception for all services, which are only supported for specific sources.
* Bump aiomusiccast to 0.6 to support asyncio sockets
Co-authored-by: Michael Harbarth <michael.harbarth@gmx.de>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
* Add Ecobee humidifier device_info and unique_id
Ecobee humidifier entity was not connected to the thermostat device.
This change will ensure the entitiy is properly connected.
This change also fills out the ecobee-data.json fixutre data a bit
to address failures in the test setup.
* Add Ecobee humidifier device_info and unique_id
Adjust test fixture data to increase pytest coverage
Clean up indenting in ecobee-data.json
* Add Ecobee humidifier device_info and unique_id
Update exception case in device_info to not
be included in codecov tests. This case has
been tested locally.
* Add Ecobee humidifier device_info and unique_id
Address pylint issue
* Add Ecobee humidifier device_info and unique_id
Remove no cover pragma and add ecobee humidifier.py to
.coveragerc
* add support for binary_sensor
* added default enabled for binary sensors
* fixed coverage and a import deleted
* disable pylint for line
* Apply suggestions from code review
* split binary sensor and used more attr fields
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* initial commit of SIA integration
* translations
* moved reactions to file, typed everything
* fixed no-else-return 3 times
* refactored config and fix coverage of test
* fix requirements_test
* elimated another platform
* forgot some mentions of sensor
* updated config flow steps, fixed restore and small edits
* fixed pylint
* updated config_flow with better schema, small fixes from review
* final comment and small legibility enhancements
* small fix for pylint
* fixed init
* fixes for botched rebase
* fixed port string
* updated common strings
* rebuild component with eventbus
* fixed pylint and tests
* updates based on review by @bdraco
* updates based on new version of package and reviews
* small updates with latest package
* added raise from
* deleted async_setup from test
* fixed tests
* removed unused code from addititional account step
* fixed typo in strings
* clarification and update to update_data func
* added iot_class to manifest
* fixed entity and unique id setup
* small fix in tests
* improved unique_id semantics and load/unload functions
* added typing in order to fix mypy
* further fixes for typing
* final fixes for mypy
* adding None return types
* fix hub DR identifier
* rebased, added DeviceInfo
* rewrite to clean up and make it easier to read
* replaced functions with format for id and name
* renamed tracker remover small fix in state.setter
* improved readibility of state.setter
* no more state.setter and small updates
* mypy fix
* fixed and improved config flow
* added fixtures to test and other cleaner test code
* removed timeband from config, will reintro in a options flow
* removed timeband from tests
* added options flow for zones and timestamps
* removed type ignore
* replaced mapping with collections.abc
* Growatt Server Config flow
* Use reference strings
Co-authored-by: SNoof85 <snoof85@gmail.com>
* Remove configuration.yaml import logic
* Removed import test
* Re-added PLATFORM_SCHEMA validation
* Import yaml from old yaml configuration
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Feedback
* Use Executor for IO only
* Fix imports
* update requirements
* Fix flake8
* Run every section of fetching devices in single executor
* Config flow feedback
* Clean up
* Fix plan step
* Fix config flow test
* Remove duplicate test
* Test import step
* Test already configured entry
* Clean up tests
* Add asserts
* Mock out entry setup
* Add warning if set up via yaml
Co-authored-by: SNoof85 <snoof85@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Scaffold the integration
* Add config flow data schema
* Handle configuration errors
* Get folder states
* Support https
* Fix translations
* Listen to syncthing events in a separate thread
* Bump syncthing
* Automatically reconnect to the syncthing server
* Renames
* Improve loading and unloading
* Update folder states from events
* Refactoring, handle FolderPaused event
* Dynamic folder icons
* Refactoring
* Mark folders as unavailable when senrver is unavailable
* Update folder satus when server is available
* Raise PlatformNotReady
* Implement additional polling
* Stop polling when the server is not available
* Minor fixes
* Remove logging
* Check name uniqueness
* Refactoring
* Minor refactorings
* Bump python-syncthing
* Migrate to aiosyncthing
* Minor fixes
* Update .coveragerc
* Set quality scale
* Bump aiosyncthing, properly handle invalid token
* Fix logging
* Fix logging
* Use CONF_VERIFY_SSL from homeassistant.const
* Bump aiosyncthing. Add Syncthing device
* Fix device name
* Bump aiosyncthing
* Bump aiosyncthing
* Extract SyncthingClient
* Add folder to device_state_attributes
* Do not pass the loop
* Cover config_flow.py
* Move self.async_create_entry outside of the try block
* Raise ConfigEntryNotReady if syncthing server is not reachable
* Fix already configured error message
* Change default name to Syncthing
* Bump aiosyncthing
* Fix formatting
* Fix formatting
* Fix tests
* Fix typo, use lis comprehension
* Fix typo, remove unused CONFIG_SCHEMA
* Bump aiosyncthing
* Remove periods from log messages W0001
* Fix tests
* Black, isort
* Remove empty items from manifest.json
* Fix variable naming
* Remove async_setup
* Use SensorEntity
* Use asyncio.create_task instead of self._hass.loop.create_task
* Do not pass hass to FolderSensor initializer
* Rename device_state_attributes to extra_state_attributes
* Use callbacks
* Simplify tests
* Refactor _listen()
* Use url for the title
* Use the url instead of the name to identify the config entry
* Explicitly set sensor attributes, extract _filter_state
* Use server url instead of name in device_info
* Use server url instead of name in logs
* User server id as a device identifier
* Use URL instead of name to identify config entry
* Use shortened server id instead of name to build entity name and unique id
* Do not use CONF_NAME
* Cleanup unused strings
* Cleanup unused strings
* Add IOT class
* Scaffold the integration
* Add config flow data schema
* Handle configuration errors
* Get folder states
* Support https
* Fix translations
* Listen to syncthing events in a separate thread
* Bump syncthing
* Automatically reconnect to the syncthing server
* Renames
* Improve loading and unloading
* Update folder states from events
* Refactoring, handle FolderPaused event
* Dynamic folder icons
* Refactoring
* Mark folders as unavailable when senrver is unavailable
* Update folder satus when server is available
* Raise PlatformNotReady
* Implement additional polling
* Stop polling when the server is not available
* Minor fixes
* Remove logging
* Check name uniqueness
* Refactoring
* Minor refactorings
* Bump python-syncthing
* Migrate to aiosyncthing
* Minor fixes
* Update .coveragerc
* Set quality scale
* Bump aiosyncthing, properly handle invalid token
* Fix logging
* Fix logging
* Use CONF_VERIFY_SSL from homeassistant.const
* Bump aiosyncthing. Add Syncthing device
* Fix device name
* Bump aiosyncthing
* Bump aiosyncthing
* Extract SyncthingClient
* Add folder to device_state_attributes
* Do not pass the loop
* Cover config_flow.py
* Move self.async_create_entry outside of the try block
* Raise ConfigEntryNotReady if syncthing server is not reachable
* Fix already configured error message
* Change default name to Syncthing
* Bump aiosyncthing
* Fix formatting
* Fix formatting
* Fix tests
* Fix typo, use lis comprehension
* Fix typo, remove unused CONFIG_SCHEMA
* Bump aiosyncthing
* Remove periods from log messages W0001
* Fix tests
* Black, isort
* Remove empty items from manifest.json
* Fix variable naming
* Remove async_setup
* Use SensorEntity
* Use asyncio.create_task instead of self._hass.loop.create_task
* Do not pass hass to FolderSensor initializer
* Rename device_state_attributes to extra_state_attributes
* Use callbacks
* Simplify tests
* Refactor _listen()
* Use url for the title
* Use the url instead of the name to identify the config entry
* Explicitly set sensor attributes, extract _filter_state
* Use server url instead of name in device_info
* Use server url instead of name in logs
* User server id as a device identifier
* Use URL instead of name to identify config entry
* Use shortened server id instead of name to build entity name and unique id
* Do not use CONF_NAME
* Cleanup unused strings
* Cleanup unused strings
* Add IOT class
* Apply suggestions from code review
* Clean up
* Fix dict comprehension
* Clean sensor
* Use the server ID as a config entry unique ID
* Remove the AlreadyConfigured exception
* Clean up old error string
* Format json
* Convert sensor attributes to snake case
* Force CI
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Prepare test harness for new pymodbus return types.
Use pytest.fixture to mock pymodbus.
Use pytest.fixture to load modbus using mocked pymodbus
Add test of Exception/IllegalResponse/ExceptionResponse from pymodbus.
* Modbus.py is back at 100% test coverage.
* Added assert mock.called.
* add mock reset.
* Bump omnilogic dependency to 0.4.4 to fix Lights key error.
* Bumped dependency to 0.4.5.
* Fixed pump type issue for unique pool structure.
* Create full platform bundle for final testing and PR to Home Assistant dev.
* Removed logger instances not required.
* Fixed lint issues.
* Fixed pylint issues.
* Fix pylint issues. Fix issue with pH sensor offset.
* Stripped light, water_heater platform for PR submit.
* Correct pH and ORP sensor report to unknown with offset if pump is off.
* Moving guard condition check to helper function.
* Update to asyncio.sleep to wait for switch status delay in Hayward API status.
* Removed sleep, added state delay to handle slow Hayward API state update response.
* Fix flake8 issue.
* Fix flake8 issue.
* Fix isort issue.
* Addressed PR Comments.
* Addressed PR comments. Corrected Unit of Measure for sensor where pump speed is not variable.
* Fix pylint issue.
* Address pylint issue.
* Update homeassistant/components/omnilogic/switch.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
The previous iAlarm integration has been removed because it used
webscraping #43010.
Since then, the pyialarm library has been updated to use the iAlarm API
instead.
With this commit I reintroduce the iAlarm integration, leveraging the
new HA config flow.
Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
* Update Ezviz Component
* Update Ezviz for pylint test
* Update Ezviz component pylint tests
* Update Ezviz component tests
* Update Ezviz Component tests
* Update Ezviz component pylint error
* Fix ezviz component config flow tests
* Update ezviz component
* Update Ezviz component
* Add sensor platforms
* issue with requirements file
* Update binary_sensor to include switches
* Updates to Ezviz sensors
* Removed enum private method.
* Fix switch args
* Update homeassistant/components/ezviz/switch.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* config flow checks login info
* Config_flow now imports ezviz from camera platform
* Update test
* Updated config_flow with unique_id and remove period from logging
* Added two camera services and clarified service descryptions in services.yaml
* Fixed variable name mistake with new service
* Added french integration translation
* Config_flow add camera rtsp credentials as seperate entities, with user step and import step
* rerun hassfest after rebase
* Removed region from legacy config schema, removed logging in camera platform setup that could contain credentials, removed unused constant.
* Regenerate requirements
* Fix tests and add config_flow import config test
* Added addition test to config_flow to test successfull camera entity create.
* Add to tests method to end in create entry, config_flow cleanup, use entry instead of entry.data
* Removed all services, sorted platforms in init file.
* Changed RTSP logging to debug from warning. (Forgot to change this before commit)
* Cleanup typing, change platform order, bump pyezviz version
* Added types to entries, allow creation of main entry if deleted by validating existance of type
* Config_flow doesn't store serial under entry data, camera rtsp read from entry and not stored in hass, removed duplicate abort if unique id from config flow
* Fix test of config_flow
* Update tests/components/ezviz/test_config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/ezviz/test_config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/ezviz/test_config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Bumped pyezviz api version, added api pyezvizerror exception raised in api (on HTTPError), cleanup unused imports.
* rebase
* cleanup coordinator, bump pyezviz api version, move async_setup_entry to add entry options to camera entries. (order change)
* Added discovery step in config_flow if cameras detected without rtsp config entry
* Reload main integration after addition or completion of camera rtsp config entry
* Add tests for discovery config_flow, added a few other output asserts
* Camera platform call discover flow with hass.async_create_task. Fixes to config_flow for discovery step
* Fix config_flow discovery, add check to legacy yaml camera platform import, move camera private method to camera import step
* Remove not needed check from config_flow import step.
* Cleanup config_flow
* Added config_flow description for discovered camera
* Reordered description in config_flow confim step.
* Added serial to flow_step description for discovered camera, readded camera attributes for rtsp stream url (allows user to check RTSP cred), added local ip and firmware upgade available.
* Bumped pyezviz version and changed region code to region url. (Russia uses a completly different url). PyEzviz adds a Local IP sensor, removed camera entity attributes.
* Add RSTP describe auth check from API to config_flow
* url as vol.in options in Config_flow
* Config_flow changes to discovery step, added exceptions, fixed tests, added rtsp config validate module mock to test disovery confirm step
* Add test for config_flow step user_camera
* Added tests for abort flow
* Extend tests on custom url flow step
* Fix exceptions in config_flow, fix test for discovery import exception test
* Bump pyezviz api version
* Bump api version, added config_flow function to wake hybernating camera before testing credentials, removed "user camera" step from config flow not needed as cameras are discovered.
* Create pyezviz Api instance for config_flow wake hybernating camera, fixed tests and added fixture to mock method
* Added alarm_control_panel with support to arm/disarm all cameras, fixed camera is available attribute (returns 2 if unavailable, 1 if available)
* Skip ignored entities when setup up camera RTSP stream
* Remove alarm_control_panel, add additional config_flow tests
* Cleanup tests, add tests for discovery_step.
* Add test for config_flow rtsp test step1 exceptions
* Removed redundant except from second step in test RTSP method
* All tests to CREATE or ABORT, added step exception for general HTTP error so user can retry in case of trasient network condition
* Ammended tests with output checks for step_id, error, data, create entry method calls.
* bumped ezviz api now rases library exceptions. Config_flow, coordiantor and init raises library exceptions. Updated test sideeffect for library exceptions
* Bump api version, Create mock ezviz cloud account on discovery tests first to allow more complete testing of step.
* Add abort to rtsp verification method if cloud account was deleted and add tests
* Update tests/components/ezviz/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/ezviz/const.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/ezviz/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/ezviz/camera.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/ezviz/camera.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/ezviz/camera.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/ezviz/camera.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/ezviz/camera.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/ezviz/camera.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Undo config import change to password key for yaml, move hass.data.setdefault to async_setup_entry and remove async_setup
* Fixed tests by removing _patch_async_setup as this was removed from init.
* Update homeassistant/components/ezviz/camera.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/ezviz/camera.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/ezviz/camera.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Changed L67 on camera config to complete suggestion for cleanup
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* New integration for Kostal Plenticore solar inverters.
* Fix errors from github pipeline.
* Fixed test for py37.
* Add more test for test coverage check.
* Try to fix test coverage check.
* Fix import sort order.
* Try fix test code coverage .
* Mock api client for tests.
* Fix typo.
* Fix order of rebased code from dev.
* Add new data point for home power.
* Modifications to review.
Remove service for write access (for first pull request). Refactor
update coordinator to not use the entity API.
* Fixed mock imports.
* Ignore new python module on coverage.
* Changes after review.
* Fixed unit test because of config title.
* Fixes from review.
* Changes from review (unique id and mocking of tests)
* Use async update method. Change unique id. Remove _dict
* Remove _data field.
* Removed login flag from PlenticoreUpdateCoordinator.
* Removed Dynamic SoC sensor because it should be a binary sensor.
* Remove more sensors because they are binary sensors.
* Add config flow for Waze Travel Time
* update translations
* setup entry is async
* fix update logic during setup
* support old config method in the interim
* fix requirements
* fix requirements
* add abort string
* changes based on @bdraco review
* fix tests
* add device identifier
* Update homeassistant/components/waze_travel_time/__init__.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* fix tests
* Update homeassistant/components/waze_travel_time/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* log warning for deprecation message
* PR feedback
* fix tests and bugs
* re-add name to config schema to avoid breaking change
* handle if we get name from config in entry title
* fix name logic
* always set up options with defaults
* Update homeassistant/components/waze_travel_time/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update config_flow.py
* Update sensor.py
* handle options updates by getting options on every update
* patch library instead of sensor
* fixes and make sure first update writes the state
* validate config entry data during config flow and entry setup
* fix input parameters
* fix tests
* invert if statement
* remove unnecessary else
* exclude helpers from coverage
* remove async_setup because it's no longer needed
* fix patch statements
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Added a new weather integration - Met Éireann
* Fix codespell error
* Update met_eireann to use CoordinatorEntity
* Remove deprecated platform setup
* Fix merge conflict
* Remove unnecessary onboarding/home tracking code
* Use common strings for config flow
* Remove unnecessary code
* Switch to using unique IDs in config flow
* Use constants where possible
* Fix failing tests
* Fix isort errors
* Remove unnecessary DataUpdateCoordinator class
* Add device info
* Explicitly define forecast data
* Disable hourly forecast entity by default
* Update config flow to reflect requested changes
* Cleanup code
* Update entity naming to match other similar components
* Convert forecast time to UTC
* Fix test coverage
* Update test coverage
* Remove elevation conversion
* Update translations for additional clarity
* Remove en-GB translation
* Add ClimaCell v4 API support
* fix tests
* use constants
* fix logic and update tests
* revert accidental changes and enable hourly and nowcast forecast entities in test
* use variable instead of accessing dictionary multiple times
* only grab necessary fields
* add _translate_condition method ot base class
* bump pyclimacell again to fix bug
* switch typehints back to new format
* more typehint fixes
* fix tests
* revert merge conflict change
* handle 'migration' in async_setup_entry so we don't have to bump config entry versions
* parametrize timestep test
* add config flow support to google_travel_time
* fix bugs and add strings
* fix import and add new test
* address comments in #43419 since this is a similar PR
* fix default name and test
* add unique ID and device info
* fix test
* feedback from waze PR
* continue incorporating feedback from waze PR
* final fixes and update tests
* call update in lambda
* Update homeassistant/components/google_travel_time/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* additional fixes
* validate config entry data during config flow and config entry setup
* don't store entity
* patch dependency instead of HA code
* fixes
* improve tests by moving all patching to fixtures
* use self.hass instead of setting self._hass
* invert if
* remove unnecessary else
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Simplify maxcube integration
Device objects returned by maxcube-api dependency are stable, so
we do not need to resolve from the device address every time.
Also, refactor and unify how maxcube integration sets temperature & mode.
* Add tests for maxcube component
* Use homeassistant.util.utcnow to retrieve current time
* Revert "Simplify maxcube integration"
This reverts commit 84d231d5bd.
* Make test pass again after rolling back integration changes
* Add tests for Netatmo data handler
* Clean up coveragerc
* Move block to fixture
* Minor update
* Remove tests of implementation details for data handler
* Update homeassistant/components/netatmo/data_handler.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/netatmo/data_handler.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Import callback
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add tests for Netatmo sensor
* Fix coveragerc
* Remove freezegun dependency
* Use f-strings instead of string concatenation
* Update tests/components/netatmo/test_sensor.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Address comment on config options test
* Replace deprecated call to async_get_registry()
* Fix public weather sensor update test
* Clean up
* Prevent division by zero
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* ScreenLogic cleanup.
Bump screenlogicpy to 0.2.0.
Move heating functions from water_heater to climate platform.
Address notes from original PR.
* Fix temperature attribute
* Addressing notes.
Bump screenlogicpy to 0.2.1.
Made device_types constants.
Made (known) equipment flags constants.
Used dict.get() in places where None is the default.
Return fast with good _last_preset.
* Update homeassistant/components/screenlogic/climate.py
Let base entity handle state property.
Co-authored-by: J. Nick Koston <nick@koston.org>
* Patch integration setup functions.
* Exception, ATTR_TEMPERATURE notes
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add tests for Netatmo light
* Improve docstring
* Register the camera data class for the light platform
* Remove freezegun dependency
* Update tests
* Update tests/components/netatmo/test_light.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Deduplicate webhook test data
* Mock pytest to verify it is called
* Don't test internals
* Rename
* Assert light still on with erroneous event data
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add init test to Freebox
* Review : more readable conftest
* Expect 2 blank lines between defs
* Review : Not I/O in the event loop
* Fix test_setup test
* remove useless const
* Review : mock setup methods
* Add service test
* Add import test
* add addon_update service, use config flow to set up config entry, create disabled sensors
* move most of entity logic to common entity class, improve device info, get rid of config_flow user step
* fix setup logic
* additional refactor
* fix refactored logic
* fix config flow tests
* add test for addon_update service and get_addons_info
* add entry setup and unload test and fix update coordinator
* handle if entry setup calls unload
* return nothing for coordinator if entry is being reloaded because coordinator will get recreated anyway
* remove entry when HA instance is no longer hassio and add corresponding test
* handle adding and removing device registry entries
* better config entry reload logic
* fix comment
* bugfix
* fix flake error
* switch pass to return
* use repository attribute for model and fallback to url
* use custom 'system' source since hassio source is misleading
* Update homeassistant/components/hassio/entity.py
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* update remove addons function name
* Update homeassistant/components/hassio/__init__.py
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* fix import
* pop coordinator after unload
* additional fixes
* always pass in sensor name when creating entity
* prefix one more function with async and fix tests
* use supervisor info for addons since list is already filtered on what's installed
* remove unused service
* update sensor names
* remove added handler function
* use walrus
* add OS device and sensors
* fix
* re-add addon_update service schema
* add more test coverage and exclude entities from tests
* check if instance is using hass OS in order to create OS entities
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Add test for invalid usercode
* Add usercodes to totalconnect.
* Update existing tests for usercodes
* Fix tests
* Add test for invalid usercode
* Add usercodes to totalconnect.
* Update existing tests for usercodes
* Fix tests
* Remove YAML support
* Fix conflict
* Bump to total_connect_client 0.56
* Change Exception to HomeAssistantError
* Fix config_flow.py
* Simplify async_setup since no yaml
* Remove import from config flow and tests
* Add reauth and test for it. Various other fixes.
* Fix pylint in __init__
* Show config yaml as deprecated
* separate config_flow and init tests
* Assert ENTRY_STATE_SETUP_ERROR in init test
* Add test for reauth flow
* Fix reauth and tests
* Fix strings
* Restore username and usercode with new passord
* Correct the integration name
* Update tests/components/totalconnect/test_config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/totalconnect/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update .coveragerc
* Add test for invalid auth during reauth
* Bump total-connect-client to 0.57
* Fix .coveragerc
* More tests for usercodes
* Fix usercode test
* Reload config entry on reauth
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add config flow to philips_js
* Adjust name of entry to contain serial
* Use device id in event rather than entity id
* Adjust turn on text
* Deprecate all fields
* Be somewhat more explicit in typing
* Switch to direct coordinator access
* Refactor the pluggable action
* Adjust tests a bit
* Minor adjustment
* More adjustments
* Add missing await in update coordinator
* Be more lenient to lack of system info
* Use constant for trigger type and simplify
* Apply suggestions from code review
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Removed pylint disable on unused after updating CI files that were out of date.
* Pylint still fails due to bug on DOMAIN import. Added disable check.
* Addressed PR comments
* Added import for ClientError to test_config_flow.py
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* 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 first two testcases
* Remove repetition
* Add first two testcases
* Remove repetition
* Add connection error test case
* add test_setup_entry_credentials_valid
* First attempt to use fixtures
* Use markers
* Optimize patch
* Optimize marker use
* Always patch mydevolo
* Add first two testcases
* Remove repetition
* Add first two testcases
* Remove repetition
* Add connection error test case
* add test_setup_entry_credentials_valid
* First attempt to use fixtures
* Use markers
* Optimize patch
* Optimize marker use
* Always patch mydevolo
* Add unload entry test case
* Catch up with reality
* Use unittest patch
* Use core interface to start tests
* Use entry state
* Consistently assert entry state
* Patch class instead of init
Co-authored-by: Markus Bong <2Fake1987@gmail.com>
* Add entry setup and unload test
* Test home assistant stop
* Test on connect and on disconnect
* Test client connect timeout
* Test ready node added
* Test non ready node added
* Test existing node not ready
* Test device registry state
* Add common test tools module
* Add existing ready node test
* Include init module in coverage calculation
* Clean docstrings
* 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
* Add Config Flow to bmw_connected_drive
* Fix checks for bmw_connected_drive
* Adjust code as requested
* Clean .coveragerc after merge
* Use references for config flow
* Fix execute_service check against allowed accounts
* Adjust translation as username can be email or phone no
* Add BMWConnectedDriveBaseEntity mixin, remove unnecessary type casts
* Use BaseEntity correctly, fix pylint error
* Bump bimmer_connected to 0.7.13
* Adjustments for review
* Fix pylint
* Fix loading notify, move vin to entity attrs
* Remove vin from device registry
* Remove commented-out code
* Show tracker warning only if vehicle (currently) doesn't support location
* Remove unnecessary return values & other small adjustments
* Move original hass_config to own domain in hass.data
* Move entries to separate dict in hass.data
* Remove invalid_auth exception handling & test as it cannot happen
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
* Move Legacy Works With Nest integration to subdirectory
Motivation is to streamline the actively developed integration e.g. make code coverage easier to reason about and simplify __init__.py
* Add tests for the wemo component.
* Prefer mock tools from tests.async_mock over importing asynctest directly
* Avoid using `entity/entities` except when referring to an `Entity` instance in wemo tests
* Remove the overridden event_loop fixture from the wemo tests
* Patch the library code, not the integration code, in the wemo tests
* Add browse media support to squeezebox integration
* Move browse media logic to browse_media.py
* Fix missing command when loading single url
* Update .coveragerc
* Handle empty library gracefully
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Implement suggestions from code review
* Additional suggestion from code review
* Use MEDIA_CLASS_GENRE
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* 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 websocket commands to retrieve and set config parameters for a node
* move set_config_parameter into generic function and refactor service and WS API
* add payload to return to make service call behave the same way it did before
* create response class
* update error message to pass tests
* move things a bit to reduce LOC
* add tests
* handle logging errors better and make new response class more generic to prepare for lock user code work
* remove unused function parameter
* invert check
* add additional error checking
* refactor a bit to remove repeat code
* revert log msg change
* one more refactor to create generic get_config_parameters function
* change if logic for consistency
* fix test
* add support to provide bool value in set_config_parameter service call
* standardize parameter names on service call
* add test coverage
* fix tests and message sending
* remove unnecessary logging import
* fix one test to get missing coverage
* update per martin and kpines reviews
* remove false assertion
* string line length
* add support for Decimal config param, remove node instance ID as input, and move helper functions to node.py
* cast Decimal appropriately
* revert change to support Decimal for config params since they are not supported as a config param type
* revert to using error arguments to make next PR for WS lock commands easier
* switch to class method and add guard for list Value not being a number
* update logic to use new openzwavemqtt util methods
* add support for bitsets
* use parent exception class
* bump openzwavemqtt version, remove node.py from .coveragerc and put file references in the right place
* add comment
* improve config validation
* remove bitset support from config validation
* re-add bitset support with some additional tests
* move send_result out of try block
* Use camera name as device name
* Add Surveillance Station home mode switch for Synology DSM
- camera uses Surveillance Station as device parent
- camera uses camera name instead of NAS name + camera name
* Without device_class otherwise no icon
* Update .coveragerc
* 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>
* 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>
* Move options import to async_setup_entry
* Add tests for insteon init
* Move common constants to const
* Clean up to adhear to standards
* Create mock insteon device manager
* Update for HA standards
* Use keys and align to config_flow steps
* Fix default port for hub v1
* Update doc string to represent function
* Remove dump print commands
* Add modem_type entry
* Simplify dict key test
* Setup platforms in async_setup_entry
* Black
* Black tests
* 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.
* Add basic light platform
* Add sensor support
* Bump aioshelly to 0.2.1
* Lint
* Use UNIT_PERCENTAGE
Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
* Format sensor.py
Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>