Update lirc.markdown (#5913)

Added a hint that the file has to be in the users dir of the user running Home Assistant.
If one is running Home Assistant in a virtual env and working with the pi user as root, using `~/.lircrc` could lead to errors setting up LIRC.
This commit is contained in:
Pascal 2018-07-29 12:32:05 +02:00 committed by Franck Nijhof
parent 837c0def07
commit 8fd38deefb

View File

@ -41,7 +41,7 @@ For more information have a look at `/usr/share/doc/lirc/README.Debian.gz` where
Now teach LIRC about your particular remote control by preparing a lircd configuration file (`/etc/lirc/lircd.conf`). Search the [LIRC remote database](http://lirc.sourceforge.net/remotes/) for your model. If you can't find it, then you can always use the `irrecord` program to learn your remote. This will create a valid configuration file. Add as many remotes as you want by pasting them into the file. If `irrecord` doesn't work (e.g., for some air conditioner remotes), then the `mode2` program is capable of reading the codes in raw mode, followed by `irrecord -a` to extract hex codes.
Next, you have to make a `~/.lircrc` file that maps keypresses to system actions. [The configuration](http://www.lirc.org/html/configure.html) is a bit tedious but it must be done. Use the `prog = home-assistant` for all keys you want to be recognized by Home Assistant. The values you set for `button` must be the same as in the `lircd.conf` file and the values you put for `config` entry will be the sensor value in Home Assistant when you press the button. An example may look like this:
Next, you have to make a `~/.lircrc` file that maps keypresses to system actions. The file has to be in the home dir of the user running Home Assistant, e.g. in `/home/homeassistant/.lircrc` if you're running in a virtual env. [The configuration](http://www.lirc.org/html/configure.html) is a bit tedious but it must be done. Use the `prog = home-assistant` for all keys you want to be recognized by Home Assistant. The values you set for `button` must be the same as in the `lircd.conf` file and the values you put for `config` entry will be the sensor value in Home Assistant when you press the button. An example may look like this:
```bash
begin