mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 01:06:52 +00:00
Migration Arduino to new config style (#3919)
This commit is contained in:
parent
9afaa05223
commit
3365e091f4
@ -30,9 +30,12 @@ arduino:
|
|||||||
port: /dev/ttyACM0
|
port: /dev/ttyACM0
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
{% configuration %}
|
||||||
|
port:
|
||||||
- **port** (*Required*): The port where your board is connected to your Home Assistant host. If you are using an original Arduino, the port will be named `ttyACM*` otherwise `ttyUSB*`.
|
description: The port where your board is connected to your Home Assistant host. If you are using an original Arduino, the port will be named `ttyACM*` otherwise `ttyUSB*`.
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
The exact number can be determined with the command shown below.
|
The exact number can be determined with the command shown below.
|
||||||
|
|
||||||
|
@ -27,14 +27,23 @@ sensor:
|
|||||||
name: Door switch
|
name: Door switch
|
||||||
0:
|
0:
|
||||||
name: Brightness
|
name: Brightness
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
{% configuration %}
|
||||||
|
pins:
|
||||||
- **pins** array (*Required*): Array of pins to use.
|
description: List of pins to use.
|
||||||
- **[number]** (*Required*): The pin number that corresponds with the pin numbering schema of your board.
|
required: true
|
||||||
- **name** (*Optional*): Name that will be used in the frontend for the pin.
|
type: map
|
||||||
|
keys:
|
||||||
|
pin_number:
|
||||||
|
description: The pin number that corresponds with the pin numbering schema of your board.
|
||||||
|
required: true
|
||||||
|
type: map
|
||||||
|
keys:
|
||||||
|
name:
|
||||||
|
default: Name that will be used in the frontend for the pin.
|
||||||
|
type: string
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
The 6 analog pins of an Arduino UNO are numbered from A0 to A5.
|
The 6 analog pins of an Arduino UNO are numbered from A0 to A5.
|
||||||
|
|
||||||
|
@ -31,13 +31,32 @@ switch:
|
|||||||
negate: true
|
negate: true
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
{% configuration %}
|
||||||
|
pins:
|
||||||
- **pins** array (*Required*): List of pins to use.
|
description: List of of pins to use.
|
||||||
- **[number]** (*Required*): The pin number that corresponds with the pin numbering schema of your board.
|
required: true
|
||||||
- **name** (*Required*): Name that will be used in the frontend for the pin.
|
type: map
|
||||||
- **initial** (*Optional*): The initial value for this port. Defaults to `False` .
|
keys:
|
||||||
- **negate** (*Optional*): If this pin should be inverted. Defaults to `False`.
|
pin_number:
|
||||||
|
description: The pin number that corresponds with the pin numbering schema of your board.
|
||||||
|
required: true
|
||||||
|
type: map
|
||||||
|
keys:
|
||||||
|
name:
|
||||||
|
default: Name that will be used in the frontend for the pin.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
initial:
|
||||||
|
default: The initial value for this port.
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
negate:
|
||||||
|
default: If this pin should be inverted.
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
The digital pins are numbered from 0 to 13 on a Arduino UNO. The available pins are 2 till 13. For testing purposes you can use pin 13 because with that pin you can control the internal LED.
|
The digital pins are numbered from 0 to 13 on a Arduino UNO. The available pins are 2 till 13. For testing purposes you can use pin 13 because with that pin you can control the internal LED.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user