Have to admit it wasn’t very straightforward for me either. Here’s a breakdown of what goes where:
Files go in config/custom_components/EthermineInfo
sensor.py contains the main code, including fetching the data and assigning the data to various attribute you end up seeing in homeassistant.
manifest.json contains all the info about the project and it’s maintainers
const.py contains the config items we need to ask users to set in their configuration.yaml and also defines the attributes we want to assign to the sensor.
This article goes more in depth about the structure, but with that you should now know which files perform certain functions
This may be a silly question but is there a way to return data in more readable format? Might be just a task I haven’t needed to accomplish until now. For example, hashrate returns a pretty lengthy number that I’d prefer to translate to mH.
Did some digging and figured it out. As suspected it was just something I hadn’t done before. Found this link from another user that did most of the work I needed already. Thank you for the prompt reply!
The only instance I’ve been made aware of in which null values have been returned for everything was when no mining activity had ever taken place on the address configured.
Hey thanks for the component.One issue I have is that most of the values are way too big. Like for the Hashrate,I need to divide it by 1000000 to get the value in the usual format. Same goes for unpaid for amount.
Does it mean that I have to create a template sensor for all those attributes in order to display them nicely? Don’t you think it would be great to have the sensor attributes already in human readable format?
Thank you so far. Yes this helps already Only the Unpaid eth shows only 2 decimals which in my opinion is not enough. I think having around 5 decimals would be great there.
Hi Addon works great for me. But question, how can we edit the template to have information on specific rigs connected with one address. I see that the api sends information on i.e. hashrate for separate rig.