Skip to content

Commit

Permalink
Merge pull request #102 from custom-components/develop
Browse files Browse the repository at this point in the history
Refactoring
  • Loading branch information
isabellaalstrom authored Oct 1, 2020
2 parents 1fcfa67 + f45634e commit e1b38de
Show file tree
Hide file tree
Showing 18 changed files with 990 additions and 640 deletions.
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"image": "ludeeus/container:integration",
"context": "..",
"appPort": [
"9123:8123"
],
"postCreateCommand": "container install",
"postCreateCommand": "apk add jq && for req in $(jq -c -r '.requirements | .[]' custom_components/grocy/manifest.json); do python -m pip install $req; done && container install",
"extensions": [
"ms-python.python",
"github.vscode-pull-request-github",
"tabnine.tabnine-vscode"
"tabnine.tabnine-vscode",
"ms-python.vscode-pylance"
],
"settings": {
"files.eol": "\n",
Expand All @@ -24,4 +24,4 @@
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true
}
}
}
16 changes: 8 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ labels: ''
assignees: ''

---
## Unless all relevant information is provided, I can't help you

**Describe the bug**
A clear and concise description of what the bug is.

**Expected behavior**
A clear and concise description of what you expected to happen.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Are you using HASSIO to run grocy?**
Yes/No
**What is your installed versions of Home Assistant, Grocy and this integration?**

**configuration.yaml entry**
```yaml
Your grocy component config entry
```
**How do you have Grocy installed? Add-on or external?**

**Have you added debugging to the log, and what does the log say?**

**JSON service data (if related to using a service)**
```json
Expand Down
76 changes: 58 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,68 @@
[![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg)](https://github.com/custom-components/hacs)
# Installation

## Installation instructions (general):

1. Install HACS for Home Assistant
2. Go to Community-Store-Grocy
3. Install Grocy
4. Restart Home Assistant
5. Go to Grocy-Wrench icon-Manage API keys-Add
6. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Grocy"
7. Look for the new Grocy sensor in States and use its info
---
**INFO**

You have to have the Grocy software already installed, this integration only communicates with an existing installation of Grocy.

---


## Additional installation instructions for Hass.io users
## <a name="addon"></a>for Grocy add-on

The configuration is slightly different for users that use Hass.io and the [official Grocy addon](https://github.com/hassio-addons/addon-grocy) from the Hass.io Add-on store.
The configuration is slightly different for those who use the [official Grocy addon](https://github.com/hassio-addons/addon-grocy) from the add-on store.

1. If you haven't already done so, install Grocy from the Add-on store
2. In the 'Network' section of the add-on config, input 9192 in the host field [screenshot](https://github.com/custom-components/grocy/raw/master/grocy-addon-config.png). Save your changes and restart the add-on.
3. Install HACS for Home Assistant
4. Go to Grocy > Wrench icon > Manage API keys > Add
5. Copy resulting API key
1. If you haven't already done so, install Grocy from the add-on store
2. In the 'Configuration' section of the add-on config, input `9192` in the host field - see [screenshot](#screenshot). Save your changes and restart the add-on.
3. Install [HACS](https://hacs.xyz/)
4. Go to Community > Store > Grocy
5. Install the Grocy integration component
5. Install the Grocy integration
6. Restart Home Assistant
7. Go to Grocy > Wrench icon > Manage API keys > Add
8. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Grocy"
9. Look for the new Grocy sensor in States and use its info
8. Copy resulting API key
9. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Grocy"
10. You will now have a new integration for Grocy. Some or all of the entities might be disabled from the start.


## <a name="external"></a> for existing external Grocy install

1. Install [HACS](https://hacs.xyz/)
2. Go to Community > Store > Grocy
3. Install the Grocy integration
4. Restart Home Assistant
5. Go to Grocy > Wrench icon > Manage API keys > Add
6. Copy resulting API key
7. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Grocy"
8. You will now have a new integration for Grocy. Some or all of the entities might be disabled from the start.

(This component will not currently work if you have an install where you don't use a port, due to [this issue](https://github.com/SebRut/pygrocy/issues/121).)



# Entities
Some or all of the entities might be disabled from the start.
You get a sensor each for chores, meal plan, shopping list, stock and tasks.
You get a binary sensor each for expired, expiring and missing products.


# Troubleshooting

If you have problems with the integration you can add debug prints to the log.

```yaml
logger:
default: info
logs:
pygrocy: debug
   custom_components.grocy: debug
```
If you are having issues and want to report a problem, always start with making sure that you're on the latest version of the integration, Grocy and Home Assistant.
You can ask for help [in the forums](https://community.home-assistant.io/t/grocy-custom-component-and-card-s/218978), or [make an issue with all of the relevant information here](https://github.com/custom-components/grocy/issues/new?assignees=&labels=&template=bug_report.md&title=).
# <a name="screenshot"></a>Add-on port configuration
![alt text](grocy-addon-config.png)
Loading

0 comments on commit e1b38de

Please sign in to comment.