@@ -34,56 +34,13 @@ Configuration variables:
34
34
- ' temperature'
35
35
- ' humidity'
36
36
- ' pressure'
37
+ is_hat_attached (Optional) : True|False boolean; Default value is True declaring that the SenseHAT _is_ physically on the Raspberry Pi
38
+
37
39
38
- # ## {% linkable_title Installation instruction for the All-In-One installer and HASSbian %}
40
+ # ### Customizing the Sense HAT data
39
41
40
- Here are the steps to make the Sense HAT sensor work with a virtual environment.
41
-
42
- Install SenseHAT package. Switch to the `homeassistant_venv` directory and activate the virtual environment.
43
-
44
- ` ` ` bash
45
- $ sudo su -s /bin/bash homeassistant
46
- $ source /srv/homeassistant/homeassistant_venv/bin/activate
47
- ` ` `
48
-
49
- Install the `sense-hat` module.
50
-
51
- ` ` ` bash
52
- $ pip3 install sense-hat
53
- ` ` `
54
-
55
- Please be patient, this will take a long while...
56
-
57
- Type `exit` to quit out of the _homeassistant_venv_ back to your `pi` environment. As all of the following steps should be under the `pi` user environment.
58
-
59
- Install the [RTIMU](https://github.com/RPi-Distro/RTIMULib) Python module :
60
-
61
- ` ` ` bash
62
- $ pip3 install rtimulib
63
- ` ` `
64
-
65
- Add symlink to RTIMU in `homeassistant_venv` directory. Create a symlink using the following command :
66
-
67
- ` ` ` bash
68
- $ ln -s /usr/lib/python3/dist-packages/RTIMU.cpython-34m-arm-linux-gnueabihf.so /srv/homeassistant/homeassistant_venv/lib/python3.4/
69
- ` ` `
70
-
71
- Add `homeassistant` user to the `input` and the `i2c` groups.
72
-
73
- ` ` ` bash
74
- $ sudo addgroup homeassistant input
75
- $ sudo addgroup homeassistant i2c
76
- ` ` `
77
-
78
- Reboot Raspberry Pi to apply changes.
79
-
80
- ` ` ` bash
81
- $ sudo reboot
82
- ` ` `
83
-
84
- # ## {% linkable_title Customizing the Sense HAT data %}
85
-
86
- To format the sensor values, add the following to your `sensor` entry in your `configuration.yaml` file.
42
+ **Format the sensor values**
43
+ Add the following to your `sensor`
87
44
88
45
` ` ` yaml
89
46
# Example configuration.yaml entry
@@ -107,7 +64,8 @@ sensor:
107
64
unit_of_measurement: '%'
108
65
` ` `
109
66
110
- Add the following to your `customize` section to set friendly names & icons for the values.
67
+ **Give the values friendly names & icons**
68
+ Add the following to your `customize`
111
69
112
70
` ` ` yaml
113
71
# Example configuration.yaml entry
@@ -121,9 +79,10 @@ customize:
121
79
sensor.sensehat_pressure:
122
80
icon: mdi:gauge
123
81
friendly_name: "Pressure"
124
- ` ` `
82
+ ` ` `
125
83
126
- Create a group for your Sense HAT details by adding the following to your `groups` section.
84
+ **Create a group**
85
+ Add the following to your `groups`
127
86
128
87
` ` ` yaml
129
88
# Example configuration.yaml entry
@@ -135,13 +94,59 @@ group:
135
94
- sensor.sensehat_humidity
136
95
- sensor.sensehat_pressure
137
96
` ` `
138
-
139
97
Add the _sense_hat group_ a group (_Kitchen for example_)
140
-
141
98
` ` ` yaml
142
99
# Example configuration.yaml entry
143
100
group:
144
101
kitchen:
145
102
- group.sense_hat
146
103
` ` `
147
104
105
+
106
+ # ## Directions for installing on Raspberry Pi All-In-One installer and HASSbian:
107
+ Here are the steps to make the _SenseHAT_ sensor work _successfully_ with the virtual enviroment versions.
108
+
109
+ # ### Install SenseHAT package to _homeassistant_venv_
110
+ ` ` ` bash
111
+ # switch to the homeassistant_venv environment
112
+ sudo su -s /bin/bash homeassistant
113
+ source /srv/homeassistant/homeassistant_venv/bin/activate
114
+
115
+ # install the sense-hat lib
116
+ pip3 install sense-hat
117
+ # be patient, this will take a long while
118
+ ` ` `
119
+ # ### Return to `pi`
120
+ Type `exit` to quit out of the _homeassistant_venv_ back to your `pi` environment.
121
+
122
+ As all of the following steps should be under the `pi` user environment.
123
+
124
+ # ##### Install _RTIMU_
125
+
126
+ ` ` ` bash
127
+ # Install RTIMU to pi user environment
128
+ pip3 install rtimulib
129
+
130
+ # Add symlink to RTIMU in _homeassistant_venv_
131
+ # Create a symlink using the following command:
132
+ ln -s /usr/lib/python3/dist-packages/RTIMU.cpython-34m-arm-linux-gnueabihf.so /srv/homeassistant/homeassistant_venv/lib/python3.4/
133
+
134
+ # Add _homeassistant_ user to the _input_ and the _i2c_ groups
135
+ sudo addgroup homeassistant input
136
+ sudo addgroup homeassistant i2c
137
+
138
+ # Reboot Raspberry Pi to apply changes
139
+ sudo reboot
140
+ ` ` `
141
+
142
+ Unfortunately enabling the SenseHAT Sensor component for a Virtual Environment install of Home-Assistant fails with errors.
143
+ _(The Raspberry Pi All-In-One installer and HASSbian both run Home-Assistant in an virtual environment)._
144
+ These issues have been discussed in the repository issue (#5093)[https://github.com/home-assistant/home-assistant/issues/5093)
145
+
146
+ This fix has been tested with a clean install of :
147
+
148
+ * [Raspbian Jessie - version January 2017](https://downloads.raspberrypi.org/raspbian/images/raspbian-2017-01-10/)
149
+
150
+ and
151
+
152
+ * [Home-Assistant 0.37.1](https://home-assistant.io/getting-started/installation-raspberry-pi-all-in-one/)
0 commit comments