* Add here_travel_time
* Bump herepy version to 0.6.2
* Update requirements_all.txt
* Disable pylint and catch errors
* Add herepy to requirements_test_all
* Correctly place test req for herepy
* use homeassistant.const.LENGTH_METERS
* Implemented Requested Changes
* Better error message for cryptic error code
* add requested changes
* add_entities instead of async
* Add route attr and distance in km instead of m
* fix linting errors
* attribute duration in minutes instead of seconds
* Correct pattern for longitude
* dont split attribute but rather local var
* move strings to const and use travelTime
* Add tests
* Add route for pedestrian and public
* fix public transport route generation
* remove print statement
* Standalone pytest
* Use hass fixture and increase test cov
_resolve_zone is redundant
* Clean up redundant code
* Add type annotations
* Readd _resolve_zone and add a test for it
* Full test cov
* use caplog
* Add origin/destination attributes
According to https://github.com/home-assistant/home-assistant/pull/24956
* Add mode: bicycle
* black
* Add mode: publicTransportTimeTable
* Fix error for publicTransportTimeTable
Switch route_mode and travel_mode in api request.
* split up config options
* More type hints
* implement *_entity_id
* align attributes with google_travel_time
* route in lib
apply requested changes
* Update requirements_all.txt
* remove DATA_KEY
* Use ATTR_MODE
* add attribution
* Only add attribution if not none
* Add debug log for raw response
* Add _build_hass_attribution
* clearer var names in credentials check
* async _are_valid_client_credentials
* adding feature obtaining Moscow transport data from maps.yandex.ru api
* extracting the YandexMapsRequester to pypi
* fix code review comments
* fix stop_name, state in datetime, logger formating
* fix comments
* add docstring to init
* rename, because it works not only Moscow, but many another big cities in Russia
* fix comments
* Try to solve relative view in sensor timestamp
* back to isoformat
* add tests, update external library version
* flake8 and black tests for sensor.py
* fix manifest.json
* update tests, migrate to pytest, async, Using MockDependency
* move json to tests/fixtures
* script/lint fixes
* fix comments
* removing check_filter function
* fix typo
* up version on manifest.json
* up version to 0.3.7 in requirements_all.txt
* adding feature obtaining Moscow transport data from maps.yandex.ru api
* extracting the YandexMapsRequester to pypi
* fix code review comments
* fix stop_name, state in datetime, logger formating
* fix comments
* add docstring to init
* rename, because it works not only Moscow, but many another big cities in Russia
* fix comments
* Try to solve relative view in sensor timestamp
* back to isoformat
* add tests, update external library version
* flake8 and black tests for sensor.py
* fix manifest.json
* update tests, migrate to pytest, async, Using MockDependency
* move json to tests/fixtures
* script/lint fixes
* fix comments
* removing check_filter function
* fix typo
* Add simple battery sensor
* Add test for battery sensor based on a real device
* Vary icon based on battery state
* Add test for battery sensory
* Read other battery related states from accessory
* Add a device class to the battery sensor
* Respect the low battery flag from the device
* Add nws weather.
* Hassfest
* Address multiple comments
* Add NWS icon weather code link
* Add metar fallback.
Use metar code from nws observation if normal api is missing data.
* only get 1 observation - we dont use more than 1
* add mocked metar for tests
* lint
* mock metar package for all tests
* add check for metar attributes
* catch errors in setup
* add timeout error
* handle request exceptions
* check and test for missing observations
* refactor to new pynws
* change to simpler api
* Make py3.5 compatible
Remove f string
* bump pynws version
* gen_requirements
* fix wind bearing observation
* Revert "Make py3.5 compatible"
This reverts commit 4946d91779.
* Precommit black missed a file?
* black test
* add exceptional weather condition
* bump pynws version
* update requirements_all
* address comments
* move observation and forecast outside try-except-else
* Revert "move observation and forecast outside try-except-else"
This reverts commit 53b78b3283.
* remove else from update forecast block
* remove unneeded ConfigEntryNotReady import
* add scan_interval, reduce min_time_between_updates
* pytest tests
* lint test docstring
* use async await
* lat and lon inclusive in config
* Add in a switch platform to ring.
* Changes following code review
* remove tests for now
* remove the request to call update
* support the new type of test
* update after running black
* fix comment
* fixes following code review
* Remove ring cache file
* patch out io code
* Move the patches to within a fixture
* missing period
* Add in a switch to control lights and sirens
* Improve the way sensors are updated
* fixes following flake8
* remove light platform, and fix breaking test.
* Resolve issues with tests
* add tests for the switch platform
* fix up flake8 errors
* fix the long strings
* fix naming on private method.
* updates following p/r
* further fixes following pr
* removed import
* add additional tests to improve code coverage
* forgot to check this in
* Add severe weather alert sensor to Dark Sky
* fixup test case
* address review comments and fixup testcases
* address comments, fix assertion order
* remove extra line
* remove index increment
* Update sleepyq to 0.7
Fixes crash when working with a single sleeper.
* sleepiq: Handle null side definitions
These happen if no sleeper is defined for a side of the bed. Don't
create sensors for null sides; they'll crash every time we try to use
them.
* sleepiq: Fix urls mocked to match sleepyq 0.7
* sleepi: Fix test_sensor.TestSleepIQSensorSetup
Sleepyq 0.7 throws on empty strings, so we have to specify them.
* sleepiq: Test for ValueError thrown by sleepyq 0.7
* sleepiq: Drop no longer used HTTPError import
* sleepiq: Add tests for single sleeper case
* sleepiq: Shorten comments to not overflow line length
* sleepiq: Use formatted string literals for adding suffixes to test files
* sleepiq: Use str.format() for test suffixing
* The Great Migration
* removed outdated tests
* Upgraded enturclient to v0.2.0
- client has gone async
- configurable if non boarding departures should be omitted from result
- configurable how many departures should be shown
- more clear which attributes are included and when
* reduced nesting and clearing of attributes
* Removed test data
* ensure attribution and stop id in attributes
* docstring fixes
* fix rebase errors
went a bit too fast on continue on one of the conflicts..
* fix test requirements comment from gen
* Moving existing sensor file
* Initial functionality in place
* Added test for config flow
* Updated coverage and CODEOWNERS
* Linting
* Linting
* Member comments
* Hound
* Moving socket disconnect on HASS stop
* Member comments
* Removed unnecessary dispatcher call
* Config entry fix
* Added support in config flow for good accounts with no devices
* Hound
* Updated comment
* Member comments
* Stale docstrings
* Stale docstring
* Added Entur departure information sensor.
* Fixed houndci-bot comments.
* Removed tailing whitespace.
* Fixed some comments from tox lint.
* Improved docstring, i think.
* Fix for C1801
* Unit test for entur platform setup
* Rewritten entur component to have pypi dependecy.
* Propper client id for api usage.
* Minor cleanup of usage of constants.
* Made location output configurable.
* Cleaned up usage of constants.
* Moved logic to be contained within setup or update methods.
* Moved icon consts to root in module.
* Using config directly in test
* Minor changes
* Awair Sensor Platform
This commit adds a sensor platform for Awair devices, by accessing
their beta API. Awair heavily rate-limits this API, so we throttle
updates based on the number of devices found. We also allow for the
user to bypass API device listing entirely, because the device list
endpoint is limited to only 6 calls per day. A crashing or restarting
server would quickly hit that limit.
This sensor platform uses the python_awair library (also written
as part of this PR), which is available for async usage.
* Disable pylint warning for broad try/catch
It's true that this is generally not a great idea, but we really don't
want to crash here. If we can't set up the platform, logging it and
continuing is the right answer.
* Add space to satisfy the linter
* Awair platform PR feedback
- Bump python_awair to 0.0.2, which has support for more granular exceptions
- Ensure we have python_awair available in test
- Raise PlatformNotReady if we can't set up Awair
- Make the 'Awair score' its own sensor, rather than exposing it other ways
- Set the platform up as polling, and set a sensible default
- Pass in throttling parameters to the underlying data class, rather
than use hacky global variable access to dynamically set the interval
- Switch to dict access for required variables
- Use pytest coroutines, set up components via async_setup_component,
and test/modify/assert in generally better ways
- Commit test data as fixtures
* Awair PR feedback, volume 2
- Don't force updates in test, instead modify time itself and let
homeassistant update things "normally".
- Remove unneeded polling attribute
- Rename timestamp attribute to 'last_api_update', to better reflect
that it is the timestamp of the last time the Awair API servers
received data from this device.
- Use that attribute to flag the component as unavailable when data
is stale. My own Awair device periodically goes offline and it really
hardly indicates that at all.
- Dynamically set fixture timestamps to the test run utcnow() value,
so that we don't have to worry about ancient timestamps in tests
blowing up down the line.
- Don't assert on entities directly, for the most part. Find desired
attributes in ... the attributes dict.
* Patch an instance of utcnow I overlooked
* Switch to using a context manager for timestream modification
Honestly, it's just a lot easier to keep track of patches. Moreover,
the ones I seem to have missed are now caught, and tests seem to
consistently pass.
Also, switch test_throttle_async_update to manipulating time more
explicitly.
* Missing blank line, thank you hound
* Fix pydocstyle error
I very much need to set up a script to do this quickly w/o tox, because
running flake8 is not enough!
* PR feedback
* PR feedback
* SMHI Component
* Clean up typos
* Fixed default values first config to home location (tests will follow)
* Fixed tests and removed unused function
* Minor fixup after comments from @kane610
* add support for precipitation in forecast
* Removed old async_step_init not needed.
* moved regular updates definition to own method to be able to override behaviour in subclass
* moved filter by max entries to own method to be able to override behaviour in subclass
* event type used when firing events to the bus now based on variable to be able to override behaviour in subclass
* feed id introduced instead of url for storing meta-data about the feed to be able to fetch the same feed from different configs with different filtering rules applied
* keep the status of the last update; continue processing the entries retrieved even if a recoverable error was detected while fetching the feed
* added test cases for feedreader component
* better explanation around breaking change
* fixing lint issues and hound violations
* fixing lint issue
* using assert_called_once_with instead of assert_called_once to make it compatible with python 3.5
* Added Foobot device sensor
* Added error handling tests
* Corrections after PR review.
* Migrated to async/await syntax
* lint fixes
* stop raising HomeAssistantError
* debug log for number of requests
* Moved shared data between sensors from a class attribute to a separate class
* Made test more async-aware
disabled setup error test for now as it's not working
* Working failure scenarios tests
* 🐎 Async WUnderground
* ∞ Them lines be too long
* Fix pylint warnings
* Changes according to comments
* Remove STATE_UNKNOWN
* 🔬 Fix tests
* Improve tests
* Initial commit of Vultr components
Have a working Vultr hub and binary sensor which pulls down the
following attributes of your VPS:
- Date created
- Subscription id (server id)
- Cost per month (in US$)
- Operating System installed
- IPv4 address
- label (human readable name)
- region
- number of vcpus
- which storage package chosen
- IPV6 address (if applicable)
- RAM amount
Working next on sensor and then testing / coverage.
* Added Vultr sensor for pending charges and current bandwidth. Refactored binary_sensor and hub too
* Corrected is_on bases
* Added basic tests for Vultr binary & platform
* Updated require files
* Changing test fixture to highlight different cases
* Written basic test for sensor.vultr
* Resolved linting errors and broken test
* Increase test coverage and corrected docs
* Resolved hound issues
* Revert back negative binary test
* Another hound resolve
* Refactoring and adding is switch, moving over to vultr branch
* Made Vultr components more resiliant to invalid configs
* Added negetive test for vultr binary sensor
* Added better testing of vultr sensor
* Resolved vultr platform test affecting subsequent vultr tests
* Moving VULTR components to single use design
* Added in sensor name config
* Added missing sensors var
* Resolved init data setting of sensors, added in name conf to switch
* Made the Vultr component more resiliant to startup failure with better alerting
* Various Vultr component changes
- Refactored sensor, binary_sensor, and switch to reference one subscription
- Renamed CURRENT_BANDWIDTH_GB monitored condition to CURRENT_BANDWIDTH_USED
- Improved test coverage
* Resolved local tox linting issue
* Added more testing for Vultr switch
* Improved test coverage for Vultr components
* Made PR comment changes to vultr binary sensor
* Made PR comment changes to Vultr sensor
* resolved PR comments for Vultr Switch
* Resolved vultr sensor name and improved tests
* Improved Vultr switch testing (default name formatting)
* Removed vultr hub failure checking
* Add support for different display currencies in CoinMarkerCap sensor.
* Add test for CoinMarketCap sensor.
* Add test dependency to gen_requirements_all.
* Fix review comments: use string formatting and less string case chanes.
* Extended Ring DoorBell to support camera playback and wifi sensors
* Bump python-ringdoorbell to version 0.1.6
* Support to camera playback via ffmpeg
* Extended ringdoorbell sensors to report WiFi attributes
* Extended unittests
* Makes lint happy
* Added support to stickup cameras and fixed logic
* Fixed unittests for stickup cameras
* Makes lint happy
* Refactored attributions and removed extra refresh method.
* new geo rss events sensor
* SCAN_INTERVAL instead of DEFAULT_SCAN_INTERVAL
* removed redefinition CONF_SCAN_INTERVAL
* definition of self._name not required
* removed unnecessary check and unnecessary parameter
* changed log levels
* fixed default name not used
* streamlined sensor name and entity id generation, removed unnecessary parameter
* fixed issue for entries without geometry data
* fixed tests after code changes
* simplified code
* simplified code; removed unnecessary imports
* fixed invalid variable name
* shorter sensor name and in turn entity id
* increasing test coverage for previously untested code
* fixed indentation and variable usage
* simplified test code
* merged two similar tests
* fixed an issue if no data could be fetched from external service; added test case for this case
* Add tube_state
Add tube_state sensor
* Final cleanup
* Make corrections
Correct PLATFORM_SCHEMA
* Fix space
* Make test pass
* Correct format of test
Test still failing, don’t understand why
* correct description
* Make test pass
Preferred method below returns None
state = self.hass.states.get('sensor.london_overground')
* Format for hound
* indent
* Make requested changes to test, not working
Test fails with:
AssertionError: assert 0 > 0
where 0 = len([])
Surely I need tube_state.setup_platform ?
* Fixed test
Config was wrong
* Change component name to london_tube
* Update name to london_underground
Make consistent
* cleanup
* Open Hardware Monitor sensor
Platform which is able to connect to the JSON API of Open Hardware Monitor and adds sensors for the devices.
* Remove copyright in header, not needed.
* - Removed old code
- Fixed typo’s in comments
- Removed log spamming
- Removed code that was unnecessary
- Use requests instead of urllib
- Moved sensor update functionality to data handler, to remove unwanted constructor parameters
* Fixed typo in comment
Added tests
* Added default fixture, to stabilize tests
* - Fix for values deeper than 4 levels, no longer relies on fixed level
- Fixed tests
* Removed timer in preference of helper methods
* Moved update functionality back to Entity….
Updated SCAN INTERVAL
* Added timeout to request
Removed retry when Open Hardware Monitor API is not reachable
Fixed naming of sensors
Flow optimalisations
Fixed tests to use states
* Remove unused import
* - Introduced Ring binary_sensor.
- Added unittest for Ring binary_sensor.
- Bumped ring_doorbell 3rd party module.
* Updated requirements
* Added correct file for unittest
* - Introduced Ring binary_sensor.
- Added unittest for Ring binary_sensor.
- Bumped ring_doorbell 3rd party module.
* Updated requirements
* Added correct file for unittest
* Added extra sensors last_ding and last_motion
* Modified Ring binary_sensor and sensor to inherit DOMAIN configuration
* Moved static to top ring.py
* Fixed requirements
* Bump version ring_doorbell to 0.1.2
* testing unittests
* Use hass.data dict instead GLOBALS
* Fixed unittests
* Bump ring_doorbell to 0.1.3
* Updated unittest and coverted to use decorator @requests_mock.Mocker()
* Updated ring_session with lower case
* Added support for multiple efergy sensors in the same household.
Also added inital tests for the efergy platform.
* Fixed current_values units.
Changed name to include efergy_ prefix.