You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -81,6 +81,7 @@ These device representations in Home Assistant will have [entities](#entities) a
81
81
The traccar server integration will create entities in with the following domains:
82
82
83
83
-[Device Tracker](/integrations/device_tracker)
84
+
-[Sensor](/integrations/sensor)
84
85
85
86
For more details about each of these, see the sections below.
86
87
@@ -104,22 +105,10 @@ State:
104
105
In addition to the custom attributes you can define in the Traccar Server integration options, the device tracker entity will have the following attributes:
105
106
106
107
{% configuration_basic %}
107
-
Address:
108
-
description: If a position update has an address associated with it, this will be the address.
109
-
Altitude:
110
-
description: The altitude of the position update.
111
-
Battery Level:
112
-
description: The battery level of the device if defined.
113
108
Category:
114
109
description: The category of the device in Traccar if defined.
115
-
Geofence:
116
-
description: The name of the geofence the device is located in.
117
110
Motion:
118
111
description: If the device is moving or not.
119
-
Speed:
120
-
description: The speed of the device.
121
-
Status:
122
-
description: The status of the device in Traccar.
123
112
Traccar ID:
124
113
description: The ID of the device in Traccar.
125
114
Tracker:
@@ -128,6 +117,120 @@ Tracker:
128
117
129
118
{% enddetails %}
130
119
120
+
### Sensor - Address
121
+
122
+
The Traccar Server integration will create a [sensor](/integrations/sensor) entity for each device registered in Traccar Server to show the address reported by the Traccar Server.
123
+
124
+
This entity is disabled by default.
125
+
126
+
{% configuration_basic %}
127
+
Name:
128
+
description: The name of the sensor will be set to what you have named it in Traccar Server followed by Address. If your device is named "Millennium Falcon", this will be "Millennium Falcon Address".
129
+
Entity ID:
130
+
description: This will be a slugified version of the name.
131
+
Unique ID:
132
+
description: This will be the unique ID of the device tracker in Traccar Server followed by `position_address`.
133
+
State:
134
+
description: This will be the address reported by the Traccar Server, if geo detection is not configured this will be unknown`.
135
+
{% endconfiguration_basic %}
136
+
137
+
This entity does not have any attributes.
138
+
139
+
### Sensor - Altitude
140
+
141
+
The Traccar Server integration will create a [sensor](/integrations/sensor) entity for each device registered in Traccar Server to show the altitude reported by the Traccar Server.
142
+
143
+
This entity is disabled by default.
144
+
145
+
{% configuration_basic %}
146
+
Name:
147
+
description: The name of the sensor will be set to what you have named it in Traccar Server followed by Altitude. If your device is named "Millennium Falcon", this will be "Millennium Falcon Altitude".
148
+
Entity ID:
149
+
description: This will be a slugified version of the name.
150
+
Unique ID:
151
+
description: This will be the unique ID of the device tracker in Traccar Server followed by `position_altitude`.
152
+
State:
153
+
description: This will be the altitude in meters. You can select a different unit in the entity options if you want.
154
+
{% endconfiguration_basic %}
155
+
156
+
This entity does not have any attributes.
157
+
158
+
### Sensor - Battery
159
+
160
+
The Traccar Server integration will create a [sensor](/integrations/sensor) entity for each device registered in Traccar Server to show the remaining battery percentage reported by the Traccar Server.
161
+
162
+
This entity is disabled by default.
163
+
164
+
{% configuration_basic %}
165
+
Name:
166
+
description: The name of the sensor will be set to what you have named it in Traccar Server followed by Battery. If your device is named "Millennium Falcon", this will be "Millennium Falcon Battery".
167
+
Entity ID:
168
+
description: This will be a slugified version of the name.
169
+
Unique ID:
170
+
description: This will be the unique ID of the device tracker in Traccar Server followed by `position_attributes.batteryLevel`.
171
+
State:
172
+
description: This will be the battery percentage (level) as reported by the tracked device, if the device does not have a battery this will be unknown.
173
+
{% endconfiguration_basic %}
174
+
175
+
This entity does not have any attributes.
176
+
177
+
### Sensor - Geofence
178
+
179
+
The Traccar Server integration will create a [sensor](/integrations/sensor) entity for each device registered in Traccar Server to show the geofence reported by the Traccar Server.
180
+
181
+
This entity is disabled by default.
182
+
183
+
{% configuration_basic %}
184
+
Name:
185
+
description: The name of the sensor will be set to what you have named it in Traccar Server followed by Geofence. If your device is named "Millennium Falcon", this will be "Millennium Falcon Geofence".
186
+
Entity ID:
187
+
description: This will be a slugified version of the name.
188
+
Unique ID:
189
+
description: This will be the unique ID of the device tracker in Traccar Server followed by `geofence_geofence`.
190
+
State:
191
+
description: This will be geofence that the device is in, if you have overlapping geofences it will show the first one as reported by the Traccar Server.
192
+
{% endconfiguration_basic %}
193
+
194
+
This entity does not have any attributes.
195
+
196
+
### Sensor - Speed
197
+
198
+
The Traccar Server integration will create a [sensor](/integrations/sensor) entity for each device registered in Traccar Server to show the speed reported by the Traccar Server.
199
+
200
+
This entity is disabled by default.
201
+
202
+
{% configuration_basic %}
203
+
Name:
204
+
description: The name of the sensor will be set to what you have named it in Traccar Server followed by Speed. If your device is named "Millennium Falcon", this will be "Millennium Falcon Speed".
205
+
Entity ID:
206
+
description: This will be a slugified version of the name.
207
+
Unique ID:
208
+
description: This will be the unique ID of the device tracker in Traccar Server followed by `position_speed`.
209
+
State:
210
+
description: This will be the speed of the device in knots. You can select a different unit in the entity options if you want.
211
+
{% endconfiguration_basic %}
212
+
213
+
This entity does not have any attributes.
214
+
215
+
### Sensor - Status
216
+
217
+
The Traccar Server integration will create a [sensor](/integrations/sensor) entity for each device registered in Traccar Server to show the status reported by the Traccar Server.
218
+
219
+
This entity is disabled by default.
220
+
221
+
{% configuration_basic %}
222
+
Name:
223
+
description: The name of the sensor will be set to what you have named it in Traccar Server followed by Status. If your device is named "Millennium Falcon", this will be "Millennium Falcon Status".
224
+
Entity ID:
225
+
description: This will be a slugified version of the name.
226
+
Unique ID:
227
+
description: This will be the unique ID of the device tracker in Traccar Server followed by `devcie_status`.
228
+
State:
229
+
description: This will be one of the following; `offline`, `unknown`, `online`.
230
+
{% endconfiguration_basic %}
231
+
232
+
This entity does not have any attributes.
233
+
131
234
## Examples
132
235
133
236
So you set up the integration and it pulled in all your devices. Now what? Below are some examples of what you can do with the data provided by Traccar Server integration.
@@ -138,7 +241,7 @@ In this section you will find some example automations that you can use to get s
138
241
139
242
#### Do something when a device enters a geofence
140
243
141
-
The allows you to do something when the device `device_tracker.millennium_falcon` enters the defined geofence.
244
+
The allows you to do something when the device "Millennium Falcon" enters the defined geofence.
142
245
143
246
{% my blueprint_import badge blueprint_url="https://www.home-assistant.io/blueprints/integrations/traccar_server_device_enter_geofence.yaml" %}
144
247
@@ -147,8 +250,7 @@ The allows you to do something when the device `device_tracker.millennium_falcon
147
250
```yaml
148
251
trigger:
149
252
- platform: state
150
-
entity_id: device_tracker.millennium_falcon
151
-
attribute: geofence
253
+
entity_id: sensor.millennium_falcon_geofence
152
254
to: 'Tatooine'
153
255
action:
154
256
...
@@ -158,7 +260,7 @@ action:
158
260
159
261
#### Do something when a device are speeding
160
262
161
-
The allows you to do something when the device `device_tracker.millennium_falcon` exceeds a defined speed.
263
+
The allows you to do something when the device "Millennium Falcon" exceeds a defined speed.
162
264
163
265
{% my blueprint_import badge blueprint_url="https://www.home-assistant.io/blueprints/integrations/traccar_server_device_speed_limit.yaml" %}
164
266
@@ -167,14 +269,13 @@ The allows you to do something when the device `device_tracker.millennium_falcon
167
269
```yaml
168
270
trigger:
169
271
- platform: numeric_state
170
-
entity_id: device_tracker.millennium_falcon
171
-
attribute: speed
272
+
entity_id: sensor.millennium_falcon_speed
172
273
above: 1337
173
274
action:
174
275
...
175
276
```
176
277
177
-
If you want to include the speed in a notification, you can use the `{{ trigger.to_state.attributes.speed }}` template.
278
+
If you want to include the speed in a notification, you can use the `{{ trigger.to_state.state }}` template.
178
279
179
280
Partial example:
180
281
@@ -184,7 +285,7 @@ trigger:
184
285
action:
185
286
- service: notify.notify
186
287
data:
187
-
message: "The current speed of the Millennium falcon is {{ trigger.to_state.attributes.speed }}!"
288
+
message: "The current speed of the Millennium falcon is {{ trigger.to_state.state }}!"
0 commit comments