mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +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
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **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*`.
|
||||
{% configuration %}
|
||||
port:
|
||||
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.
|
||||
|
||||
|
@ -27,14 +27,23 @@ sensor:
|
||||
name: Door switch
|
||||
0:
|
||||
name: Brightness
|
||||
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **pins** array (*Required*): Array of pins to use.
|
||||
- **[number]** (*Required*): The pin number that corresponds with the pin numbering schema of your board.
|
||||
- **name** (*Optional*): Name that will be used in the frontend for the pin.
|
||||
{% configuration %}
|
||||
pins:
|
||||
description: List of pins to use.
|
||||
required: true
|
||||
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.
|
||||
|
||||
|
@ -31,13 +31,32 @@ switch:
|
||||
negate: true
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **pins** array (*Required*): List of pins to use.
|
||||
- **[number]** (*Required*): The pin number that corresponds with the pin numbering schema of your board.
|
||||
- **name** (*Required*): Name that will be used in the frontend for the pin.
|
||||
- **initial** (*Optional*): The initial value for this port. Defaults to `False` .
|
||||
- **negate** (*Optional*): If this pin should be inverted. Defaults to `False`.
|
||||
{% configuration %}
|
||||
pins:
|
||||
description: List of of pins to use.
|
||||
required: true
|
||||
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
|
||||
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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user