Skip to content

Releases: v1k70rk4/HASS.Agent.NET10-Integration

v10.5.0

19 Jun 18:52

Choose a tag to compare

Changelog

10.5.0

  • Fixed a spurious "received invalid discovery payload" warning: the device availability sub-topic (hass.agent/devices/<serial>/availability) matches the same MQTT discovery wildcard and is no longer treated as a discovery message

v10.4.0

19 Jun 11:07

Choose a tag to compare

Changelog

10.4.0

  • Added device availability: entities now turn unavailable when the device disconnects — via the MQTT availability topic / Last Will, and via a heartbeat timeout on the HA API WebSocket transport
  • Added enum device class with possible-value options for the monitor power state, power status, and session state sensors, so Home Assistant knows their selectable states
  • Fully backwards compatible — these activate with HASS.Agent .NET10 v10.4.0 or newer; older clients keep working unchanged

v10.3.0

10 Jun 14:28
fcc63ae

Choose a tag to compare

Add persistent notification support for device update progress

Summary

  • The device can now create Home Assistant persistent notifications — used by the
    client for update progress: started, completed, no installer, or failure
  • MQTT transport: new per-entry subscription on hass.agent/persistent_notification/{serial}
  • HA API WebSocket transport: new hass_agent_persistent_notification event listener,
    filtered by serial number like the other WS events
  • One notification ID per device (hass_agent_{serial}), so progress messages replace
    each other instead of piling up

Version

  • 10.3.0 (stable) — fully backwards compatible: older clients simply never publish
    to the new topic/event, everything else works unchanged
  • The notification feature activates with HASS.Agent .NET10 v10.3.0-beta.1 or newer
    on the Windows side

v10.2.0

09 Jun 15:54

Choose a tag to compare

Add standalone HA API auto-discovery without MQTT

Summary

  • Added standalone HA API device discovery so devices can be registered in Home Assistant
    without an MQTT broker — the integration listens for hass_agent_device_update events on
    the global event bus and auto-starts a config flow for unknown serial numbers
  • Added async_step_ha_api config flow step and a user menu with HA API info and Local API options
  • Fixed event.py missing the WebSocket dispatcher listener for notification actions
    (hass_agent_notification_action_{entry_id})
  • Updated all entity platforms (sensor, media_player, button, notify, event) to
    skip MQTT publish/subscribe for HA API-only entries using the ha_api_only flag

v10.1.0 - .NET10

08 Jun 19:11

Choose a tag to compare

Summary

  • Add HA API WebSocket event handling for device, sensor, media, thumbnail, and notification action updates
  • Send WebSocket fallback commands with serial_number so Home Assistant device renames do not break routing
  • Update button, media player, notification, and execute_command fallback command events
  • Document HA API WebSocket mode, event names, and command payloads
  • Bump integration version to 10.1.0

v10.0.0 - .NET10

07 Jun 19:22

Choose a tag to compare

HASS.Agent Logo

Custom Home Assistant integration for HASS.Agent devices.

This integration exposes a Windows HASS.Agent device as Home Assistant entities. Devices can be discovered through MQTT, and notification actions are exposed both as device automation triggers and as a modern Home Assistant event entity.

It is the matching Home Assistant side for the modern HASS.Agent .NET10 Windows client.


Important: This integration (v10.0.0+) requires HASS.Agent .NET10 as the Windows client. The older pre-.NET10 HASS.Agent client is not compatible with this version.

If you want to keep using the old HASS.Agent client, switch to the legacy branch of this integration. The legacy branch is compatible with Home Assistant 2026.6+ and the original pre-.NET10 HASS.Agent.


Features

  • MQTT auto-discovery for HASS.Agent .NET10 devices
  • Media player entity for playback control, volume control, media browsing, TTS, and album art
  • Notify entity for sending notifications to the Windows client
  • Notification action triggers for automations
  • Notification action event entity for newer Home Assistant automation workflows
  • Button entities for Windows commands: lock, sleep, monitor off, volume, shutdown, restart, restart cancel
  • System sensor entities for Windows machine state (CPU, memory, disk, battery, network, session, etc.)
  • Custom sensor entities: process running, service status, disk free, built-in attribute extraction
  • Dynamic sensor handling based on what the Windows client advertises
  • Automatic removal of disabled command and sensor entities
  • Service-aware command routing for system commands handled by the Windows service
  • hass_agent.execute_command service for scripts and automations
  • Local API setup for notification-only use cases (with API key authentication)
  • Hungarian and English translations

Requirements

Component Minimum version
Home Assistant 2026.6.0
HASS.Agent .NET10 (Windows client) 10.0.0
MQTT broker Mosquitto or any MQTT 3.1.1+ broker

HACS is required when installing through the custom repository flow.

MQTT discovery is recommended for full functionality. The Local API setup supports notifications only.

Installation

  1. Open HACS in Home Assistant.

  2. Add this repository as a custom integration repository:

    https://github.com/v1k70rk4/HASS.Agent-Integration
    
  3. Install HASS.Agent Integration from HACS.

  4. Restart Home Assistant.

  5. The device appears automatically if MQTT is enabled in the Windows client. Otherwise add it manually from Settings > Devices & services > Add integration > HASS.Agent.

If another HASS.Agent integration is already installed, remove it before installing this one, then restart Home Assistant.

Connection Modes

MQTT (recommended)

Enable MQTT in the HASS.Agent .NET10 Windows client. The device is discovered automatically in Home Assistant. All features work:

  • Notifications (with actionable buttons)
  • Media player (play/pause, volume, TTS)
  • System sensors (built-in + custom)
  • Command buttons (lock, shutdown, restart, etc.)
  • Update entity
  • Windows service integration

Local API

For environments where MQTT is not available. Add the device manually:

  • Host: the Windows machine's LAN IP address
  • Port: 5115 (default)
  • SSL: disabled
  • API key: copy from the agent's General settings page (Network section)

Only notifications are supported in Local API mode. The POST /notify endpoint is protected with the API key (Authorization: Bearer <key>).

Entities

When connected via MQTT, the integration creates the following entities:

Platform Entity Description
media_player Media player Control Windows media playback, volume, TTS
notify Notifications Send notifications to the Windows tray
event Notification actions Action button press events from notifications
sensor System sensors Built-in and custom sensors from the Windows client
button System commands Lock, sleep, shutdown, restart, volume, etc.
update App update Shows available HASS.Agent .NET10 updates

Entities are created and removed dynamically as the Windows client changes its configuration.

Services

hass_agent.send_notification

Sends a notification to a HASS.Agent notify entity. Supports actionable notifications with buttons:

action: hass_agent.send_notification
target:
  entity_id: notify.my_pc_notifications
data:
  message: "Would you like to turn on the lights?"
  title: Home Assistant
  data:
    actions:
      - action: lights_on
        title: "Turn on"
      - action: lights_off
        title: "Turn off"

hass_agent.execute_command

Sends a system command to a HASS.Agent .NET10 device:

Field Required Description
device_name yes Target Windows device name
command * lock, sleep, monitor_off, volume_up, volume_down, toggle_mute, shutdown, restart
comment Windows shutdown/restart comment
force Force shutdown/restart (default: false)
time Delay in seconds (default: 0)
restart_cancel * Cancel a pending shutdown/restart

* Either command or restart_cancel: true is required.

Example:

action: hass_agent.execute_command
data:
  device_name: MY-PC
  command: restart
  force: true
  time: 30
  comment: "Restarted from Home Assistant"

Cancel a pending shutdown or restart:

action: hass_agent.execute_command
data:
  device_name: MY-PC
  restart_cancel: true

When the Windows service is online and capable of handling the command, the integration automatically routes it to the service topic. Otherwise it falls back to the tray app.

MQTT Topics

Published by the Windows client, consumed by this integration:

hass.agent/devices/{deviceName}                  # discovery + capabilities
hass.agent/system/{deviceName}/state             # Windows service status
hass.agent/sensors/{deviceName}/state            # sensor values
hass.agent/update/{deviceName}/state             # app update state
hass.agent/media_player/{deviceName}/state       # media player state
hass.agent/notifications/{deviceName}/actions    # notification action events

Published by this integration (commands):

hass.agent/notifications/{deviceName}            # outgoing notifications
hass.agent/media_player/{deviceName}/cmd         # media player commands
hass.agent/buttons/{deviceName}/cmd              # system command buttons
hass.agent/system/{deviceName}/cmd               # service-routed commands

Legacy Branch

Using the old pre-.NET10 HASS.Agent? Switch to the legacy branch.

The legacy branch is compatible with Home Assistant 2026.6+ and the original pre-.NET10 HASS.Agent client. It will continue to receive compatibility fixes but no new features.

The main branch (v10.0.0+) is designed exclusively for HASS.Agent .NET10 and is not backwards compatible with the old client.

Changelog

10.0.0

HASS.Agent .NET10 support:

  • Added command button entities
  • Added system sensor entities (built-in + custom)
  • Added dynamic standard/custom sensor discovery
  • Added sensor attributes for richer Windows state
  • Added service-aware command routing
  • Added hass_agent.execute_command service
  • Added shutdown/restart parameters: comment, force, time, restart_cancel
  • Added inactive entity removal when features are disabled in the Windows client
  • Added API key authentication for Local API mode

3.x (pre-.NET10)

  • Replaced the custom unauthenticated thumbnail endpoint with Home Assistant's built-in media player image proxy
  • Added a notification action event entity
  • Improved config entry setup retry behavior
  • Improved platform unload handling
  • Hardened MQTT and config flow payload parsing
  • Updated MQTT publish calls with explicit qos and retain
  • Updated media source typing for Home Assistant 2026.6
  • Added Ruff linting workflow
  • Enabled hassfest and HACS validation on push and pull request
  • Added Hungarian translations

Credits

This project builds on the work done by:

Thanks to the original maintainers and contributors for creating the foundation this integration is based on.

v3.0.2-legacy

05 Jun 22:44
147d53e

Choose a tag to compare

HASS.Agent Integration v3.0.2

Branding+Bugfix

v3.0.0-legacy

05 Jun 18:59

Choose a tag to compare

Summary

  • Remove unsupported version key from hacs.json
  • Add Hungarian (hu.json) translations
  • Complete missing English translation keys
  • Keep HACS metadata limited to accepted fields

Notes

The remaining HACS validation failures are repository settings, not code changes:

  • Enable GitHub Issues
  • Add valid repository topics such as home-assistant, hacs, hass-agent, custom-component, integration

v2.2.0-legacy

05 Jun 17:35

Choose a tag to compare

Modernize HASS.Agent Integration for HA 2026.x

Summary

Full modernization of the HASS.Agent custom integration to ensure compatibility with Home Assistant 2026.x, fix known bugs, and align with current HA development best practices.


🐛 Bug Fixes

  • Fix Configure button 500 error (PR #59 / Issue #61) — Removed broken OptionsFlowHandler.__init__ that overwrote the parent without calling super(), preventing self.config_entry from being injected by the framework.
  • Fix notify platform unload error — The old "ValueError: Config entry was never loaded!" is gone because notify now uses standard async_forward_entry_setups instead of discovery.async_load_platform.
  • Fix thumbnail view crash — Returns 404 instead of crashing with AttributeError when an invalid entity ID is requested.

🔄 HA 2026.x Compatibility

  • FlowResultConfigFlowResult / OptionsFlowResult — Replace deprecated type from data_entry_flow.
  • BaseNotificationServiceNotifyEntity — Full rewrite of notify.py from legacy service-based pattern to modern entity-based NotifyEntity with standard async_setup_entry.
  • utcnow()datetime.now(UTC) — Replace deprecated homeassistant.util.dt.utcnow() with Python 3.11+ native approach.

⚡ Performance

  • Synchronous requests → async aiohttp — All HTTP calls in __init__.py, config_flow.py, and notify.py now use async_get_clientsession. The event loop is no longer blocked by synchronous I/O.

🛡️ Error Handling

  • async_setup_entry now returns False with an error log if the device is unreachable, instead of crashing.
  • Config flow catches specific ClientError/TimeoutError instead of bare Exception.
  • Notification HTTP error handling simplified from 60+ line status code switch to concise response.ok check.

🧹 Code Cleanup

  • Removed ~15 unused imports (asyncio, Coroutine, suppress, Path, cast, SOURCE_IMPORT, SERVICE_RELOAD, slugify, discovery, requests, etc.)
  • Removed commented-out code blocks (notify unload workaround)
  • Simplified platform unload to single async_unload_platforms call with a list

📦 Repository & HACS

  • All GitHub links updated to v1k70rk4/HASS.Agent-Integration
  • codeowners updated to @v1k70rk4
  • HACS version set to 20260601.1
  • Minimum HA version bumped to 2024.1

Changed Files

File What changed
init.py Async HTTP, cleaned imports, notify uses async_forward_entry_setups, unified platform unload
config_flow.py Removed broken init, typed flow results, requests → aiohttp
notify.py Full rewrite: BaseNotificationService → NotifyEntity
media_player.py utcnow() → datetime.now(UTC), removed unused import
views.py Null-safety checks, returns 404 instead of crashing
repairs.py Updated FlowResult import
manifest.json Repo URLs + codeowners → v1k70rk4
hacs.json Version 20260601.1, min HA 2024.1
README.md All links → v1k70rk4 repo