Commit Graph

116 Commits

Author SHA1 Message Date
Cody Cutrer
5de73f923a
[mqtt.homeassistant] implement iif and is_defined jinja function and filters (#17435)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-09-26 21:25:36 +02:00
Cody Cutrer
bcfbd6480a
[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>
2024-09-23 16:57:21 +02:00
Cody Cutrer
ab2daded4c
[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>
2024-09-20 20:47:20 +02:00
Cody Cutrer
b77458dca7
[mqtt.homeassistant] remove channels for no-longer-configured components (#17447)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-09-20 08:52:05 +02:00
Holger Friedrich
54fd13b0c1
Reduce SAT warnings (#17406)
* Reduce SAT warnings

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-09-13 17:20:11 +02:00
Cody Cutrer
6953c8bc6f
[mqtt.homeassistant] Fully implement Fan component (#17402)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-09-11 22:36:43 +02:00
Cody Cutrer
436dea619d
[mqtt.homeassistant] Implement template schema lights (#17399)
* [mqtt.homeassistant] implement template schema lights

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-09-10 22:37:05 +02:00
Cody Cutrer
110fd9b1ca
[mqtt.homeassistant] Use Jinjava directly (#17378)
* [mqtt.homeassistant] Use Jinjava directly

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-09-09 14:54:08 +02:00
J-N-K
c1a63ff4c6
[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>
2024-09-04 23:07:21 +02:00
jimtng
06b361c139
[mqtt.homeassistant] Update config abbreviations (#17359)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-09-01 18:17:57 +02:00
jimtng
9c5689df90
[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>
2024-09-01 12:54:37 +02:00
jimtng
03863feab4
[jinja] Use osgiified Jinjava (#17356)
* [jinja] Use osgiified Jinjava

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-09-01 12:51:05 +02:00
openhab-bot
cd398b701e
New Crowdin updates (#17285)
* New translations mqtt.properties (Italian)
2024-08-18 22:10:31 +02:00
Cody Cutrer
740e44994f
[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>
2024-08-13 23:22:31 +02:00
Cody Cutrer
73a3f151c9
[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>
2024-08-12 21:23:24 +02:00
Cody Cutrer
0156612c5c
[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>
2024-07-23 21:56:38 +02:00
lsiepel
71a208b91b
Apply Spotless after release (#17016)
* Spotless

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
2024-07-07 23:20:16 +02:00
openhab-bot
4b5e4646ac [unleash-maven-plugin] Preparation for next development cycle. 2024-07-07 18:09:31 +00:00
Mark Herwege
f64cb0bbd5
[MQTT] Fix state description (#16866)
* fix state description

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-06-14 19:07:58 +02:00
openhab-bot
fda90d1bb2
New translations mqtt.properties (Italian) (#16320) 2024-01-24 22:45:47 +01:00
Cody Cutrer
3ea1451050
[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>
2024-01-22 22:36:53 +01:00
Cody Cutrer
f99d9777f0
[mqtt.homeassistant] Update config abbreviations (#16246)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-01-22 20:50:44 +01:00
Wouter Born
a2868bb0dc
Use diamond operator and remove redundant type arguments (#16249)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-09 23:46:15 +01:00
Cody Cutrer
a53b740c51
[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>
2024-01-02 20:02:47 +01:00
Jacob Laursen
f4596f581e
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>
2024-01-01 18:14:57 +01: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
Cody Cutrer
935415aa6e
[mqtt.homeassistant] VETO updates to read only channels (#15937)
I.e. Button, Scene, and Binary Sensors.

Also ensure we set up the CommandDescription, since some value types mights use it.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-11-25 12:27:05 +01:00
Cody Cutrer
89380b0e41
[mqtt.homeassistant] Add support for Scene component (#15916)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-11-19 17:54:33 +01:00
Cody Cutrer
44e32d3fbb
[mqtt.homeassistant] implement effect channel for light (#15914)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-11-19 17:52:51 +01:00
Cody Cutrer
fc9579430e
[mqtt.homeassistant] Add support for Button component (#15892)
* [mqtt.homeassistant] Add support for Button component
* use a StringValue instead of an OnOffValue

---------

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-11-19 17:06:54 +01:00
Cody Cutrer
c2a6329408
[mqtt.homeassistant] Handle empty device name (#15918)
Follow on to #15427

ring-mqtt sends `"name": ""`, not `"name": null` or simply omitting it,
so be sure to handle that way as well

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-11-19 00:58:25 +01:00
Cody Cutrer
8ca03bd5c7
[mqtt.homeassistant] fix compilation problems (#15915)
Due to #15427 and #14839 being developed independently, but merged
to main successively

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-11-18 23:38:52 +01:00
Cody Cutrer
7fc351c9c2
[mqtt.homeassistant] handle null component name (#15427)
* [mqtt.homeassistant] handle null component name

channels from such components will not have a group. this is
now done by zigbee2mqtt for the "default" component of a device,
such as the light. HASS encourages this as of release 2023.8

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-11-18 22:46:57 +01:00
Cody Cutrer
27924d677f
[mqtt.homeassistant] Support color temp on JSON schema lights (#14839)
* [mqtt.homeassistant] support color temp on JSON schema lights

also adds a color_mode channel if color temp is possible, so you can
know how the bulb is behaving

* put color mode channel construction into buildChannels()

---------

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-11-18 21:31:49 +01:00
Holger Friedrich
cbf4411034
Improve javadoc for all addons (#15667)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-09-30 21:49:12 +02:00
Holger Friedrich
edaf17b345
Java 17 features (H-M) (#15520)
- add missing @override
- Java style array syntax
- remove redundant modifiers
- always move String constants to left side in comparisons
- simplify lambda expressions and return statements
- use replace instead of replaceAll w/o regex
- instanceof matching and multiline strings
- remove null check before instanceof

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-09-08 14:36:59 +02:00
Kai Kreuzer
72607d3bee Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-07-24 01:20:31 +02:00
openhab-bot
809fceaff3 [unleash-maven-plugin] Preparation for next development cycle. 2023-07-23 19:19:01 +00:00
Wouter Born
0c3934f3c8
Use Eclipse formatter 4.25 with Spotless (#15264)
This version still checks test files.

See: openhab/openhab-core#3515

Signed-off-by: Wouter Born <github@maindrain.net>
2023-07-18 09:02:05 +02:00
Cody Cutrer
fa57c627a9
[mqtt.homeassistant] don't set range on current temp channel (#14858)
the min/max from the config are specifically only for the set point.
i.e. for a heater in winter when the heater is off, it may have
a set point range of 65-104°F, but if it's off for an unoccopied room
the ambient temperature might drop far below 65

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-04-24 13:22:18 +02:00
Holger Friedrich
428ccbe075
[mqtt][tradfri][webthing] Adapt to ColorUtil changes in core (#14810)
* [mqtt][tradfri][webthing] Adapt to ColorUtil changes in core

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-04-21 23:55:36 +02:00