Add binary sensor entities to Traccar Server (#114719)

This commit is contained in:
Joakim Sørensen
2024-04-24 17:08:56 +02:00
committed by GitHub
parent 2beab34de8
commit f83ee963bf
6 changed files with 177 additions and 15 deletions
@@ -82,9 +82,7 @@
'gps_accuracy': 3.5,
'latitude': '**REDACTED**',
'longitude': '**REDACTED**',
'motion': False,
'source_type': 'gps',
'status': 'online',
'traccar_id': 0,
'tracker': 'traccar_server',
}),
@@ -92,6 +90,29 @@
}),
'unit_of_measurement': None,
}),
dict({
'disabled': False,
'enity_id': 'binary_sensor.x_wing_motion',
'state': dict({
'attributes': dict({
'device_class': 'motion',
'friendly_name': 'X-Wing Motion',
}),
'state': 'off',
}),
'unit_of_measurement': None,
}),
dict({
'disabled': False,
'enity_id': 'binary_sensor.x_wing_status',
'state': dict({
'attributes': dict({
'friendly_name': 'X-Wing Status',
}),
'state': 'on',
}),
'unit_of_measurement': None,
}),
dict({
'disabled': False,
'enity_id': 'sensor.x_wing_battery',
@@ -231,6 +252,18 @@
}),
}),
'entities': list([
dict({
'disabled': True,
'enity_id': 'binary_sensor.x_wing_motion',
'state': None,
'unit_of_measurement': None,
}),
dict({
'disabled': True,
'enity_id': 'binary_sensor.x_wing_status',
'state': None,
'unit_of_measurement': None,
}),
dict({
'disabled': True,
'enity_id': 'sensor.x_wing_battery',
@@ -343,6 +376,18 @@
}),
}),
'entities': list([
dict({
'disabled': True,
'enity_id': 'binary_sensor.x_wing_motion',
'state': None,
'unit_of_measurement': None,
}),
dict({
'disabled': True,
'enity_id': 'binary_sensor.x_wing_status',
'state': None,
'unit_of_measurement': None,
}),
dict({
'disabled': True,
'enity_id': 'sensor.x_wing_battery',
@@ -384,9 +429,7 @@
'gps_accuracy': 3.5,
'latitude': '**REDACTED**',
'longitude': '**REDACTED**',
'motion': False,
'source_type': 'gps',
'status': 'online',
'traccar_id': 0,
'tracker': 'traccar_server',
}),