Skip to content

Commit b04c07d

Browse files
committed
Update README.md
Fixes #11.
1 parent a372bd3 commit b04c07d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,27 @@ You need to have [Python](https://www.python.org) installed.
2727
The package is available in the [Python Package Index](https://pypi.python.org/).
2828

2929
```bash
30-
$ pip install python-stiebel-eltron
30+
$ pip install pystiebeleltron
3131
```
3232

3333
## Example usage of the module
3434
The sample below shows how to use this Python module (api for wpm heat pumps).
3535

3636
```python
37+
import asyncio
3738
from pystiebeleltron.wpm import WpmStiebelEltronAPI, WpmSystemParametersRegisters
3839

39-
api = WpmStiebelEltronAPI('IP_ADDRESS_ISG')
40-
await api.connect()
40+
async def main():
41+
api = WpmStiebelEltronAPI('IP_ADDRESS_ISG')
42+
await api.connect()
4143

42-
await api.async_update()
44+
await api.async_update()
4345

44-
print("water comfort target temperature: {}".format(api.get_register_value(WpmSystemParametersRegisters.COMFORT_TEMPERATURE)))
46+
print("water comfort target temperature: {}".format(api.get_register_value(WpmSystemParametersRegisters.COMFORT_TEMPERATURE)))
4547

46-
await api.close()
48+
await api.close()
49+
50+
asyncio.run(main())
4751
```
4852

4953
## Example usage of the module

0 commit comments

Comments
 (0)