Skip to content

Commit

Permalink
fixed if domain index is None
Browse files Browse the repository at this point in the history
  • Loading branch information
ckarrie committed Feb 16, 2023
1 parent a244559 commit e095c4b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
10 changes: 5 additions & 5 deletions build.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ cd ~/workspace/src/oekofen-api
```

### Push git changes
- Neue Version in der setup.py eintragen 0.0.16
- Neue Version in der setup.py eintragen 0.0.17
- Mit git changes pushen!!

### github Release erstellen
- https://github.com/ckarrie/oekofen-api/releases/new
- Tag (create new): v0.0.16
- Title: v0.0.16
- Tag (create new): v0.0.17
- Title: v0.0.17
- Button "Publish Release"

### Anpassen in setup.py
```
nano setup.py
```
```python
VERSION = "0.0.16"
VERSION = "0.0.17"

```

Expand All @@ -60,7 +60,7 @@ twine upload dist/*
Lokal updaten

```
pip install oekofen-api==0.0.16
pip install oekofen-api==0.0.17
```

## Update homeassistant-oekofen
Expand Down
5 changes: 4 additions & 1 deletion oekofen_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ async def set_attribute_value(self, att: Attribute, value):
if not isinstance(att, ControllableAttribute):
return False
val = att.generate_new_value(value=value, value_in_human_format=True)
dom_att = f'{att.domain.name}{att.domain.index}.{att.key}'
if att.domain.index is None:
dom_att = f'{att.domain.name}.{att.key}'
else:
dom_att = f'{att.domain.name}{att.domain.index}.{att.key}'
value_set = await self._send_set_value(domain_attribute=dom_att, value=val)
return value_set

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
with open("README.md", "r") as f:
long_description = f.read()

VERSION = "0.0.16"
VERSION = "0.0.17"

setup(
name="oekofen_api",
Expand Down

0 comments on commit e095c4b

Please sign in to comment.