2194 Commits

Author SHA1 Message Date
Magnus Ihse Bursie a2ce3230ac fix: Add additional discovery lookups for Home Assistant (#24555) 2024-10-31 20:36:52 +01:00
Bacchus777 e0a0f868c0 fix: Improve power_phase_b and power_phase_c Home Assistant discovery (#24538)
Added power_phase_b and power_phase_c
2024-10-29 20:07:07 +01:00
Cody Cutrer ab726061b7 fix: Remove extraneous whitespace in template for binary attributes (#24520)
I assume Home Assistant strips the whitespace at some point before
comparing it to payload_on/payload_off, but I haven't quite found where yet.
I have confirmed Python preserves the whitespace when simply evaluating
the Jinja.

For openHAB, it does not strip the whitespace, causing errors because
it doesn't match the payload_on or payload_off values. At some point I'd
like to bring openHAB inline with Home Assistant, but I need to do so
carefully without breaking something unexpectedly (especially with non-
Home Assistant MQTT integrations). In the meantime, this should fix the
issue in openHAB, without causing issues for Home Assistant or any other
software that follows Home Assistant's MQTT discovery process.
2024-10-28 21:16:40 +01:00
Koen Kanters e2f19f19b4 fix: Frontend code cleanup @Nerivec (#24322)
Co-authored-by: Nerivec <62446222+Nerivec@users.noreply.github.com>
2024-10-14 19:56:00 +02:00
Vladimir Kotikov 1fdf0a0a47 feat: Allow serving frontend under subpath (#24244)
* Allow app running in the server subdirectory

* Use path.posix to manage urls

* Add base_utl to config schema
2024-10-10 14:22:48 +02: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
Ivan F. Martinez 17ac9cf8e7 feat: Add throttle option for devices (#24122)
* basic spam control

* used npm run pretty:write

* add test for SPAMMER description to comply with 100% coverage test

* define friendly name to spammer test devices

* Update README.md

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>

* trying now with throttleit library

* lint corrections

* last lint request

* correct await / async definiction

* remove description support

* change first command to be executed

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2024-10-02 21:15:15 +02:00
Koen Kanters 7ad51ce662 fix: Fix Home Assistant Invalid state message error when state is too long (#24045) 2024-09-21 00:06:44 +02:00
Koen Kanters e642f7c86a fix(ignore): Sync eslint settings from zhc (#23951)
* fix(ignore): Sync eslint settings from zhc

* u
2024-09-12 19:36:57 +00:00
Tomer c6ca472ca1 fix: Improve performance when logging is disabled (#23893)
* Improve log performance

* Bug fix

* Revert sample configuration

* Align package versions

* Revert dependecies version to allow testing

* Update package-lock.json

* Fix prettier issue

* Coverage to 100%

* Fix CR comments

* remove uneeded changes

* Make the same perf optimization to the MQTT messages

* Fix MQTT tests

* prettier fix

* Allow easy mocking of stub logger callTransports function to receive the actual message

* cleanup leftover

* Fix prettier issues

* Finalize logger mock structure and add few lambda log calls

* fix prettier issue

* Run prettier

* Revert "fix prettier issue"

This reverts commit b409d538e3.

* Update zigbee.ts

Fix prettier issue

* Fix test issues

* Revert await removal
2024-09-12 20:33:05 +02:00
Koen Kanters 9c72a768f2 fix(ignore): Improvement for afd80449b3 2024-09-08 21:33:56 +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
Koen Kanters 13a108ddbc fix: Log stack trace when update check fails https://github.com/Koenkk/zigbee2mqtt/discussions/23798 2024-09-06 14:37:20 +02:00
Koen Kanters 557b17ad5b fix: Fix Cannot read properties of undefined (reading 'some') https://github.com/Koenkk/zigbee2mqtt/issues/23821 2024-09-02 22:22:19 +02:00
Koen Kanters 64222d231f Update zigbee-herdsman-converters to 20.8.5 (#23799)
* fix(ignore): update zigbee-herdsman-converters to 20.8.5

* Update utils.ts
2024-09-01 19:23:14 +00:00
Koen Kanters b2bae6ba94 fix: Add logging when loading external converters https://github.com/Koenkk/zigbee2mqtt/issues/23703 2024-08-30 20:23:55 +02:00
Ilya Kirov b4176d6fee feat: Add support for zboss adapter (#23747)
https://github.com/Koenkk/zigbee-herdsman/pull/1165
2024-08-27 20:37:00 +02:00
Koen Kanters 22980177b6 fix(ignore): Fix crash when retrieving state (#23679) 2024-08-20 20:57:09 +02:00
Koen Kanters efd3d3dfb0 fix: Set zigbee-herdsman transmit power through settings on startup (#23566)
* fix: Set zigbee-herdsman transmit power through settings on startup

* use advanced
2024-08-09 12:33:59 +00:00
Koen Kanters aeba93d0a3 fix(ignore): update zigbee-herdsman-converters to 19.75.0 (#23565)
* fix(ignore): update zigbee-herdsman-converters to 19.75.0

* fix

---------

Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com>
2024-08-08 21:14:32 +02: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 bd7dec0f11 fix(ignore): update dependencies (#23508)
* fix(ignore): update dependencies

* update

---------

Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com>
2024-08-05 21:08:40 +00:00
Koen Kanters 9bb21f486c chore: merge master to dev 2024-08-04 22:14:52 +02:00
Laurent d0f5733db3 fix: Remove group from Home Assistant when removed (#23492)
* Fire event when group gets removed

* Add a unit test for the new behavior

* Make prettier happy

* Add missing return type

* Merge device and group removal events

* Unbreak bridgeLegacy.ts

* Update homeassistant.ts

* Update bridge.ts

* Update bridge.ts

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2024-08-04 22:14:36 +02:00
Koen Kanters 5b610afa8f fix: Add min/max for some adapter options (#23503)
* fix: Add min/max for some adapter options

* update
2024-08-04 19:53:29 +00:00
Koen Kanters 3217332e46 fix: Fix expose category ignored by HA discovery (#23494) 2024-08-03 13:00:29 +02:00
Koen Kanters d9ba4524e4 fix(ignore): fix 5fcf295ab8 2024-07-25 21:59:40 +02:00
Koen Kanters 5fcf295ab8 fix: Fix race condition in frontend extension (#23412) 2024-07-24 20:20:24 +00:00
Nerivec b7d9d9e142 fix: Improve looping when retrieving all devices from herdsman (#23405) 2024-07-24 21:58:48 +02:00
Koen Kanters 26b1613948 fix(ignore): Remove some unecessary string concatenations 2024-07-22 21:33:24 +02:00
Koen Kanters 541221bbbd fix(ignore): Update channel change description (#23333)
* fix(ignore): Update channel change description

* Update settings.schema.json
2024-07-16 22:02:41 +02:00
Koen Kanters e3fa0bfb65 fix: Ignore cache when re-interviewing device (#23328)
* fix: Ignore cache when re-interviewing device

* updates
2024-07-12 10:15:33 +00:00
Koen Kanters 8397f47649 fix: Fix availability blocking other extensions startup (#23316)
* fix: Fix availability blocking frontend startup

* Process feedback

* fix
2024-07-11 21:07:01 +02:00
Koen Kanters 1bf385c5ff fix(ignore): fix 6b9247c84d 2024-07-06 11:56:16 +02:00
Koen Kanters 6b9247c84d fix: Truncate text of Home Assistant text sensor https://github.com/Koenkk/zigbee2mqtt/issues/23199 2024-07-06 11:22:26 +02:00
Nerivec 6cb62e53cf fix: Fix syslog output (#23269) 2024-07-06 10:57:24 +02:00
Gernot Messow 4210edf60e fix: Allow definition to override HA discovery payload (#23075)
* Added function to override payloads for non-conforming devices

* override implementation for Bosch BTH-RA
* unit test including mockup for this device

* Experimental and broken integration of overrideHaConfig

* Not working experiments; mqtt publish debug output

* fixes

* Updates

* fix

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2024-07-03 21:27:45 +02:00
Ikko Eltociear Ashimine 5dde063119 chore: update homeassistant.ts (#23213)
unecessary -> unnecessary
2024-06-30 20:59:53 +02:00
Koen Kanters dc7a06cf56 fix: Don't allow homeassistant.discovery_topic to be equal to mqtt.base_topic https://github.com/Koenkk/zigbee2mqtt/issues/23109 (#23209) 2024-06-30 10:42:24 +00: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
Koen Kanters 8780ab2792 fix(ignore): update dependencies (#23137)
* fix(ignore): update dependencies

* fix

---------

Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com>
2024-06-24 12:01:44 +02:00
Jorge Schrauwen ad84374046 fix: Fix OTA overriding custom software version attribute (#23129)
* fix: OTA loses version info for develco/frient

This fix is not perfect, as it will still print that it got updated from null to null.

We just moved the reconfigure later, which will trigger this https://github.com/Koenkk/zigbee-herdsman-converters/blob/000041cba216822dab151151c493b560678da91a/src/devices/develco.ts#L36
for develco/frient devices that have it in their configure. (Which should be all of them)

Of note though, ZCL marks both dateCode and swBuildId as optional attributes, so Develco/Frient returning UNSUPPORTED_ATTRIBUTE here is not outside of spec. Although I'm not sure there is a cleaner way to do this.

* Update otaUpdate.test.js

* Update otaUpdate.ts

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2024-06-23 11:24:03 +02: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 9c2264e86e fix: MQTT code optimization/formatting (#23072)
* MQTT code optimization/formatting

* Feedback.

* Move `onConnect` logic inside `connect` event.
2024-06-18 13:59:07 +02:00
Nerivec f57465324a fix: Availability code optimization/formatting (#23065)
* Availability code optimization/formatting

* Fix mock.

* Fix map => some
2024-06-16 17:25:40 +02:00
ghoz d41cf43a7c fix: Exclude homeassistant entries from null cleanup (#22995)
* exclude homeassistant entries from null cleanup

* Add a test

* Don't hardcode the exclude list, add one more test

* implement suggested changes as per review
2024-06-15 10:27:29 +02:00
ghoz ef2c939482 fix: Don't call onEvent on disabled devices (#23058)
As z2m requires a restart for  enable/disable to be effective,
we don't need to handle changes at runtime (stop events etc)
2024-06-15 10:26:06 +02:00
Koen Kanters 0754fa8552 fix(ignore): Improve network key hiding https://github.com/Koenkk/zigbee-herdsman/pull/1086 2024-06-13 21:19:09 +02:00
ghoz eff341bd14 fix: Differentiate the MQTT publish/ received from regular MQTT logs (#23026)
* Differentiate the spammy "MQTT publish"/"received MQTT message" from regular logs

Rather than creating subnamespaces, keep the z2m:mqtt logger namespace only for those 2 , move back to z2m default for the rest.

* fix tests
2024-06-12 21:01:16 +02:00