Skip to content

feat(node-red): add seat cooling, preconditioning max, climate keeper, bioweapon commands - #94

Merged
Bre77 merged 2 commits into
mainfrom
fm/nred-t2-climate
Aug 6, 2026
Merged

feat(node-red): add seat cooling, preconditioning max, climate keeper, bioweapon commands#94
Bre77 merged 2 commits into
mainfrom
fm/nred-t2-climate

Conversation

@Bre77

@Bre77 Bre77 commented Aug 6, 2026

Copy link
Copy Markdown
Member

Intent

  • Tier-2 parity for node-red-contrib-teslemetry's Command node: expose four climate commands that @teslemetry/api already implements but the node's switch-case didn't wrap yet.
    • setSeatCooler -> new setSeatCooler case (msg.seat front_left/front_right, msg.level 0-3).
    • setPreconditioningMax -> setPreconditioningMaxOn/Off cases (msg.manualOverride, default false).
    • setClimateKeeperMode -> new setClimateKeeperMode case (msg.mode 0-3).
    • setBioweaponDefenseMode -> setBioweaponDefenseModeOn/Off cases (msg.manualOverride, default false).
  • Matching dropdown options added to the editor HTML, following the existing on/off-pair pattern used by e.g. setSentryModeOn/Off.
  • No SDK changes needed - all four methods already existed in TeslemetryVehicleApi.

…, bioweapon commands

Wraps the existing @teslemetry/api setSeatCooler/setPreconditioningMax/
setClimateKeeperMode/setBioweaponDefenseMode methods with Command node
switch cases and matching editor dropdown options.
@Bre77 Bre77 added the fm Opened by a Firstmate crewmate label Aug 6, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0e9a7ccbb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .changeset/nred-t2-climate-commands.md Outdated
@@ -0,0 +1,5 @@
---
"node-red-contrib-teslemetry": minor

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use the scoped package name in the changeset

When Changesets processes this entry, this key does not match any workspace package: packages/node-red-contrib-teslemetry/package.json declares @teslemetry/node-red-contrib-teslemetry, and prior changesets use that scoped name. Consequently the versioning step will reject the unknown package instead of producing the minor bump, blocking the release workflow until the frontmatter uses the exact scoped name.

Useful? React with 👍 / 👎.

integer: true,
},
});
result = await vehicle.setSeatCooler(msg.seat, msg.level);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Normalize validated numeric inputs before calling the SDK

When a flow supplies numeric strings—for example msg.level as "2" or msg.mode as "1"validateParameters accepts them because it validates Number(value), but this call and the new climate-keeper call forward the original strings. The SDK's JSON serializer preserves those strings even though the generated request types require numeric values, so otherwise validator-approved messages can be rejected by these endpoints; either pass the converted numbers or reject non-number inputs.

Useful? React with 👍 / 👎.

@Bre77
Bre77 marked this pull request as draft August 6, 2026 06:38
…s before SDK calls

- .changeset used the unscoped "node-red-contrib-teslemetry" name; the
  package is published as "@teslemetry/node-red-contrib-teslemetry", so
  changesets' versioning step would reject it.
- setSeatCooler/setClimateKeeperMode forwarded msg.level/msg.mode as
  received - validateParameters accepts numeric strings (e.g. "2") but
  never coerces them, so a numeric-string payload reached the SDK call
  untouched. Wrap both in Number() after validation.
- Add the node-red package's first test suite (tsx --test, matching the
  other packages' convention) covering the two coercions above.
@Bre77
Bre77 marked this pull request as ready for review August 6, 2026 06:44
@Bre77
Bre77 merged commit 3ae9250 into main Aug 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fm Opened by a Firstmate crewmate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant