Commit Graph

144 Commits

Author SHA1 Message Date
Claude
e60ac0c059 Fix real-time house-mode updates: hub-mode notify uses component "hub"
A house-mode-change evt.pd7.notify is broadcast on the hub component
(component "hub", id "mode"), not component "mode". The previous guard
`notify.component !== 'mode'` discarded every real mode-change notification, so
the Mode select only updated via the 30s poll fallback instead of in real time.

Gate on component "hub" (and, defensively, "mode") and extract the new mode
from either param.mode.current (primefimp Hub/HubMode) or param.current
(edge-iqcontrols/tpflow references), publishing only when a mode string is
found.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FuQAyPde4K57P2XMCKbFek
2026-07-01 20:57:39 +00:00
Claude
ac4e051ac2 Add Futurehome house mode support (Modeswitch) + scene event entities
The Futurehome Modeswitch (Modusbryter) is a house-mode switch: its buttons
change the hub's mode (Home/Away/Sleep/Vacation), which is a hub-level Vinculum
concept broadcast via `evt.pd7.notify` (component "mode") — not a device
`scene_ctrl` event. That is why tapping it produced nothing in the device
message stream and the mapped scene sensor was stuck on `unknown`.

The add-on had no house-mode support at all. This adds it:

- Expose the current house mode as a `Mode` select on the Smarthub device.
  It reflects the current mode, updates in real time via `evt.pd7.notify`
  (with a 30s house-poll fallback), and can change the mode from Home Assistant
  via `cmd.pd7.request {cmd:"set", component:"mode", id:<mode>}` (matching the
  reference primefimp `ChangeMode`).
- Always publish the Smarthub hub device so the Mode select is available even
  without Thingsplex credentials; inclusion/exclusion tooling stays gated.
- Discover available modes from the Vinculum `mode` component, falling back to
  home/away/sleep/vacation.

Also improve genuine scene controllers: `scene_ctrl` now additionally exposes a
Home Assistant `event` entity so momentary button presses can drive automations
(the previous `Scene` sensor latched and could not react to repeated presses).
The sensor is kept for backwards compatibility (renamed "Scene (last value)").

Includes demo-mode support, README/CHANGELOG updates, and a version bump to
1.7.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FuQAyPde4K57P2XMCKbFek
2026-07-01 20:51:24 +00:00
Adrian Jagielak
36168c1101 v1.6.2 2026-05-16 23:59:35 +02:00
Jagi ᯅ
1a8a7c2e2c Fix invalid device_class + unit_of_measurement combinations for HA 2026.5 (#32)
HA 2026.5 enforces strict validation of device_class/unit_of_measurement
pairs in MQTT discovery payloads. Four categories were broken:

- power_factor: unit was sent as "power_factor" (the FIMP field name); HA
  requires the field to be omitted or empty for this device class. Fixed by
  normalising the display unit separately from the FIMP data-path key.

- illuminance: unit "Lux" is rejected; normalise to "lx". When a sensor
  reports luminance as "%" (some Z-Wave devices), the illuminance device
  class is dropped so the entity becomes a generic sensor rather than
  triggering a validation error.

- reactive_power (regular/export meter): unit "VAr" is rejected; HA requires
  lowercase "var".

- reactive_power (extended meter values, e.g. p_import_react): the unit
  determination logic fell through to the generic power branch and sent "W";
  reactive power extended values now emit "var", apparent power values emit
  "VA", and reactive energy values emit "kvarh".

Fixes #31

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-16 23:58:19 +02:00
Adrian Jagielak
ce36669587 v1.6.1 2025-10-16 20:50:41 +02:00
Adrian Jagielak
dac16b0fd4 Tweak 'Ignore Availability Reports' setting 2025-10-16 20:50:03 +02:00
Adrian Jagielak
45182a6416 v1.6.0 2025-10-16 20:16:11 +02:00
Adrian Jagielak
9f2feea8c1 Add setting to always treat all devices as up 2025-10-16 20:15:31 +02:00
Adrian Jagielak
a38e441c9b v1.5.0 2025-10-16 02:07:11 +02:00
Adrian Jagielak
afbfd1d1c7 Revert "Add ability to specify a custom MQTT broker"
This reverts commit b937f90340.
2025-10-16 02:06:06 +02:00
Adrian Jagielak
729c6c839f v1.4.0 2025-10-13 19:03:53 +02:00
Adrian Jagielak
b937f90340 Add ability to specify a custom MQTT broker 2025-10-13 19:03:52 +02:00
Adrian Jagielak
4a3eb07464 v1.3.1 2025-09-28 15:49:27 +02:00
Adrian Jagielak
5732c70d4e Revert "Upgrade dependencies"
This reverts commit 91c33b33cd.
2025-09-28 15:48:40 +02:00
Adrian Jagielak
16a4fb3181 v1.3.0 2025-09-28 14:59:18 +02:00
Adrian Jagielak
fdc65a0bd5 Use light entity for out_lvl_switch if the device type is "light" 2025-09-28 14:57:37 +02:00
Adrian Jagielak
91c33b33cd Upgrade dependencies 2025-09-28 14:54:14 +02:00
Adrian Jagielak
6ca05e95b9 v1.2.1 - update version in config.yaml 2025-09-28 12:25:43 +02:00
Adrian Jagielak
7e3d56cec1 v1.2.1 2025-09-27 02:26:33 +02:00
Adrian Jagielak
a8c61c4658 Revert "Use light entity for out_lvl_switch if the device type is "light""
This reverts commit 50500e97be.
2025-09-27 02:25:52 +02:00
Adrian Jagielak
653df93807 v1.2.0 2025-09-26 20:00:52 +02:00
Adrian Jagielak
50500e97be Use light entity for out_lvl_switch if the device type is "light" 2025-09-26 20:00:11 +02:00
Adrian Jagielak
f216f4b719 v1.1.2 2025-09-25 00:41:48 +02:00
Adrian Jagielak
383980d5f8 v1.1.1 2025-09-25 00:41:47 +02:00
Adrian Jagielak
41cd550225 Add error handling for invalid FIMP messages 2025-09-25 00:41:47 +02:00
Adrian Jagielak
a05e96bae0 v1.1.0 2025-09-25 00:41:47 +02:00
Adrian Jagielak
000537585d Stop inclusion/exclusion after the first report 2025-09-25 00:41:47 +02:00
Adrian Jagielak
351274f56e Allow empty Thingsplex credentials (#3) 2025-09-25 00:41:47 +02:00
Andreas
a8e5b00275 Improve GUI security by hiding passwords by default (#5)
Replaced 'str?' with 'password?' for fh_password and tp_password
2025-09-25 00:41:47 +02:00
Adrian Jagielak
0bb82f6d95 Add logging the initial devices response 2025-09-16 12:44:38 +02:00
Adrian Jagielak
a41c599686 Update README.md 2025-07-29 00:48:24 +02:00
Adrian Jagielak
69c2d7de4b Update README.md 2025-07-29 00:46:35 +02:00
Adrian Jagielak
e17a4eaec7 v1.0.0 2025-07-29 00:40:32 +02:00
Adrian Jagielak
9e2aa6999a Add Installation Guide 2025-07-29 00:38:10 +02:00
Adrian Jagielak
986c85c0bf Lint fixes 2025-07-28 23:31:14 +02:00
Adrian Jagielak
c56b9c6fbe Allow unpairing devices using any adapter 2025-07-28 22:38:00 +02:00
Adrian Jagielak
361eaaf1bc Add icon 2025-07-28 17:34:41 +02:00
Adrian Jagielak
57d7773a27 Update README.md 2025-07-28 17:34:23 +02:00
Adrian Jagielak
4d599a5e1a Update README.md 2025-07-28 17:32:28 +02:00
Adrian Jagielak
1aad80ed38 Inclusion/exclusion improvements 2025-07-28 16:57:57 +02:00
Adrian Jagielak
d131297f2a Add more delays when initializing demo mode 2025-07-28 16:16:19 +02:00
Adrian Jagielak
d43414c90d Update demo mode data 2025-07-28 16:15:35 +02:00
Adrian Jagielak
e0b18b304c Restart the add-on when disconnected from the hub or Home Assistant 2025-07-28 16:14:36 +02:00
Adrian Jagielak
0d993643fb Fix using the unit reported by the numerical sensor 2025-07-28 16:13:18 +02:00
Adrian Jagielak
850fc7fc57 Add support for unpairing devices 2025-07-28 16:12:12 +02:00
Adrian Jagielak
b034197a93 Add support for pairing new devices 2025-07-28 14:18:42 +02:00
Adrian Jagielak
15c65850bf Add logo 2025-07-28 13:48:11 +02:00
Adrian Jagielak
44addcd589 Update README.md 2025-07-27 02:51:47 +02:00
Adrian Jagielak
b6be226ac2 Reset all devices each time when starting in demo mode 2025-07-27 02:09:51 +02:00
Adrian Jagielak
aa9cb0f12a Add setting for enabling debug log 2025-07-27 01:50:10 +02:00