Update README.md

This commit is contained in:
zewelor
2019-03-23 11:37:47 +01:00
committed by GitHub
parent a0f9ef4da0
commit b6048e6d39
+16 -15
View File
@@ -114,21 +114,7 @@ mosquitto_pub -h localhost -t 'mithermometer/update_interval' -m '30'
## Custom worker development
Create custom worker in workers directory. Add config to the example config:
### Example config entry
```yaml
timeworker:
args:
topic_prefix: cool_time_worker
update_interval: 1800
```
Variables set in args section will be set as object attributes in [BaseWorker.__init__](https://github.com/zewelor/bt-mqtt-gateway/blob/master/workers/base.py#L2)
topic_prefix, if specified, will be added to each mqtt message. Alongside with global_prefix set for gateway
Create custom worker in workers directory.
### Example simple worker
@@ -154,6 +140,21 @@ class TimeWorker(BaseWorker):
`status_update` method - It will be called using specified update_interval
Add config to the example config:
### Example config entry
```yaml
timeworker:
args:
topic_prefix: cool_time_worker
update_interval: 1800
```
Variables set in args section will be set as object attributes in [BaseWorker.__init__](https://github.com/zewelor/bt-mqtt-gateway/blob/master/workers/base.py#L2)
topic_prefix, if specified, will be added to each mqtt message. Alongside with global_prefix set for gateway
## Built With
* [Python](https://www.python.org/) - The high-level programming language for general-purpose programming