Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency bumps #8

Merged
merged 4 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Welcome to `@digital-alchemy/synapse`!

This project builds on the functions provided by `@digital-alchemy/hass` to provide the ability to generate entities within your Home Assistant install. With the help of a [custom component](https://github.com/Digital-Alchemy-TS/synapse-extension), you can gate logic behind switches, report states with sensors, attach functions to buttons, and more!

- [Extended docs](https://docs.digital-alchemy.app/Synapse)
- [Extended docs](https://docs.digital-alchemy.app)
- [Discord](https://discord.gg/JkZ35Gv97Y)

## 💾 Install
Expand All @@ -21,10 +21,11 @@ Then add to your application / library
```typescript
import { LIB_SYNAPSE } from "@digital-alchemy/synapse";
import { LIB_HASS } from "@digital-alchemy/hass";
import { LIB_FASTIFY } from "@digital-alchemy/fastify-extension";

// application
const MY_APP = CreateApplication({
libraries: [LIB_SYNAPSE, LIB_HASS],
libraries: [LIB_SYNAPSE, LIB_HASS, LIB_FASTIFY],
name: "home_automation",
})

Expand Down
34 changes: 17 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@digital-alchemy/synapse",
"repository": "https://github.com/Digital-Alchemy-TS/synapse",
"homepage": "https://docs.digital-alchemy.app/Synapse",
"version": "0.3.8",
"version": "24.06.1",
"scripts": {
"build": "rm -rf dist; tsc",
"test": "./scripts/test.sh",
Expand All @@ -25,9 +25,9 @@
},
"license": "MIT",
"dependencies": {
"@digital-alchemy/core": "^0.3.17",
"@digital-alchemy/fastify-extension": "^0.3.3",
"@digital-alchemy/hass": "^0.3.31",
"@digital-alchemy/core": "^24.6.1",
"@digital-alchemy/fastify-extension": "^24.6.1",
"@digital-alchemy/hass": "^24.6.2",
"bonjour": "^3.5.0",
"dayjs": "^1.11.11"
},
Expand Down
2 changes: 2 additions & 0 deletions src/mock/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@
suggested_object_id: "magic_the_sensor",
unit_of_measurement: "ft/s",
});

sensor.onUpdate(() => {
//
});

const binary_sensor = synapse.binary_sensor({
context,
device_class: "window",
name: "blinkey",

Check warning on line 30 in src/mock/generator.ts

View workflow job for this annotation

GitHub Actions / lint-and-build

Unknown word: "blinkey"

Check warning on line 30 in src/mock/generator.ts

View workflow job for this annotation

GitHub Actions / publish

Unknown word: "blinkey"
suggested_object_id: "blinkey_the_binary_sensor",

Check warning on line 31 in src/mock/generator.ts

View workflow job for this annotation

GitHub Actions / lint-and-build

Unknown word: "blinkey"

Check warning on line 31 in src/mock/generator.ts

View workflow job for this annotation

GitHub Actions / publish

Unknown word: "blinkey"
});
scheduler.interval({
exec() {
const number = Math.floor(Math.random() * 1000);

Check warning on line 35 in src/mock/generator.ts

View workflow job for this annotation

GitHub Actions / lint-and-build

No magic number: 1000

Check warning on line 35 in src/mock/generator.ts

View workflow job for this annotation

GitHub Actions / publish

No magic number: 1000
sensor.storage.set("state", number);
binary_sensor.storage.set("is_on", !binary_sensor.storage.get("is_on"));
},
Expand Down
7 changes: 2 additions & 5 deletions src/synapse.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ export const LIB_SYNAPSE = CreateLibrary({
type: "number",
},
METADATA: {
description: [
"A string to uniquely identify this application",
"Should be unique within home assistant, such as a uuid",
"Default value calculated from hostname + username + app_name",
],
description: "Extra data to describe the app + build default device from",
type: "internal",
} as InternalConfig<HassDeviceMetadata>,
METADATA_HOST: {
Expand All @@ -120,6 +116,7 @@ export const LIB_SYNAPSE = CreateLibrary({
},
PUBLISH_BONJOUR: {
default: true,
description: "Publish mDNS discovery topics to allow zeroconf discovery",
type: "boolean",
},
},
Expand Down
Loading