Commit Graph

131 Commits

Author SHA1 Message Date
Cody Cutrer
df8d7e28ae [mqtt.homeassistant] JSON Attributes can exist on BinarySensor (#17608)
also fix the conditional for JSON attributes on other components,
and make the channel read only.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:23 +02:00
Cody Cutrer
0deda9d22b [mqtt.homeassistant] JSON Attributes can exist on Climate (#17610)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:23 +02:00
Cody Cutrer
5e040e3dc4 [mqtt.homeassistant] JSON Attributes can exist on Cover (#17611)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:23 +02:00
Cody Cutrer
92e514dc57 [mqtt.homeassistant] JSON Attributes are supported by Scene (#17614)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:23 +02:00
Cody Cutrer
e97833b041 [mqtt.homeassistant] JSON Attributes can exist on Number (#17613)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:23 +02:00
Cody Cutrer
926fff034c [mqtt.homeassistant] JSON Attributes can exist on Lock (#17612)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:23 +02:00
Cody Cutrer
d135e24fe4 [mqtt.homeassistant] Add support for Event component (#17599)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:23 +02:00
Cody Cutrer
356aa13fb7 [mqtt.homeassistant] add JSON attributes channel to several components (#17605)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:23 +02:00
Cody Cutrer
40805e9c94 [mqtt.homeassistant] bring channel ids inline with coding standards (#17604)
but only for newStyleChannels, which is already a breaking change of
most channels getting renamed for 4.3 anyway

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:23 +02:00
Cody Cutrer
89b4e2267d [mqtt.homeassistant] Use a single channel for all events from a single button (#17598)
Use the `subtype` field to collapse multiple DeviceAutomation components into
a single channel.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:23 +02:00
Cody Cutrer
69c519e06d [mqtt.homeassistant] avoid improperly delivered triggers (#17584)
if multiple DeviceTrigger components share a topic, and each
has a payload value configured, only messages matching that
payload should be delivered to the corresponding channel

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:22 +02:00
Cody Cutrer
21c47c85d7 [mqtt.homeassistant] implement non-deprecated color inference for JSON Schema lights (#17529)
In particular, use the color_mode attribute to tell us which color space to parse in,
instead of trying to guess. Some devices will fill out attributes not-pertinent to
the current color mode, and their math might be... less than optimal.
Also sync color temp and color channels when the color_mode is the opposite.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:20 +02:00
Cody Cutrer
f137c07dad [mqtt.homeassistant] Implement optimistic components with AutoUpdatePolicy.RECOMMEND (#17520)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:19 +02:00
Cody Cutrer
2c6a0f052c [mqtt.homeassistant] fix newStyleChannels (#17491)
* [mqtt.homeassistant] fix newStyleChannels
* further simplify channel IDs

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:19 +02:00
Cody Cutrer
37aa25d0a6 [mqtt.homeassistant] Fix jinja usage in availability templates (#17400)
* [mqtt.homeassistant] Fix jinja usage in availability templates

Use the local Jinjava, instead of implicitly depending on the Jinja
transformation service.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:17 +02:00
Cody Cutrer
53937d0c08 [mqtt.homeassistant] implement iif and is_defined jinja function and filters (#17435)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:17 +02:00
Cody Cutrer
c6097cc517 [mqtt.homeassistant] Update Jinjava to 2.7.3 (#17412)
* [mqtt.homeassistant] Update Jinjava to 2.7.3

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:16 +02:00
Cody Cutrer
48c96f98c8 [mqtt.homeassistant] Include the details of JSON syntax errors when parsing fails (#17452)
While it's useful in general to not have to copy/paste a MQTT message into a JSON
parser to verify syntax, it also includes details about fields that are the wrong
data type that a generic JSON parser won't catch. A la #17375.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:16 +02:00
Cody Cutrer
6dc2b6e478 [mqtt.homeassistant] remove channels for no-longer-configured components (#17447)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:16 +02:00
Holger Friedrich
bd9a50e2ed Reduce SAT warnings (#17406)
* Reduce SAT warnings

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:14 +02:00
Cody Cutrer
a4d083281a [mqtt.homeassistant] Fully implement Fan component (#17402)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:14 +02:00
Cody Cutrer
ae8f53274d [mqtt.homeassistant] Implement template schema lights (#17399)
* [mqtt.homeassistant] implement template schema lights

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:14 +02:00
Cody Cutrer
5f2253e656 [mqtt.homeassistant] Use Jinjava directly (#17378)
* [mqtt.homeassistant] Use Jinjava directly

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:14 +02:00
J-N-K
1b7c906c5e [transform.jinja] Properly use jinjava OSGi (#17358)
Depends on https://github.com/openhab/openhab-osgiify/pull/49

Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:12 +02:00
jimtng
9fe534ca4c [mqtt.homeassistant] Update config abbreviations (#17359)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:12 +02:00
jimtng
c1307a2764 [mqtt.generic] Support chaining transformations without an intersection symbol (#17290)
* [mqtt.generic] Support chaining transformations without an intersection symbol

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:12 +02:00
jimtng
bd399e8e2a [jinja] Use osgiified Jinjava (#17356)
* [jinja] Use osgiified Jinjava

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:12 +02:00
openhab-bot
45ff0ea8e9 New Crowdin updates (#17285)
* New translations mqtt.properties (Italian)

Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:09 +02:00
Cody Cutrer
795f797ab7 [mqtt.homeassistant] Fix color lights that don't specify color_mode: true (#17240)
* [mqtt.homeassistant] Fix color lights that don't specify color_mode: true

See https://github.com/home-assistant/core/pull/111676

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:08 +02:00
Cody Cutrer
1bfa807bee [mqtt] Simplify homeassistant thing types, and use AbstractStorageBasedTypeProvider (#16600)
* [mqtt.homeassistant] don't dynamically generate channel types

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:07 +02:00
Cody Cutrer
09ba1bb41d [mqtt.generic] Send ON/OFF for dimmer channels when so configured (#15929)
Similar to how UP/DOWN are processed for rollershutters.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:04 +02:00
lsiepel
90da4e40cc Apply Spotless after release (#17016)
* Spotless

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:00 +02:00
openhab-bot
5fa59d316f [unleash-maven-plugin] Preparation for next development cycle.
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:00 +02:00
Mark Herwege
b079e09b35 [MQTT] Fix state description (#16866)
* fix state description

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:48:54 +02:00
openhab-bot
69f4450059 New translations mqtt.properties (Italian) (#16320)
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:48:29 +02:00
Cody Cutrer
ff782e4101 [mqtt.homeassistant] Trigger HA devices to update discovery information (#16143)
* [mqtt.homeassistant] Trigger HA devices to update discovery information

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:48:29 +02:00
Cody Cutrer
68e912b19f [mqtt.homeassistant] Update config abbreviations (#16246)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:48:29 +02:00
Wouter Born
ef59934e9c Use diamond operator and remove redundant type arguments (#16249)
Signed-off-by: Wouter Born <github@maindrain.net>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:48:25 +02:00
Cody Cutrer
34c2155775 [mqtt.homeassistant] Improve support for Lock component (#16052)
* [mqtt.homeassistant] Improve support for Lock component

 * handle state and command payloads differing (as they do by default)
 * expose full state possibilities and OPEN command by adding
   a TextValue channel
* Recognize intermediate lock states as unlocked on the switch channel

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:48:24 +02:00
Jacob Laursen
92145428df Update license headers to 2024 (#16168)
* Update copyright year in configuration
* Update license headers
* Manually update nibeheatpump headers (.cpp/.h/.ino)
* Manually update smsmodem header
* Manually update hueemulation header
* Manually update addon-header.xml header

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:48:23 +02:00
openhab-bot
fcb9976047
New Crowdin updates (#16130)
* New translations mqtt.properties (Italian)
2023-12-29 16:00:43 +01:00
Cody Cutrer
9a6836cc12
[mqtt.homeassistant] Update README (#16129)
Enumerate supported components, rather than a few limitations.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-12-28 12:59:48 +01:00
Cody Cutrer
5e26b7073a
[mqtt.homeassistant] update example config topic (#16128)
The prefix (homeassistant/) and the suffix (/config) are
automatically added

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-12-28 00:52:39 +01:00
Holger Friedrich
533cc666ab
Apply spotless after release (#16097)
* Apply spotless after release
* itests: resolve bundles

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-22 23:30:38 +01:00
openhab-bot
83e0485219 [unleash-maven-plugin] Preparation for next development cycle. 2023-12-22 14:37:48 +00:00
openhab-bot
71066837dc
New translations mqtt.properties (Italian) (#16067) 2023-12-15 20:57:40 +01:00
Cody Cutrer
98fb791dc5
[mqtt.homeassistant] Add support for Update component (#14241)
* [mqtt.homeassistant] add support for Update component

This component is fairly non-standard - it doesn't add any channels.
Instead, it provides several properties to the thing, and also adds
a thing configuration allowing you to trigger an OTA update on a
Home Assistant device from MainUI.

---------

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-12-14 23:53:14 +01:00
Cody Cutrer
73559be058
[mqtt.homeassistant] Improve Cover support (#15875)
* [mqtt.homeassistant] improve Cover support

 * Add support for covers that report position
 * Handle when command and state values for OPEN/CLOSE/STOP
   differ (as they do by default)
 * Expose the full cover state, since it can have tell you
   if the cover is moving or not
 * Handle covers that have a position only, but not a state

* add constants to clarify up/down values

* Be sure to parse percents from strings in RollshutterValue

---------

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-12-11 19:11:27 +01:00
Cody Cutrer
d6b19fecfe
[mqtt.homeassistant] handle multiple availability topics (#15977)
* [mqtt.homeassistant] handle multiple availability topics

---------

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-12-07 20:22:03 +01:00
Cody Cutrer
9d214b0558
[mqtt.homeassistant] interpret a dimmable light as OFF properly from zigbee2mqtt (#15925)
* [mqtt.homeassistant] interpret a dimmable light as OFF properly from zigbee2mqtt

zigbee2mqtt can send a brightness of say 99, with a state of OFF, when a bulb is
off. make sure if state is sent, it overrides all other inferences

* handle brightness but not color bulbs

---------

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-11-25 12:47:00 +01:00