mirror of
https://github.com/teslamate-org/teslamate.git
synced 2026-01-24 21:06:08 +08:00
Report if windows are open (v10)
This commit is contained in:
@@ -210,6 +210,7 @@ teslamate/cars/$car_id/outside_temp
|
||||
teslamate/cars/$car_id/inside_temp
|
||||
teslamate/cars/$car_id/locked
|
||||
teslamate/cars/$car_id/sentry_mode
|
||||
teslamate/cars/$car_id/windows_open
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
||||
@@ -24,7 +24,8 @@ defmodule TeslaMate.Vehicles.Vehicle.Summary do
|
||||
:plugged_in,
|
||||
:scheduled_charging_start_time,
|
||||
:charge_limit_soc,
|
||||
:charger_power
|
||||
:charger_power,
|
||||
:windows_open
|
||||
]
|
||||
|
||||
def into(nil, %{state: :start}) do
|
||||
@@ -69,7 +70,12 @@ defmodule TeslaMate.Vehicles.Vehicle.Summary do
|
||||
outside_temp: get_in_struct(vehicle, [:climate_state, :outside_temp]),
|
||||
inside_temp: get_in_struct(vehicle, [:climate_state, :inside_temp]),
|
||||
locked: get_in_struct(vehicle, [:vehicle_state, :locked]),
|
||||
sentry_mode: get_in_struct(vehicle, [:vehicle_state, :sentry_mode])
|
||||
sentry_mode: get_in_struct(vehicle, [:vehicle_state, :sentry_mode]),
|
||||
windows_open:
|
||||
get_in_struct(vehicle, [:vehicle_state, :fd_window]) == 1 or
|
||||
get_in_struct(vehicle, [:vehicle_state, :fp_window]) == 1 or
|
||||
get_in_struct(vehicle, [:vehicle_state, :rd_window]) == 1 or
|
||||
get_in_struct(vehicle, [:vehicle_state, :rp_window]) == 1
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -151,6 +151,12 @@
|
||||
<td><%= (if @summary.locked, do: gettext("yes"), else: gettext("no")) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<%= if @summary.windows_open == true do %>
|
||||
<tr>
|
||||
<td class="has-text-weight-medium"><%= gettext "Windows open" %></td>
|
||||
<td><%= (if @summary.windows_open, do: gettext("yes"), else: gettext("no")) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<%= if @summary.sentry_mode do %>
|
||||
<tr>
|
||||
<td class="has-text-weight-medium"><%= gettext "Sentry Mode" %></td>
|
||||
|
||||
@@ -47,7 +47,7 @@ defmodule TeslaMate.MixProject do
|
||||
{:jason, "~> 1.0"},
|
||||
{:plug_cowboy, "~> 2.0"},
|
||||
# Custom
|
||||
{:tesla_api, github: "mgwidmann/tesla_api"},
|
||||
{:tesla_api, github: "adriankumpf/tesla_api", branch: "v10"},
|
||||
{:gen_state_machine, "~> 2.0"},
|
||||
{:ecto_enum, "~> 1.2"},
|
||||
{:phoenix_live_view, "~> 0.1"},
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.5", "6eaf7ad16cb568bb01753dbbd7a95ff8b91c7979482b95f38443fe2c8852a79b", [:make, :mix, :rebar3], [], "hexpm"},
|
||||
"telemetry": {:hex, :telemetry, "0.4.0", "8339bee3fa8b91cb84d14c2935f8ecf399ccd87301ad6da6b71c09553834b2ab", [:rebar3], [], "hexpm"},
|
||||
"tesla": {:hex, :tesla, "1.3.0", "f35d72f029e608f9cdc6f6d6fcc7c66cf6d6512a70cfef9206b21b8bd0203a30", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:gun, "~> 1.3", [hex: :gun, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "~> 4.4.0", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 0.4", [hex: :mint, repo: "hexpm", optional: true]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.3", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm"},
|
||||
"tesla_api": {:git, "https://github.com/mgwidmann/tesla_api.git", "435c753ab6c34876c1b0e9a8cb3ac0ce26c79940", []},
|
||||
"tesla_api": {:git, "https://github.com/adriankumpf/tesla_api.git", "da8941cd4b93530d1a059116cd047a30a9132b81", [branch: "v10"]},
|
||||
"tortoise": {:hex, :tortoise, "0.9.4", "3bca5f4475f80a5bd45aab644ddb3364dd0956b67f4202dcef6ed20e045ea3a6", [:mix], [{:gen_state_machine, "~> 2.0", [hex: :gen_state_machine, repo: "hexpm", optional: false]}], "hexpm"},
|
||||
"unicode_util_compat": {:hex, :unicode_util_compat, "0.4.1", "d869e4c68901dd9531385bb0c8c40444ebf624e60b6962d95952775cac5e90cd", [:rebar3], [], "hexpm"},
|
||||
}
|
||||
|
||||
@@ -290,3 +290,7 @@ msgstr "Allgemein"
|
||||
#, elixir-format
|
||||
msgid "Do you really want to delete '%{geo_fence}'?"
|
||||
msgstr "Willst du wirklich '%{geo_fence}' löschen?"
|
||||
|
||||
#, elixir-format
|
||||
msgid "Windows open"
|
||||
msgstr "Fenster geöffnet"
|
||||
|
||||
@@ -16,7 +16,7 @@ msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-format
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:162
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:168
|
||||
msgid "Speed"
|
||||
msgstr ""
|
||||
|
||||
@@ -61,12 +61,12 @@ msgid "updating"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-format
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:187
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:193
|
||||
msgid "Inside temperature"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-format
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:175
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:181
|
||||
msgid "Outside temperature"
|
||||
msgstr ""
|
||||
|
||||
@@ -79,6 +79,7 @@ msgstr ""
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:120
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:151
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:157
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:163
|
||||
msgid "no"
|
||||
msgstr ""
|
||||
|
||||
@@ -86,11 +87,12 @@ msgstr ""
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:120
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:151
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:157
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:163
|
||||
msgid "yes"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-format
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:156
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:162
|
||||
msgid "Sentry Mode"
|
||||
msgstr ""
|
||||
|
||||
@@ -378,3 +380,8 @@ msgstr ""
|
||||
#: lib/teslamate_web/templates/geo_fence/index.html.leex:51
|
||||
msgid "Do you really want to delete '%{geo_fence}'?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-format
|
||||
#: lib/teslamate_web/templates/car/summary.html.leex:156
|
||||
msgid "Windows open"
|
||||
msgstr ""
|
||||
|
||||
@@ -290,3 +290,7 @@ msgstr ""
|
||||
#, elixir-format
|
||||
msgid "Do you really want to delete '%{geo_fence}'?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-format
|
||||
msgid "Windows open"
|
||||
msgstr ""
|
||||
|
||||
Reference in New Issue
Block a user