Skip to content

Commit

Permalink
publish center_display_state to mqtt
Browse files Browse the repository at this point in the history
  • Loading branch information
Atrox committed Apr 3, 2024
1 parent dfb3a3c commit 822f2d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/teslamate/mqtt/pubsub/vehicle_subscriber.ex
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ defmodule TeslaMate.Mqtt.PubSub.VehicleSubscriber do

@always_published ~w(charge_energy_added charger_actual_current charger_phases
charger_power charger_voltage scheduled_charging_start_time
time_to_full_charge shift_state geofence trim_badging)a
time_to_full_charge shift_state geofence trim_badging
center_display_state)a

def handle_info(%Summary{} = summary, state) do
summary
Expand Down
5 changes: 3 additions & 2 deletions lib/teslamate/vehicles/vehicle/summary.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defmodule TeslaMate.Vehicles.Vehicle.Summary do
model trim_badging exterior_color wheel_type spoiler_type trunk_open frunk_open elevation power
charge_current_request charge_current_request_max tpms_pressure_fl tpms_pressure_fr tpms_pressure_rl tpms_pressure_rr
tpms_soft_warning_fl tpms_soft_warning_fr tpms_soft_warning_rl tpms_soft_warning_rr climate_keeper_mode
active_route_destination active_route_latitude active_route_longitude
active_route_destination active_route_latitude active_route_longitude center_display_state
)a

def into(nil, %{state: :start, healthy?: healthy?, car: car}) do
Expand Down Expand Up @@ -133,7 +133,8 @@ defmodule TeslaMate.Vehicles.Vehicle.Summary do
tpms_soft_warning_fl: get_in_struct(vehicle, [:vehicle_state, :tpms_soft_warning_fl]),
tpms_soft_warning_fr: get_in_struct(vehicle, [:vehicle_state, :tpms_soft_warning_fr]),
tpms_soft_warning_rl: get_in_struct(vehicle, [:vehicle_state, :tpms_soft_warning_rl]),
tpms_soft_warning_rr: get_in_struct(vehicle, [:vehicle_state, :tpms_soft_warning_rr])
tpms_soft_warning_rr: get_in_struct(vehicle, [:vehicle_state, :tpms_soft_warning_rr]),
center_display_state: get_in_struct(vehicle, [:vehicle_state, :center_display_state])
}
end

Expand Down
1 change: 1 addition & 0 deletions website/docs/integrations/mqtt.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Vehicle data will be published to the following topics:
| `teslamate/cars/$car_id/active_route_destination` | Home | Navigation destination name |
| `teslamate/cars/$car_id/active_route_latitude` | 35.278131 | Navigation destination latitude |
| `teslamate/cars/$car_id/active_route_longitude` | 29.744801 | Navigation destination longitude |
| `teslamate/cars/$car_id/center_display_state` | 0 | Center Display State |

:::note
`$car_id` usually starts at 1
Expand Down

0 comments on commit 822f2d6

Please sign in to comment.