blockchain.info sensor#7856
Merged
Merged
Conversation
|
@nkgilley, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob, @fabaff and @robbiet480 to be potential reviewers. |
fabaff
requested changes
Jun 2, 2017
| import homeassistant.helpers.config_validation as cv | ||
| import voluptuous as vol | ||
|
|
||
| REQUIREMENTS = ['python-blockchain-api==0.0.1'] |
Member
There was a problem hiding this comment.
The bitcoin sensor is using the blockchain module. Perhaps it's worth to re-use that to avoid two deps while using both sensors.
Contributor
Author
There was a problem hiding this comment.
I could use it, but it was missing the method I was looking for: https://github.com/blockchain/api-v1-client-python/issues/51
|
|
||
|
|
||
| def setup_platform(hass, config, add_devices, discovery_info=None): | ||
| """Set up the etherscan sensors.""" |
|
|
||
|
|
||
| class BlockchainSensor(Entity): | ||
| """Representation of an Etherscan.io sensor.""" |
| def setup_platform(hass, config, add_devices, discovery_info=None): | ||
| """Set up the etherscan sensors.""" | ||
| add_devices([BlockchainSensor('Bitcoin Balance', | ||
| config.get(CONF_ADDRESSES))]) |
Member
There was a problem hiding this comment.
It could be that the addresses are not valid.
Member
|
Thanks! 🐬 |
Merged
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Sensor to monitor a list of bitcoin wallet addresses via blockchain.info. This sensor will return the total balance of all of the listed wallet addresses.
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2734
Example entry for
configuration.yaml(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
toxrun successfully. Your PR cannot be merged unless tests passREQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.