37 Commits

Author SHA1 Message Date
dependabot[bot] 73d8ae8956 fix(ignore): bump the minor-patch group with 3 updates (#31559)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nerivec <62446222+Nerivec@users.noreply.github.com>
2026-03-31 20:46:21 +02:00
Nerivec db20369447 fix: Various fixes to align behaviors (+add benchmarks for dev) (#28011) 2025-07-18 21:34:51 +02:00
Koen Kanters c87d4524d5 fix(ignore): Migrate to Biome 2 (#27785) 2025-06-28 10:20:41 +02:00
Nerivec 7cbf31a129 fix(ignore): Group API proper typing (#27243) 2025-04-28 21:01:14 +02:00
Nerivec 6fbb8b5ca2 fix: Migrate to Biome (#27150) 2025-04-18 20:34:47 +02:00
Nerivec 36e2baf081 fix: Use Map for State (#27105) 2025-04-14 21:51:01 +02:00
Nerivec fc31e0af0a fix(ignore): partial cleanup for biome move (#27076) 2025-04-12 14:02:47 +02:00
Nerivec db578d9d11 fix: Use dynamic import for optional extensions (#26735) 2025-03-15 08:07:56 +01:00
Rob Coleman 0462b94f5a fix: Only use endpoint-specific states if the device definition uses them (#26019) 2025-01-27 20:54:01 +01:00
Nerivec 06f44533af feat: Use Vitest for testing (#25284)
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2024-12-22 20:19:45 +01:00
Nerivec 758ab34747 fix(ignore): import using node: prefix for built-in (#25248) 2024-12-18 22:19:33 +01:00
Nerivec 1a9c79bb2f feat: Typing for MQTT API (#25098) 2024-12-07 20:21:30 +00:00
IIIEII d891320314 fix(ignore): Fixed additional case of calculation of group state when including no… (#25104) 2024-12-07 21:05:55 +01:00
IIIEII 9227e139de fix: Fixed calculation of group state when including non-default endpoints (#25059) 2024-12-04 21:20:47 +01:00
Nerivec 9537ef05d5 fix!: Improve bind/bridge/groups parsing and resolving consistency (#24432)
* Improve bind/bridge/groups parsing and resolving consistency

* Fix mqtt payload casing. Improve typing.

* Cleanup tests

* Add test for bind endpoint by ID.

* Match behavior for group response 'default' endpoint.
2024-12-01 20:09:28 +01:00
Koen Kanters 3f76586a50 fix!: Remove configuring group members through configuration.yaml (#24338)
* fix!: Remove configuring group members through `configuration.yaml`

* Updates

* Updates

* fix

* Updates

* Feedback
2024-12-01 20:09:28 +01:00
Koen Kanters b6186623f0 feat!: The big cleanup (#24200)
* Remove `deviceGroupMembership`

* Fix controller.ts

* Remove `legacy_api` logic from non-legacy extensions.

* Fix network map coverage.

* Remove all `legacy` extensions.

* Remove `legacy_availability_payload`, `legacy_api`. Remove legacy from configure.

* Fix prettier.

* Remove some leftovers

* Renamed `updateAvailable` to `update_available`

* Remove emitPublishAvailability

* Remove `configuration.yaml`

* Switch to pnpm

* Remove direct mqtt-packet dependency.

* fix pretty

* fix `getDependencyVersion`

* fix pnpm publish

* fix(ignore): fix pnpm publish

* Remove deprecated bridge `config/*`

* Improve update script

* Improve update.sh

---------

Co-authored-by: Nerivec <62446222+Nerivec@users.noreply.github.com>
2024-12-01 20:06:49 +01:00
Massimiliano 076ada2325 fix: Fix group state change for open/close devices (#24226)
* Fix group state change if OPEN

* Runned Prettier
2024-10-06 21:35:46 +02:00
Koen Kanters afd80449b3 fix(ignore): Migrate to eslint 9 (#23800)
* Eslint 9

* Automatic changes

* Manual changes

* Process feedback

* u
2024-09-08 14:26:18 +02:00
Nerivec 48d77e4b5e fix: Enforce TS strict type checking (#23601)
* Enforce TS `strict` type checking.

* updates

* updates

* updates

* Updates

* Updates

* pretty

* u

* u

* u

* Updates

* updates

* Updates

* Updates

* `ReadonlyArray`

* scenesChanged

* objectID

* Improve coverage

* u

* u

* process feedback

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2024-09-07 11:40:50 +00:00
Nerivec 13ac8a0f53 fix: Improve looping performance (#23541)
* Use herdsman improved looping.

* Fix lint.

* Fix tests.

* Feedback
2024-08-08 20:21:40 +02:00
Koen Kanters 30227a13ae chore: Implement prettier (#23153)
* chore: Implement prettier

* Run prettier

* fix lint

* process feedback

* process feedback
2024-06-24 18:58:47 +00:00
Nerivec 3d772b5db3 fix: Bind code optimisation/formatting (#23110)
* Bind code optimization/formatting

* Feedback

* Fix coverage
2024-06-23 10:38:00 +02:00
Nerivec 6064194e52 fix: Groups code optimization/formatting (#23015) 2024-06-11 21:08:01 +02:00
Nerivec 2b8eaa196a fix: Enforce no floating promises (#22880)
* Enforce no floating promises.

* forEach => for/of. Fix tests.
2024-06-04 20:05:39 +02:00
Oleksandr Masliuchenko 81335e5b4b fix: Remove dependency on predefined list of endpoints (parseEntityID() function) (#21264)
* Add function resolveEntityByID() function as an improved alternative for parseEntityID()

* Port deviceGroupMembership.ts from parseEntityID() to resolveEntityByID()

* Migrade groups.ts from parseEntityID() to resolveEntityByID()

* Improve test coverage on groups functionality

* Migrate from parseEntityID() to resolveEntityByID() for bridge functionality

* Migrate from parseEntityID() to resolveEntityByID() for bind functionality

* Finally get rid of parseEntityID() function

* Fix linter issues

* Move resolveEntityAndEndpoint() function to zigbee.ts

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2024-02-08 20:54:05 +01:00
Oleksandr Masliuchenko a5a87a79a8 fix: Match endpoint name in the MQTT topic based on endpoints listed in the definition (#21214)
* Add endpoint matching based on the endpoint names list in the device definition

* Cleanup debug prints

* Correct creating endpoint names list, filter out null elements

* Correct test due to slightly changed behavior

* Fix endpoint name lookup when converter does not provide full name-to-id mapping

* Simplify topic name matching

* Remove obsolete branches, improve code coverage

* Make linter happy

* Make linter happy

* Remove dependency on endpoint names while removing device from all groups

* Get rid of predefined list of endpoints when processing group state update

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2024-02-07 20:12:48 +01:00
Koen Kanters dd1e0db407 fix(ignore): Use zhc types (#20006)
* fix(ignore): Use zhc TS types

* updates
2023-12-04 10:05:05 +01:00
Koen Kanters 1f642d86e8 Add disabled option (#15589)
* Add disabled option

* Updates

* Tests

* Add restart required
2022-12-23 23:56:29 +01:00
Koen Kanters da4a3b9a77 Fix exception when using group remove_all. https://github.com/Koenkk/zigbee2mqtt/issues/13484 2022-08-10 22:38:04 +02:00
Koen Kanters 420b34c909 Fix group and device states changing when cached states are published. https://github.com/Koenkk/zigbee2mqtt/issues/13028 2022-07-12 17:01:29 +02:00
Koen Kanters f2e953cf18 Add group off_state option (#12868) 2022-06-18 15:47:06 +02:00
Koen Kanters 7f1f1497c6 Always return a device state 2022-05-08 09:58:30 +02:00
Koen Kanters 30177b0db4 Restructure settings (#10437)
* -

* deep copy schema

* -

* -

* -

* -

* -

* -

* -

* -

* -

* -

* -

* -
2022-01-09 22:28:44 +01:00
Valentin cd5dd39971 Dynamically expose attributes (#10132)
* Dynamically expose attributes

* Rollback options in configure step

Use event instead, as proposed in https://github.com/Koenkk/zigbee2mqtt/pull/10132/files#r771801648

* Simplify code

* Switch to already existing event

* Fix all unit tests

* Remove redundant code

* Perfect rollback

* Fix typescript types

* Updates

* Updates

* Updates

* updates

* Improve

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2021-12-22 19:31:41 +00:00
Koen Kanters 6f9371e4b0 Fix incorrect state when last_seen and debounce is enabled. https://github.com/Koenkk/zigbee2mqtt/issues/8958 https://github.com/Koenkk/zigbee2mqtt/issues/9010 2021-10-07 20:36:42 +02:00
Koen Kanters 045ee573a0 Final TypeScript refactor (#8859)
* Update

* Updates

* More refactoringzzz

* Bindoo

* Loadz of typescripting

* Logga

* Updates

* Updates

* Updates

* Updates

* cleanup

* updates

* Fix coverage

* Fixes

* Updates

* Updates
2021-10-02 10:09:38 +02:00