mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-28 11:47:00 +00:00
Update python_script.markdown (#10791)
This commit is contained in:
parent
e81cd379bf
commit
3b99f3d575
@ -34,10 +34,8 @@ hass.bus.fire(name, { "wow": "from a Python script!" })
|
|||||||
- Start Home Assistant
|
- Start Home Assistant
|
||||||
- Call service `python_script.hello_world` with parameters
|
- Call service `python_script.hello_world` with parameters
|
||||||
|
|
||||||
```json
|
```yaml
|
||||||
{
|
name: you
|
||||||
"name": "you"
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Calling Services
|
## Calling Services
|
||||||
@ -54,8 +52,9 @@ if entity_id is not None:
|
|||||||
```
|
```
|
||||||
The above `python_script` can be called using the following JSON as an input.
|
The above `python_script` can be called using the following JSON as an input.
|
||||||
|
|
||||||
```json
|
```yaml
|
||||||
{"entity_id": "light.bedroom", "rgb_color": [255, 0, 0] }
|
entity_id: light.bedroom
|
||||||
|
rgb_color: [255, 0, 0]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Documenting your Python scripts
|
## Documenting your Python scripts
|
||||||
|
Loading…
x
Reference in New Issue
Block a user