Skip to content

Commit e0e1553

Browse files
committed
Use the same password placeholder
1 parent 6499a70 commit e0e1553

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

source/developers/python_api.markdown

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Similar to the output in the "Developer Tools" of the frontend.
4040
```python
4141
import homeassistant.remote as remote
4242

43-
api = remote.API('127.1.0.1', 'password')
43+
api = remote.API('127.1.0.1', 'YOUR_PASSWORD')
4444

4545
print('-- Available services:')
4646
services = remote.get_services(api)
@@ -65,7 +65,7 @@ To get the details of a single entity the `get_state` method is used.
6565
```python
6666
import homeassistant.remote as remote
6767

68-
api = remote.API('127.1.0.1', 'password')
68+
api = remote.API('127.1.0.1', 'YOUR_PASSWORD')
6969
office_temperature = remote.get_state(api, 'sensor.office_temperature')
7070
print('{} is {} {}.'.format(office_temperature.attributes['friendly_name'],
7171
office_temperature.state,
@@ -85,7 +85,7 @@ The exact same thing is working for a switch. The difference is that both entiti
8585
```python
8686
import homeassistant.remote as remote
8787

88-
api = remote.API('127.1.0.1', 'password')
88+
api = remote.API('127.1.0.1', 'YOUR_PASSWORD')
8989
switch_livingroom = remote.get_state(api, 'switch.livingroom_pin_2')
9090
print('{} is {}.'.format(switch_livingroom.attributes['friendly_name'],
9191
switch_livingroom.state
@@ -101,7 +101,7 @@ Of course, it's possible to set the state.
101101
import homeassistant.remote as remote
102102
from homeassistant.const import STATE_ON
103103

104-
api = remote.API('127.1.0.1', 'password')
104+
api = remote.API('127.1.0.1', 'YOUR_PASSWORD')
105105
remote.set_state(api, 'sensor.office_temperature', new_state=123)
106106
remote.set_state(api, 'switch.livingroom_pin_2', new_state=STATE_ON)
107107
```
@@ -117,7 +117,7 @@ If you want to turn on all entities of a domain, just use a service which was re
117117
import time
118118
import homeassistant.remote as remote
119119

120-
api = remote.API('127.1.0.1', 'password')
120+
api = remote.API('127.1.0.1', 'YOUR_PASSWORD')
121121
domain = 'switch'
122122

123123
remote.call_service(api, domain, 'turn_on')
@@ -133,7 +133,7 @@ To turn on or off a single switch. The ID of the entity is needed as attribute.
133133
import time
134134
import homeassistant.remote as remote
135135

136-
api = remote.API('127.1.0.1', 'password')
136+
api = remote.API('127.1.0.1', 'YOUR_PASSWORD')
137137
domain = 'switch'
138138
switch_name = 'switch.livingroom_pin_2'
139139

@@ -149,7 +149,7 @@ The example uses the jabber notification platform to send a single message to th
149149
```python
150150
import homeassistant.remote as remote
151151

152-
api = remote.API('127.1.0.1', 'password')
152+
api = remote.API('127.1.0.1', 'YOUR_PASSWORD')
153153
domain = 'notify'
154154
data = {"title":"Test", "message":"A simple test message from HA."}
155155

source/developers/server_sent_events.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The simplest script to consume the SSE looks like the following snipplet.
6767
```python
6868
from sseclient import SSEClient
6969

70-
messages = SSEClient('http://localhost:8123/api/stream?api_password=MYPASS')
70+
messages = SSEClient('http://localhost:8123/api/stream?api_password=YOUR_PASSWORD')
7171
for msg in messages:
7272
print(msg)
7373
```

0 commit comments

Comments
 (0)