Commit graph

2054 commits

Author SHA1 Message Date
cgtobi
47183ce02e Temporarily fix yahoo weather API issue and add unit test. ()
* Temporarily fix yahoo weather API issue and add unit test.

* Add test data.
2017-11-23 12:45:56 -08:00
Rendili
f2dea4615f New Hive Component / Platforms ()
* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms

* Changes

* Changes

* Changes

* changes

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Sensor code updates

* Sensor code updates

* Move sensors to binary sensors

* Quack

* Updates - Removed climate related sensors

* sensor fix

* binary_sensor updates

* New Hive Component / Platforms

* New Hive Component / Platforms

* New Hive Component / Platforms
2017-11-23 13:10:23 +01:00
Lewis Juggins
cfb1853bbd
Update pytradfri to 4.1.0 () 2017-11-22 09:37:20 +00:00
Sven-Hendrik Haase
b784d80973 Add transmission rate ()
* Add transmission rate

* Rename transmission rate attributes to shorter names
2017-11-22 08:39:45 +01:00
bigwoof
5dbd554a10 Adding Queue count sensor ()
Adding another sensor to output the numeber of items in the SABnabd queue.  This is an alternative to displaying filesize, just a preference thing, as it is more meaningfull for me the way I use SABnzdb. 

Note this is my first time coding on github and I have no idea if I am doing things right, I assume that all I needed to do is add a couple of lines to the sensors available and also another line as to what to extract from the SABnzdb API, in this case I have called the sensor "queue_count" and it gets the value from the noofslots_total which as I understand - each slot is a separate download item. 

hope I did this correctly - also I don't have a separate instance of home assistant running for testing so I have no way to test this code (and I don't know how I would switch to the dev channel either).  As I said I am a newb!
2017-11-21 15:35:23 +01:00
Thibault Cohen
df37cb11fa Handle the new version of HydroQuebec website ()
* Handle the new version of HydroQuebec website

* Update requirements_all.txt
2017-11-20 18:02:05 +01:00
Markus Nigbur
a83e741dc7 Refactored to new global json saving and loading ()
* Refactored to new global json saving and loading

* Fixed emulated_hue tests

* Removed unnecassary error handling

* Added missing newline

* Remove unused imports

* Fixed linting error

* Moved _load_json wrapper out of the config class
2017-11-19 19:47:55 -08:00
Egor Tsinko
7695ca2c8b Fix for time_date sensor ()
* fix to time_date sensor

* cleaned up the code and added unit tests

* fixed lint errors
2017-11-19 19:41:30 -08:00
Philip Kleimeyer
b548116f9b Tahoma platform for Somfy Covers and Sensors ()
Tahoma platform for Somfy Covers and Sensors
2017-11-19 21:35:13 +01:00
Aaron Bach
3ad64b0a66 Fixes AirVisual bug regarding incorrect location data ()
* Fixes AirVisual bug regarding incorrect location data

* Owner-requested changes
2017-11-17 21:11:05 +01:00
cgtobi
be5f0fb3ac Add hddtemp sensor device even if unreachable. ()
* Add hddtemp sensor device even if unreachable.

* Removed old commented code.

* Move unit detection logic into update.
2017-11-17 09:21:27 -05:00
Alok Saboo
2a77883146 Added unit_of_measurement to Currencylayer ()
* Added unit_of_measurement to Currencylayer

* Updated based on comments

* Remove quote from name
2017-11-17 08:58:46 +01:00
Milan V
eb7643e163 Improve WUnderground config validation ()
* Fix WUnderground config validation

* Fix indentation
2017-11-16 10:26:23 -05:00
Fabrizio Furnari
b2ab4443a7 New sensor viaggiatreno. ()
* New sensor viaggiatreno.

I've messed up the previous PR so here it is in a new one.
Should include also all corrections from @pvizeli

* fixes from PR 10522

* fixed import order

* requested changes from MartinHjelmare
2017-11-15 22:07:16 -08:00
ziotibia81
d652d793f3 Fix ValueError exception ()
* Fix ValueError exception

structure = '>{:c}'.format(data_types[register.get(CONF_DATA_TYPE)][register.get(CONF_COUNT)])
give:
ValueError: Unknown format code 'c' for object of type 'str'

* Minor typo
2017-11-15 18:17:17 -05:00
Jeremy Williams
c2d0c8fba4 Arlo - Fixes for updated library ()
* Reduce update calls to API. Add signal strength monitor.

* Fix lint errors

* Fix indent

* Update pyarlo version and review fixes

* Fix lint errors

* Remove staticmethod

* Clean up attributes

* Update arlo.py
2017-11-15 23:33:50 +01:00
On Freund
c7b0f25eae Fix Yahoo Weather icons over SSL () 2017-11-15 22:27:26 +02:00
ziotibia81
e33451e2b9 Better support for int types ()
* Better int types support

* type

* Added optional register order

* Fix white spaces

* Fix line length

* Fix line too long

* Fix trailing whitespace

* Stylistc code fixes
2017-11-13 23:27:15 +01:00
Fabian Affolter
6974f2366d Upgrade pysnmp to 4.4.2 () 2017-11-13 09:24:07 -08:00
Diogo Gomes
bc23799c71 Change to device state attributes ()
* Following the suggestion of @MartinHjelmare
2017-11-12 15:25:44 +01:00
Hmmbob
f3a90d6994 Update nederlandse_spoorwegen.py to include platform information ()
* Update nederlandse_spoorwegen.py

Make departure and arrival platforms available as state attributes

* Update nederlandse_spoorwegen.py

* Update nederlandse_spoorwegen.py
2017-11-11 11:51:26 -08:00
Diogo Gomes
9bfdff0be1 add JSON processing capabilities to sensor_serial ()
* add JSON processing capabilities

* format fixes

* format fixes

* Fix according to @fabaff comment

* reverting last commit to a more sane approach

* docstring...

* still docstring...

* passed script/lint

* downgrade exception

JSONDecodeError was only introduced in Python3.5

Since we are still supporting 3.4 ValueError is the parent class of
JSONDecodeError
2017-11-10 10:49:30 +01:00
Fabian Affolter
8878eccb7b Upgrade psutil to 5.4.1 () 2017-11-09 20:17:31 +01:00
Marcelo Moreira de Mello
2118ab2503 Fixed update() method and removed ding feature from stickupcams/floodlight ()
* Simplified URL expiration calculation and fixed refresh method

* Remove support from Ring from StickupCams or floodlight cameras

* Makes lint happy

* Removed unecessary attributes
2017-11-09 01:01:20 +01:00
Daniel Høyer Iversen
e49278cc7d
update tibber library () 2017-11-08 11:18:35 +01:00
Diogo Gomes
a5aa111893 Add baudrate option to Serial sensor ()
* Add baudrate option

Baudrate is essential!

* line too long

line too long (82 > 79 characters)

* trailing whitespace

* Rename const

* Fix the missing one
2017-11-07 22:06:19 +01:00
Robin
119fb08198 Fixes issue ()
Fixes an error reported resulting from Hammersmith no longer supplying
data.
2017-11-07 18:19:54 +01:00
Adam Cooper
72ce9ec321 Add platform and sensors for Vultr VPS ()
* 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
2017-11-05 14:10:14 +01:00
Fabian Affolter
de9d19d6f4 Use constants for HTTP headers ()
* Use constants for HTTP headers

* Fix ordering

* Move 'no-cache' to platform
2017-11-04 12:04:05 -07:00
Hugo Dupras
1347c3191f Refactor Neato botvac components as a vacuum ()
* Refactor Neato botvac components as a vacuum

A switch is still use to enable/disable the schedule

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* CI Hound fixes

* Fix lint errors

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* [Neato vacumm] Add sensor attributes to vacuum

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Remove line breaks and fix docstring

* PR fixes
2017-11-03 14:25:26 +01:00
Heiko Thiery
23809bff64 Add LaCrosse sensor platform ()
* Initial commit of LaCrosse sensor component

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* fix review comments from houndci-bot

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* fix review comments from houndci-bot

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* add pylacrosse version to REQUIREMENTS

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* add lacrosse to .coveragerc

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* import 3rd party libraries inside methods

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* add pylacrosse to requirements_all.txt

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* add missing docstring

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* fix pylint warning

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* fix pylint warning

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* fix pylint warnings

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* remove too many blank lines

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* some minor cleanup

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* change to single quote

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* incorporate review comments

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* remove type check as validation only allows TYPES

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

* Adjust log level and update ordering
2017-11-03 08:59:11 +01:00
Markus
4d19092722 pyLoad download sensor ()
* Create pyload.py

* tabs and whitespaces removed

* code style fix

* code style fixes

* code style fix

* fixed standard import order

* classname fixed

* Added homeassistant/components/sensor/pyload.py

* code formatting

* implemented @fabaff recommendations

* Update pyload.py

* Use string formatting

* Make host optional
2017-11-02 22:17:44 +01:00
lichtteil
d74dbc35f2 Luftdaten sensor ()
* Add sensor platform for luftdaten.info

* Add monitored conditions to platform schema

* Make monitored conditions config obligatory

* Improve inline documentation

* Import first standard libs then 3rd party libs

* Combine resource url using format

* Remove unnecessary try..except block

* Use state “None” instead of STATE_UNKNOWN

* Minor changes incl. removal of unused vars

* Add missing spaces
2017-11-02 10:32:06 +01:00
Fabian Affolter
6d94c121a7
Move constant to 'const.py' () 2017-10-31 13:31:12 +01:00
Greg. A
8832de80bc Sytadin default value must be a list ()
* Sytadin default value must be a list 

* Sytadin default value must be a list  v2
2017-10-31 08:32:26 +01:00
Aaron Bach
646c03eea1 Add entity_picture_template options to Template Cover, Template Light, Template Sensor, and Template Switch ()
* Re-adding cover

* Re-adding light

* Re-adding sensor

* Re-adding switch

* Re-added tests

* Fixing missing imports in rebased test

* Fixing broken tests

* Owner-requested changes

* Owner-requested changes

* Fixed exception
2017-10-30 09:28:37 -07:00
Fabian Affolter
690760404b
Move constant to 'const.py' and use already defined ones () 2017-10-29 17:28:07 +01:00
Fabian Affolter
115c59d88c Move constant to 'const.py' and use already definied ones () 2017-10-29 12:32:02 +01:00
Fabian Affolter
97bb252d23
Upgrade pylast to 2.0.0 () 2017-10-29 11:54:11 +01:00
cgtobi
20a1a52bd5 Add unit test for hddtemp sensor. ()
* Add unit test for hddtemp sensor.

* Remove sample fixture and include it in the code.

* Add test to raise coverage.

* Fix bug when host is not reachable.

* Minor code cleanups.

* More code cleanups.
2017-10-29 11:53:53 +01:00
Greg. A
b3e88d1f8f Add Sytadin Traffic component ()
* Add Sytadin Traffic component

* Add Sytadin Traffic component, update

* Add Sytadin Traffic component, update

* Add Sytadin Traffic component, update

* Add Sytadin Traffic component, update

* Add Sytadin Traffic component, update

* implements @fabaff comments

* Formatting

* formatting

* formatting

* split monitored condition to be independent

* formatting

* add version

* fix requirements part based on gen_requirements_all.py result

* formatting

* requirements stuff file

* formatting

* add missing file into .coveragerc

* add me for code review

* configuration management updated

* implements @fabaff and @pvizeli comments

* indentation

* indentation

* indentation

* indentation

* add const DEFAULT_UPDATE_INTERVAL

* use const DEFAULT_UPDATE_INTERVAL

* remove blank line

* fixes debug call

* clean for loop

* use BeautifulSoup for html parsing

* Update requirements

* Add throttle and fix remaining issues

* Don't add const
2017-10-29 01:34:55 +02:00
Menno Blom
5c168ab551 Nederlandse spoorwegen ()
* Add Nederlandse Spoorwegen sensor

* Remove unused 'delay' option.

* Apply requested code reviewed changes

- use constants from const.py
- ensure the configuration is a list
- verify credentials upon platform setup
- verify station input
- add True as second param to add_device
- only call add_device if at least 1 sensor was setup
2017-10-27 22:19:12 +02:00
Fabian Affolter
027ce2f555 Upgrade python_opendata_transport to 0.0.3 () 2017-10-27 08:01:12 +02:00
Richard Leurs
c2ef22bd08 Add display currency setting to CoinMarketCap sensor ()
* 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.
2017-10-26 18:49:17 +02:00
Fabian Affolter
b1291e572e Upgrade pysnmp to 4.4.1 () 2017-10-26 10:38:27 +02:00
Hydreliox
632466bb56 Add Deluge Sensor ()
Add a sensor to provide upload and download speed of the Deluge Bittorrent Client
2017-10-25 15:13:11 +02:00
Ryan McLean
41fa8cc8f2 Plex refactor Part 1 - Update plexapi to 3.0.3 ()
* Fix: Last Played Media Title in plex would stay even when player was idle/off
     Primary Fix is in the "if self._device" portion.
     code in "if self._session" is a catch all but i'm not 100% if it is needed.

* Fixed lint issues with previous commit

* 1st Pass at refactoring plex refresh
Moved _media** into clearMedia() which is called in _init_ and
at start of refresh.

Removed redunant _media_* = None entries

Grouped TV Show and Music under single if rather than testing
seperately for now.

* Fixed invalid name for _clearMedia()
Removed another media_* = None entry

* Removed print() statements used for debug

* Removed unneeded "if" statement

* Changes
* Updated Requests to 2.18.4
* Updated plexapi to 3.0.3
* Removed function to convert_NA_to_None
* Removed function get_thumb_url

Type changes
* _session.player is now a list players
* na_type deprecated and to be removed
* plexapi has change na to None

Known Issues:
* Player controls currently broken
* Last location (library) stays while player idle

* Username is now Usernames and a list

* Fix for broken controls

* Removed errant print statement

* Removed depecrated na_type

* Updated Plex Sensor to use plexapi 3.0.3
Added support for Token to be used in sensor

Known Issues:
Username and Password broken for Plex Sensor use Token instead for now

* removed TODOs

* Fixes for private access violations

* Removed need for _local_client_fix

* Removed unused import and fixed parens
2017-10-25 11:42:13 +02:00
Trevor
2a2a106e62 Fix Sonarr and Radarr divide by zero ()
* Fix Sonarr and Radarr divide by zero

* Fixes for hound

* Clean up Radarr diskspace
2017-10-25 11:37:08 +02:00
Anders Melchiorsen
45e140149b Allow folder selection for IMAP unread sensor () 2017-10-25 11:36:00 +02:00
Fabian Affolter
560a4ef5eb Fix PEP8 and PEP257 issues () 2017-10-24 18:36:08 +02:00