DavidMStraub / homeassistant-homeconnect

Custom component for Home Assistant to connect appliances supporting the Home Connect standard
MIT License
118 stars 29 forks source link

HACS Integration #31

Closed darootler closed 5 years ago

darootler commented 5 years ago

Hi!

This is not a issue, it's more an enhancement. Would it be possible to integrate your custom component into HACS?

As far i can see you only need to add a file called "hacs.json" to your repository with some content like this.

Regards Richard

DavidMStraub commented 5 years ago

Hi,

cool, I was not even aware of this. In principle, I would actually like to open a PR to get this into HA itself, but I didn't have time in the last couple of months. In the meantime, HACS looks like an interesting option.

darootler commented 5 years ago

If you need some testing please let me know, looks like the effort for getting your component into HACS isn't that much.

Regards Richard

ltjessem commented 5 years ago

I'd love to see it in HACS as well

DavidMStraub commented 5 years ago

I added the JSON file now, I think all the other requirements were already met.

Testing is welcome! I haven't installed HACS myself yet. However note that the changes I pushed today make the component only work with HA 0.102, which is only out as beta so far.

anthonyangel commented 5 years ago

Screenshot_20191119-224622

Your repo can be added to HACS without the hacs.json file - not sure if it's still needed as it's not in their integration docs. If you want to set a minimum required Home Assistant version that now goes into manifest.json

DavidMStraub commented 5 years ago

Cool, didn't know. I did add 0.102 to the manifest.json.

darootler commented 5 years ago

I am not able to find Home Connect via HACS:

image image

What i am doing wrong?

Regards Richard

anthonyangel commented 5 years ago

In settings you need to add https://github.com/DavidMStraub/homeassistant-homeconnect as a custom repo

DavidMStraub commented 5 years ago

Right, I'll submit it as a default repo once we know it works (e.g. #37).

darootler commented 5 years ago

Right, I'll submit it as a default repo once we know it works (e.g. #37).

I see.

It's working now with adding a custom repository.

Regards Richard

DavidMStraub commented 5 years ago

Which HACS version are you using? It's not working for me yet

darootler commented 5 years ago

Sorry, it's also not working for me. I can install it but i am receiving the following errors:

Component error: homeconnect - cannot import name 'CONF_CLIENT_ID' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

Setup failed for homeconnect: Unable to import component

I am using HACS 0.17.3.

Regards Richard

DavidMStraub commented 5 years ago

I suspect you are using HA 0.101 or earlier? The new updated integration only works with 0.102 or above (you can install homeassistant==0.102b2 with pip if you want to try the beta version).

darootler commented 5 years ago

I am using HA 0.101.3 on Hass.io, i think i have to wait until 0.102 is available.

Regards Richard

holnburger commented 5 years ago

Im running Home Assistant 0.102.0 and HCAS 0.17.4, all updated versions to the latest release. Adding the repository of homeconnect works fine but when i try to insall it, I get the error message: This repository version requires Home Assistant version 0.102.0

Edit: 0.102.0 was released this morning

darootler commented 5 years ago

Im running Home Assistant 0.102.0 and HCAS 0.17.4, all updated versions to the latest release. Adding the repository of homeconnect works fine but when i try to insall it, I get the error message: This repository version requires Home Assistant version 0.102.0

Edit: 0.102.0 was released this morning

Same here.

Regards Richard

holnburger commented 5 years ago

I just forked and and changed the dependent HA-version in the hcas.json, apperantly that's the only issue. Changed it to:

{ "name": "Home Connect", "domains": ["sensor", "binary_sensor", "switch"], "homeassistant": "0.102", "render_readme": true }

And it was working (instead of 0.102.0) - which is strange.

Edit: I created a pull request.

DavidMStraub commented 5 years ago

Thanks for the fix;

so is this actually working now for anyone with HA 0.102 and HA-HC 0.2.1?

For me the install silently fails and I don't know why, log:

Nov 21 22:00:25 hass hass[5469]: 2019-11-21 22:00:25 DEBUG (MainThread) [hacs.download.downloader] Donwloading https://raw.githubusercontent.com/DavidMStraub/homeassistant-homeconnect/v0.2.1/custom_components/homeconnect/.translations/en.json
Nov 21 22:00:25 hass hass[5469]: 2019-11-21 22:00:25 DEBUG (MainThread) [hacs.repository.integration.DavidMStraub.homeassistant-homeconnect] Downloading __init__.py
Nov 21 22:00:25 hass hass[5469]: 2019-11-21 22:00:25 DEBUG (MainThread) [hacs.download.downloader] Donwloading https://raw.githubusercontent.com/DavidMStraub/homeassistant-homeconnect/v0.2.1/custom_components/homeconnect/__init__.py
Nov 21 22:00:25 hass hass[5469]: 2019-11-21 22:00:25 ERROR (MainThread) [hacs.repository.integration.DavidMStraub.homeassistant-homeconnect] Download was not complete.
Nov 21 22:00:25 hass hass[5469]: 2019-11-21 22:00:25 ERROR (MainThread) [hacs.repository.integration.DavidMStraub.homeassistant-homeconnect] Download was not complete.
DavidMStraub commented 5 years ago

Stupid me, I didn't set 777 permissions on custom_components. So this issue can be closed no?

darootler commented 5 years ago

For me it's working now.

Thank you!

Regard Richard

anthonyangel commented 5 years ago

Working for me too, FWIW it might be worth adding your repo into the default store in https://github.com/hacs/default rather than having to add it in as a custom repo

DavidMStraub commented 5 years ago

Right, will do this now that I know it works. Thanks!

darootler commented 4 years ago

Right, will do this now that I know it works. Thanks!

Is Home Connect already in the default HACS repository?

Regards Richard

DavidMStraub commented 4 years ago

No, good point. I forgot that the PR wasn't merged due to a stray comma. I updated it and hope it'll be merged now.

darootler commented 4 years ago

Nice, i think more people will start to use/support your integration if it‘s available within the default repositories.

Regards Richard