Skip to content

Commit 7e1cab6

Browse files
committed
#303: Expose journey ID to Home Assistant
1 parent 084b91f commit 7e1cab6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/integrations/home_assistant/discovery.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ def __publish_ha_discovery_messages_real(self):
295295
self.__publish_sensor(mqtt_topics.DRIVETRAIN_CURRENT_JOURNEY, 'Mileage of journey',
296296
device_class='distance', state_class='total_increasing', unit_of_measurement='km',
297297
value_template='{{ value_json["distance"] | int(0) }}', enabled=False)
298+
self.__publish_sensor(mqtt_topics.DRIVETRAIN_CURRENT_JOURNEY, 'Identifier of journey',
299+
value_template='{{ value_json["id"] | int(0) }}', enabled=False)
298300
self.__publish_sensor(mqtt_topics.DRIVETRAIN_AUXILIARY_BATTERY_VOLTAGE, 'Auxiliary battery voltage',
299301
device_class='voltage', state_class='measurement', unit_of_measurement='V',
300302
icon='mdi:car-battery')

0 commit comments

Comments
 (0)