-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converted market times sensor to ISO Date Time format & added AUD Cur…
…rency (#130) * Update const.py Added - 'aud' to CURRENCY_CODES Added New Constants - ATTR_REGULAR_MARKET_TIME - ATTR_POST_MARKET_TIME - DATA_REGULAR_MARKET_TIME - DATA_POST_MARKET_TIME * epoch to datetime conversion for market times Added Code to convert Regular & Post market times epoch values to ISO time formats * Add Extra Numeric Value tests Validate new datetime conversions * Update const.py Added new Constant * refactor Epoch timestamp conversions Refactored and renamed Epoch timestamp conversion * Update sensor.py - fixed return value Updated convert_timestamp_to_datetime to return date_timestamp value to support both None and 0 options. IF 0 was allowed to continue on to Epoch conversion then it would return datetime for Epoch 0 which is 1970 * Update test_sensor.py - rewrote test for timestamp conversion rewrote test to use the convert_timestamp_to_datetime which replaced the dividend_date function. Added additional tests to valid the functionality and confirm it correctly returns 0 or None based on the input value.
- Loading branch information
Showing
3 changed files
with
63 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters