Commit Graph

41 Commits

Author SHA1 Message Date
Long Zheng
123f7ab63c docs: fix Home Assistant MQTT sensor JSON templates warnings (#4257)
* Fix Home Assistant active route MQTT sensor JSON templates

More gracefully handles JSONs with error (not actively routing)

* Fix tesla_active_route_distance_to_arrival_km sensor

* Fix template sensors

Conditionally convert values if the sensor actually has a value, to prevent converting invalid non-numeric values

* Fix copy/paste mistakes
2024-10-19 15:51:28 +02:00
JakobLichterfeld
fdf8185ce2 ci: add treefmt as code formatting multiplexer, refactor CI to avoid duplication, reorg CI into DevOps workflow (#4219)
* ci: add treefmt as code formatting multiplexer

* style: linter findings in entrypoint.sh script

* style: linter findings for yaml and yml

* style: linter findings for json files

* style: linter findings for nix files

* style: linter findings for js files

* style: linter findings for dashboards.sh

* style: linter findings for md and mdx files

* chore: remove unused clang formatter in treefmt config

* style: linter findings for mdx files

* ci: exclude Grafana dashboard JSON files from prettier formatting

* Revert "style: linter findings for json files"

This reverts commit f40c2e175992f66f887a3f4fc5aa1a1a89393147.

* ci: exclude Grafana dashboard JSON files from all formatting as we use the grafana export style

* style: linter findings for json files

* doc: update changelog

* ci(refactor): use composite action to avoid duplication in elixir workflow

* doc: update changelog

* ci: prevent workflow runs for certain conditions and allow scheduled runs

* ci(refactor): use reusable workflow to check paths

* ci(fix): correct output syntax for check_paths workflow and setting base branch

* ci(refactor): use reusable workflows for streamlined DevOps pipeline

* ci(fix): add write permission for packages in DevOps workflow

* ci(test): test DevOps workflow

* ci(test): test DevOps workflow

* ci(fix): Update condition for spell_check, ensure_linting, elixir, and ghcr_build workflows to reflect empty result instead of false

* ci: revert test DevOps

* ci(refactor): allow ghcr_build parallel to elixir test

* ci(refactor): Remove redundant check_paths job from elixir.yml, elixir_test.yml, and spell_check.yml workflows, check is done in devops.yml

* feat: add treefmt-nix to nix flake (#4219 - @JakobLichterfeld)

* ci: ensure proper linting via treefmt

* ci(test): test ensure_linting workflow

* ci(fix): checkout code for spell_checker to access file to check

* ci(fix): allow impure in ensure_linting workflow

* Revert "ci(test): test ensure_linting workflow"

This reverts commit a67b17ec098a628a8b093ec20b34b0e2696811cc.

* ci(fix): correct use of flake-utils for formatter and checks

Co-authored-by: scottbot95 <scottbot95@gmail.com>

* ci(fix): correct use of flake-utils for treefmt

Co-authored-by: scottbot95 <scottbot95@gmail.com>

* refactor: Remove unnecessary imports in flake

* ci(fix): correct syntax in flake

* ci(refactor): Remove unused code in flake.nix

* style: standardised style for input url in flake

* ci(fix): treefmt-nix config with existing options

* ci(feat): Add Nix binary cache and update treefmt command in CI workflow

* ci(refactor): Remove unused code in flake.nix

* fix: include devShell packages only on supported platforms

* fix: update hash for mix-deps package in flake.nix

* ci(fix): Update treefmt command in CI workflow

* ci(test): test ensure_linting workflow

* feat: ensure mix deps are present in devShell

* ci(feat): use flake-parts to enable treefmt-nix

* feat: use flake-parts

* fix: correct use of flake-parts for package build

* doc: update CI badge URL for devops workflow

* ci(fix): handle empty path filter output

* ci: remove --impure flag from treefmt command in CI workflow

* fix: correct treefmt.config settings in formatter.nix

* fix: correct flake-parts inputs, avoid with in imports

* fix: correct program name for mix-format in formatter.nix

* feat: devenv via flake-parts

* fix: correct use of legacy nix code with flake-parts

* ci(fix): correct nix develop command in ensure_linting.yml

* refactor: list imports explicitly in flake, rename folder to flake-modules to be precise

* style: use tabs for indent size to format sh

* style: use nixfmt-rfc-style

* Revert "style: use nixfmt-rfc-style"

This reverts commit 082056159e611c2c0639f8b4dc509446f5308a92.

* style: use nixfmt style

* fix: remove glibcLocales from optional dependencies to avoid  "A definition for option `packages."[definition 4-entry 16]"' is not of type `package'."

* fix: remove inotify-tools from optional dependencies to avoid  "A definition for option `packages."[definition 4-entry 16]"' is not of type `package'."

* fix: Remove inotify-tools and glibcLocales from optional dependencie

* fix: correct file paths in flake.nix to version

* fix: add ELIXIR_ERL_OPTIONS to shell environment to force utf8 locale

* fix: add LOCALE_ARCHIVE to shell environment in flake.nix

* Revert "fix: add LOCALE_ARCHIVE to shell environment in flake.nix"

This reverts commit d45f6e32eea1fcaf55cd03733e648cda4dbb764b.

* ci(refactor): rename workflow to elixir_dep_verification_and_static_analysis.yml to better reflect the intention,, remove duplicate checks

* ci(debug): debug locale settings

* Revert "ci(debug): debug locale settings"

This reverts commit 9b402f3c5f9b41ff4716dc4fc99f711fc9ef8135.

* Revert "fix: add ELIXIR_ERL_OPTIONS to shell environment to force utf8 locale"

This reverts commit d02419cba44055d55978ad36d23493d8790ce21b.

* fix: add LOCALE_ARCHIVE to shell environment in flake.nix

* Revert "fix: add LOCALE_ARCHIVE to shell environment in flake.nix"

This reverts commit 761b437e699d8381a0726dd969052b1e85c3f08f.

* fix: add LANG=C.UTF-8 to shell environment in flake.nix

* fix: add mix local.rebar and mix local.hex commands to flake.nix

* fix: pin devenv to version without unix socket bug

* chore: update nixpkgs to nixos-24.05 and update dependencies

* doc: add treefmt config comments

* ci: do not expose treefmt formatter programs in devshell

* fix: correct use of module option to enable PostgreSQL server in flake.nix

* Revert "chore: update nixpkgs to nixos-24.05 and update dependencies"

This reverts commit a6ea3f25aa393c32d9c2494b21e6330de2482496.

* feat: consistent use of erlang 26 and elixir 1_16 in flake

* ci: switch to macOS runner for linting workflow

* Revert "ci: do not expose treefmt formatter programs in devshell"

This reverts commit 1ecfa451dcf4199554a5d96d241ee846601862d9.

* Revert "ci: switch to macOS runner for linting workflow"

This reverts commit 7b430667d8737e5adf91f5ba59bbf83eb15bcb7a.

* ci: Remove nixpkgs channel specification in ensure_linting workflow

* ci(debug): Add debug output for PATH and NIX_PATH in flake.nix

* Revert "ci(debug): Add debug output for PATH and NIX_PATH in flake.nix"

This reverts commit 07faec5ddf88195969f89f3e74791d030c980b03.

* fix: avoid the need for impure for devenv

see #4245

* fix: remove invalid custom build.check for formatter and use default

* style: linter findings

* fix: Add emptyTest to avoid nix flake check test execution on non-Linux systems

* chore: Remove LANG=C.UTF-8 from enterShell in flake.nix

* ci(fix): Remove --impure flag from treefmt command in CI mode

* ci(fix): avoid impure mode in ensure_linting workflow

* style: linter findings

* ci(debug): debug elixir version and locale

* chore: Update flake.lock dependencies

* feat: use newer devenv as unix socket bug is fixed in upstream

https://github.com/cachix/devenv/issues/1497

* fix: set rebar3 path in devenv

* Revert "ci(debug): debug elixir version and locale"

This reverts commit 7ecdc77c163cd6ef9c913689c1f75e86ce8587cb.

* ci: re-enable path check in DevOps workflow

* doc: update Development and Contributing guide with nix and treefmt

* ci: use PostgreSQL 17

* style: linter findings

* ci(fix): ensure cache name in build action does not contain invalid characters to avoid invalid reference format

* doc: update changelog

* Revert "ci(fix): ensure cache name in build action does not contain invalid characters to avoid invalid reference format"

This reverts commit 02abb0359db4f22e5a28283476b3ced0d99729ff.

* ci: remove branch restriction for check_paths workflow to increase sec

* ci(fix): run ghcr build workflow only for specific conditions

- Ensure workflow only run if there are no changes to the .github folder
- Allow workflow to run on workflow call or PRs from forks
- Prevent duplicate runs for PRs from non-forks
- Avoid invalid reference format for cache name in PRs from our repository

* doc: update changelog

* fix: update hash for mix-deps package in flake.nix

* fix: disable flakeCheck for formatter, as mix format need the dep to be fetched beforehand

* ci(fix): run ghcr build workflow only for specific conditions

* fix: move nixosModules.default to top-level attribute set

* refactor: remove unnecessary config nesting in formatter.nix

* ci(fix): ensure version for buildx is set to correct name

---------

Co-authored-by: scottbot95 <scottbot95@gmail.com>
2024-10-14 08:54:10 +02:00
Herman van Rink
94da8f6d92 doc: align TPMS Pressure naming in sensor config to match ui config for home assistant (#4104) 2024-07-29 11:14:55 +02:00
JakobLichterfeld
4a32f6eb28 doc: fix typo in MQTT location JSON format (#4047)
* doc: fix typo in MQTT location JSON format

* doc: fix typo in MQTT location JSON format
2024-07-06 14:47:13 +02:00
Atrox
21439f1a14 publish center_display_state to mqtt (#3813) 2024-07-05 16:55:03 +02:00
Saswat Padhi
195433c319 Track open/close states for individual doors (#3962)
* feat: track open/close states for individual doors

* doc: add individual door open states
2024-06-19 10:28:19 +02:00
Long Zheng
55baa5e3dc Update HomeAssistant docs to use new MQTT values (#3923)
* Update HomeAssistant docs to use new MQTT values

* Update name to `mi`

* Update website/docs/integrations/home_assistant.md
2024-05-30 15:03:51 +02:00
Long Zheng
5b029bc043 Update MQTT examples of location/active_route (#3919) 2024-05-30 14:25:09 +02:00
Brian May
c684252940 Publish extra active_route fields to mqtt output (#3789)
This refactors the existing code to make it more maintainable.

Nil values are published as "nil" string. This ensures that they will
get published, and ensures that MQTT doesn't drop the retained data.

Fixes #3748
2024-04-05 17:29:00 +11:00
Brian May
b5285d2ace Add location topic (lat and long in one json blob) (#3729)
* Add location topic

Fixes #3660.

* doc: update mqtt topics with new location topic

---------

Co-authored-by: Jakob Lichterfeld <jakob-lichterfeld@gmx.de>
2024-03-18 08:36:21 +01:00
Jan
131651845a Fix name in lovelace example to match sensor name (#3718) 2024-03-04 11:36:31 +01:00
Long Zheng
78fe8116ad Add navigation active route drive state data (#3657)
* Add navigation active route drive state data

* Add active_route data to MQTT

* Update MQTT documentation

* Fix streaming test drive state
2024-02-08 08:45:42 +01:00
Kenni Lund
6a19ec257e doc: Fix TPMS sensor names to match binary_sensor.yaml (#3613) 2024-01-19 14:06:52 +01:00
Toni
ee5e16daf9 Node-RED required modules should be saved under /data (#3623) 2024-01-19 14:04:05 +01:00
Igor Yamolov
abd1e6c3ad Use recommended format for Home Assistant MQTT sensor configuration (#3344) 2023-11-29 11:28:08 +01:00
virtualm2000
c1db4f58a3 Fix tpms bar sensors name in template for psi (#3490) 2023-11-26 08:55:51 +01:00
marspath
d7f6349cb2 Update HA integrations docs with TPMS sensors and examples (#2845) 2023-11-16 19:02:17 +01:00
Nir Klinger
fba87d7e88 added tire low pressure icon to teslamate web (#3424)
* added tire low pressure icon to teslamate web

* updated new fields to mqtt md

* Update default.pot and errors.pot
2023-11-13 19:07:03 -06:00
Eden Yemini
c8b0df802f Docker compose command fixes (#3025)
* Replace `docker-compose` commands with `docker compose`

* Use official and up to date documentation for Docker and Compose installation

* Revert IDE automatic style changes

* Fix a dash from merging the upstream
2023-06-12 12:13:41 +02:00
enzo2
98a0428738 Fix tesla_power unit from W to kW (#3024) 2023-01-13 14:04:50 +01:00
dc
7d2b2c861c Update HA integration (#2735)
Fix km to mi conversion
Add timestamp class to charge time so HA will show relative time.
2022-07-15 11:04:42 +02:00
NirKli
7a9c6b9ad1 Added tire pressure (#2706)
* - Added support for tire pressure graph per drive

* - Fixed migration script

* - Added tire pressure documentation in mqtt.md

* Use add command instead of add_if_not_exists

Co-authored-by: Adrian Kumpf <8999358+adriankumpf@users.noreply.github.com>

* Remove drop function command from migration script

Co-authored-by: Adrian Kumpf <8999358+adriankumpf@users.noreply.github.com>

* Format code

Co-authored-by: Adrian Kumpf <8999358+adriankumpf@users.noreply.github.com>
2022-06-24 15:24:39 +02:00
Rob Walsh
9500a2d8a4 Add Plugin Notification Example (#2712) 2022-06-24 14:21:02 +02:00
Heesik Shin
901d02df5c update HomeAssistant Integration example yaml (#2704)
Defining manually configured MQTT entities directly under the respective platform keys (e.g., fan, light, sensor, etc.) is deprecated, and support will be removed in Home Assistant Core 2022.9.

Manually configured MQTT entities should now be defined under the mqtt configuration key in configuration.yaml instead of under the platform key.
2022-06-24 11:52:24 +02:00
Adrian Kumpf
a8bcb906b1 Add charge_current_request(_max) MQTT topics
Implements #2412
2022-02-09 17:13:35 +01:00
Pierre Belanger
29bbf7a67c README.md typo (#2410) 2022-01-31 12:47:10 +01:00
Peter Boothby
1f8bbef39a Integration Guide for Node-RED, with examples (#2098)
* Create Node-RED.md

* Update Node-RED.md

* Add files via upload

* Update Node-RED.md

* Update Node-RED.md

* Add files via upload

* Update Node-RED.md

* Update Node-RED.md

* Add files via upload

* Update Node-RED.md

* Update Node-RED.md

* Update Node-RED.md

* Update Node-RED.md

* Update Node-RED.md

* Update Node-RED.md

* Update Node-RED.md

* Update Node-RED.md

* Update Node-RED.md

* Add files via upload

* Update Node-RED.md

* Create Node-RED.md

* Add files via upload

* Update Node-RED.md

* Update Node-RED.md

* Add files via upload

* Update Node-RED.md

* Update Node-RED.md

improved the directions for adding node-red modules

* Add sidebar link

* Format markdown file

* Fix file link

* Move assets into separate directory

* Optimize images

* fix spelling error

"hamburber" sounds like something Donald Trump would write. I fixed the spelling error. :)

Co-authored-by: Adrian Kumpf <8999358+adriankumpf@users.noreply.github.com>
2021-11-08 17:05:36 +01:00
Adrian Kumpf
88d9ac757e Change icon name
Fixes #1832
2021-07-19 15:19:04 +02:00
Jux
a6d881f54f Update home_assistant.md (#1756)
Fixed heading for binary_sensor config. Old one caused some confusion
2021-07-09 15:09:47 +02:00
JakobLichterfeld
aa220d975b Docu: Home Assistant fixed (#1711)
* Update home_assistant.md

- ui-lovelace: added needed views array, now able to load in Home Assistant
- sensor.yml: Correct spacing, now valid yaml-file and able to load in Home Assistant

* Update home_assistant.md

- ui-lovelace: entities with binary_sensor fixed, un-needed '' removed
2021-06-15 12:14:42 +02:00
ffeingol
e810a9b199 Update home_assistant.md (#1634)
Corrected binary_sensors to be sensors in the binary_sensors/tesla.yaml example file
2021-05-20 10:17:31 +02:00
Sean Vig
43ad712fac Add device classes and binary sensors to documented Home Assistant config (#1597)
For the Home Assistant config, for all of the sensors which are binary on/off sensors, add a section which configures these as a binary sensor type. In addition, add device classes to both the binary sensors as well as some of the regular sensors. The device class makes it so the UI will show, for example "Open" or "Closed" for the door, rather than "On" or "Off.
2021-05-13 14:12:08 +02:00
Martin Nadvornik
b60bf5e6bb add drive state battery power to published mqtt topics (#1504) 2021-04-26 11:36:59 +02:00
Philippe Gressé-Lugué
1c785b70e1 Update home_assistant.md (#1374)
Units fixes
2021-02-21 17:35:51 +01:00
Jason Schollenberger
ac3677e84d HomeAssistant documentation update (#1321)
* update homeassistant sensors.yaml example

* update homeassistant lovelace example
2021-02-08 17:47:07 +01:00
Adrian Kumpf
2360f3d0d4 Fix unit of measurements (docs)
Fixes #1131
2020-12-25 23:05:41 +01:00
Lauri Andler
533e4c0a23 Fix unit of measurement for charge added shown in overview, documentation to be correct (#1061)
* Fix units of charge energy added to be correct

The name of the measurement didn't make sense, since it is plotting added energy but was using an unit of power (kW). Changed to make sense.

* Fix unit of energy added

Documentation was using the wrong unit for energy added, fixed.

* Fix unit of energy added

Documentation was using unit of power (kW) for measuring energy added. Fixed to use the correct unit (kWh)
2020-10-30 12:05:23 +01:00
andrewfoster
a37f6c5fe7 Improve garage door automation example (#1039)
The current automation example incorrectly triggers based on the state of the garage door switch, rather than on the state of the Tesla's location. Also changed the action to turn on the garage door switch to be consistent with the description of the automation.
2020-10-27 16:10:57 +01:00
Adrian
7872184a5c Display update version in the homescreen update tooltip (#976)
* Make update_version of the API available

* Add update version to the update tooltip

* Fix formatting

* Update translations to reflect the new tooltip

* Fix car controller test

* Add update_version to the mqtt documentation
2020-10-08 10:33:56 +02:00
Nathan Gardiner
3c263bf000 Update HomeAssistant documentation (#705)
* Update home_assistant.md

   - Removed the static not_home location from the device_tracker definition which fixes #695 
   - Added Garage Door automation
   - Added automation for doors and windows open which would address #698 (for HomeAssistant users at least)

* Enalbe syntax highlighting

* Enalbe syntax highlighting

* Enalbe syntax highlighting

Co-authored-by: Adrian Kumpf <adrian.kumpf@posteo.de>
2020-05-19 19:31:29 +02:00
Adrian Kumpf
c6b265788c Migrate docs to docusaurus
Fixes #564
2020-04-07 19:32:18 +02:00