diff --git a/README.md b/README.md
index 03c3e020..0c6aae13 100644
--- a/README.md
+++ b/README.md
@@ -1,37 +1,84 @@
-# HASS.Agent Staging Project
+# HASS.Agent Project
-**Do not use this repo if you just want to manually build and use HASS.Agent. Please see [these instructions](https://hassagent.readthedocs.io/en/latest/installation/#3-build-from-scratch) on how to do that.**
+This project is a fork of the [original HASS.Agent](https://github.com/LAB02-Research/HASS.Agent) created by [Sam](https://github.com/LAB02-Research).
+
+The Purpose of this project is to provide updates/features/fixes until development on the original project resumes. For now, all released from this repository will be marked as beta.
+
+At first all PRs made by me will be merged, but in time, I'll approach authors of other PRs for permission to also include them in here.
+
+**NOTE**: I did my best to always maintain backward compatibility but this ***cannot be guaranteed***, please report any issues you may encounter.
+
+## Installation
+
+**I do hope to improve this process in the future**
+
+The original HASS.Agent repository is not available as far as I'm informed.
+There are two options to approach this:
+- creating a new installer
+- going with "patch it over" approach
+
+Currently the recommended option is the "patch it over". HASS.Agent is capable of functioning without the installer but the installer takes care of some dependencies that might need to be installed manually otherwise.
+
+1. Download and install HASS.Agent from [the official release](https://github.com/LAB02-Research/HASS.Agent/releases) (usually in **"C:\Users\\AppData\Roaming\LAB02 Research\HASS.Agent\"**)
+2. Download and install WindowsAppSDK available at https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/downloads ([explanation why](https://github.com/LAB02-Research/HASS.Agent.Staging/pull/18))
+3. Make sure the HASS.Agent service is stopped
+
+4. Close/Exit out of the HASS.Agent
+
+6. Download the release package from this repository
+7. Copy/Replace the downloaded files over the installed ones (again, usually in **"C:\Users\\AppData\Roaming\LAB02 Research\HASS.Agent\"**)
+8. Launch HASS.Agent and verify that you're using the unofficial beta version by navigating to help window - "u" in the version postfix
+
+
+
+----
+
+"Project" differences from the base project:
+1. No separation between "HASS.Agent" and "HASS.Agent.Staging" - since I have no access to the original repositories, it'll be easier for me to maintain it this way
+2. No documentation available yet - best case scenario the descriptions in the application should be sufficient but even so, I'd like to have unofficial documentation created at some point
+3. The update functionality present in UI does not work with the unofficial version, yet
+
+----
+
+Major feature changes compared to the original project:
+1. [Virtual desktop sensor and command](https://github.com/LAB02-Research/HASS.Agent.Staging/pull/12)
+2. [Quick Action carousel/circular navigation](https://github.com/LAB02-Research/HASS.Agent.Staging/pull/15)
+3. [Notification library change an improvements including possible Win11 fix](https://github.com/LAB02-Research/HASS.Agent.Staging/pull/18)
+4. [Application volume controls (per application control, audio output command, audio sensor overhaul)](https://github.com/LAB02-Research/HASS.Agent.Staging/pull/19)
+5. [Internal device sensors - sensors present on the device running HASS.Agent](https://github.com/LAB02-Research/HASS.Agent.Staging/pull/21)
+6. [Ignore availability option for sensors](https://github.com/LAB02-Research/HASS.Agent.Staging/pull/22)
+6. [Radio (BT/WiFi/Broadband) control command](https://github.com/LAB02-Research/HASS.Agent.Staging/pull/23)
+7. [LastActive sensor refresh upon wake from sleep/hibernation](https://github.com/LAB02-Research/HASS.Agent.Staging/pull/9)
+
+Major bug fix changes compared to the original project:
+1. [GPU temperature and load sensor returns proper values when encountering an error](https://github.com/LAB02-Research/HASS.Agent.Staging/pull/10)
+2. [Key commands emulation not actually "releases" the key after "pressing it"](https://github.com/LAB02-Research/HASS.Agent.Staging/pull/13)
+3. [PowerShell command action parameters now include check culture config missing on some systems](https://github.com/LAB02-Research/HASS.Agent.Staging/pull/14)
+4. [PerformanceCounter sensors do not call NextValue twice causing values to be borked](https://github.com/LAB02-Research/HASS.Agent.Staging/pull/16)
+5. [Adjustments per Home Assistant 2023.8 MQTT changes regarding sensor/device naming convention](https://github.com/LAB02-Research/HASS.Agent.Staging/pull/20)
+
+----
+
+This project contains the latest code of all three parts of the HASS.Agent platform:
-
-This project contains the latest (beta) code of all three parts of the HASS.Agent platform:
-
| Project | Description |
|---|---|
| HASS.Agent | Main client, containing the UI, runs in userspace, by default without elevation |
| HASS.Agent.Satellite.Service | Windows client, runs under SYSTEM account |
-| HASS.Agent.Shared | Library, published as a nuget, contains all commands, sensors, shared functions and enums |
+| HASS.Agent.Shared | Library, contains all commands, sensors, shared functions and enums |
-Its purpose is to more easily develop beta releases, as the shared library will be instantly compiled and referenced.
-
-Note: make sure any regular instance of HASS.Agent is shut down. If you're just planning to tinker with HASS.Agent, you can leave the regular service active, otherwise turn it off as well as the named pipe will be in use. Start the service with elevated privileges.
Note: it's best to have `enable extended logging` enabled, which will also reflect on the satellite service (as long as it's started in console mode instead of service mode). But that'll also generate false positives, so primarily focus on the issue at hand.
----
-The base of all tickets is HASS.Agent's YouTrack page:
-
-[HASS.Agent YouTrack Dashboard](https://lab02research.youtrack.cloud)
-
-Let me know that you're working on a ticket (you can use the discussions page of this repo), to avoid double work.
-
-Documentation available here: [https://hassagent.readthedocs.io/en/latest/development/introduction/](https://hassagent.readthedocs.io/en/latest/development/introduction/)
+Documentation for the original project is available here: [https://hassagent.readthedocs.io/en/latest/development/introduction/](https://hassagent.readthedocs.io/en/latest/development/introduction/)
----
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/Commands/CommandsManager.cs b/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/Commands/CommandsManager.cs
index 1a474394..ec1755c2 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/Commands/CommandsManager.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/Commands/CommandsManager.cs
@@ -59,7 +59,7 @@ internal static async Task UnpublishAllCommands()
foreach (var command in Variables.Commands)
{
await command.UnPublishAutoDiscoveryConfigAsync();
- await Variables.MqttManager.UnubscribeAsync(command);
+ await Variables.MqttManager.UnsubscribeAsync(command);
command.ClearAutoDiscoveryConfig();
count++;
}
@@ -188,7 +188,7 @@ internal static async Task StoreAsync(List commands, Li
// remove and unregister
await abstractCommand.UnPublishAutoDiscoveryConfigAsync();
- await Variables.MqttManager.UnubscribeAsync(abstractCommand);
+ await Variables.MqttManager.UnsubscribeAsync(abstractCommand);
Variables.Commands.RemoveAt(Variables.Commands.FindIndex(x => x.Id == abstractCommand.Id));
Log.Information("[COMMANDS] Removed command: {command}", abstractCommand.Name);
@@ -220,7 +220,7 @@ internal static async Task StoreAsync(List commands, Li
Log.Information("[COMMANDS] Command changed, re-registering as new entity: {old} to {new}", Variables.Commands[currentCommandIndex].Name, abstractCommand.Name);
await Variables.Commands[currentCommandIndex].UnPublishAutoDiscoveryConfigAsync();
- await Variables.MqttManager.UnubscribeAsync(Variables.Commands[currentCommandIndex]);
+ await Variables.MqttManager.UnsubscribeAsync(Variables.Commands[currentCommandIndex]);
await Variables.MqttManager.SubscribeAsync(abstractCommand);
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/HASS.Agent.Satellite.Service.csproj b/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/HASS.Agent.Satellite.Service.csproj
index 334c6ed7..1612359a 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/HASS.Agent.Satellite.Service.csproj
+++ b/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/HASS.Agent.Satellite.Service.csproj
@@ -1,7 +1,7 @@
- net6.0-windows
+ net6.0-windows10.0.19041.0
true
enable
enable
@@ -20,6 +20,7 @@
hass.ico
+ 10.0.17763.0
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/MQTT/MqttManager.cs b/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/MQTT/MqttManager.cs
index 9307d0a7..35c618a0 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/MQTT/MqttManager.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/MQTT/MqttManager.cs
@@ -60,8 +60,9 @@ public class MqttManager : IMqttManager
///
public DeviceConfigModel? GetDeviceConfigModel()
{
- if (Variables.DeviceConfig != null) return Variables.DeviceConfig;
-
+ if (Variables.DeviceConfig != null)
+ return Variables.DeviceConfig;
+
CreateDeviceConfigModel();
return Variables.DeviceConfig ?? null;
}
@@ -73,13 +74,10 @@ public void Initialize()
{
try
{
- // create our device's config model
- if (Variables.DeviceConfig == null) CreateDeviceConfigModel();
+ if (Variables.DeviceConfig == null)
+ CreateDeviceConfigModel();
- // create a new mqtt client
_mqttClient = Variables.MqttFactory.CreateManagedMqttClient();
-
- // bind 'connected' handler
_mqttClient.UseConnectedHandler(_ =>
{
_status = MqttStatus.Connected;
@@ -89,24 +87,16 @@ public void Initialize()
_disconnectionNotified = false;
_connectingFailureNotified = false;
});
-
- // bind 'connecting failed' handler
_mqttClient.ConnectingFailedHandler = new ConnectingFailedHandlerDelegate(ConnectingFailedHandler);
-
- // bind 'messager received' handler
_mqttClient.UseApplicationMessageReceivedHandler(e => HandleMessageReceived(e.ApplicationMessage));
-
- // bind 'disconnected' handler
_mqttClient.DisconnectedHandler = new MqttClientDisconnectedHandlerDelegate(DisconnectedHandler);
- // get the mqtt options
var options = GetOptions();
-
- // only start connecting if they're found
if (options == null)
{
_status = MqttStatus.ConfigMissing;
Log.Warning("[MQTT] Configuration missing");
+
return;
}
@@ -132,15 +122,12 @@ public async void ReloadConfiguration()
// already connected?
if (_mqttClient != null)
{
- // stop the connection
await _mqttClient.StopAsync();
- // dispose our current client
_mqttClient.Dispose();
_mqttClient = null;
}
- // clear our device config
Variables.DeviceConfig = null;
// reset state
@@ -149,8 +136,6 @@ public async void ReloadConfiguration()
_connectingFailureNotified = false;
Log.Information("[MQTT] Initializing ..");
-
- // simple re-run initialization
Initialize();
}
catch (Exception ex)
@@ -166,14 +151,12 @@ public async void ReloadConfiguration()
///
private async void StartClient(IManagedMqttClientOptions options)
{
- if (_mqttClient == null) return;
+ if (_mqttClient == null)
+ return;
try
{
- // start the client
await _mqttClient.StartAsync(options);
-
- // perform initial registration
InitialRegistration();
}
catch (MqttConnectingFailedException ex)
@@ -201,11 +184,9 @@ private async void ConnectingFailedHandler(ManagedProcessFailedEventArgs ex)
var runningTimer = Stopwatch.StartNew();
while (runningTimer.Elapsed.TotalSeconds < Variables.ServiceSettings?.DisconnectedGracePeriodSeconds)
{
- if (_mqttClient is { IsConnected: true })
- {
- // recoved, nevermind
+ // recovered
+ if (IsConnected())
return;
- }
await Task.Delay(TimeSpan.FromSeconds(5));
}
@@ -214,7 +195,9 @@ private async void ConnectingFailedHandler(ManagedProcessFailedEventArgs ex)
_status = MqttStatus.Error;
// log only once
- if (_connectingFailureNotified) return;
+ if (_connectingFailureNotified)
+ return;
+
_connectingFailureNotified = true;
Log.Fatal(ex.Exception, "[MQTT] Error while connecting: {err}", ex.Exception.Message);
@@ -237,11 +220,8 @@ private async void DisconnectedHandler(MqttClientDisconnectedEventArgs e)
var runningTimer = Stopwatch.StartNew();
while (runningTimer.Elapsed.TotalSeconds < Variables.ServiceSettings?.DisconnectedGracePeriodSeconds)
{
- if (_mqttClient is { IsConnected: true })
- {
- // recoved, nevermind
+ if (IsConnected())
return;
- }
await Task.Delay(TimeSpan.FromSeconds(5));
}
@@ -249,13 +229,11 @@ private async void DisconnectedHandler(MqttClientDisconnectedEventArgs e)
// nope, call it
_status = MqttStatus.Disconnected;
- // log if we're not shutting down
- if (Variables.ShuttingDown) return;
+ // log if we're not shutting down, but only once
+ if (Variables.ShuttingDown || _disconnectionNotified)
+ return;
- // only once
- if (_disconnectionNotified) return;
_disconnectionNotified = true;
-
Log.Warning("[MQTT] Disconnected: {reason}", e.Reason.ToString());
}
catch (Exception ex)
@@ -270,13 +248,13 @@ private async void DisconnectedHandler(MqttClientDisconnectedEventArgs e)
///
private async void InitialRegistration()
{
- if (_mqttClient == null) return;
- while (!_mqttClient.IsConnected) await Task.Delay(2000);
+ if (_mqttClient == null)
+ return;
- // let HA know we're here
- await AnnounceAvailabilityAsync();
+ while (!IsConnected())
+ await Task.Delay(2000);
- // done
+ await AnnounceAvailabilityAsync();
Log.Information("[MQTT] Initial registration completed");
}
@@ -306,35 +284,47 @@ public async Task PublishAsync(MqttApplicationMessage message)
{
try
{
- if (_mqttClient == null) return false;
- if (!_mqttClient.IsConnected)
+ if (_mqttClient == null)
+ return false;
+
+ if (!IsConnected())
{
// only log failures once every 5 minutes to minimize log growth
- if ((DateTime.Now - _lastPublishFailedLogged).TotalMinutes < 5) return false;
+ if ((DateTime.Now - _lastPublishFailedLogged).TotalMinutes < 5)
+ return false;
+
_lastPublishFailedLogged = DateTime.Now;
- if (Variables.ExtendedLogging) Log.Warning("[MQTT] Not connected, message dropped (won't report again for 5 minutes)");
+ if (Variables.ExtendedLogging)
+ Log.Warning("[MQTT] Not connected, message dropped (won't report again for 5 minutes)");
+
return false;
}
- // publish away
var published = await _mqttClient.PublishAsync(message);
- if (published.ReasonCode == MqttClientPublishReasonCode.Success) return true;
+ if (published.ReasonCode == MqttClientPublishReasonCode.Success)
+ return true;
// only log failures once every 5 minutes to minimize log growth
- if ((DateTime.Now - _lastPublishFailedLogged).TotalMinutes < 5) return false;
+ if ((DateTime.Now - _lastPublishFailedLogged).TotalMinutes < 5)
+ return false;
+
_lastPublishFailedLogged = DateTime.Now;
- if (Variables.ExtendedLogging) Log.Warning("[MQTT] Publishing message failed, reason: [{reason}] {reasonStr}", published.ReasonCode.ToString(), published.ReasonString ?? string.Empty);
+ if (Variables.ExtendedLogging)
+ Log.Warning("[MQTT] Publishing message failed, reason: [{reason}] {reasonStr}", published.ReasonCode.ToString(), published.ReasonString ?? string.Empty);
+
return false;
}
catch (Exception ex)
{
// only log failures once every 5 minutes to minimize log growth
- if ((DateTime.Now - _lastPublishFailedLogged).TotalMinutes < 5) return false;
- _lastPublishFailedLogged = DateTime.Now;
+ if ((DateTime.Now - _lastPublishFailedLogged).TotalMinutes < 5)
+ return false;
+ _lastPublishFailedLogged = DateTime.Now;
Log.Fatal("[MQTT] Error publishing message: {err}", ex.Message);
+
return false;
}
}
@@ -349,17 +339,20 @@ public async Task PublishAsync(MqttApplicationMessage message)
///
public async Task AnnounceAutoDiscoveryConfigAsync(AbstractDiscoverable discoverable, string domain, bool clearConfig = false)
{
- if (_mqttClient is not { IsConnected: true }) return;
+ if (!IsConnected())
+ return;
try
{
if (Variables.DeviceConfig == null)
{
// only log failures once every 5 minutes to minimize log growth
- if ((DateTime.Now - _lastAutoDiscoConfigFailedLogged).TotalMinutes < 5) return;
- _lastAutoDiscoConfigFailedLogged = DateTime.Now;
+ if ((DateTime.Now - _lastAutoDiscoConfigFailedLogged).TotalMinutes < 5)
+ return;
+ _lastAutoDiscoConfigFailedLogged = DateTime.Now;
Log.Warning("[MQTT] Not connected, autodiscovery config dropped (won't report again for 5 minutes)");
+
return;
}
@@ -370,22 +363,27 @@ public async Task AnnounceAutoDiscoveryConfigAsync(AbstractDiscoverable discover
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
};
- // prepare prefix
- if (string.IsNullOrEmpty(Variables.ServiceMqttSettings!.MqttDiscoveryPrefix)) Variables.ServiceMqttSettings.MqttDiscoveryPrefix = "homeassistant";
+ if (string.IsNullOrEmpty(Variables.ServiceMqttSettings!.MqttDiscoveryPrefix))
+ Variables.ServiceMqttSettings.MqttDiscoveryPrefix = "homeassistant";
- // prepare topic
var topic = $"{Variables.ServiceMqttSettings.MqttDiscoveryPrefix}/{domain}/{Variables.DeviceConfig.Name}/{discoverable.ObjectId}/config";
- // build config message
var messageBuilder = new MqttApplicationMessageBuilder()
.WithTopic(topic)
.WithRetainFlag(Variables.ServiceMqttSettings.MqttUseRetainFlag);
- // add payload
- if (clearConfig) messageBuilder.WithPayload(Array.Empty());
- else messageBuilder.WithPayload(JsonSerializer.Serialize(discoverable.GetAutoDiscoveryConfig(), discoverable.GetAutoDiscoveryConfig().GetType(), options));
+ if (clearConfig)
+ {
+ messageBuilder.WithPayload(Array.Empty());
+ }
+ else
+ {
+ var payload = discoverable.GetAutoDiscoveryConfig();
+ if (discoverable.IgnoreAvailability)
+ payload.Availability_topic = null;
- // publish disco config
+ messageBuilder.WithPayload(JsonSerializer.Serialize(payload, payload.GetType(), options));
+ }
await PublishAsync(messageBuilder.Build());
}
catch (Exception ex)
@@ -407,34 +405,38 @@ public async Task AnnounceAutoDiscoveryConfigAsync(AbstractDiscoverable discover
///
public async Task AnnounceAvailabilityAsync(bool offline = false)
{
- if (_mqttClient is not { IsConnected: true }) return;
+ if (!IsConnected())
+ return;
try
{
// offline msgs always need to be sent, the rest once every 30 secs
if (!offline)
{
- if ((DateTime.Now - _lastAvailableAnnouncement).TotalSeconds < 30) return;
+ if ((DateTime.Now - _lastAvailableAnnouncement).TotalSeconds < 30)
+ return;
+
_lastAvailableAnnouncement = DateTime.Now;
}
- if (_mqttClient.IsConnected && Variables.DeviceConfig != null)
+ if (IsConnected() && Variables.DeviceConfig != null)
{
- if (string.IsNullOrEmpty(Variables.ServiceMqttSettings!.MqttDiscoveryPrefix)) Variables.ServiceMqttSettings.MqttDiscoveryPrefix = "homeassistant";
+ if (string.IsNullOrEmpty(Variables.ServiceMqttSettings!.MqttDiscoveryPrefix))
+ Variables.ServiceMqttSettings.MqttDiscoveryPrefix = "homeassistant";
- // prepare message
var messageBuilder = new MqttApplicationMessageBuilder()
.WithTopic($"{Variables.ServiceMqttSettings.MqttDiscoveryPrefix}/sensor/{Variables.DeviceConfig.Name}/availability")
.WithPayload(offline ? "offline" : "online")
.WithRetainFlag(Variables.ServiceMqttSettings.MqttUseRetainFlag);
- // publish
await _mqttClient.PublishAsync(messageBuilder.Build());
}
else
{
// only log failures once every 5 minutes to minimize log growth
- if ((DateTime.Now - _lastAvailableAnnouncementFailedLogged).TotalMinutes < 5) return;
+ if ((DateTime.Now - _lastAvailableAnnouncementFailedLogged).TotalMinutes < 5)
+ return;
+
_lastAvailableAnnouncementFailedLogged = DateTime.Now;
Log.Warning(!_mqttClient.IsConnected
@@ -455,31 +457,33 @@ public async Task AnnounceAvailabilityAsync(bool offline = false)
///
public async Task ClearDeviceConfigAsync()
{
- if (_mqttClient is not { IsConnected: true })
+ if (!IsConnected())
{
Log.Warning("[MQTT] Not connected, clearing device config failed");
+
return;
}
try
{
- if (_mqttClient.IsConnected && Variables.DeviceConfig != null)
+ if (IsConnected() && Variables.DeviceConfig != null)
{
- if (string.IsNullOrEmpty(Variables.ServiceMqttSettings!.MqttDiscoveryPrefix)) Variables.ServiceMqttSettings.MqttDiscoveryPrefix = "homeassistant";
+ if (string.IsNullOrEmpty(Variables.ServiceMqttSettings!.MqttDiscoveryPrefix))
+ Variables.ServiceMqttSettings.MqttDiscoveryPrefix = "homeassistant";
- // prepare message
var messageBuilder = new MqttApplicationMessageBuilder()
.WithTopic($"{Variables.ServiceMqttSettings.MqttDiscoveryPrefix}/sensor/{Variables.DeviceConfig.Name}/availability")
.WithPayload(Array.Empty())
.WithRetainFlag(Variables.ServiceMqttSettings.MqttUseRetainFlag);
- // publish
await _mqttClient.PublishAsync(messageBuilder.Build());
}
else
{
// only log failures once every 5 minutes to minimize log growth
- if ((DateTime.Now - _lastClearDeviceConfigFailedLogged).TotalMinutes < 5) return;
+ if ((DateTime.Now - _lastClearDeviceConfigFailedLogged).TotalMinutes < 5)
+ return;
+
_lastClearDeviceConfigFailedLogged = DateTime.Now;
Log.Warning(!_mqttClient.IsConnected
@@ -498,8 +502,10 @@ public async Task ClearDeviceConfigAsync()
///
public void Disconnect()
{
- if (_mqttClient == null) return;
- if (_mqttClient.IsConnected)
+ if (_mqttClient == null)
+ return;
+
+ if (IsConnected())
{
_mqttClient.InternalClient.DisconnectAsync();
_mqttClient.Dispose();
@@ -517,8 +523,11 @@ public async Task SubscribeAsync(AbstractCommand command)
{
try
{
- if (_mqttClient == null) return;
- if (!IsConnected()) while (IsConnected() == false) await Task.Delay(250);
+ if (_mqttClient == null)
+ return;
+
+ while (!IsConnected())
+ await Task.Delay(250);
await _mqttClient.SubscribeAsync(((CommandDiscoveryConfigModel)command.GetAutoDiscoveryConfig()).Command_topic);
await _mqttClient.SubscribeAsync(((CommandDiscoveryConfigModel)command.GetAutoDiscoveryConfig()).Action_topic);
@@ -534,12 +543,15 @@ public async Task SubscribeAsync(AbstractCommand command)
///
///
///
- public async Task UnubscribeAsync(AbstractCommand command)
+ public async Task UnsubscribeAsync(AbstractCommand command)
{
try
{
- if (_mqttClient == null) return;
- if (!IsConnected()) while (IsConnected() == false) await Task.Delay(250);
+ if (_mqttClient == null)
+ return;
+
+ while (!IsConnected())
+ await Task.Delay(250);
await _mqttClient.UnsubscribeAsync(((CommandDiscoveryConfigModel)command.GetAutoDiscoveryConfig()).Command_topic);
await _mqttClient.UnsubscribeAsync(((CommandDiscoveryConfigModel)command.GetAutoDiscoveryConfig()).Action_topic);
@@ -556,26 +568,24 @@ public async Task UnubscribeAsync(AbstractCommand command)
///
private static ManagedMqttClientOptions? GetOptions()
{
- if (string.IsNullOrEmpty(Variables.ServiceMqttSettings?.MqttAddress)) return null;
- if (Variables.DeviceConfig == null) return null;
+ if (string.IsNullOrEmpty(Variables.ServiceMqttSettings?.MqttAddress) || Variables.DeviceConfig == null)
+ return null;
// id can be random, but we'll store it for consistency (unless user-defined)
if (string.IsNullOrEmpty(Variables.ServiceMqttSettings.MqttClientId))
{
+ //TODO: make sure that we don't use id which is already in use
Variables.ServiceMqttSettings.MqttClientId = Guid.NewGuid().ToString()[..8];
SettingsManager.StoreServiceSettings();
}
- // configure last will message
var lastWillMessageBuilder = new MqttApplicationMessageBuilder()
.WithTopic($"{Variables.ServiceMqttSettings.MqttDiscoveryPrefix}/sensor/{Variables.DeviceConfig.Name}/availability")
.WithPayload("offline")
.WithRetainFlag(Variables.ServiceMqttSettings.MqttUseRetainFlag);
- // prepare message
var lastWillMessage = lastWillMessageBuilder.Build();
- // basic options
var clientOptionsBuilder = new MqttClientOptionsBuilder()
.WithClientId(Variables.ServiceMqttSettings.MqttClientId)
.WithTcpServer(Variables.ServiceMqttSettings.MqttAddress, Variables.ServiceMqttSettings.MqttPort)
@@ -583,10 +593,9 @@ public async Task UnubscribeAsync(AbstractCommand command)
.WithWillMessage(lastWillMessage)
.WithKeepAlivePeriod(TimeSpan.FromSeconds(15));
- // optional credentials
- if (!string.IsNullOrEmpty(Variables.ServiceMqttSettings.MqttUsername)) clientOptionsBuilder.WithCredentials(Variables.ServiceMqttSettings.MqttUsername, Variables.ServiceMqttSettings.MqttPassword);
+ if (!string.IsNullOrEmpty(Variables.ServiceMqttSettings.MqttUsername))
+ clientOptionsBuilder.WithCredentials(Variables.ServiceMqttSettings.MqttUsername, Variables.ServiceMqttSettings.MqttPassword);
- // configure tls
var tlsParameters = new MqttClientOptionsBuilderTlsParameters()
{
UseTls = Variables.ServiceMqttSettings.MqttUseTls,
@@ -594,21 +603,23 @@ public async Task UnubscribeAsync(AbstractCommand command)
SslProtocol = Variables.ServiceMqttSettings.MqttUseTls ? SslProtocols.Tls12 : SslProtocols.None
};
- // configure certificates
var certificates = new List();
if (!string.IsNullOrEmpty(Variables.ServiceMqttSettings.MqttRootCertificate))
{
- if (!File.Exists(Variables.ServiceMqttSettings.MqttRootCertificate)) Log.Error("[MQTT] Provided root certificate not found: {cert}", Variables.ServiceMqttSettings.MqttRootCertificate);
- else certificates.Add(new X509Certificate2(Variables.ServiceMqttSettings.MqttRootCertificate));
+ if (!File.Exists(Variables.ServiceMqttSettings.MqttRootCertificate))
+ Log.Error("[MQTT] Provided root certificate not found: {cert}", Variables.ServiceMqttSettings.MqttRootCertificate);
+ else
+ certificates.Add(new X509Certificate2(Variables.ServiceMqttSettings.MqttRootCertificate));
}
if (!string.IsNullOrEmpty(Variables.ServiceMqttSettings.MqttClientCertificate))
{
- if (!File.Exists(Variables.ServiceMqttSettings.MqttClientCertificate)) Log.Error("[MQTT] Provided client certificate not found: {cert}", Variables.ServiceMqttSettings.MqttClientCertificate);
- certificates.Add(new X509Certificate2(Variables.ServiceMqttSettings.MqttClientCertificate));
+ if (!File.Exists(Variables.ServiceMqttSettings.MqttClientCertificate))
+ Log.Error("[MQTT] Provided client certificate not found: {cert}", Variables.ServiceMqttSettings.MqttClientCertificate);
+ else
+ certificates.Add(new X509Certificate2(Variables.ServiceMqttSettings.MqttClientCertificate));
}
- // optionally loosen security
if (Variables.ServiceMqttSettings.MqttAllowUntrustedCertificates)
{
tlsParameters.IgnoreCertificateChainErrors = true;
@@ -616,16 +627,12 @@ public async Task UnubscribeAsync(AbstractCommand command)
tlsParameters.CertificateValidationHandler += _ => true;
}
- // add the certs
- if (certificates.Count > 0) tlsParameters.Certificates = certificates;
+ if (certificates.Count > 0)
+ tlsParameters.Certificates = certificates;
- // finalise tls params
clientOptionsBuilder.WithTls(tlsParameters);
-
- // build the client options
clientOptionsBuilder.Build();
- // build and return the mqtt options
return new ManagedMqttClientOptionsBuilder()
.WithAutoReconnectDelay(TimeSpan.FromSeconds(5))
.WithClientOptions(clientOptionsBuilder).Build();
@@ -639,16 +646,17 @@ private static void HandleMessageReceived(MqttApplicationMessage applicationMess
{
try
{
- if (!Variables.Commands.Any()) return;
+ if (!Variables.Commands.Any())
+ return;
+
foreach (var command in Variables.Commands)
{
var commandConfig = (CommandDiscoveryConfigModel)command.GetAutoDiscoveryConfig();
- // check for command
- if (commandConfig.Command_topic == applicationMessage.Topic) HandleCommandReceived(applicationMessage, command);
-
- // check for action
- else if (commandConfig.Action_topic == applicationMessage.Topic) HandleActionReceived(applicationMessage, command);
+ if (commandConfig.Command_topic == applicationMessage.Topic)
+ HandleCommandReceived(applicationMessage, command);
+ else if (commandConfig.Action_topic == applicationMessage.Topic)
+ HandleActionReceived(applicationMessage, command);
}
}
catch (Exception ex)
@@ -667,16 +675,26 @@ private static void HandleCommandReceived(MqttApplicationMessage applicationMess
try
{
var payload = Encoding.UTF8.GetString(applicationMessage.Payload).ToLower();
- if (string.IsNullOrWhiteSpace(payload)) return;
+ if (string.IsNullOrWhiteSpace(payload))
+ return;
- if (payload.Contains("on")) command.TurnOn();
- else if (payload.Contains("off")) command.TurnOff();
- else switch (payload)
+ if (payload.Contains("on"))
{
- case "press":
- case "lock":
- command.TurnOn();
- break;
+ command.TurnOn();
+ }
+ else if (payload.Contains("off"))
+ {
+ command.TurnOff();
+ }
+ else
+ {
+ switch (payload)
+ {
+ case "press":
+ case "lock":
+ command.TurnOn();
+ break;
+ }
}
}
catch (Exception ex)
@@ -695,7 +713,8 @@ private static void HandleActionReceived(MqttApplicationMessage applicationMessa
try
{
var payload = Encoding.UTF8.GetString(applicationMessage.Payload);
- if (string.IsNullOrWhiteSpace(payload)) return;
+ if (string.IsNullOrWhiteSpace(payload))
+ return;
command.TurnOnWithAction(payload);
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/Settings/StoredSensors.cs b/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/Settings/StoredSensors.cs
index c15543c3..e86b010a 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/Settings/StoredSensors.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Satellite.Service/Settings/StoredSensors.cs
@@ -111,7 +111,7 @@ await Task.Run(delegate
abstractSensor = new NamedWindowSensor(sensor.WindowName, sensor.Name, sensor.FriendlyName, sensor.UpdateInterval, sensor.Id.ToString());
break;
case SensorType.LastActiveSensor:
- abstractSensor = new LastActiveSensor(sensor.UpdateInterval, sensor.Name, sensor.FriendlyName, sensor.Id.ToString());
+ abstractSensor = new LastActiveSensor(sensor.ApplyRounding, sensor.Round, sensor.UpdateInterval, sensor.Name, sensor.FriendlyName, sensor.Id.ToString());
break;
case SensorType.LastSystemStateChangeSensor:
abstractSensor = new LastSystemStateChangeSensor(sensor.UpdateInterval, sensor.Name, sensor.FriendlyName, sensor.Id.ToString());
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Enums/CommandType.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Enums/CommandType.cs
index 42080577..d2b6e148 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Enums/CommandType.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Enums/CommandType.cs
@@ -89,10 +89,18 @@ public enum CommandType
[EnumMember(Value = "SendWindowToFrontCommand")]
SendWindowToFrontCommand,
+ [LocalizedDescription("CommandType_SwitchDesktopCommand", typeof(Languages))]
+ [EnumMember(Value = "SwitchDesktopCommand")]
+ SwitchDesktopCommand,
+
[LocalizedDescription("CommandType_SetVolumeCommand", typeof(Languages))]
[EnumMember(Value = "SetVolumeCommand")]
SetVolumeCommand,
+ [LocalizedDescription("CommandType_SetApplicationVolumeCommand", typeof(Languages))]
+ [EnumMember(Value = "SetApplicationVolumeCommand")]
+ SetApplicationVolumeCommand,
+
[LocalizedDescription("CommandType_ShutdownCommand", typeof(Languages))]
[EnumMember(Value = "ShutdownCommand")]
ShutdownCommand,
@@ -103,6 +111,10 @@ public enum CommandType
[LocalizedDescription("CommandType_WebViewCommand", typeof(Languages))]
[EnumMember(Value = "WebViewCommand")]
- WebViewCommand
+ WebViewCommand,
+
+ [LocalizedDescription("CommandType_RadioCommand", typeof(Languages))]
+ [EnumMember(Value = "RadioCommand")]
+ RadioCommand
}
}
\ No newline at end of file
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Enums/SensorType.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Enums/SensorType.cs
index 647a4d50..bf3b31eb 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Enums/SensorType.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Enums/SensorType.cs
@@ -15,6 +15,10 @@ public enum SensorType
[EnumMember(Value = "ActiveWindowSensor")]
ActiveWindowSensor,
+ [LocalizedDescription("SensorType_ActiveDesktopSensor", typeof(Languages))]
+ [EnumMember(Value = "ActiveDesktopSensor")]
+ ActiveDesktopSensor,
+
[LocalizedDescription("SensorType_AudioSensors", typeof(Languages))]
[EnumMember(Value = "AudioSensors")]
AudioSensors,
@@ -157,6 +161,10 @@ public enum SensorType
[LocalizedDescription("SensorType_WmiQuerySensor", typeof(Languages))]
[EnumMember(Value = "WmiQuerySensor")]
- WmiQuerySensor
+ WmiQuerySensor,
+
+ [LocalizedDescription("SensorType_InternalDeviceSensor", typeof(Languages))]
+ [EnumMember(Value = "InternalDeviceSensor")]
+ InternalDeviceSensor
}
}
\ No newline at end of file
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Extensions/CommandExtensions.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Extensions/CommandExtensions.cs
index 6cf06963..0038d6d3 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Extensions/CommandExtensions.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Extensions/CommandExtensions.cs
@@ -16,23 +16,23 @@ public static class CommandExtensions
public static string GetCommandName(this CommandType commandType)
{
var (_, name) = commandType.GetLocalizedDescriptionAndKey();
- var commandName = name.ToLower();
-
- return $"{SharedHelperFunctions.GetSafeConfiguredDeviceName()}_{commandName}";
+ return name.ToLower();
}
+ //TODO: remove after tests
+
///
/// Returns the name of the commandtype, based on the provided devicename
///
///
///
///
- public static string GetCommandName(this CommandType commandType, string deviceName)
- {
- var (_, name) = commandType.GetLocalizedDescriptionAndKey();
- var commandName = name.ToLower();
-
- return $"{SharedHelperFunctions.GetSafeValue(deviceName)}_{commandName}";
- }
+ /* public static string GetCommandName(this CommandType commandType, string deviceName)
+ {
+ var (_, name) = commandType.GetLocalizedDescriptionAndKey();
+ var commandName = name.ToLower();
+
+ return $"{SharedHelperFunctions.GetSafeValue(deviceName)}_{commandName}";
+ }*/
}
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Extensions/SensorExtensions.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Extensions/SensorExtensions.cs
index 1d4807a7..ef91a026 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Extensions/SensorExtensions.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Extensions/SensorExtensions.cs
@@ -16,23 +16,23 @@ public static class SensorExtensions
public static string GetSensorName(this SensorType sensorType)
{
var (_, name) = sensorType.GetLocalizedDescriptionAndKey();
- var sensorName = name.ToLower();
-
- return $"{SharedHelperFunctions.GetSafeConfiguredDeviceName()}_{sensorName}";
+ return name.ToLower();
}
+ //TODO: remove after tests
+
///
/// Returns the name of the sensortype, based on the provided devicename
///
///
///
///
- public static string GetSensorName(this SensorType sensorType, string deviceName)
+/* public static string GetSensorName(this SensorType sensorType, string deviceName)
{
var (_, name) = sensorType.GetLocalizedDescriptionAndKey();
var sensorName = name.ToLower();
return $"{SharedHelperFunctions.GetSafeValue(deviceName)}_{sensorName}";
- }
+ }*/
}
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Functions/Inputs.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Functions/Inputs.cs
new file mode 100644
index 00000000..e42c8607
--- /dev/null
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Functions/Inputs.cs
@@ -0,0 +1,970 @@
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using System.Text;
+
+namespace HASS.Agent.Shared.Functions
+{
+ ///
+ /// Class containing objects used by input emulation functions
+ ///
+ public class Inputs
+ {
+ /// Courtesy of http://www.pinvoke.net/default.aspx/Structures/INPUT.html
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct INPUT
+ {
+ public InputType type;
+ public InputUnion U;
+ public static int Size
+ {
+ get { return Marshal.SizeOf(typeof(INPUT)); }
+ }
+ }
+
+ public enum InputType : uint
+ {
+ INPUT_MOUSE,
+ INPUT_KEYBOARD,
+ INPUT_HARDWARE
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public struct InputUnion
+ {
+ [FieldOffset(0)]
+ public MOUSEINPUT mi;
+ [FieldOffset(0)]
+ public KEYBDINPUT ki;
+ [FieldOffset(0)]
+ public HARDWAREINPUT hi;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct MOUSEINPUT
+ {
+ public int dx;
+ public int dy;
+ public int mouseData;
+ public MOUSEEVENTF dwFlags;
+ public uint time;
+ public UIntPtr dwExtraInfo;
+ }
+
+ [Flags]
+ public enum MOUSEEVENTF : uint
+ {
+ ABSOLUTE = 0x8000,
+ HWHEEL = 0x01000,
+ MOVE = 0x0001,
+ MOVE_NOCOALESCE = 0x2000,
+ LEFTDOWN = 0x0002,
+ LEFTUP = 0x0004,
+ RIGHTDOWN = 0x0008,
+ RIGHTUP = 0x0010,
+ MIDDLEDOWN = 0x0020,
+ MIDDLEUP = 0x0040,
+ VIRTUALDESK = 0x4000,
+ WHEEL = 0x0800,
+ XDOWN = 0x0080,
+ XUP = 0x0100
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct KEYBDINPUT
+ {
+ public VirtualKeyShort wVk;
+ public ScanCodeShort wScan;
+ public KEYEVENTF dwFlags;
+ public int time;
+ public UIntPtr dwExtraInfo;
+ }
+
+ [Flags]
+ public enum KEYEVENTF : uint
+ {
+ EXTENDEDKEY = 0x0001,
+ KEYUP = 0x0002,
+ SCANCODE = 0x0008,
+ UNICODE = 0x0004
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct HARDWAREINPUT
+ {
+ internal int uMsg;
+ internal short wParamL;
+ internal short wParamH;
+ }
+
+ public enum VirtualKeyShort : short
+ {
+ ///
+ ///Left mouse button
+ ///
+ LBUTTON = 0x01,
+ ///
+ ///Right mouse button
+ ///
+ RBUTTON = 0x02,
+ ///
+ ///Control-break processing
+ ///
+ CANCEL = 0x03,
+ ///
+ ///Middle mouse button (three-button mouse)
+ ///
+ MBUTTON = 0x04,
+ ///
+ ///Windows 2000/XP: X1 mouse button
+ ///
+ XBUTTON1 = 0x05,
+ ///
+ ///Windows 2000/XP: X2 mouse button
+ ///
+ XBUTTON2 = 0x06,
+ ///
+ ///BACKSPACE key
+ ///
+ BACK = 0x08,
+ ///
+ ///TAB key
+ ///
+ TAB = 0x09,
+ ///
+ ///CLEAR key
+ ///
+ CLEAR = 0x0C,
+ ///
+ ///ENTER key
+ ///
+ RETURN = 0x0D,
+ ///
+ ///SHIFT key
+ ///
+ SHIFT = 0x10,
+ ///
+ ///CTRL key
+ ///
+ CONTROL = 0x11,
+ ///
+ ///ALT key
+ ///
+ MENU = 0x12,
+ ///
+ ///PAUSE key
+ ///
+ PAUSE = 0x13,
+ ///
+ ///CAPS LOCK key
+ ///
+ CAPITAL = 0x14,
+ ///
+ ///Input Method Editor (IME) Kana mode
+ ///
+ KANA = 0x15,
+ ///
+ ///IME Hangul mode
+ ///
+ HANGUL = 0x15,
+ ///
+ ///IME Junja mode
+ ///
+ JUNJA = 0x17,
+ ///
+ ///IME final mode
+ ///
+ FINAL = 0x18,
+ ///
+ ///IME Hanja mode
+ ///
+ HANJA = 0x19,
+ ///
+ ///IME Kanji mode
+ ///
+ KANJI = 0x19,
+ ///
+ ///ESC key
+ ///
+ ESCAPE = 0x1B,
+ ///
+ ///IME convert
+ ///
+ CONVERT = 0x1C,
+ ///
+ ///IME nonconvert
+ ///
+ NONCONVERT = 0x1D,
+ ///
+ ///IME accept
+ ///
+ ACCEPT = 0x1E,
+ ///
+ ///IME mode change request
+ ///
+ MODECHANGE = 0x1F,
+ ///
+ ///SPACEBAR
+ ///
+ SPACE = 0x20,
+ ///
+ ///PAGE UP key
+ ///
+ PRIOR = 0x21,
+ ///
+ ///PAGE DOWN key
+ ///
+ NEXT = 0x22,
+ ///
+ ///END key
+ ///
+ END = 0x23,
+ ///
+ ///HOME key
+ ///
+ HOME = 0x24,
+ ///
+ ///LEFT ARROW key
+ ///
+ LEFT = 0x25,
+ ///
+ ///UP ARROW key
+ ///
+ UP = 0x26,
+ ///
+ ///RIGHT ARROW key
+ ///
+ RIGHT = 0x27,
+ ///
+ ///DOWN ARROW key
+ ///
+ DOWN = 0x28,
+ ///
+ ///SELECT key
+ ///
+ SELECT = 0x29,
+ ///
+ ///PRINT key
+ ///
+ PRINT = 0x2A,
+ ///
+ ///EXECUTE key
+ ///
+ EXECUTE = 0x2B,
+ ///
+ ///PRINT SCREEN key
+ ///
+ SNAPSHOT = 0x2C,
+ ///
+ ///INS key
+ ///
+ INSERT = 0x2D,
+ ///
+ ///DEL key
+ ///
+ DELETE = 0x2E,
+ ///
+ ///HELP key
+ ///
+ HELP = 0x2F,
+ ///
+ ///0 key
+ ///
+ KEY_0 = 0x30,
+ ///
+ ///1 key
+ ///
+ KEY_1 = 0x31,
+ ///
+ ///2 key
+ ///
+ KEY_2 = 0x32,
+ ///
+ ///3 key
+ ///
+ KEY_3 = 0x33,
+ ///
+ ///4 key
+ ///
+ KEY_4 = 0x34,
+ ///
+ ///5 key
+ ///
+ KEY_5 = 0x35,
+ ///
+ ///6 key
+ ///
+ KEY_6 = 0x36,
+ ///
+ ///7 key
+ ///
+ KEY_7 = 0x37,
+ ///
+ ///8 key
+ ///
+ KEY_8 = 0x38,
+ ///
+ ///9 key
+ ///
+ KEY_9 = 0x39,
+ ///
+ ///A key
+ ///
+ KEY_A = 0x41,
+ ///
+ ///B key
+ ///
+ KEY_B = 0x42,
+ ///
+ ///C key
+ ///
+ KEY_C = 0x43,
+ ///
+ ///D key
+ ///
+ KEY_D = 0x44,
+ ///
+ ///E key
+ ///
+ KEY_E = 0x45,
+ ///
+ ///F key
+ ///
+ KEY_F = 0x46,
+ ///
+ ///G key
+ ///
+ KEY_G = 0x47,
+ ///
+ ///H key
+ ///
+ KEY_H = 0x48,
+ ///
+ ///I key
+ ///
+ KEY_I = 0x49,
+ ///
+ ///J key
+ ///
+ KEY_J = 0x4A,
+ ///
+ ///K key
+ ///
+ KEY_K = 0x4B,
+ ///
+ ///L key
+ ///
+ KEY_L = 0x4C,
+ ///
+ ///M key
+ ///
+ KEY_M = 0x4D,
+ ///
+ ///N key
+ ///
+ KEY_N = 0x4E,
+ ///
+ ///O key
+ ///
+ KEY_O = 0x4F,
+ ///
+ ///P key
+ ///
+ KEY_P = 0x50,
+ ///
+ ///Q key
+ ///
+ KEY_Q = 0x51,
+ ///
+ ///R key
+ ///
+ KEY_R = 0x52,
+ ///
+ ///S key
+ ///
+ KEY_S = 0x53,
+ ///
+ ///T key
+ ///
+ KEY_T = 0x54,
+ ///
+ ///U key
+ ///
+ KEY_U = 0x55,
+ ///
+ ///V key
+ ///
+ KEY_V = 0x56,
+ ///
+ ///W key
+ ///
+ KEY_W = 0x57,
+ ///
+ ///X key
+ ///
+ KEY_X = 0x58,
+ ///
+ ///Y key
+ ///
+ KEY_Y = 0x59,
+ ///
+ ///Z key
+ ///
+ KEY_Z = 0x5A,
+ ///
+ ///Left Windows key (Microsoft Natural keyboard)
+ ///
+ LWIN = 0x5B,
+ ///
+ ///Right Windows key (Natural keyboard)
+ ///
+ RWIN = 0x5C,
+ ///
+ ///Applications key (Natural keyboard)
+ ///
+ APPS = 0x5D,
+ ///
+ ///Computer Sleep key
+ ///
+ SLEEP = 0x5F,
+ ///
+ ///Numeric keypad 0 key
+ ///
+ NUMPAD0 = 0x60,
+ ///
+ ///Numeric keypad 1 key
+ ///
+ NUMPAD1 = 0x61,
+ ///
+ ///Numeric keypad 2 key
+ ///
+ NUMPAD2 = 0x62,
+ ///
+ ///Numeric keypad 3 key
+ ///
+ NUMPAD3 = 0x63,
+ ///
+ ///Numeric keypad 4 key
+ ///
+ NUMPAD4 = 0x64,
+ ///
+ ///Numeric keypad 5 key
+ ///
+ NUMPAD5 = 0x65,
+ ///
+ ///Numeric keypad 6 key
+ ///
+ NUMPAD6 = 0x66,
+ ///
+ ///Numeric keypad 7 key
+ ///
+ NUMPAD7 = 0x67,
+ ///
+ ///Numeric keypad 8 key
+ ///
+ NUMPAD8 = 0x68,
+ ///
+ ///Numeric keypad 9 key
+ ///
+ NUMPAD9 = 0x69,
+ ///
+ ///Multiply key
+ ///
+ MULTIPLY = 0x6A,
+ ///
+ ///Add key
+ ///
+ ADD = 0x6B,
+ ///
+ ///Separator key
+ ///
+ SEPARATOR = 0x6C,
+ ///
+ ///Subtract key
+ ///
+ SUBTRACT = 0x6D,
+ ///
+ ///Decimal key
+ ///
+ DECIMAL = 0x6E,
+ ///
+ ///Divide key
+ ///
+ DIVIDE = 0x6F,
+ ///
+ ///F1 key
+ ///
+ F1 = 0x70,
+ ///
+ ///F2 key
+ ///
+ F2 = 0x71,
+ ///
+ ///F3 key
+ ///
+ F3 = 0x72,
+ ///
+ ///F4 key
+ ///
+ F4 = 0x73,
+ ///
+ ///F5 key
+ ///
+ F5 = 0x74,
+ ///
+ ///F6 key
+ ///
+ F6 = 0x75,
+ ///
+ ///F7 key
+ ///
+ F7 = 0x76,
+ ///
+ ///F8 key
+ ///
+ F8 = 0x77,
+ ///
+ ///F9 key
+ ///
+ F9 = 0x78,
+ ///
+ ///F10 key
+ ///
+ F10 = 0x79,
+ ///
+ ///F11 key
+ ///
+ F11 = 0x7A,
+ ///
+ ///F12 key
+ ///
+ F12 = 0x7B,
+ ///
+ ///F13 key
+ ///
+ F13 = 0x7C,
+ ///
+ ///F14 key
+ ///
+ F14 = 0x7D,
+ ///
+ ///F15 key
+ ///
+ F15 = 0x7E,
+ ///
+ ///F16 key
+ ///
+ F16 = 0x7F,
+ ///
+ ///F17 key
+ ///
+ F17 = 0x80,
+ ///
+ ///F18 key
+ ///
+ F18 = 0x81,
+ ///
+ ///F19 key
+ ///
+ F19 = 0x82,
+ ///
+ ///F20 key
+ ///
+ F20 = 0x83,
+ ///
+ ///F21 key
+ ///
+ F21 = 0x84,
+ ///
+ ///F22 key, (PPC only) Key used to lock device.
+ ///
+ F22 = 0x85,
+ ///
+ ///F23 key
+ ///
+ F23 = 0x86,
+ ///
+ ///F24 key
+ ///
+ F24 = 0x87,
+ ///
+ ///NUM LOCK key
+ ///
+ NUMLOCK = 0x90,
+ ///
+ ///SCROLL LOCK key
+ ///
+ SCROLL = 0x91,
+ ///
+ ///Left SHIFT key
+ ///
+ LSHIFT = 0xA0,
+ ///
+ ///Right SHIFT key
+ ///
+ RSHIFT = 0xA1,
+ ///
+ ///Left CONTROL key
+ ///
+ LCONTROL = 0xA2,
+ ///
+ ///Right CONTROL key
+ ///
+ RCONTROL = 0xA3,
+ ///
+ ///Left MENU key
+ ///
+ LMENU = 0xA4,
+ ///
+ ///Right MENU key
+ ///
+ RMENU = 0xA5,
+ ///
+ ///Windows 2000/XP: Browser Back key
+ ///
+ BROWSER_BACK = 0xA6,
+ ///
+ ///Windows 2000/XP: Browser Forward key
+ ///
+ BROWSER_FORWARD = 0xA7,
+ ///
+ ///Windows 2000/XP: Browser Refresh key
+ ///
+ BROWSER_REFRESH = 0xA8,
+ ///
+ ///Windows 2000/XP: Browser Stop key
+ ///
+ BROWSER_STOP = 0xA9,
+ ///
+ ///Windows 2000/XP: Browser Search key
+ ///
+ BROWSER_SEARCH = 0xAA,
+ ///
+ ///Windows 2000/XP: Browser Favorites key
+ ///
+ BROWSER_FAVORITES = 0xAB,
+ ///
+ ///Windows 2000/XP: Browser Start and Home key
+ ///
+ BROWSER_HOME = 0xAC,
+ ///
+ ///Windows 2000/XP: Volume Mute key
+ ///
+ VOLUME_MUTE = 0xAD,
+ ///
+ ///Windows 2000/XP: Volume Down key
+ ///
+ VOLUME_DOWN = 0xAE,
+ ///
+ ///Windows 2000/XP: Volume Up key
+ ///
+ VOLUME_UP = 0xAF,
+ ///
+ ///Windows 2000/XP: Next Track key
+ ///
+ MEDIA_NEXT_TRACK = 0xB0,
+ ///
+ ///Windows 2000/XP: Previous Track key
+ ///
+ MEDIA_PREV_TRACK = 0xB1,
+ ///
+ ///Windows 2000/XP: Stop Media key
+ ///
+ MEDIA_STOP = 0xB2,
+ ///
+ ///Windows 2000/XP: Play/Pause Media key
+ ///
+ MEDIA_PLAY_PAUSE = 0xB3,
+ ///
+ ///Windows 2000/XP: Start Mail key
+ ///
+ LAUNCH_MAIL = 0xB4,
+ ///
+ ///Windows 2000/XP: Select Media key
+ ///
+ LAUNCH_MEDIA_SELECT = 0xB5,
+ ///
+ ///Windows 2000/XP: Start Application 1 key
+ ///
+ LAUNCH_APP1 = 0xB6,
+ ///
+ ///Windows 2000/XP: Start Application 2 key
+ ///
+ LAUNCH_APP2 = 0xB7,
+ ///
+ ///Used for miscellaneous characters; it can vary by keyboard.
+ ///
+ OEM_1 = 0xBA,
+ ///
+ ///Windows 2000/XP: For any country/region, the '+' key
+ ///
+ OEM_PLUS = 0xBB,
+ ///
+ ///Windows 2000/XP: For any country/region, the ',' key
+ ///
+ OEM_COMMA = 0xBC,
+ ///
+ ///Windows 2000/XP: For any country/region, the '-' key
+ ///
+ OEM_MINUS = 0xBD,
+ ///
+ ///Windows 2000/XP: For any country/region, the '.' key
+ ///
+ OEM_PERIOD = 0xBE,
+ ///
+ ///Used for miscellaneous characters; it can vary by keyboard.
+ ///
+ OEM_2 = 0xBF,
+ ///
+ ///Used for miscellaneous characters; it can vary by keyboard.
+ ///
+ OEM_3 = 0xC0,
+ ///
+ ///Used for miscellaneous characters; it can vary by keyboard.
+ ///
+ OEM_4 = 0xDB,
+ ///
+ ///Used for miscellaneous characters; it can vary by keyboard.
+ ///
+ OEM_5 = 0xDC,
+ ///
+ ///Used for miscellaneous characters; it can vary by keyboard.
+ ///
+ OEM_6 = 0xDD,
+ ///
+ ///Used for miscellaneous characters; it can vary by keyboard.
+ ///
+ OEM_7 = 0xDE,
+ ///
+ ///Used for miscellaneous characters; it can vary by keyboard.
+ ///
+ OEM_8 = 0xDF,
+ ///
+ ///Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
+ ///
+ OEM_102 = 0xE2,
+ ///
+ ///Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
+ ///
+ PROCESSKEY = 0xE5,
+ ///
+ ///Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes.
+ ///The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information,
+ ///see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP
+ ///
+ PACKET = 0xE7,
+ ///
+ ///Attn key
+ ///
+ ATTN = 0xF6,
+ ///
+ ///CrSel key
+ ///
+ CRSEL = 0xF7,
+ ///
+ ///ExSel key
+ ///
+ EXSEL = 0xF8,
+ ///
+ ///Erase EOF key
+ ///
+ EREOF = 0xF9,
+ ///
+ ///Play key
+ ///
+ PLAY = 0xFA,
+ ///
+ ///Zoom key
+ ///
+ ZOOM = 0xFB,
+ ///
+ ///Reserved
+ ///
+ NONAME = 0xFC,
+ ///
+ ///PA1 key
+ ///
+ PA1 = 0xFD,
+ ///
+ ///Clear key
+ ///
+ OEM_CLEAR = 0xFE
+ }
+ public enum ScanCodeShort : short
+ {
+ LBUTTON = 0,
+ RBUTTON = 0,
+ CANCEL = 70,
+ MBUTTON = 0,
+ XBUTTON1 = 0,
+ XBUTTON2 = 0,
+ BACK = 14,
+ TAB = 15,
+ CLEAR = 76,
+ RETURN = 28,
+ SHIFT = 42,
+ CONTROL = 29,
+ MENU = 56,
+ PAUSE = 0,
+ CAPITAL = 58,
+ KANA = 0,
+ HANGUL = 0,
+ JUNJA = 0,
+ FINAL = 0,
+ HANJA = 0,
+ KANJI = 0,
+ ESCAPE = 1,
+ CONVERT = 0,
+ NONCONVERT = 0,
+ ACCEPT = 0,
+ MODECHANGE = 0,
+ SPACE = 57,
+ PRIOR = 73,
+ NEXT = 81,
+ END = 79,
+ HOME = 71,
+ LEFT = 75,
+ UP = 72,
+ RIGHT = 77,
+ DOWN = 80,
+ SELECT = 0,
+ PRINT = 0,
+ EXECUTE = 0,
+ SNAPSHOT = 84,
+ INSERT = 82,
+ DELETE = 83,
+ HELP = 99,
+ KEY_0 = 11,
+ KEY_1 = 2,
+ KEY_2 = 3,
+ KEY_3 = 4,
+ KEY_4 = 5,
+ KEY_5 = 6,
+ KEY_6 = 7,
+ KEY_7 = 8,
+ KEY_8 = 9,
+ KEY_9 = 10,
+ KEY_A = 30,
+ KEY_B = 48,
+ KEY_C = 46,
+ KEY_D = 32,
+ KEY_E = 18,
+ KEY_F = 33,
+ KEY_G = 34,
+ KEY_H = 35,
+ KEY_I = 23,
+ KEY_J = 36,
+ KEY_K = 37,
+ KEY_L = 38,
+ KEY_M = 50,
+ KEY_N = 49,
+ KEY_O = 24,
+ KEY_P = 25,
+ KEY_Q = 16,
+ KEY_R = 19,
+ KEY_S = 31,
+ KEY_T = 20,
+ KEY_U = 22,
+ KEY_V = 47,
+ KEY_W = 17,
+ KEY_X = 45,
+ KEY_Y = 21,
+ KEY_Z = 44,
+ LWIN = 91,
+ RWIN = 92,
+ APPS = 93,
+ SLEEP = 95,
+ NUMPAD0 = 82,
+ NUMPAD1 = 79,
+ NUMPAD2 = 80,
+ NUMPAD3 = 81,
+ NUMPAD4 = 75,
+ NUMPAD5 = 76,
+ NUMPAD6 = 77,
+ NUMPAD7 = 71,
+ NUMPAD8 = 72,
+ NUMPAD9 = 73,
+ MULTIPLY = 55,
+ ADD = 78,
+ SEPARATOR = 0,
+ SUBTRACT = 74,
+ DECIMAL = 83,
+ DIVIDE = 53,
+ F1 = 59,
+ F2 = 60,
+ F3 = 61,
+ F4 = 62,
+ F5 = 63,
+ F6 = 64,
+ F7 = 65,
+ F8 = 66,
+ F9 = 67,
+ F10 = 68,
+ F11 = 87,
+ F12 = 88,
+ F13 = 100,
+ F14 = 101,
+ F15 = 102,
+ F16 = 103,
+ F17 = 104,
+ F18 = 105,
+ F19 = 106,
+ F20 = 107,
+ F21 = 108,
+ F22 = 109,
+ F23 = 110,
+ F24 = 118,
+ NUMLOCK = 69,
+ SCROLL = 70,
+ LSHIFT = 42,
+ RSHIFT = 54,
+ LCONTROL = 29,
+ RCONTROL = 29,
+ LMENU = 56,
+ RMENU = 56,
+ BROWSER_BACK = 106,
+ BROWSER_FORWARD = 105,
+ BROWSER_REFRESH = 103,
+ BROWSER_STOP = 104,
+ BROWSER_SEARCH = 101,
+ BROWSER_FAVORITES = 102,
+ BROWSER_HOME = 50,
+ VOLUME_MUTE = 32,
+ VOLUME_DOWN = 46,
+ VOLUME_UP = 48,
+ MEDIA_NEXT_TRACK = 25,
+ MEDIA_PREV_TRACK = 16,
+ MEDIA_STOP = 36,
+ MEDIA_PLAY_PAUSE = 34,
+ LAUNCH_MAIL = 108,
+ LAUNCH_MEDIA_SELECT = 109,
+ LAUNCH_APP1 = 107,
+ LAUNCH_APP2 = 33,
+ OEM_1 = 39,
+ OEM_PLUS = 13,
+ OEM_COMMA = 51,
+ OEM_MINUS = 12,
+ OEM_PERIOD = 52,
+ OEM_2 = 53,
+ OEM_3 = 41,
+ OEM_4 = 26,
+ OEM_5 = 43,
+ OEM_6 = 27,
+ OEM_7 = 40,
+ OEM_8 = 0,
+ OEM_102 = 86,
+ PROCESSKEY = 0,
+ PACKET = 0,
+ ATTN = 0,
+ CRSEL = 0,
+ EXSEL = 0,
+ EREOF = 93,
+ PLAY = 0,
+ ZOOM = 98,
+ NONAME = 0,
+ PA1 = 0,
+ OEM_CLEAR = 0,
+ }
+ }
+}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Functions/NativeMethods.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Functions/NativeMethods.cs
index 88584f86..0c807982 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Functions/NativeMethods.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Functions/NativeMethods.cs
@@ -5,13 +5,14 @@
using System.Runtime.InteropServices;
using System.Text;
using HASS.Agent.Shared.Enums;
+using static HASS.Agent.Shared.Functions.Inputs;
namespace HASS.Agent.Shared.Functions
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
- internal static class NativeMethods
+ public static class NativeMethods
{
- internal static WINDOWPLACEMENT GetPlacement(IntPtr hwnd)
+ public static WINDOWPLACEMENT GetPlacement(IntPtr hwnd)
{
var placement = new WINDOWPLACEMENT();
placement.length = Marshal.SizeOf(placement);
@@ -21,11 +22,11 @@ internal static WINDOWPLACEMENT GetPlacement(IntPtr hwnd)
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
- internal static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);
+ public static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);
[Serializable]
[StructLayout(LayoutKind.Sequential)]
- internal struct WINDOWPLACEMENT
+ public struct WINDOWPLACEMENT
{
public int length;
public int flags;
@@ -40,33 +41,36 @@ internal struct WINDOWPLACEMENT
internal const uint SC_MONITORPOWER = 0xF170;
[DllImport("advapi32.dll", SetLastError = true)]
- internal static extern bool OpenProcessToken(IntPtr processHandle, uint desiredAccess, out IntPtr tokenHandle);
+ public static extern bool OpenProcessToken(IntPtr processHandle, uint desiredAccess, out IntPtr tokenHandle);
[DllImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
- internal static extern bool CloseHandle(IntPtr hObject);
+ public static extern bool CloseHandle(IntPtr hObject);
- internal delegate bool EnumWindowsProc(IntPtr hWnd, int lParam);
+ public delegate bool EnumWindowsProc(IntPtr hWnd, int lParam);
[DllImport("USER32.DLL")]
- internal static extern bool EnumWindows(EnumWindowsProc enumFunc, int lParam);
+ public static extern bool EnumWindows(EnumWindowsProc enumFunc, int lParam);
[DllImport("USER32.DLL")]
- internal static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
+ public static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
[DllImport("USER32.DLL")]
- internal static extern int GetWindowTextLength(IntPtr hWnd);
+ public static extern int GetWindowTextLength(IntPtr hWnd);
[DllImport("USER32.DLL")]
- internal static extern bool IsWindowVisible(IntPtr hWnd);
+ public static extern bool IsWindowVisible(IntPtr hWnd);
[DllImport("USER32.DLL")]
- internal static extern IntPtr GetShellWindow();
+ public static extern IntPtr GetShellWindow();
[DllImport("user32.dll", CharSet = CharSet.Auto)]
- internal static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, [Out] IntPtr lParam);
+ public static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, [Out] IntPtr lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
- internal static extern IntPtr PostMessage(IntPtr hWnd, uint msg, IntPtr wParam, [Out] IntPtr lParam);
+ public static extern IntPtr PostMessage(IntPtr hWnd, uint msg, IntPtr wParam, [Out] IntPtr lParam);
+
+ [DllImport("user32.dll")]
+ public static extern uint SendInput(uint nInputs, INPUT[] pInputs, int cbSize);
}
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HASS.Agent.Shared.csproj b/src/HASS.Agent.Staging/HASS.Agent.Shared/HASS.Agent.Shared.csproj
index 77d48d7e..f67e0de7 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HASS.Agent.Shared.csproj
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HASS.Agent.Shared.csproj
@@ -1,7 +1,7 @@
- netstandard2.1
+ net6.0-windows10.0.19041.0
AnyCPU;x64
HASS.Agent.Shared
HASS.Agent.Shared
@@ -21,6 +21,7 @@
True
disable
full
+ 10.0.17763.0
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/InternalCommands/SetApplicationVolumeCommand.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/InternalCommands/SetApplicationVolumeCommand.cs
new file mode 100644
index 00000000..27f6bbff
--- /dev/null
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/InternalCommands/SetApplicationVolumeCommand.cs
@@ -0,0 +1,117 @@
+using CoreAudio;
+using HASS.Agent.Shared.Enums;
+using Newtonsoft.Json;
+using Serilog;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+
+namespace HASS.Agent.Shared.HomeAssistant.Commands.InternalCommands
+{
+ public class SetApplicationVolumeCommand : InternalCommand
+ {
+ private const string DefaultName = "setappvolume";
+ private static readonly Dictionary ApplicationNames = new Dictionary();
+
+ public SetApplicationVolumeCommand(string name = DefaultName, string friendlyName = DefaultName, string commandConfig = "", CommandEntityType entityType = CommandEntityType.Button, string id = default) : base(name ?? DefaultName, friendlyName ?? null, commandConfig, entityType, id)
+ {
+ State = "OFF";
+ }
+
+ public override void TurnOn()
+ {
+ if (string.IsNullOrWhiteSpace(CommandConfig))
+ {
+ Log.Error("[SETAPPVOLUME] Error, command config is null/empty/blank");
+
+ return;
+ }
+
+
+ TurnOnWithAction(CommandConfig);
+ }
+
+ private MMDevice GetAudioDeviceOrDefault(string playbackDeviceName)
+ {
+ var devices = Variables.AudioDeviceEnumerator.EnumerateAudioEndPoints(DataFlow.eRender, DeviceState.Active);
+ var playbackDevice = devices.Where(d => d.DeviceFriendlyName == playbackDeviceName).FirstOrDefault();
+
+ return playbackDevice ?? Variables.AudioDeviceEnumerator.GetDefaultAudioEndpoint(DataFlow.eRender, Role.Multimedia);
+ }
+
+ private string GetSessionDisplayName(AudioSessionControl2 session)
+ {
+ var procId = (int)session.ProcessID;
+
+ if (procId <= 0)
+ return session.DisplayName;
+
+ if (ApplicationNames.ContainsKey(procId))
+ return ApplicationNames[procId];
+
+ using var p = Process.GetProcessById(procId);
+ ApplicationNames.Add(procId, p.ProcessName);
+
+ return p.ProcessName;
+ }
+
+ public override void TurnOnWithAction(string action)
+ {
+ State = "ON";
+
+ try
+ {
+ var actionData = JsonConvert.DeserializeObject(action);
+
+ if (string.IsNullOrWhiteSpace(actionData.ApplicationName))
+ {
+ Log.Error("[SETAPPVOLUME] Error, this command can be run only with action");
+
+ return;
+ }
+
+ using var audioDevice = GetAudioDeviceOrDefault(actionData.PlaybackDevice);
+ using var session = audioDevice.AudioSessionManager2?.Sessions?.Where(s =>
+ s != null &&
+ actionData.ApplicationName == GetSessionDisplayName(s)
+ ).FirstOrDefault();
+
+ if (session == null)
+ {
+ Log.Error("[SETAPPVOLUME] Error, no session of application {app} can be found", actionData.ApplicationName);
+
+ return;
+ }
+
+ session.SimpleAudioVolume.Mute = actionData.Mute;
+ if (actionData.Volume == -1)
+ {
+ Log.Debug("[SETAPPVOLUME] No volume value provided, only mute has been set for {app}", actionData.ApplicationName);
+
+ return;
+ }
+
+ var volume = Math.Clamp(actionData.Volume, 0, 100) / 100.0f;
+ session.SimpleAudioVolume.MasterVolume = volume;
+ }
+ catch (Exception ex)
+ {
+ Log.Error("[SETAPPVOLUME] Error while processing action '{action}': {err}", action, ex.Message);
+ }
+ finally
+ {
+ State = "OFF";
+ }
+ }
+
+ private class ApplicationVolumeAction
+ {
+ public int Volume { get; set; } = -1;
+ public bool Mute { get; set; } = false;
+ public string ApplicationName { get; set; } = string.Empty;
+ public string PlaybackDevice { get; set; } = string.Empty;
+ }
+ }
+}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/InternalCommands/SetAudioOutputCommand.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/InternalCommands/SetAudioOutputCommand.cs
new file mode 100644
index 00000000..ecc2e0fe
--- /dev/null
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/InternalCommands/SetAudioOutputCommand.cs
@@ -0,0 +1,68 @@
+using CoreAudio;
+using HASS.Agent.Shared.Enums;
+using Newtonsoft.Json;
+using Serilog;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Text;
+
+namespace HASS.Agent.Shared.HomeAssistant.Commands.InternalCommands
+{
+ public class SetAudioOutputCommand : InternalCommand
+ {
+ private const string DefaultName = "setaudiooutput";
+
+ private string OutputDevice { get => CommandConfig; }
+
+ public SetAudioOutputCommand(string name = DefaultName, string friendlyName = DefaultName, string audioDevice = "", CommandEntityType entityType = CommandEntityType.Button, string id = default) : base(name ?? DefaultName, friendlyName ?? null, audioDevice, entityType, id)
+ {
+ State = "OFF";
+ }
+
+ public override void TurnOn()
+ {
+ if (string.IsNullOrWhiteSpace(OutputDevice))
+ {
+ Log.Error("[SETAUDIOOUT] Error, output device name cannot be null/blank");
+
+ return;
+ }
+
+ TurnOnWithAction(OutputDevice);
+ }
+
+ private MMDevice GetAudioDeviceOrDefault(string playbackDeviceName)
+ {
+ var devices = Variables.AudioDeviceEnumerator.EnumerateAudioEndPoints(DataFlow.eRender, DeviceState.Active);
+ var playbackDevice = devices.Where(d => d.DeviceFriendlyName == playbackDeviceName).FirstOrDefault();
+
+ return playbackDevice ?? Variables.AudioDeviceEnumerator.GetDefaultAudioEndpoint(DataFlow.eRender, Role.Multimedia);
+ }
+
+ public override void TurnOnWithAction(string action)
+ {
+ State = "ON";
+
+ try
+ {
+ var outputDevice = GetAudioDeviceOrDefault(action);
+ if (outputDevice == Variables.AudioDeviceEnumerator.GetDefaultAudioEndpoint(DataFlow.eRender, Role.Multimedia))
+ return;
+
+ outputDevice.Selected = true;
+ }
+ catch (Exception ex)
+ {
+ Log.Error("[SETAUDIOOUT] Error while processing action '{action}': {err}", action, ex.Message);
+ }
+ finally
+ {
+ State = "OFF";
+ }
+ }
+ }
+}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommand.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommand.cs
index a9aa4647..4013f504 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommand.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommand.cs
@@ -1,8 +1,12 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
+using System.Windows.Forms;
using HASS.Agent.Shared.Enums;
using HASS.Agent.Shared.Models.HomeAssistant;
+using Serilog;
+using static HASS.Agent.Shared.Functions.Inputs;
+using static HASS.Agent.Shared.Functions.NativeMethods;
namespace HASS.Agent.Shared.HomeAssistant.Commands
{
@@ -14,20 +18,11 @@ public class KeyCommand : AbstractCommand
{
private const string DefaultName = "key";
- public const int KEYEVENTF_EXTENTEDKEY = 1;
- public const int KEYEVENTF_KEYUP = 0;
- public const int VK_MEDIA_NEXT_TRACK = 0xB0;
- public const int VK_MEDIA_PLAY_PAUSE = 0xB3;
- public const int VK_MEDIA_PREV_TRACK = 0xB1;
- public const int VK_VOLUME_MUTE = 0xAD;
- public const int VK_VOLUME_UP = 0xAF;
- public const int VK_VOLUME_DOWN = 0xAE;
- public const int KEY_UP = 38;
-
public string State { get; protected set; }
- public byte KeyCode { get; set; }
+
+ public VirtualKeyShort KeyCode { get; set; }
- public KeyCommand(byte keyCode, string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Switch, string id = default) : base(name ?? DefaultName, friendlyName ?? null, entityType, id)
+ public KeyCommand(VirtualKeyShort keyCode, string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Switch, string id = default) : base(name ?? DefaultName, friendlyName ?? null, entityType, id)
{
KeyCode = keyCode;
State = "OFF";
@@ -52,9 +47,6 @@ public override DiscoveryConfigModel GetAutoDiscoveryConfig()
Device = deviceConfig
};
}
-
- [DllImport("user32.dll")]
- public static extern void keybd_event(byte virtualKey, byte scanCode, uint flags, IntPtr extraInfo);
public override string GetState() => State;
@@ -65,10 +57,23 @@ public override void TurnOff()
public override void TurnOn()
{
- State = "OFF";
+ State = "ON";
+
+ var inputs = new INPUT[2];
+ inputs[0].type = InputType.INPUT_KEYBOARD;
+ inputs[0].U.ki.wVk = KeyCode;
+
+ inputs[1].type = InputType.INPUT_KEYBOARD;
+ inputs[1].U.ki.wVk = KeyCode;
+ inputs[1].U.ki.dwFlags = KEYEVENTF.KEYUP;
+
+ var ret = SendInput((uint)inputs.Length, inputs, INPUT.Size);
+ if (ret != inputs.Length)
+ {
+ var error = Marshal.GetLastWin32Error();
+ Log.Error($"[{DefaultName}] Error simulating key press for {KeyCode}: {error}");
+ }
- keybd_event(KeyCode, 0, KEYEVENTF_EXTENTEDKEY, IntPtr.Zero);
-
State = "OFF";
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaMuteCommand.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaMuteCommand.cs
index fa17e6ca..c02464cf 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaMuteCommand.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaMuteCommand.cs
@@ -1,4 +1,5 @@
using HASS.Agent.Shared.Enums;
+using static HASS.Agent.Shared.Functions.Inputs;
namespace HASS.Agent.Shared.HomeAssistant.Commands.KeyCommands
{
@@ -9,6 +10,6 @@ public class MediaMuteCommand : KeyCommand
{
private const string DefaultName = "mute";
- public MediaMuteCommand(string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Switch, string id = default) : base(VK_VOLUME_MUTE, name ?? DefaultName, friendlyName ?? null, entityType, id) { }
+ public MediaMuteCommand(string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Switch, string id = default) : base(VirtualKeyShort.VOLUME_MUTE, name ?? DefaultName, friendlyName ?? null, entityType, id) { }
}
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaNextCommand.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaNextCommand.cs
index 2574f783..56e44c9f 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaNextCommand.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaNextCommand.cs
@@ -1,4 +1,5 @@
using HASS.Agent.Shared.Enums;
+using static HASS.Agent.Shared.Functions.Inputs;
namespace HASS.Agent.Shared.HomeAssistant.Commands.KeyCommands
{
@@ -9,6 +10,6 @@ public class MediaNextCommand : KeyCommand
{
private const string DefaultName = "next";
- public MediaNextCommand(string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Switch, string id = default) : base(VK_MEDIA_NEXT_TRACK, name ?? DefaultName, friendlyName ?? null, entityType, id) { }
+ public MediaNextCommand(string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Switch, string id = default) : base(VirtualKeyShort.MEDIA_NEXT_TRACK, name ?? DefaultName, friendlyName ?? null, entityType, id) { }
}
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaPlayPauseCommand.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaPlayPauseCommand.cs
index 58ace62c..b84012f3 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaPlayPauseCommand.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaPlayPauseCommand.cs
@@ -1,4 +1,5 @@
using HASS.Agent.Shared.Enums;
+using static HASS.Agent.Shared.Functions.Inputs;
namespace HASS.Agent.Shared.HomeAssistant.Commands.KeyCommands
{
@@ -9,6 +10,6 @@ public class MediaPlayPauseCommand : KeyCommand
{
private const string DefaultName = "playpause";
- public MediaPlayPauseCommand(string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Switch, string id = default) : base(VK_MEDIA_PLAY_PAUSE, name ?? DefaultName, friendlyName ?? null, entityType, id) { }
+ public MediaPlayPauseCommand(string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Switch, string id = default) : base(VirtualKeyShort.MEDIA_PLAY_PAUSE, name ?? DefaultName, friendlyName ?? null, entityType, id) { }
}
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaPreviousCommand.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaPreviousCommand.cs
index 32feaaf8..8726638c 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaPreviousCommand.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaPreviousCommand.cs
@@ -1,4 +1,5 @@
using HASS.Agent.Shared.Enums;
+using static HASS.Agent.Shared.Functions.Inputs;
namespace HASS.Agent.Shared.HomeAssistant.Commands.KeyCommands
{
@@ -9,6 +10,6 @@ public class MediaPreviousCommand : KeyCommand
{
private const string DefaultName = "previous";
- public MediaPreviousCommand(string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Switch, string id = default) : base(VK_MEDIA_PREV_TRACK, name ?? DefaultName, friendlyName ?? null, entityType, id) { }
+ public MediaPreviousCommand(string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Switch, string id = default) : base(VirtualKeyShort.MEDIA_PREV_TRACK, name ?? DefaultName, friendlyName ?? null, entityType, id) { }
}
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaVolumeDownCommand.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaVolumeDownCommand.cs
index b92106da..762b9b68 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaVolumeDownCommand.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaVolumeDownCommand.cs
@@ -1,4 +1,5 @@
using HASS.Agent.Shared.Enums;
+using static HASS.Agent.Shared.Functions.Inputs;
namespace HASS.Agent.Shared.HomeAssistant.Commands.KeyCommands
{
@@ -9,6 +10,6 @@ public class MediaVolumeDownCommand : KeyCommand
{
private const string DefaultName = "volumedown";
- public MediaVolumeDownCommand(string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Switch, string id = default) : base(VK_VOLUME_DOWN, name ?? DefaultName, friendlyName ?? null, entityType, id) { }
+ public MediaVolumeDownCommand(string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Switch, string id = default) : base(VirtualKeyShort.VOLUME_DOWN, name ?? DefaultName, friendlyName ?? null, entityType, id) { }
}
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaVolumeUpCommand.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaVolumeUpCommand.cs
index c67af29c..844422a2 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaVolumeUpCommand.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MediaVolumeUpCommand.cs
@@ -1,4 +1,5 @@
using HASS.Agent.Shared.Enums;
+using static HASS.Agent.Shared.Functions.Inputs;
namespace HASS.Agent.Shared.HomeAssistant.Commands.KeyCommands
{
@@ -9,6 +10,6 @@ public class MediaVolumeUpCommand : KeyCommand
{
private const string DefaultName = "volumeup";
- public MediaVolumeUpCommand(string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Switch, string id = default) : base(VK_VOLUME_UP, name ?? DefaultName, friendlyName ?? null, entityType, id) { }
+ public MediaVolumeUpCommand(string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Switch, string id = default) : base(VirtualKeyShort.VOLUME_UP, name ?? DefaultName, friendlyName ?? null, entityType, id) { }
}
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MonitorWakeCommand.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MonitorWakeCommand.cs
index 56467121..49f16831 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MonitorWakeCommand.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/KeyCommands/MonitorWakeCommand.cs
@@ -1,4 +1,5 @@
using HASS.Agent.Shared.Enums;
+using static HASS.Agent.Shared.Functions.Inputs;
namespace HASS.Agent.Shared.HomeAssistant.Commands.KeyCommands
{
@@ -10,6 +11,6 @@ public class MonitorWakeCommand : KeyCommand
{
private const string DefaultName = "monitorwake";
- public MonitorWakeCommand(string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Button, string id = default) : base(KEY_UP, name ?? DefaultName, friendlyName ?? null, entityType, id) { }
+ public MonitorWakeCommand(string name = DefaultName, string friendlyName = DefaultName, CommandEntityType entityType = CommandEntityType.Button, string id = default) : base(VirtualKeyShort.UP, name ?? DefaultName, friendlyName ?? null, entityType, id) { }
}
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/PowershellCommand.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/PowershellCommand.cs
index e9076055..187cade1 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/PowershellCommand.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Commands/PowershellCommand.cs
@@ -45,7 +45,7 @@ public override void TurnOn()
}
var executed = _isScript
- ? PowershellManager.ExecuteScriptHeadless(Command)
+ ? PowershellManager.ExecuteScriptHeadless(Command, string.Empty)
: PowershellManager.ExecuteCommandHeadless(Command);
if (!executed) Log.Error("[POWERSHELL] [{name}] Executing {descriptor} failed", Name, _descriptor, Name);
@@ -57,12 +57,9 @@ public override void TurnOnWithAction(string action)
{
State = "ON";
- // prepare command
- var command = string.IsNullOrWhiteSpace(Command) ? action : $"{Command} {action}";
-
var executed = _isScript
- ? PowershellManager.ExecuteScriptHeadless(command)
- : PowershellManager.ExecuteCommandHeadless(command);
+ ? PowershellManager.ExecuteScriptHeadless(Command, action)
+ : PowershellManager.ExecuteCommandHeadless(Command);
if (!executed) Log.Error("[POWERSHELL] [{name}] Launching PS {descriptor} with action '{action}' failed", Name, _descriptor, action);
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/AudioSensors.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/AudioSensors.cs
index 6806fa93..c0422267 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/AudioSensors.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/AudioSensors.cs
@@ -34,124 +34,166 @@ public AudioSensors(int? updateInterval = null, string name = DefaultName, strin
UpdateSensorValues();
}
- public sealed override void UpdateSensorValues()
+ private void AddUpdateSensor(string sensorId, AbstractSingleValueSensor sensor)
{
- try
+ if (!Sensors.ContainsKey(sensorId))
+ Sensors.Add(sensorId, sensor);
+ else
+ Sensors[sensorId] = sensor;
+ }
+
+ private List GetAudioDevices(DataFlow type)
+ {
+ var audioDevices = new List();
+ foreach (var device in Variables.AudioDeviceEnumerator.EnumerateAudioEndPoints(type, DeviceState.Active))
{
- // lowercase and safe name of the multivalue sensor
- var parentSensorSafeName = SharedHelperFunctions.GetSafeValue(Name);
+ audioDevices.Add(device.DeviceFriendlyName);
+ device.Dispose();
+ }
- // get the default audio device
- using (var audioDevice = Variables.AudioDeviceEnumerator.GetDefaultAudioEndpoint(DataFlow.eRender, Role.Multimedia))
+ return audioDevices;
+ }
+
+ private List GetAudioOutputDevices() => GetAudioDevices(DataFlow.eRender);
+ private List GetAudioInputDevices() => GetAudioDevices(DataFlow.eCapture);
+
+ private void HandleAudioOutputSensors(string parentSensorSafeName)
+ {
+ using var audioDevice = Variables.AudioDeviceEnumerator.GetDefaultAudioEndpoint(DataFlow.eRender, Role.Multimedia);
+
+ var defaultDeviceId = $"{parentSensorSafeName}_default_device";
+ var defaultDeviceSensor = new DataTypeStringSensor(_updateInterval, $"Default Device", defaultDeviceId, string.Empty, "mdi:speaker", string.Empty, Name);
+ defaultDeviceSensor.SetState(audioDevice.DeviceFriendlyName);
+ AddUpdateSensor(defaultDeviceId, defaultDeviceSensor);
+
+ var defaultDeviceStateId = $"{parentSensorSafeName}_default_device_state";
+ var defaultDeviceStateSensor = new DataTypeStringSensor(_updateInterval, $"Default Device State", defaultDeviceStateId, string.Empty, "mdi:speaker", string.Empty, Name);
+ defaultDeviceStateSensor.SetState(GetReadableState(audioDevice.State));
+ AddUpdateSensor(defaultDeviceStateId, defaultDeviceStateSensor);
+
+ var masterVolume = Convert.ToInt32(Math.Round(audioDevice.AudioEndpointVolume?.MasterVolumeLevelScalar * 100 ?? 0, 0));
+ var defaultDeviceVolumeId = $"{parentSensorSafeName}_default_device_volume";
+ var defaultDeviceVolumeSensor = new DataTypeIntSensor(_updateInterval, $"Default Device Volume", defaultDeviceVolumeId, string.Empty, "mdi:speaker", string.Empty, Name);
+ defaultDeviceVolumeSensor.SetState(masterVolume);
+ AddUpdateSensor(defaultDeviceVolumeId, defaultDeviceVolumeSensor);
+
+ var defaultDeviceIsMuted = audioDevice.AudioEndpointVolume?.Mute ?? false;
+ var defaultDeviceIsMutedId = $"{parentSensorSafeName}_default_device_muted";
+ var defaultDeviceIsMutedSensor = new DataTypeBoolSensor(_updateInterval, $"Default Device Muted", defaultDeviceIsMutedId, string.Empty, "mdi:speaker", Name);
+ defaultDeviceIsMutedSensor.SetState(defaultDeviceIsMuted);
+ AddUpdateSensor(defaultDeviceIsMutedId, defaultDeviceIsMutedSensor);
+
+ // get session and volume info
+ var sessionInfos = GetSessions(out var peakVolume);
+
+ var peakVolumeId = $"{parentSensorSafeName}_peak_volume";
+ var peakVolumeSensor = new DataTypeStringSensor(_updateInterval, $"Peak Volume", peakVolumeId, string.Empty, "mdi:volume-high", string.Empty, Name);
+ peakVolumeSensor.SetState(peakVolume.ToString(CultureInfo.CurrentCulture));
+ AddUpdateSensor(peakVolumeId, peakVolumeSensor);
+
+ var sessionsId = $"{parentSensorSafeName}_sessions";
+ var sessionsSensor = new DataTypeIntSensor(_updateInterval, $"Audio Sessions", sessionsId, string.Empty, "mdi:music-box-multiple-outline", string.Empty, Name, true);
+ sessionsSensor.SetState(sessionInfos.Count);
+ sessionsSensor.SetAttributes(
+ JsonConvert.SerializeObject(new
{
- // default device name
- var defaultDeviceId = $"{parentSensorSafeName}_default_device";
- var defaultDeviceSensor = new DataTypeStringSensor(_updateInterval, $"{Name} Default Device", defaultDeviceId, string.Empty, "mdi:speaker", string.Empty, Name);
- defaultDeviceSensor.SetState(audioDevice.DeviceFriendlyName);
-
- if (!Sensors.ContainsKey(defaultDeviceId)) Sensors.Add(defaultDeviceId, defaultDeviceSensor);
- else Sensors[defaultDeviceId] = defaultDeviceSensor;
-
- // default device state
- var defaultDeviceStateId = $"{parentSensorSafeName}_default_device_state";
- var defaultDeviceStateSensor = new DataTypeStringSensor(_updateInterval, $"{Name} Default Device State", defaultDeviceStateId, string.Empty, "mdi:speaker", string.Empty, Name);
- defaultDeviceStateSensor.SetState(GetReadableState(audioDevice.State));
-
- if (!Sensors.ContainsKey(defaultDeviceStateId)) Sensors.Add(defaultDeviceStateId, defaultDeviceStateSensor);
- else Sensors[defaultDeviceStateId] = defaultDeviceStateSensor;
-
- // default device volume
- var masterVolume = Convert.ToInt32(Math.Round(audioDevice.AudioEndpointVolume?.MasterVolumeLevelScalar * 100 ?? 0, 0));
- var defaultDeviceVolumeId = $"{parentSensorSafeName}_default_device_volume";
- var defaultDeviceVolumeSensor = new DataTypeIntSensor(_updateInterval, $"{Name} Default Device Volume", defaultDeviceVolumeId, string.Empty, "mdi:speaker", string.Empty, Name);
- defaultDeviceVolumeSensor.SetState(masterVolume);
-
- if (!Sensors.ContainsKey(defaultDeviceVolumeId)) Sensors.Add(defaultDeviceVolumeId, defaultDeviceVolumeSensor);
- else Sensors[defaultDeviceVolumeId] = defaultDeviceVolumeSensor;
-
- // default device muted
- var defaultDeviceIsMuted = audioDevice.AudioEndpointVolume?.Mute ?? false;
- var defaultDeviceIsMutedId = $"{parentSensorSafeName}_default_device_muted";
- var defaultDeviceIsMutedSensor = new DataTypeBoolSensor(_updateInterval, $"{Name} Default Device Muted", defaultDeviceIsMutedId, string.Empty, "mdi:speaker", Name);
- defaultDeviceIsMutedSensor.SetState(defaultDeviceIsMuted);
-
- if (!Sensors.ContainsKey(defaultDeviceIsMutedId)) Sensors.Add(defaultDeviceIsMutedId, defaultDeviceIsMutedSensor);
- else Sensors[defaultDeviceIsMutedId] = defaultDeviceIsMutedSensor;
-
- // get session and volume info
- var sessionInfos = GetSessions(out var peakVolume);
-
- // peak value sensor
- var peakVolumeId = $"{parentSensorSafeName}_peak_volume";
- var peakVolumeSensor = new DataTypeStringSensor(_updateInterval, $"{Name} Peak Volume", peakVolumeId, string.Empty, "mdi:volume-high", string.Empty, Name);
- peakVolumeSensor.SetState(peakVolume.ToString(CultureInfo.CurrentCulture));
-
- if (!Sensors.ContainsKey(peakVolumeId)) Sensors.Add(peakVolumeId, peakVolumeSensor);
- else Sensors[peakVolumeId] = peakVolumeSensor;
-
- // sessions sensor
- var sessions = JsonConvert.SerializeObject(new AudioSessionInfoCollection(sessionInfos), Formatting.Indented);
- var sessionsId = $"{parentSensorSafeName}_audio_sessions";
- var sessionsSensor = new DataTypeIntSensor(_updateInterval, $"{Name} Audio Sessions", sessionsId, string.Empty, "mdi:music-box-multiple-outline", string.Empty, Name, true);
-
- sessionsSensor.SetState(sessionInfos.Count);
- sessionsSensor.SetAttributes(sessions);
-
- if (!Sensors.ContainsKey(sessionsId)) Sensors.Add(sessionsId, sessionsSensor);
- else Sensors[sessionsId] = sessionsSensor;
- }
+ AudioSessions = sessionInfos
+ }, Formatting.Indented)
+ );
+ AddUpdateSensor(sessionsId, sessionsSensor);
+
+ var audioOutputDevices = GetAudioOutputDevices();
+ var audioOutputDevicesId = $"{parentSensorSafeName}_output_devices";
+ var audioOutputDevicesSensor = new DataTypeIntSensor(_updateInterval, $"Audio Output Devices", audioOutputDevicesId, string.Empty, "mdi:music-box-multiple-outline", string.Empty, Name, true);
+ audioOutputDevicesSensor.SetState(audioOutputDevices.Count);
+ audioOutputDevicesSensor.SetAttributes(
+ JsonConvert.SerializeObject(new
+ {
+ OutputDevices = audioOutputDevices
+ }, Formatting.Indented)
+ );
+ AddUpdateSensor(audioOutputDevicesId, audioOutputDevicesSensor);
+ }
- // get the default input audio device
- using (var inputDevice = Variables.AudioDeviceEnumerator.GetDefaultAudioEndpoint(DataFlow.eCapture, Role.Communications))
+ private void HandleAudioInputSensors(string parentSensorSafeName)
+ {
+ using var inputDevice = Variables.AudioDeviceEnumerator.GetDefaultAudioEndpoint(DataFlow.eCapture, Role.Communications);
+
+ var defaultInputDeviceId = $"{parentSensorSafeName}_default_input_device";
+ var defaultInputDeviceSensor = new DataTypeStringSensor(_updateInterval, $"Default Input Device", defaultInputDeviceId, string.Empty, "mdi:microphone", string.Empty, Name);
+ defaultInputDeviceSensor.SetState(inputDevice.DeviceFriendlyName);
+ AddUpdateSensor(defaultInputDeviceId, defaultInputDeviceSensor);
+
+ var defaultInputDeviceStateId = $"{parentSensorSafeName}_default_input_device_state";
+ var defaultInputDeviceStateSensor = new DataTypeStringSensor(_updateInterval, $"Default Input Device State", defaultInputDeviceStateId, string.Empty, "mdi:microphone", string.Empty, Name);
+ defaultInputDeviceStateSensor.SetState(GetReadableState(inputDevice.State));
+ AddUpdateSensor(defaultInputDeviceStateId, defaultInputDeviceStateSensor);
+
+ var defaultInputDeviceIsMuted = inputDevice.AudioEndpointVolume?.Mute ?? false;
+ var defaultInputDeviceIsMutedId = $"{parentSensorSafeName}_default_input_device_muted";
+ var defaultInputDeviceIsMutedSensor = new DataTypeBoolSensor(_updateInterval, $"Default Input Device Muted", defaultInputDeviceIsMutedId, string.Empty, "mdi:microphone", Name);
+ defaultInputDeviceIsMutedSensor.SetState(defaultInputDeviceIsMuted);
+ AddUpdateSensor(defaultInputDeviceIsMutedId, defaultInputDeviceIsMutedSensor);
+
+ var inputVolume = (int)GetDefaultInputDevicePeakVolume(inputDevice);
+ var defaultInputDeviceVolumeId = $"{parentSensorSafeName}_default_input_device_volume";
+ var defaultInputDeviceVolumeSensor = new DataTypeIntSensor(_updateInterval, $"Default Input Device Volume", defaultInputDeviceVolumeId, string.Empty, "mdi:microphone", string.Empty, Name);
+ defaultInputDeviceVolumeSensor.SetState(inputVolume);
+ AddUpdateSensor(defaultInputDeviceVolumeId, defaultInputDeviceVolumeSensor);
+
+ var audioInputDevices = GetAudioInputDevices();
+ var audioInputDevicesId = $"{parentSensorSafeName}_input_devices";
+ var audioInputDevicesSensor = new DataTypeIntSensor(_updateInterval, $"Audio Input Devices", audioInputDevicesId, string.Empty, "mdi:microphone", string.Empty, Name, true);
+ audioInputDevicesSensor.SetState(audioInputDevices.Count);
+ audioInputDevicesSensor.SetAttributes(
+ JsonConvert.SerializeObject(new
{
- // default input device name
- var defaultInputDeviceId = $"{parentSensorSafeName}_default_input_device";
- var defaultInputDeviceSensor = new DataTypeStringSensor(_updateInterval, $"{Name} Default Input Device", defaultInputDeviceId, string.Empty, "mdi:microphone", string.Empty, Name);
- defaultInputDeviceSensor.SetState(inputDevice.DeviceFriendlyName);
-
- if (!Sensors.ContainsKey(defaultInputDeviceId)) Sensors.Add(defaultInputDeviceId, defaultInputDeviceSensor);
- else Sensors[defaultInputDeviceId] = defaultInputDeviceSensor;
-
- // default input device state
- var defaultInputDeviceStateId = $"{parentSensorSafeName}_default_input_device_state";
- var defaultInputDeviceStateSensor = new DataTypeStringSensor(_updateInterval, $"{Name} Default Input Device State", defaultInputDeviceStateId, string.Empty, "mdi:microphone", string.Empty, Name);
- defaultInputDeviceStateSensor.SetState(GetReadableState(inputDevice.State));
-
- if (!Sensors.ContainsKey(defaultInputDeviceStateId)) Sensors.Add(defaultInputDeviceStateId, defaultInputDeviceStateSensor);
- else Sensors[defaultInputDeviceStateId] = defaultInputDeviceStateSensor;
-
- // default input device muted
- var defaultInputDeviceIsMuted = inputDevice.AudioEndpointVolume?.Mute ?? false;
- var defaultInputDeviceIsMutedId = $"{parentSensorSafeName}_default_input_device_muted";
- var defaultInputDeviceIsMutedSensor = new DataTypeBoolSensor(_updateInterval, $"{Name} Default Input Device Muted", defaultInputDeviceIsMutedId, string.Empty, "mdi:microphone", Name);
- defaultInputDeviceIsMutedSensor.SetState(defaultInputDeviceIsMuted);
-
- if (!Sensors.ContainsKey(defaultInputDeviceIsMutedId)) Sensors.Add(defaultInputDeviceIsMutedId, defaultInputDeviceIsMutedSensor);
- else Sensors[defaultInputDeviceIsMutedId] = defaultInputDeviceIsMutedSensor;
-
- // default input device volume
- var inputVolume = (int)GetDefaultInputDevicePeakVolume(inputDevice);
- var defaultInputDeviceVolumeId = $"{parentSensorSafeName}_default_input_device_volume";
- var defaultInputDeviceVolumeSensor = new DataTypeIntSensor(_updateInterval, $"{Name} Default Input Device Volume", defaultInputDeviceVolumeId, string.Empty, "mdi:microphone", string.Empty, Name);
- defaultInputDeviceVolumeSensor.SetState(inputVolume);
-
- if (!Sensors.ContainsKey(defaultInputDeviceVolumeId)) Sensors.Add(defaultInputDeviceVolumeId, defaultInputDeviceVolumeSensor);
- else Sensors[defaultInputDeviceVolumeId] = defaultInputDeviceVolumeSensor;
- }
+ InputDevices = audioInputDevices
+ }, Formatting.Indented)
+ );
+ AddUpdateSensor(audioInputDevicesId, audioInputDevicesSensor);
+ }
- // optionally reset error flag
- if (_errorPrinted) _errorPrinted = false;
+ public sealed override void UpdateSensorValues()
+ {
+ try
+ {
+ var parentSensorSafeName = SharedHelperFunctions.GetSafeValue(Name);
+
+ HandleAudioOutputSensors(parentSensorSafeName);
+ HandleAudioInputSensors(parentSensorSafeName);
+
+ if (_errorPrinted)
+ _errorPrinted = false;
}
catch (Exception ex)
{
- // something went wrong, only print once
- if (_errorPrinted) return;
+ if (_errorPrinted)
+ return;
+
_errorPrinted = true;
Log.Fatal(ex, "[AUDIO] [{name}] Error while fetching audio info: {err}", Name, ex.Message);
}
}
+ private string GetSessionDisplayName(AudioSessionControl2 session)
+ {
+ var procId = (int)session.ProcessID;
+
+ if (procId <= 0)
+ return session.DisplayName;
+
+ if (ApplicationNames.ContainsKey(procId))
+ return ApplicationNames[procId];
+
+ // we don't know this app yet, get process info
+ using var p = Process.GetProcessById(procId);
+ ApplicationNames.Add(procId, p.ProcessName);
+
+ return p.ProcessName;
+ }
+
private List GetSessions(out float peakVolume)
{
var sessionInfos = new List();
@@ -163,65 +205,50 @@ private List GetSessions(out float peakVolume)
foreach (var device in Variables.AudioDeviceEnumerator.EnumerateAudioEndPoints(DataFlow.eRender, DeviceState.Active))
{
- // process sessions (and get peak volume)
- foreach (var session in device.AudioSessionManager2?.Sessions.Where(x => x != null))
+ using (device)
{
- try
+ foreach (var session in device.AudioSessionManager2?.Sessions.Where(x => x != null))
{
- // filter inactive sessions
- if (session.State != AudioSessionState.AudioSessionStateActive) continue;
+ if (session.ProcessID == 0)
+ continue;
- // prepare sessioninfo
- var sessionInfo = new AudioSessionInfo();
-
- // get displayname
- string displayName;
- var procId = (int)session.ProcessID;
- if (procId <= 0)
- {
- // faulty process id, use the provided displayname
- displayName = session.DisplayName;
- }
- else
+ try
{
- if (ApplicationNames.ContainsKey(procId)) displayName = ApplicationNames[procId];
- else
- {
- // we don't know this app yet, get process info
- using var p = Process.GetProcessById(procId);
- displayName = p.ProcessName;
- ApplicationNames.Add(procId, displayName);
- }
- }
-
- // set displayname
- if (displayName.Length > 30) displayName = $"{displayName[..30]}..";
- sessionInfo.Application = displayName;
+ var displayName = GetSessionDisplayName(session);
- // get muted state
- sessionInfo.Muted = session.SimpleAudioVolume?.Mute ?? false;
+ if(displayName == "audiodg")
+ continue;
- // set master volume
- sessionInfo.MasterVolume = session.SimpleAudioVolume?.MasterVolume * 100 ?? 0f;
+ if (displayName.Length > 30)
+ displayName = $"{displayName[..30]}..";
- // set peak volume
- sessionInfo.PeakVolume = session.AudioMeterInformation?.MasterPeakValue * 100 ?? 0f;
-
- // new max?
- if (sessionInfo.PeakVolume > peakVolume) peakVolume = sessionInfo.PeakVolume;
+ var sessionInfo = new AudioSessionInfo
+ {
+ Application = displayName,
+ PlaybackDevice = device.DeviceFriendlyName,
+ Muted = session.SimpleAudioVolume?.Mute ?? false,
+ Active = session.State == AudioSessionState.AudioSessionStateActive,
+ MasterVolume = session.SimpleAudioVolume?.MasterVolume * 100 ?? 0f,
+ PeakVolume = session.AudioMeterInformation?.MasterPeakValue * 100 ?? 0f
+ };
+
+ // new max?
+ if (sessionInfo.PeakVolume > peakVolume)
+ peakVolume = sessionInfo.PeakVolume;
+
+ sessionInfos.Add(sessionInfo);
+ }
+ catch (Exception ex)
+ {
+ if (!_errorPrinted)
+ Log.Fatal(ex, "[AUDIO] [{name}] [{app}] Exception while retrieving info: {err}", Name, session.DisplayName, ex.Message);
- // store the session info
- sessionInfos.Add(sessionInfo);
- }
- catch (Exception ex)
- {
- if (!_errorPrinted) Log.Fatal(ex, "[AUDIO] [{name}] [{app}] Exception while retrieving info: {err}", Name, session.DisplayName, ex.Message);
- errors = true;
- }
- finally
- {
- session?.Dispose();
- device?.Dispose();
+ errors = true;
+ }
+ finally
+ {
+ session?.Dispose();
+ }
}
}
}
@@ -230,16 +257,20 @@ private List GetSessions(out float peakVolume)
if (errors && !_errorPrinted)
{
_errorPrinted = true;
+
return sessionInfos;
}
// optionally reset error flag
- if (_errorPrinted) _errorPrinted = false;
+ if (_errorPrinted)
+ _errorPrinted = false;
}
catch (Exception ex)
{
// something went wrong, only print once
- if (_errorPrinted) return sessionInfos;
+ if (_errorPrinted)
+ return sessionInfos;
+
_errorPrinted = true;
Log.Fatal(ex, "[AUDIO] [{name}] Fatal exception while getting sessions: {err}", Name, ex.Message);
@@ -250,7 +281,9 @@ private List GetSessions(out float peakVolume)
private float GetDefaultInputDevicePeakVolume(MMDevice inputDevice)
{
- if (inputDevice == null) return 0f;
+ if (inputDevice == null)
+ return 0f;
+
var peakVolume = 0f;
try
@@ -263,17 +296,21 @@ private float GetDefaultInputDevicePeakVolume(MMDevice inputDevice)
try
{
// filter inactive sessions
- if (session.State != AudioSessionState.AudioSessionStateActive) continue;
-
+ if (session.State != AudioSessionState.AudioSessionStateActive)
+ continue;
+
// set peak volume
var sessionPeakVolume = session.AudioMeterInformation?.MasterPeakValue * 100 ?? 0f;
// new max?
- if (sessionPeakVolume > peakVolume) peakVolume = sessionPeakVolume;
+ if (sessionPeakVolume > peakVolume)
+ peakVolume = sessionPeakVolume;
}
catch (Exception ex)
{
- if (!_errorPrinted) Log.Fatal(ex, "[AUDIO] [{name}] [{app}] Exception while retrieving input info: {err}", Name, session.DisplayName, ex.Message);
+ if (!_errorPrinted)
+ Log.Fatal(ex, "[AUDIO] [{name}] [{app}] Exception while retrieving input info: {err}", Name, session.DisplayName, ex.Message);
+
errors = true;
}
finally
@@ -286,16 +323,20 @@ private float GetDefaultInputDevicePeakVolume(MMDevice inputDevice)
if (errors && !_errorPrinted)
{
_errorPrinted = true;
+
return peakVolume;
}
// optionally reset error flag
- if (_errorPrinted) _errorPrinted = false;
+ if (_errorPrinted)
+ _errorPrinted = false;
}
catch (Exception ex)
{
// something went wrong, only print once
- if (_errorPrinted) return peakVolume;
+ if (_errorPrinted)
+ return peakVolume;
+
_errorPrinted = true;
Log.Fatal(ex, "[AUDIO] [{name}] Fatal exception while getting input info: {err}", Name, ex.Message);
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/BatterySensors.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/BatterySensors.cs
index 1d54d63f..c9ff2ea9 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/BatterySensors.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/BatterySensors.cs
@@ -24,70 +24,55 @@ public BatterySensors(int? updateInterval = null, string name = DefaultName, str
UpdateSensorValues();
}
+ private void AddUpdateSensor(string sensorId, AbstractSingleValueSensor sensor)
+ {
+ if (!Sensors.ContainsKey(sensorId))
+ Sensors.Add(sensorId, sensor);
+ else
+ Sensors[sensorId] = sensor;
+ }
+
public sealed override void UpdateSensorValues()
{
- // lowercase and safe name of the multivalue sensor
var parentSensorSafeName = SharedHelperFunctions.GetSafeValue(Name);
- // fetch the latest battery state
var powerStatus = SystemInformation.PowerStatus;
-
- // prepare the data
- var lifetimeMinutes = powerStatus.BatteryFullLifetime;
- if (lifetimeMinutes != -1) lifetimeMinutes = Convert.ToInt32(Math.Round(TimeSpan.FromSeconds(lifetimeMinutes).TotalMinutes));
-
- var remainingMinutes = powerStatus.BatteryLifeRemaining;
- if (remainingMinutes != -1) remainingMinutes = Convert.ToInt32(Math.Round(TimeSpan.FromSeconds(remainingMinutes).TotalMinutes));
-
- // charge status sensor
var chargeStatus = powerStatus.BatteryChargeStatus.ToString();
var chargeStatusId = $"{parentSensorSafeName}_charge_status";
- var chargeStatusSensor = new DataTypeStringSensor(_updateInterval, $"{Name} Charge Status", chargeStatusId, string.Empty, "mdi:battery-charging", string.Empty, Name);
+ var chargeStatusSensor = new DataTypeStringSensor(_updateInterval, "Charge Status", chargeStatusId, string.Empty, "mdi:battery-charging", string.Empty, Name);
chargeStatusSensor.SetState(chargeStatus);
+ AddUpdateSensor(chargeStatusId, chargeStatusSensor);
- if (!Sensors.ContainsKey(chargeStatusId)) Sensors.Add(chargeStatusId, chargeStatusSensor);
- else Sensors[chargeStatusId] = chargeStatusSensor;
-
- // full charge lifetime sensor
- var fullChargeLifetimeMinutes = lifetimeMinutes;
+ var fullChargeLifetimeMinutes = powerStatus.BatteryFullLifetime;
+ if (fullChargeLifetimeMinutes != -1)
+ fullChargeLifetimeMinutes = Convert.ToInt32(Math.Round(TimeSpan.FromSeconds(fullChargeLifetimeMinutes).TotalMinutes));
var fullChargeLifetimeId = $"{parentSensorSafeName}_full_charge_lifetime";
- var fullChargeLifetimeSensor = new DataTypeIntSensor(_updateInterval, $"{Name} Full Charge Lifetime", fullChargeLifetimeId, string.Empty, "mdi:battery-high", string.Empty, Name);
+ var fullChargeLifetimeSensor = new DataTypeIntSensor(_updateInterval, "Full Charge Lifetime", fullChargeLifetimeId, string.Empty, "mdi:battery-high", string.Empty, Name);
fullChargeLifetimeSensor.SetState(fullChargeLifetimeMinutes);
+ AddUpdateSensor(fullChargeLifetimeId, fullChargeLifetimeSensor);
- if (!Sensors.ContainsKey(fullChargeLifetimeId)) Sensors.Add(fullChargeLifetimeId, fullChargeLifetimeSensor);
- else Sensors[fullChargeLifetimeId] = fullChargeLifetimeSensor;
-
- // charge remaining percentage sensor
var chargeRemainingPercentage = Convert.ToInt32(powerStatus.BatteryLifePercent * 100);
-
var chargeRemainingPercentageId = $"{parentSensorSafeName}_charge_remaining_percentage";
- var chargeRemainingPercentageSensor = new DataTypeIntSensor(_updateInterval, $"{Name} Charge Remaining Percentage", chargeRemainingPercentageId, string.Empty, "mdi:battery-high", "%", Name);
+ var chargeRemainingPercentageSensor = new DataTypeIntSensor(_updateInterval, "Charge Remaining Percentage", chargeRemainingPercentageId, string.Empty, "mdi:battery-high", "%", Name);
chargeRemainingPercentageSensor.SetState(chargeRemainingPercentage);
+ AddUpdateSensor(chargeRemainingPercentageId, chargeRemainingPercentageSensor);
- if (!Sensors.ContainsKey(chargeRemainingPercentageId)) Sensors.Add(chargeRemainingPercentageId, chargeRemainingPercentageSensor);
- else Sensors[chargeRemainingPercentageId] = chargeRemainingPercentageSensor;
-
- // charge remaining minutes sensor
- var chargeRemainingMinutes = remainingMinutes;
+ var chargeRemainingMinutes = powerStatus.BatteryLifeRemaining;
+ if (chargeRemainingMinutes != -1)
+ chargeRemainingMinutes = Convert.ToInt32(Math.Round(TimeSpan.FromSeconds(chargeRemainingMinutes).TotalMinutes));
var chargeRemainingMinutesId = $"{parentSensorSafeName}_charge_remaining";
- var chargeRemainingMinutesSensor = new DataTypeIntSensor(_updateInterval, $"{Name} Charge Remaining", chargeRemainingMinutesId, string.Empty, "mdi:battery-high", string.Empty, Name);
+ var chargeRemainingMinutesSensor = new DataTypeIntSensor(_updateInterval, "Charge Remaining", chargeRemainingMinutesId, string.Empty, "mdi:battery-high", string.Empty, Name);
chargeRemainingMinutesSensor.SetState(chargeRemainingMinutes);
+ AddUpdateSensor(chargeRemainingMinutesId, chargeRemainingMinutesSensor);
- if (!Sensors.ContainsKey(chargeRemainingMinutesId)) Sensors.Add(chargeRemainingMinutesId, chargeRemainingMinutesSensor);
- else Sensors[chargeRemainingMinutesId] = chargeRemainingMinutesSensor;
-
- // powerline status sensor
var powerlineStatus = powerStatus.PowerLineStatus.ToString();
-
var powerlineStatusId = $"{parentSensorSafeName}_powerline_status";
- var powerlineStatusSensor = new DataTypeStringSensor(_updateInterval, $"{Name} Powerline Status", powerlineStatusId, string.Empty, "mdi:power-plug", string.Empty, Name);
+ var powerlineStatusSensor = new DataTypeStringSensor(_updateInterval, "Powerline Status", powerlineStatusId, string.Empty, "mdi:power-plug", string.Empty, Name);
powerlineStatusSensor.SetState(powerlineStatus);
-
- if (!Sensors.ContainsKey(powerlineStatusId)) Sensors.Add(powerlineStatusId, powerlineStatusSensor);
- else Sensors[powerlineStatusId] = powerlineStatusSensor;
+ AddUpdateSensor(powerlineStatusId, powerlineStatusSensor);
}
public override DiscoveryConfigModel GetAutoDiscoveryConfig() => null;
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/DisplaySensors.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/DisplaySensors.cs
index 68c3b65d..0fc4166c 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/DisplaySensors.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/DisplaySensors.cs
@@ -26,54 +26,49 @@ public DisplaySensors(int? updateInterval = null, string name = DefaultName, str
UpdateSensorValues();
}
+ private void AddUpdateSensor(string sensorId, AbstractSingleValueSensor sensor)
+ {
+ if (!Sensors.ContainsKey(sensorId))
+ Sensors.Add(sensorId, sensor);
+ else
+ Sensors[sensorId] = sensor;
+ }
+
public sealed override void UpdateSensorValues()
{
- // lowercase and safe name of the multivalue sensor
var parentSensorSafeName = SharedHelperFunctions.GetSafeValue(Name);
- // fetch the latest display infos
var displays = Screen.AllScreens;
- // prepare the data
var primaryDisplayStr = string.Empty;
var primaryDisplay = displays.FirstOrDefault(x => x.Primary);
- if (primaryDisplay != null) primaryDisplayStr = primaryDisplay.DeviceName.Split('\\').Last();
+ if (primaryDisplay != null)
+ primaryDisplayStr = primaryDisplay.DeviceName.Split('\\').Last();
- // display count sensor
var displayCount = displays.Length;
-
var displayCountId = $"{parentSensorSafeName}_display_count";
- var displayCountSensor = new DataTypeIntSensor(_updateInterval, $"{Name} Display Count", displayCountId, string.Empty, "mdi:monitor", string.Empty, Name);
+ var displayCountSensor = new DataTypeIntSensor(_updateInterval, "Display Count", displayCountId, string.Empty, "mdi:monitor", string.Empty, Name);
displayCountSensor.SetState(displayCount);
+ AddUpdateSensor(displayCountId, displayCountSensor);
- if (!Sensors.ContainsKey(displayCountId)) Sensors.Add(displayCountId, displayCountSensor);
- else Sensors[displayCountId] = displayCountSensor;
-
- // nothing to do if there aren't any displays
- if (displayCount == 0) return;
+ if (displayCount == 0)
+ return;
- // primary display sensor
var primaryDisplayId = $"{parentSensorSafeName}_primary_display";
- var primaryDisplaySensor = new DataTypeStringSensor(_updateInterval, $"{Name} Primary Display", primaryDisplayId, string.Empty, "mdi:monitor", string.Empty, Name);
+ var primaryDisplaySensor = new DataTypeStringSensor(_updateInterval, "Primary Display", primaryDisplayId, string.Empty, "mdi:monitor", string.Empty, Name);
primaryDisplaySensor.SetState(primaryDisplayStr);
+ AddUpdateSensor(primaryDisplayId, primaryDisplaySensor);
- if (!Sensors.ContainsKey(primaryDisplayId)) Sensors.Add(primaryDisplayId, primaryDisplaySensor);
- else Sensors[primaryDisplayId] = primaryDisplaySensor;
-
- // get non-virtual monitor info
var monitors = Monitors.All?.ToList() ?? new List();
- // process all monitors
foreach (var display in displays)
{
- // id
var id = SharedHelperFunctions.GetSafeValue(display.DeviceName);
- if (string.IsNullOrWhiteSpace(id)) continue;
+ if (string.IsNullOrWhiteSpace(id))
+ continue;
- // name, remove the backslashes
var name = display.DeviceName.Split('\\').Last();
- // prepare values
var resolution = $"{display.Bounds.Width}x{display.Bounds.Height}";
var virtualResolution = $"{display.Bounds.Width}x{display.Bounds.Height}";
var width = display.Bounds.Width;
@@ -91,32 +86,29 @@ public sealed override void UpdateSensorValues()
rotated = monitor.RotatedDegrees;
}
- // prepare the info
- var displayInfo = new DisplayInfo();
- displayInfo.Name = name;
- displayInfo.Resolution = resolution;
- displayInfo.VirtualResolution = virtualResolution;
- displayInfo.Width = width;
- displayInfo.VirtualWidth = virtualWidth;
- displayInfo.Height = height;
- displayInfo.VirtualHeight = virtualHeight;
- displayInfo.BitsPerPixel = display.BitsPerPixel;
- displayInfo.PrimaryDisplay = displayInfo.PrimaryDisplay;
- displayInfo.WorkingArea = $"{display.WorkingArea.Width}x{display.WorkingArea.Height}";
- displayInfo.WorkingAreaWidth = display.WorkingArea.Width;
- displayInfo.WorkingAreaHeight = display.WorkingArea.Height;
- displayInfo.RotatedDegrees = rotated;
-
- // process the sensor
+ var displayInfo = new DisplayInfo
+ {
+ Name = name,
+ Resolution = resolution,
+ VirtualResolution = virtualResolution,
+ Width = width,
+ VirtualWidth = virtualWidth,
+ Height = height,
+ VirtualHeight = virtualHeight,
+ BitsPerPixel = display.BitsPerPixel,
+ PrimaryDisplay = display.Primary,
+ WorkingArea = $"{display.WorkingArea.Width}x{display.WorkingArea.Height}",
+ WorkingAreaWidth = display.WorkingArea.Width,
+ WorkingAreaHeight = display.WorkingArea.Height,
+ RotatedDegrees = rotated
+ };
+
var info = JsonConvert.SerializeObject(displayInfo, Formatting.Indented);
var displayInfoId = $"{parentSensorSafeName}_{id}";
- var displayInfoSensor = new DataTypeStringSensor(_updateInterval, $"{Name} {name}", displayInfoId, string.Empty, "mdi:monitor", string.Empty, Name, true);
-
+ var displayInfoSensor = new DataTypeStringSensor(_updateInterval, name, displayInfoId, string.Empty, "mdi:monitor", string.Empty, Name, true);
displayInfoSensor.SetState(name);
displayInfoSensor.SetAttributes(info);
-
- if (!Sensors.ContainsKey(displayInfoId)) Sensors.Add(displayInfoId, displayInfoSensor);
- else Sensors[displayInfoId] = displayInfoSensor;
+ AddUpdateSensor(displayInfoId, displayInfoSensor);
}
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/NetworkSensors.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/NetworkSensors.cs
index 4f192437..b78ee09d 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/NetworkSensors.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/NetworkSensors.cs
@@ -34,12 +34,18 @@ public NetworkSensors(int? updateInterval = null, string name = DefaultName, str
UpdateSensorValues();
}
+ private void AddUpdateSensor(string sensorId, AbstractSingleValueSensor sensor)
+ {
+ if (!Sensors.ContainsKey(sensorId))
+ Sensors.Add(sensorId, sensor);
+ else
+ Sensors[sensorId] = sensor;
+ }
+
public sealed override void UpdateSensorValues()
{
- // lowercase and safe name of the multivalue sensor
var parentSensorSafeName = SharedHelperFunctions.GetSafeValue(Name);
- // get nic info
var nicCount = 0;
var networkInterfaces = NetworkInterface.GetAllNetworkInterfaces();
@@ -47,26 +53,26 @@ public sealed override void UpdateSensorValues()
{
try
{
- if (nic == null) continue;
+ if (nic == null)
+ continue;
- // test if we need to show this card
- if (_useSpecificCard && nic.Id != NetworkCard) continue;
+ if (_useSpecificCard && nic.Id != NetworkCard)
+ continue;
- // id
var id = nic.Id.Replace("{", "").Replace("}", "").Replace("-", "").ToLower();
- if (string.IsNullOrWhiteSpace(id)) continue;
+ if (string.IsNullOrWhiteSpace(id))
+ continue;
- // prepare the info
- var networkInfo = new NetworkInfo();
- networkInfo.Name = nic.Name;
- networkInfo.NetworkInterfaceType = nic.NetworkInterfaceType.ToString();
- networkInfo.SpeedBitsPerSecond = nic.Speed;
- networkInfo.OperationalStatus = nic.OperationalStatus.ToString();
+ var networkInfo = new NetworkInfo
+ {
+ Name = nic.Name,
+ NetworkInterfaceType = nic.NetworkInterfaceType.ToString(),
+ SpeedBitsPerSecond = nic.Speed,
+ OperationalStatus = nic.OperationalStatus.ToString()
+ };
- // get interface stats
var interfaceStats = nic.GetIPv4Statistics();
- // process the stats
networkInfo.DataReceivedMB = Math.Round(ByteSize.FromBytes(interfaceStats.BytesReceived).MegaBytes);
networkInfo.DataSentMB = Math.Round(ByteSize.FromBytes(interfaceStats.BytesSent).MegaBytes);
networkInfo.IncomingPacketsDiscarded = interfaceStats.IncomingPacketsDiscarded;
@@ -75,23 +81,24 @@ public sealed override void UpdateSensorValues()
networkInfo.OutgoingPacketsDiscarded = interfaceStats.OutgoingPacketsDiscarded;
networkInfo.OutgoingPacketsWithErrors = interfaceStats.OutgoingPacketsWithErrors;
- // get nic properties
var nicProperties = nic.GetIPProperties();
- // process the properties
foreach (var unicast in nicProperties.UnicastAddresses)
{
var ip = unicast.Address.ToString();
- if (!string.IsNullOrEmpty(ip) && !networkInfo.IpAddresses.Contains(ip)) networkInfo.IpAddresses.Add(ip);
+ if (!string.IsNullOrEmpty(ip) && !networkInfo.IpAddresses.Contains(ip))
+ networkInfo.IpAddresses.Add(ip);
var mac = nic.GetPhysicalAddress().ToString();
- if (!string.IsNullOrEmpty(mac) && !networkInfo.MacAddresses.Contains(mac)) networkInfo.MacAddresses.Add(mac);
+ if (!string.IsNullOrEmpty(mac) && !networkInfo.MacAddresses.Contains(mac))
+ networkInfo.MacAddresses.Add(mac);
}
foreach (var gateway in nicProperties.GatewayAddresses)
{
var gatewayAddress = gateway.Address.ToString();
- if (!string.IsNullOrEmpty(gatewayAddress) && !networkInfo.Gateways.Contains(gatewayAddress)) networkInfo.Gateways.Add(gatewayAddress);
+ if (!string.IsNullOrEmpty(gatewayAddress) && !networkInfo.Gateways.Contains(gatewayAddress))
+ networkInfo.Gateways.Add(gatewayAddress);
}
networkInfo.DhcpEnabled = nicProperties.GetIPv4Properties().IsDhcpEnabled;
@@ -99,7 +106,8 @@ public sealed override void UpdateSensorValues()
foreach (var dhcp in nicProperties.DhcpServerAddresses)
{
var dhcpAddress = dhcp.ToString();
- if (!string.IsNullOrEmpty(dhcpAddress) && !networkInfo.DhcpAddresses.Contains(dhcpAddress)) networkInfo.DhcpAddresses.Add(dhcpAddress);
+ if (!string.IsNullOrEmpty(dhcpAddress) && !networkInfo.DhcpAddresses.Contains(dhcpAddress))
+ networkInfo.DhcpAddresses.Add(dhcpAddress);
}
networkInfo.DnsEnabled = nicProperties.IsDnsEnabled;
@@ -108,21 +116,18 @@ public sealed override void UpdateSensorValues()
foreach (var dns in nicProperties.DnsAddresses)
{
var dnsAddress = dns.ToString();
- if (!string.IsNullOrEmpty(dnsAddress) && !networkInfo.DnsAddresses.Contains(dnsAddress)) networkInfo.DnsAddresses.Add(dnsAddress);
+ if (!string.IsNullOrEmpty(dnsAddress) && !networkInfo.DnsAddresses.Contains(dnsAddress))
+ networkInfo.DnsAddresses.Add(dnsAddress);
}
- // process the sensor
var info = JsonConvert.SerializeObject(networkInfo, Formatting.Indented);
var networkInfoId = $"{parentSensorSafeName}_{id}";
- var networkInfoSensor = new DataTypeStringSensor(_updateInterval, $"{Name} {nic.Name}", networkInfoId, string.Empty, "mdi:lan", string.Empty, Name, true);
+ var networkInfoSensor = new DataTypeStringSensor(_updateInterval, nic.Name, networkInfoId, string.Empty, "mdi:lan", string.Empty, Name, true);
networkInfoSensor.SetState(nic.OperationalStatus.ToString());
networkInfoSensor.SetAttributes(info);
+ AddUpdateSensor(networkInfoId, networkInfoSensor);
- if (!Sensors.ContainsKey(networkInfoId)) Sensors.Add(networkInfoId, networkInfoSensor);
- else Sensors[networkInfoId] = networkInfoSensor;
-
- // nic count
nicCount++;
}
catch (Exception ex)
@@ -131,13 +136,10 @@ public sealed override void UpdateSensorValues()
}
}
- // nic count
var nicCountId = $"{parentSensorSafeName}_total_network_card_count";
- var nicCountSensor = new DataTypeIntSensor(_updateInterval, $"{Name} Network Card Count", nicCountId, string.Empty, "mdi:lan", string.Empty, Name);
+ var nicCountSensor = new DataTypeIntSensor(_updateInterval, "Network Card Count", nicCountId, string.Empty, "mdi:lan", string.Empty, Name);
nicCountSensor.SetState(nicCount);
-
- if (!Sensors.ContainsKey(nicCountId)) Sensors.Add(nicCountId, nicCountSensor);
- else Sensors[nicCountId] = nicCountSensor;
+ AddUpdateSensor(nicCountId, nicCountSensor);
}
public override DiscoveryConfigModel GetAutoDiscoveryConfig() => null;
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/StorageSensors.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/StorageSensors.cs
index 0c83565f..05c41754 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/StorageSensors.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/StorageSensors.cs
@@ -30,68 +30,68 @@ public StorageSensors(int? updateInterval = null, string name = DefaultName, str
UpdateSensorValues();
}
+ private void AddUpdateSensor(string sensorId, AbstractSingleValueSensor sensor)
+ {
+ if (!Sensors.ContainsKey(sensorId))
+ Sensors.Add(sensorId, sensor);
+ else
+ Sensors[sensorId] = sensor;
+ }
+
public sealed override void UpdateSensorValues()
{
var driveCount = 0;
- // lowercase and safe name of the multivalue sensor
var parentSensorSafeName = SharedHelperFunctions.GetSafeValue(Name);
foreach (var drive in DriveInfo.GetDrives())
{
try
{
- if (!(drive is { IsReady: true, DriveType: DriveType.Fixed })) continue;
- if (string.IsNullOrWhiteSpace(drive.Name)) continue;
+ if (!(drive is { IsReady: true, DriveType: DriveType.Fixed }))
+ continue;
+
+ if (string.IsNullOrWhiteSpace(drive.Name))
+ continue;
- // name (letter)
var driveName = $"{drive.Name[..1].ToUpper()}";
var driveNameLower = driveName.ToLower();
- // label
var driveLabel = string.IsNullOrEmpty(drive.VolumeLabel) ? "-" : drive.VolumeLabel;
- // sensor value
var sensorValue = string.IsNullOrEmpty(drive.VolumeLabel) ? driveName : drive.VolumeLabel;
- // prepare the info
- var storageInfo = new StorageInfo();
- storageInfo.Name = driveName;
- storageInfo.Label = driveLabel;
- storageInfo.FileSystem = drive.DriveFormat;
+ var storageInfo = new StorageInfo
+ {
+ Name = driveName,
+ Label = driveLabel,
+ FileSystem = drive.DriveFormat
+ };
- // total size
var totalSizeMb = Math.Round(ByteSize.FromBytes(drive.TotalSize).MegaBytes);
storageInfo.TotalSizeMB = totalSizeMb;
- // available space
var availableSpaceMb = Math.Round(ByteSize.FromBytes(drive.AvailableFreeSpace).MegaBytes);
storageInfo.AvailableSpaceMB = availableSpaceMb;
- // used space
var usedSpaceMb = totalSizeMb - availableSpaceMb;
storageInfo.UsedSpaceMB = usedSpaceMb;
- // available space percentage
var availableSpacePercentage = (int)Math.Round((availableSpaceMb / totalSizeMb) * 100);
storageInfo.AvailableSpacePercentage = availableSpacePercentage;
- // used space percentage
var usedSpacePercentage = (int)Math.Round((usedSpaceMb / totalSizeMb) * 100);
storageInfo.UsedSpacePercentage = usedSpacePercentage;
- // process the sensor
var info = JsonConvert.SerializeObject(storageInfo, Formatting.Indented);
var driveInfoId = $"{parentSensorSafeName}_{driveNameLower}";
- var driveInfoSensor = new DataTypeStringSensor(_updateInterval, $"{Name} {driveName}", driveInfoId, string.Empty, "mdi:harddisk", string.Empty, Name, true);
+ var driveInfoSensor = new DataTypeStringSensor(_updateInterval, driveName, driveInfoId, string.Empty, "mdi:harddisk", string.Empty, Name, true);
driveInfoSensor.SetState(sensorValue);
driveInfoSensor.SetAttributes(info);
- if (!Sensors.ContainsKey(driveInfoId)) Sensors.Add(driveInfoId, driveInfoSensor);
- else Sensors[driveInfoId] = driveInfoSensor;
+ AddUpdateSensor(driveInfoId, driveInfoSensor);
- // increment drive count
driveCount++;
}
catch (Exception ex)
@@ -114,13 +114,11 @@ public sealed override void UpdateSensorValues()
}
}
- // drive count
var driveCountId = $"{parentSensorSafeName}_total_disk_count";
- var driveCountSensor = new DataTypeIntSensor(_updateInterval, $"{Name} Total Disk Count", driveCountId, string.Empty, "mdi:harddisk", string.Empty, Name);
+ var driveCountSensor = new DataTypeIntSensor(_updateInterval, "Total Disk Count", driveCountId, string.Empty, "mdi:harddisk", string.Empty, Name);
driveCountSensor.SetState(driveCount);
- if (!Sensors.ContainsKey(driveCountId)) Sensors.Add(driveCountId, driveCountSensor);
- else Sensors[driveCountId] = driveCountSensor;
+ AddUpdateSensor(driveCountId, driveCountSensor);
}
public override DiscoveryConfigModel GetAutoDiscoveryConfig() => null;
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/WindowsUpdatesSensors.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/WindowsUpdatesSensors.cs
index a92d5992..0ec3227a 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/WindowsUpdatesSensors.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/MultiValue/WindowsUpdatesSensors.cs
@@ -25,59 +25,46 @@ public WindowsUpdatesSensors(int? updateInterval = null, string name = DefaultNa
UpdateSensorValues();
}
+ private void AddUpdateSensor(string sensorId, AbstractSingleValueSensor sensor)
+ {
+ if (!Sensors.ContainsKey(sensorId))
+ Sensors.Add(sensorId, sensor);
+ else
+ Sensors[sensorId] = sensor;
+ }
+
public sealed override void UpdateSensorValues()
{
- // lowercase and safe name of the multivalue sensor
var parentSensorSafeName = SharedHelperFunctions.GetSafeValue(Name);
- // fetch the latest updates
var (driverUpdates, softwareUpdates) = WindowsUpdatesManager.GetAvailableUpdates();
- // driver update count
var driverUpdateCount = driverUpdates.Count;
-
var driverUpdateCountId = $"{parentSensorSafeName}_driver_updates_pending";
- var driverUpdateCountSensor = new DataTypeIntSensor(_updateInterval, $"{Name} Driver Updates Pending", driverUpdateCountId, string.Empty, "mdi:microsoft-windows", string.Empty, Name);
+ var driverUpdateCountSensor = new DataTypeIntSensor(_updateInterval, "Driver Updates Pending", driverUpdateCountId, string.Empty, "mdi:microsoft-windows", string.Empty, Name);
driverUpdateCountSensor.SetState(driverUpdateCount);
+ AddUpdateSensor(driverUpdateCountId, driverUpdateCountSensor);
- if (!Sensors.ContainsKey(driverUpdateCountId)) Sensors.Add(driverUpdateCountId, driverUpdateCountSensor);
- else Sensors[driverUpdateCountId] = driverUpdateCountSensor;
-
- // software update count
var softwareUpdateCount = softwareUpdates.Count;
-
var softwareUpdateCountId = $"{parentSensorSafeName}_software_updates_pending";
- var softwareUpdateCountSensor = new DataTypeIntSensor(_updateInterval, $"{Name} Software Updates Pending", softwareUpdateCountId, string.Empty, "mdi:microsoft-windows", string.Empty, Name);
+ var softwareUpdateCountSensor = new DataTypeIntSensor(_updateInterval, "Software Updates Pending", softwareUpdateCountId, string.Empty, "mdi:microsoft-windows", string.Empty, Name);
softwareUpdateCountSensor.SetState(softwareUpdateCount);
+ AddUpdateSensor(softwareUpdateCountId, softwareUpdateCountSensor);
- if (!Sensors.ContainsKey(softwareUpdateCountId)) Sensors.Add(softwareUpdateCountId, softwareUpdateCountSensor);
- else Sensors[softwareUpdateCountId] = softwareUpdateCountSensor;
-
- // driver updates array
var driverUpdatesList = new WindowsUpdateInfoCollection(driverUpdates);
var driverUpdatesStr = JsonConvert.SerializeObject(driverUpdatesList, Formatting.Indented);
-
var driverUpdatesId = $"{parentSensorSafeName}_driver_updates";
-
- var driverUpdatesSensor = new DataTypeIntSensor(_updateInterval, $"{Name} Available Driver Updates", driverUpdatesId, string.Empty, "mdi:microsoft-windows", string.Empty, Name, true);
+ var driverUpdatesSensor = new DataTypeIntSensor(_updateInterval, "Available Driver Updates", driverUpdatesId, string.Empty, "mdi:microsoft-windows", string.Empty, Name, true);
driverUpdatesSensor.SetState(driverUpdates.Count);
driverUpdatesSensor.SetAttributes(driverUpdatesStr);
+ AddUpdateSensor(driverUpdatesId, driverUpdatesSensor);
- if (!Sensors.ContainsKey(driverUpdatesId)) Sensors.Add(driverUpdatesId, driverUpdatesSensor);
- else Sensors[driverUpdatesId] = driverUpdatesSensor;
-
- // software updates array
var softwareUpdatesStr = JsonConvert.SerializeObject(new WindowsUpdateInfoCollection(softwareUpdates), Formatting.Indented);
var softwareUpdatesId = $"{parentSensorSafeName}_software_updates";
- var softwareUpdatesSensor = new DataTypeIntSensor(_updateInterval, $"{Name} Available Software Updates", softwareUpdatesId, string.Empty, "mdi:microsoft-windows", string.Empty, Name, true);
-
+ var softwareUpdatesSensor = new DataTypeIntSensor(_updateInterval, "Available Software Updates", softwareUpdatesId, string.Empty, "mdi:microsoft-windows", string.Empty, Name, true);
softwareUpdatesSensor.SetState(softwareUpdates.Count);
softwareUpdatesSensor.SetAttributes(softwareUpdatesStr);
-
- if (!Sensors.ContainsKey(softwareUpdatesId)) Sensors.Add(softwareUpdatesId, softwareUpdatesSensor);
- else Sensors[softwareUpdatesId] = softwareUpdatesSensor;
-
- // all done!
+ AddUpdateSensor(softwareUpdatesId, softwareUpdatesSensor);
}
public override DiscoveryConfigModel GetAutoDiscoveryConfig() => null;
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/SingleValue/GpuLoadSensor.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/SingleValue/GpuLoadSensor.cs
index 8e5f174e..db186475 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/SingleValue/GpuLoadSensor.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/SingleValue/GpuLoadSensor.cs
@@ -25,7 +25,7 @@ public GpuLoadSensor(int? updateInterval = null, string name = DefaultName, stri
IsNetworkEnabled = false,
IsStorageEnabled = false,
};
-
+
computer.Open();
_gpu = computer.Hardware.FirstOrDefault(h => h.HardwareType == HardwareType.GpuAmd || h.HardwareType == HardwareType.GpuNvidia);
@@ -53,14 +53,17 @@ public override DiscoveryConfigModel GetAutoDiscoveryConfig()
public override string GetState()
{
- if (_gpu == null) return "NotSupported";
+ if (_gpu == null)
+ return null;
_gpu.Update();
+
var sensor = _gpu.Sensors.FirstOrDefault(s => s.SensorType == SensorType.Load);
- if (sensor?.Value == null) return "NotSupported";
+ if (sensor?.Value == null)
+ return null;
- return sensor.Value.HasValue ? sensor.Value.Value.ToString("#.##", CultureInfo.InvariantCulture) : "Unknown";
+ return sensor.Value.HasValue ? sensor.Value.Value.ToString("#.##", CultureInfo.InvariantCulture) : null;
}
public override string GetAttributes() => string.Empty;
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/SingleValue/GpuTemperatureSensor.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/SingleValue/GpuTemperatureSensor.cs
index 1e79b168..e01ff699 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/SingleValue/GpuTemperatureSensor.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/SingleValue/GpuTemperatureSensor.cs
@@ -54,14 +54,17 @@ public override DiscoveryConfigModel GetAutoDiscoveryConfig()
public override string GetState()
{
- if (_gpu == null) return "NotSupported";
+ if (_gpu == null)
+ return null;
_gpu.Update();
+
var sensor = _gpu.Sensors.FirstOrDefault(s => s.SensorType == SensorType.Temperature);
- if (sensor?.Value == null) return "NotSupported";
+ if (sensor?.Value == null)
+ return null;
- return sensor.Value.HasValue ? sensor.Value.Value.ToString("#.##", CultureInfo.InvariantCulture) : "Unknown";
+ return sensor.Value.HasValue ? sensor.Value.Value.ToString("#.##", CultureInfo.InvariantCulture) : null;
}
public override string GetAttributes() => string.Empty;
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/SingleValue/LastActiveSensor.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/SingleValue/LastActiveSensor.cs
index fd95dafc..8a56e43e 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/SingleValue/LastActiveSensor.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/GeneralSensors/SingleValue/LastActiveSensor.cs
@@ -1,6 +1,10 @@
using System;
+using System.Collections.Generic;
+using System.Drawing;
using System.Runtime.InteropServices;
+using System.Windows.Forms;
using HASS.Agent.Shared.Extensions;
+using HASS.Agent.Shared.Managers;
using HASS.Agent.Shared.Models.HomeAssistant;
namespace HASS.Agent.Shared.HomeAssistant.Sensors.GeneralSensors.SingleValue
@@ -11,16 +15,28 @@ namespace HASS.Agent.Shared.HomeAssistant.Sensors.GeneralSensors.SingleValue
public class LastActiveSensor : AbstractSingleValueSensor
{
private const string DefaultName = "lastactive";
+
private DateTime _lastActive = DateTime.MinValue;
- public LastActiveSensor(int? updateInterval = 10, string name = DefaultName, string friendlyName = DefaultName, string id = default) : base(name ?? DefaultName, friendlyName ?? null, updateInterval ?? 10, id) { }
+ public const int DefaultTimeWindow = 15;
+
+ public bool ApplyRounding { get; private set; }
+ public int Round { get; private set; }
+
+ public LastActiveSensor(bool updateOnResume, int? updateOnResumeTimeWindow, int? updateInterval = 10, string name = DefaultName, string friendlyName = DefaultName, string id = default) : base(name ?? DefaultName, friendlyName ?? null, updateInterval ?? 10, id)
+ {
+ ApplyRounding = updateOnResume;
+ Round = updateOnResumeTimeWindow ?? 30;
+ }
public override DiscoveryConfigModel GetAutoDiscoveryConfig()
{
- if (Variables.MqttManager == null) return null;
+ if (Variables.MqttManager == null)
+ return null;
var deviceConfig = Variables.MqttManager.GetDeviceConfigModel();
- if (deviceConfig == null) return null;
+ if (deviceConfig == null)
+ return null;
return AutoDiscoveryConfigModel ?? SetAutoDiscoveryConfigModel(new SensorDiscoveryConfigModel()
{
@@ -37,10 +53,27 @@ public override DiscoveryConfigModel GetAutoDiscoveryConfig()
public override string GetState()
{
+ var lastInput = GetLastInputTime();
+
+ if (ApplyRounding)
+ {
+ if (SharedSystemStateManager.LastEventOccurrence.TryGetValue(Enums.SystemStateEvent.Resume, out var lastWakeEventDate) // was there a wake event
+ && DateTime.Compare(lastInput, lastWakeEventDate) < 0 // was the last input before the last wake event
+ && (DateTime.Now - lastWakeEventDate).TotalSeconds < Round) // are we within the time window
+ {
+
+ var currentPosition = Cursor.Position;
+ Cursor.Position = new Point(Cursor.Position.X - 10, Cursor.Position.Y - 10);
+ Cursor.Position = currentPosition;
+
+ lastInput = GetLastInputTime();
+ }
+ }
+
// changed to min. 1 sec difference
// source: https://github.com/sleevezipper/hass-workstation-service/pull/156
- var lastInput = GetLastInputTime();
- if ((_lastActive - lastInput).Duration().TotalSeconds > 1) _lastActive = lastInput;
+ if ((_lastActive - lastInput).Duration().TotalSeconds > 1)
+ _lastActive = lastInput;
return _lastActive.ToTimeZoneString();
}
@@ -55,13 +88,15 @@ private static DateTime GetLastInputTime()
var envTicks = Environment.TickCount;
- if (!GetLastInputInfo(ref lastInputInfo)) return DateTime.Now;
+ if (!GetLastInputInfo(ref lastInputInfo))
+ return DateTime.Now;
+
var lastInputTick = Convert.ToDouble(lastInputInfo.dwTime);
var idleTime = envTicks - lastInputTick;
return idleTime > 0 ? DateTime.Now - TimeSpan.FromMilliseconds(idleTime) : DateTime.Now;
}
-
+
[DllImport("User32.dll")]
private static extern bool GetLastInputInfo(ref LASTINPUTINFO plii);
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/PerformanceCounterSensor.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/PerformanceCounterSensor.cs
index 633b5bcb..96086e31 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/PerformanceCounterSensor.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/HomeAssistant/Sensors/PerformanceCounterSensor.cs
@@ -69,7 +69,7 @@ public override string GetState()
}
// done
- return Math.Round(Counter.NextValue()).ToString(CultureInfo.CurrentCulture);
+ return Math.Round(nextVal).ToString(CultureInfo.CurrentCulture);
}
public override string GetAttributes() => string.Empty;
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Managers/PowershellManager.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Managers/PowershellManager.cs
index 869873a8..576823dc 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Managers/PowershellManager.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Managers/PowershellManager.cs
@@ -3,273 +3,321 @@
using System.Globalization;
using System.IO;
using System.Text;
+using CliWrap;
+using Newtonsoft.Json;
using Serilog;
namespace HASS.Agent.Shared.Managers
{
- ///
- /// Performs powershell-related actions
- ///
- public static class PowershellManager
- {
- ///
- /// Execute a Powershell command without waiting for or checking results
- ///
- ///
- ///
- public static bool ExecuteCommandHeadless(string command) => ExecuteHeadless(command, false);
-
- ///
- /// Executes a Powershell script without waiting for or checking results
- ///
- ///
- ///
- public static bool ExecuteScriptHeadless(string script) => ExecuteHeadless(script, true);
-
- private static bool ExecuteHeadless(string command, bool isScript)
- {
- var descriptor = isScript ? "script" : "command";
-
- try
- {
- var workingDir = string.Empty;
- if (isScript)
- {
- // try to get the script's startup path
- var scriptDir = Path.GetDirectoryName(command);
- workingDir = !string.IsNullOrEmpty(scriptDir) ? scriptDir : string.Empty;
- }
-
- // find the powershell executable
- var psExec = GetPsExecutable();
- if (string.IsNullOrEmpty(psExec)) return false;
-
- // prepare the executing process
- var processInfo = new ProcessStartInfo
- {
- WindowStyle = ProcessWindowStyle.Hidden,
- CreateNoWindow = true,
- FileName = psExec,
- WorkingDirectory = workingDir
- };
-
- // set the right type of arguments
- processInfo.Arguments = isScript ?
- $@"& '{command}'"
- : $@"& {{{command}}}";
-
- // launch
- using var process = new Process();
- process.StartInfo = processInfo;
- var start = process.Start();
-
- if (!start)
- {
- Log.Error("[POWERSHELL] Unable to start processing {descriptor}: {command}", descriptor, command);
- return false;
- }
-
- // done
- return true;
- }
- catch (Exception ex)
- {
- Log.Fatal(ex, "[POWERSHELL] Fatal error when executing {descriptor}: {command}", descriptor, command);
- return false;
- }
- }
-
- ///
- /// Execute a Powershell command, logs the output if it fails
- ///
- ///
- ///
- ///
- public static bool ExecuteCommand(string command, TimeSpan timeout) => Execute(command, false, timeout);
-
- ///
- /// Executes a Powershell script, logs the output if it fails
- ///
- ///
- ///
- ///
- public static bool ExecuteScript(string script, TimeSpan timeout) => Execute(script, true, timeout);
-
- private static bool Execute(string command, bool isScript, TimeSpan timeout)
- {
- var descriptor = isScript ? "script" : "command";
-
- try
- {
- var workingDir = string.Empty;
- if (isScript)
- {
- // try to get the script's startup path
- var scriptDir = Path.GetDirectoryName(command);
- workingDir = !string.IsNullOrEmpty(scriptDir) ? scriptDir : string.Empty;
- }
-
- // find the powershell executable
- var psExec = GetPsExecutable();
- if (string.IsNullOrEmpty(psExec)) return false;
-
- // prepare the executing process
- var processInfo = new ProcessStartInfo
- {
- FileName = psExec,
- RedirectStandardError = true,
- RedirectStandardOutput = true,
- UseShellExecute = false,
- WorkingDirectory = workingDir,
- // set the right type of arguments
- Arguments = isScript
- ? $@"& '{command}'"
- : $@"& {{{command}}}"
- };
-
- // launch
- using var process = new Process();
- process.StartInfo = processInfo;
- var start = process.Start();
-
- if (!start)
- {
- Log.Error("[POWERSHELL] Unable to start processing {descriptor}: {script}", descriptor, command);
- return false;
- }
-
- // execute and wait
- process.WaitForExit(Convert.ToInt32(timeout.TotalMilliseconds));
-
- if (process.ExitCode == 0)
- {
- // done, all good
- return true;
- }
-
- // non-zero exitcode, process as failed
- Log.Error("[POWERSHELL] The {descriptor} returned non-zero exitcode: {code}", descriptor, process.ExitCode);
-
- var errors = process.StandardError.ReadToEnd().Trim();
- if (!string.IsNullOrEmpty(errors)) Log.Error("[POWERSHELL] Error output:\r\n{output}", errors);
- else
- {
- var console = process.StandardOutput.ReadToEnd().Trim();
- if (!string.IsNullOrEmpty(console)) Log.Error("[POWERSHELL] No error output, console output:\r\n{output}", errors);
- else Log.Error("[POWERSHELL] No error and no console output");
- }
-
- // done
- return false;
- }
- catch (Exception ex)
- {
- Log.Fatal(ex, "[POWERSHELL] Fatal error when executing {descriptor}: {command}", descriptor, command);
- return false;
- }
- }
-
- ///
- /// Executes the command or script, and returns the standard and error output
- ///
- ///
- ///
- ///
- ///
- ///
- internal static bool ExecuteWithOutput(string command, TimeSpan timeout, out string output, out string errors)
- {
- output = string.Empty;
- errors = string.Empty;
-
- try
- {
- // check whether we're executing a script
- var isScript = command.ToLower().EndsWith(".ps1");
-
- var workingDir = string.Empty;
- if (isScript)
- {
- // try to get the script's startup path
- var scriptDir = Path.GetDirectoryName(command);
- workingDir = !string.IsNullOrEmpty(scriptDir) ? scriptDir : string.Empty;
- }
-
- // find the powershell executable
- var psExec = GetPsExecutable();
- if (string.IsNullOrEmpty(psExec)) return false;
-
- // prepare the executing process
- var processInfo = new ProcessStartInfo
- {
- FileName = psExec,
- RedirectStandardError = true,
- RedirectStandardOutput = true,
- UseShellExecute = false,
- CreateNoWindow = true,
- WorkingDirectory = workingDir,
- // attempt to set the right encoding
- StandardOutputEncoding = Encoding.GetEncoding(CultureInfo.CurrentCulture.TextInfo.OEMCodePage),
- StandardErrorEncoding = Encoding.GetEncoding(CultureInfo.CurrentCulture.TextInfo.OEMCodePage),
- // set the right type of arguments
- Arguments = isScript
- ? $@"& '{command}'"
- : $@"& {{{command}}}"
- };
-
- // execute and wait
- using var process = new Process();
- process.StartInfo = processInfo;
-
- var start = process.Start();
- if (!start)
- {
- Log.Error("[POWERSHELL] Unable to begin executing the {type}: {cmd}", isScript ? "script" : "command", command);
- return false;
- }
-
- // wait for completion
- var completed = process.WaitForExit(Convert.ToInt32(timeout.TotalMilliseconds));
- if (!completed) Log.Error("[POWERSHELL] Timeout executing the {type}: {cmd}", isScript ? "script" : "command", command);
-
- // read the streams
- output = process.StandardOutput.ReadToEnd().Trim();
- errors = process.StandardError.ReadToEnd().Trim();
-
- // dispose of them
- process.StandardOutput.Dispose();
- process.StandardError.Dispose();
-
- // make sure the process ends
- process.Kill();
-
- // done
- return completed;
- }
- catch (Exception ex)
- {
- Log.Fatal(ex, ex.Message);
- return false;
- }
- }
-
- ///
- /// Attempt to locate powershell.exe
- ///
- ///
- public static string GetPsExecutable()
- {
- // try regular location
- var psExec = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "WindowsPowerShell\\v1.0\\powershell.exe");
- if (File.Exists(psExec)) return psExec;
-
- // try specific
- psExec = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "WindowsPowerShell\\v1.0\\powershell.exe");
- if (File.Exists(psExec)) return psExec;
-
- // not found
- Log.Error("[POWERSHELL] PS executable not found, make sure you have powershell installed on your system");
- return string.Empty;
- }
- }
+ ///
+ /// Performs Powershell-related actions
+ ///
+ public static class PowershellManager
+ {
+ ///
+ /// Execute a Powershell command without waiting for or checking results
+ ///
+ ///
+ ///
+ public static bool ExecuteCommandHeadless(string command) => ExecuteHeadless(command, string.Empty, false);
+
+ ///
+ /// Executes a Powershell script without waiting for or checking results
+ ///
+ ///
+ ///
+ ///
+ public static bool ExecuteScriptHeadless(string script, string parameters) => ExecuteHeadless(script, parameters, true);
+
+ private static string GetProcessArguments(string command, string parameters, bool isScript)
+ {
+ if (isScript)
+ {
+ return string.IsNullOrWhiteSpace(parameters)
+ ? $"-File \"{command}\""
+ : $"-File \"{command}\" \"{parameters}\"";
+ }
+ else
+ {
+ return $@"& {{{command}}}"; //NOTE: place to fix any potential future issues with "command part of the command"
+ }
+ }
+
+ private static bool ExecuteHeadless(string command, string parameters, bool isScript)
+ {
+ var descriptor = isScript ? "script" : "command";
+
+ try
+ {
+ var workingDir = string.Empty;
+ if (isScript)
+ {
+ // try to get the script's startup path
+ var scriptDir = Path.GetDirectoryName(command);
+ workingDir = !string.IsNullOrEmpty(scriptDir) ? scriptDir : string.Empty;
+ }
+
+ var psExec = GetPsExecutable();
+ if (string.IsNullOrEmpty(psExec))
+ return false;
+
+ var processInfo = new ProcessStartInfo
+ {
+ WindowStyle = ProcessWindowStyle.Hidden,
+ CreateNoWindow = true,
+ FileName = psExec,
+ WorkingDirectory = workingDir,
+ Arguments = GetProcessArguments(command, parameters, isScript)
+ };
+
+ using var process = new Process();
+ process.StartInfo = processInfo;
+ var start = process.Start();
+
+ if (!start)
+ {
+ Log.Error("[POWERSHELL] Unable to start processing {descriptor}: {command}", descriptor, command);
+
+ return false;
+ }
+
+ return true;
+ }
+ catch (Exception ex)
+ {
+ Log.Fatal(ex, "[POWERSHELL] Fatal error when executing {descriptor}: {command}", descriptor, command);
+
+ return false;
+ }
+ }
+
+ ///
+ /// Execute a Powershell command, logs the output if it fails
+ ///
+ ///
+ ///
+ ///
+ public static bool ExecuteCommand(string command, TimeSpan timeout) => Execute(command, string.Empty, false, timeout);
+
+ ///
+ /// Executes a Powershell script, logs the output if it fails
+ ///
+ ///
+ ///
+ ///
+ public static bool ExecuteScript(string script, string parameters, TimeSpan timeout) => Execute(script, parameters, true, timeout);
+
+ private static bool Execute(string command, string parameters, bool isScript, TimeSpan timeout)
+ {
+ var descriptor = isScript ? "script" : "command";
+
+ try
+ {
+ var workingDir = string.Empty;
+ if (isScript)
+ {
+ // try to get the script's startup path
+ var scriptDir = Path.GetDirectoryName(command);
+ workingDir = !string.IsNullOrEmpty(scriptDir) ? scriptDir : string.Empty;
+ }
+
+ var psExec = GetPsExecutable();
+ if (string.IsNullOrEmpty(psExec)) return false;
+
+ var processInfo = new ProcessStartInfo
+ {
+ FileName = psExec,
+ RedirectStandardError = true,
+ RedirectStandardOutput = true,
+ UseShellExecute = false,
+ WorkingDirectory = workingDir,
+ Arguments = GetProcessArguments(command, parameters, isScript)
+ };
+
+ using var process = new Process();
+ process.StartInfo = processInfo;
+ var start = process.Start();
+
+ if (!start)
+ {
+ Log.Error("[POWERSHELL] Unable to start processing {descriptor}: {script}", descriptor, command);
+
+ return false;
+ }
+
+ process.WaitForExit(Convert.ToInt32(timeout.TotalMilliseconds));
+
+ if (process.ExitCode == 0)
+ return true;
+
+ // non-zero exitcode, process as failed
+ Log.Error("[POWERSHELL] The {descriptor} returned non-zero exitcode: {code}", descriptor, process.ExitCode);
+
+ var errors = process.StandardError.ReadToEnd().Trim();
+ if (!string.IsNullOrEmpty(errors))
+ {
+ Log.Error("[POWERSHELL] Error output:\r\n{output}", errors);
+ }
+ else
+ {
+ var console = process.StandardOutput.ReadToEnd().Trim();
+ if (!string.IsNullOrEmpty(console))
+ Log.Error("[POWERSHELL] No error output, console output:\r\n{output}", errors);
+ else
+ Log.Error("[POWERSHELL] No error and no console output");
+ }
+
+ return false;
+ }
+ catch (Exception ex)
+ {
+ Log.Fatal(ex, "[POWERSHELL] Fatal error when executing {descriptor}: {command}", descriptor, command);
+
+ return false;
+ }
+ }
+
+ private static Encoding TryParseCodePage(int codePage)
+ {
+ Encoding encoding = null;
+ try
+ {
+ encoding = Encoding.GetEncoding(codePage);
+ }
+ catch
+ {
+ // best effort
+ }
+
+ return encoding;
+ }
+
+ private static Encoding GetEncoding()
+ {
+ var encoding = TryParseCodePage(CultureInfo.InstalledUICulture.TextInfo.OEMCodePage);
+ if (encoding != null)
+ return encoding;
+
+ encoding = TryParseCodePage(CultureInfo.CurrentCulture.TextInfo.OEMCodePage);
+ if (encoding != null)
+ return encoding;
+
+ encoding = TryParseCodePage(CultureInfo.CurrentUICulture.TextInfo.OEMCodePage);
+ if (encoding != null)
+ return encoding;
+
+ encoding = TryParseCodePage(CultureInfo.InvariantCulture.TextInfo.OEMCodePage);
+ if (encoding != null)
+ return encoding;
+
+ Log.Warning("[POWERSHELL] Cannot parse system text culture to encoding, returning UTF-8 as a fallback, please report this as a GitHub issue");
+
+ Log.Debug("[POWERSHELL] currentInstalledUICulture {c}", JsonConvert.SerializeObject(CultureInfo.InstalledUICulture.TextInfo));
+ Log.Debug("[POWERSHELL] currentCulture {c}", JsonConvert.SerializeObject(CultureInfo.CurrentCulture.TextInfo));
+ Log.Debug("[POWERSHELL] currentUICulture {c}", JsonConvert.SerializeObject(CultureInfo.CurrentUICulture.TextInfo));
+ Log.Debug("[POWERSHELL] invariantCulture {c}", JsonConvert.SerializeObject(CultureInfo.InvariantCulture.TextInfo));
+
+ return Encoding.UTF8;
+ }
+
+ ///
+ /// Executes the command or script, and returns the standard and error output
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ internal static bool ExecuteWithOutput(string command, TimeSpan timeout, out string output, out string errors)
+ {
+ output = string.Empty;
+ errors = string.Empty;
+
+ try
+ {
+ var isScript = command.ToLower().EndsWith(".ps1");
+
+ var workingDir = string.Empty;
+ if (isScript)
+ {
+ // try to get the script's startup path
+ var scriptDir = Path.GetDirectoryName(command);
+ workingDir = !string.IsNullOrEmpty(scriptDir) ? scriptDir : string.Empty;
+ }
+
+ var psExec = GetPsExecutable();
+ if (string.IsNullOrEmpty(psExec))
+ return false;
+
+ var encoding = GetEncoding();
+
+ var processInfo = new ProcessStartInfo
+ {
+ FileName = psExec,
+ RedirectStandardError = true,
+ RedirectStandardOutput = true,
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ WorkingDirectory = workingDir,
+ StandardOutputEncoding = encoding,
+ StandardErrorEncoding = encoding,
+ // set the right type of arguments
+ Arguments = isScript
+ ? $@"& '{command}'"
+ : $@"& {{{command}}}"
+ };
+
+ using var process = new Process();
+ process.StartInfo = processInfo;
+
+ var start = process.Start();
+ if (!start)
+ {
+ Log.Error("[POWERSHELL] Unable to begin executing the {type}: {cmd}", isScript ? "script" : "command", command);
+
+ return false;
+ }
+
+ var completed = process.WaitForExit(Convert.ToInt32(timeout.TotalMilliseconds));
+ if (!completed)
+ Log.Error("[POWERSHELL] Timeout executing the {type}: {cmd}", isScript ? "script" : "command", command);
+
+ output = process.StandardOutput.ReadToEnd().Trim();
+ errors = process.StandardError.ReadToEnd().Trim();
+
+ process.StandardOutput.Dispose();
+ process.StandardError.Dispose();
+
+ process.Kill();
+
+ return completed;
+ }
+ catch (Exception ex)
+ {
+ Log.Fatal(ex, ex.Message);
+
+ return false;
+ }
+ }
+
+ ///
+ /// Attempt to locate powershell.exe
+ ///
+ ///
+ public static string GetPsExecutable()
+ {
+ // try regular location
+ var psExec = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "WindowsPowerShell\\v1.0\\powershell.exe");
+ if (File.Exists(psExec))
+ return psExec;
+
+ // try specific
+ psExec = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "WindowsPowerShell\\v1.0\\powershell.exe");
+ if (File.Exists(psExec))
+ return psExec;
+
+ Log.Error("[POWERSHELL] PS executable not found, make sure you have powershell installed on your system");
+ return string.Empty;
+ }
+ }
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Managers/SharedSystemStateManager.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Managers/SharedSystemStateManager.cs
index 01348f66..4b9c2c60 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Managers/SharedSystemStateManager.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Managers/SharedSystemStateManager.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using System.Threading.Tasks;
using HASS.Agent.Shared.Enums;
using Microsoft.Win32;
@@ -23,6 +24,11 @@ public static class SharedSystemStateManager
///
public static SystemStateEvent LastSystemStateEvent { get; private set; } = SystemStateEvent.ApplicationStarted;
+ ///
+ /// Contains the key value pair with SystemStateEvent and the last time it occurred
+ ///
+ public static Dictionary LastEventOccurrence = new Dictionary();
+
///
/// Sets the provided system state event
///
@@ -90,6 +96,8 @@ private static void SystemEventsOnSessionSwitch(object sender, SessionSwitchEven
SessionSwitchReason.SessionUnlock => SystemStateEvent.SessionUnlock,
_ => LastSystemStateEvent
};
+
+ LastEventOccurrence[LastSystemStateEvent] = DateTime.Now;
}
private static void SystemEventsOnPowerModeChanged(object sender, PowerModeChangedEventArgs e)
@@ -102,7 +110,9 @@ private static void SystemEventsOnPowerModeChanged(object sender, PowerModeChang
PowerModes.Suspend => SystemStateEvent.Suspend,
_ => LastSystemStateEvent
};
- }
+
+ LastEventOccurrence[LastSystemStateEvent] = DateTime.Now;
+ }
private static void SystemEventsOnSessionEnding(object sender, SessionEndingEventArgs e)
{
@@ -112,7 +122,9 @@ private static void SystemEventsOnSessionEnding(object sender, SessionEndingEven
SessionEndReasons.SystemShutdown => SystemStateEvent.SystemShutdown,
_ => LastSystemStateEvent
};
- }
+
+ LastEventOccurrence[LastSystemStateEvent] = DateTime.Now;
+ }
private static void SystemEventsOnSessionEnded(object sender, SessionEndedEventArgs e)
{
@@ -122,6 +134,8 @@ private static void SystemEventsOnSessionEnded(object sender, SessionEndedEventA
SessionEndReasons.SystemShutdown => SystemStateEvent.SystemShutdown,
_ => LastSystemStateEvent
};
- }
+
+ LastEventOccurrence[LastSystemStateEvent] = DateTime.Now;
+ }
}
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/Config/ConfiguredCommand.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/Config/ConfiguredCommand.cs
index 969e93d9..9b53b601 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/Config/ConfiguredCommand.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/Config/ConfiguredCommand.cs
@@ -3,6 +3,7 @@
using HASS.Agent.Shared.Enums;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
+using static HASS.Agent.Shared.Functions.Inputs;
namespace HASS.Agent.Shared.Models.Config
{
@@ -23,7 +24,7 @@ public class ConfiguredCommand
public string Command { get; set; } = string.Empty;
- public byte KeyCode { get; set; }
+ public VirtualKeyShort KeyCode { get; set; }
public bool RunAsLowIntegrity { get; set; } = false;
public List Keys { get; set; } = new List();
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/Config/ConfiguredSensor.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/Config/ConfiguredSensor.cs
index 9164691c..01513d21 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/Config/ConfiguredSensor.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/Config/ConfiguredSensor.cs
@@ -22,6 +22,7 @@ public class ConfiguredSensor
public string Counter { get; set; } = string.Empty;
public string Instance { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
+ public bool IgnoreAvailability { get; set; } = false;
public bool ApplyRounding { get; set; } = false;
public int? Round { get; set; }
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/HomeAssistant/AbstractDiscoverable.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/HomeAssistant/AbstractDiscoverable.cs
index 6984f982..1fa54fca 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/HomeAssistant/AbstractDiscoverable.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/HomeAssistant/AbstractDiscoverable.cs
@@ -32,6 +32,7 @@ public string ObjectId
public bool UseAttributes { get; set; } = false;
public abstract DiscoveryConfigModel GetAutoDiscoveryConfig();
+ public bool IgnoreAvailability { get; set; } = false;
public abstract void ClearAutoDiscoveryConfig();
}
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/HomeAssistant/AbstractSingleValueSensor.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/HomeAssistant/AbstractSingleValueSensor.cs
index 1b3a77e2..3a67aaae 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/HomeAssistant/AbstractSingleValueSensor.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/HomeAssistant/AbstractSingleValueSensor.cs
@@ -35,8 +35,11 @@ protected SensorDiscoveryConfigModel SetAutoDiscoveryConfigModel(SensorDiscovery
public override void ClearAutoDiscoveryConfig() => AutoDiscoveryConfigModel = null;
- public abstract string GetState();
- public abstract string GetAttributes();
+ // nullable in preparation for possible future "nullable enablement"
+ public abstract string? GetState();
+
+ // nullable in preparation for possible future "nullable enablement"
+ public abstract string? GetAttributes();
public void ResetChecks()
{
@@ -60,6 +63,9 @@ public async Task PublishStateAsync(bool respectChecks = true)
// get the current state/attributes
var state = GetState();
+ if (state == null)
+ return;
+
var attributes = GetAttributes();
// are we asked to check state changes?
@@ -82,13 +88,10 @@ public async Task PublishStateAsync(bool respectChecks = true)
// send it
var published = await Variables.MqttManager.PublishAsync(message);
if (!published)
- {
- // failed, don't store the state
- return;
- }
+ return; // failed, don't store the state
// optionally prepare and send attributes
- if (UseAttributes)
+ if (UseAttributes && attributes != null)
{
message = new MqttApplicationMessageBuilder()
.WithTopic(autoDiscoConfig.Json_attributes_topic)
@@ -98,18 +101,18 @@ public async Task PublishStateAsync(bool respectChecks = true)
published = await Variables.MqttManager.PublishAsync(message);
if (!published)
- {
- // failed, don't store the state
- return;
- }
+ return; // failed, don't store the state
}
// only store the values if the checks are respected
- // otherwise, we might stay in 'unknown' state untill the value changes
- if (!respectChecks) return;
+ // otherwise, we might stay in 'unknown' state until the value changes
+ if (!respectChecks)
+ return;
PreviousPublishedState = state;
- PreviousPublishedAttributes = attributes;
+ if (attributes != null)
+ PreviousPublishedAttributes = attributes;
+
LastUpdated = DateTime.Now;
}
catch (Exception ex)
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/HomeAssistant/DiscoveryConfigModel.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/HomeAssistant/DiscoveryConfigModel.cs
index 3f1a8278..09f730cc 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/HomeAssistant/DiscoveryConfigModel.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/HomeAssistant/DiscoveryConfigModel.cs
@@ -10,6 +10,12 @@ namespace HASS.Agent.Shared.Models.HomeAssistant
[SuppressMessage("ReSharper", "InconsistentNaming")]
public abstract class DiscoveryConfigModel
{
+ ///
+ /// (Optional) The MQTT topic subscribed to receive availability (online/offline) updates.
+ ///
+ ///
+ public string Availability_topic { get; set; }
+
///
/// (Optional) Information about the device this entity is a part of to tie it into the device registry. Only works through MQTT discovery and when unique_id is set.
///
@@ -27,7 +33,7 @@ public abstract class DiscoveryConfigModel
///
///
public string FriendlyName { get; set; }
-
+
///
/// The MQTT topic subscribed to receive entity values.
///
@@ -38,12 +44,6 @@ public abstract class DiscoveryConfigModel
[SuppressMessage("ReSharper", "InconsistentNaming")]
public class SensorDiscoveryConfigModel : DiscoveryConfigModel
{
- ///
- /// (Optional) The MQTT topic subscribed to receive availability (online/offline) updates.
- ///
- ///
- public string Availability_topic { get; set; }
-
///
/// (Optional) The type/class of the sensor to set the icon in the frontend. See https://www.home-assistant.io/integrations/sensor/#device-class for options.
///
@@ -104,6 +104,30 @@ public class SensorDiscoveryConfigModel : DiscoveryConfigModel
///
public string Unique_id { get; set; }
+ private string _objectId = string.Empty;
+ ///
+ /// (Optional) An ID that will be used by Home Assistant to generate the entity ID.
+ /// If not provided, will be generated based on the sensor name and the device name.
+ /// If not provided and sensor name already includes the device name, will return the sensor name.
+ ///
+ ///
+ public string Object_id
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(_objectId))
+ return _objectId;
+
+ // backward compatibility with HASS.Agent and HA versions below 2023.8 where device name was part of the entity ID
+ // will not mess with the "Home Assistant entity ID" if user already has their own naming convention with device ID included
+ if (Name.Contains(Device.Name))
+ return Name;
+
+ return $"{Device.Name}_{Name}";
+ }
+ set { _objectId = value; }
+ }
+
///
/// (Optional) Defines the units of measurement of the sensor, if any.
///
@@ -139,7 +163,7 @@ public class CommandDiscoveryConfigModel : DiscoveryConfigModel
public string Action_topic { get; set; }
///
- /// (Optional) The type/class of the sensor to set the icon in the frontend. See https://www.home-assistant.io/integrations/sensor/#device-class for options.
+ /// (Optional) The type/class of the command to set the icon in the frontend. See https://www.home-assistant.io/integrations/sensor/#device-class for options.
///
///
public string Device_class { get; set; }
@@ -151,7 +175,7 @@ public class CommandDiscoveryConfigModel : DiscoveryConfigModel
public bool? Force_update { get; set; }
///
- /// (Optional) The icon for the sensor.
+ /// (Optional) The icon for the command.
///
///
public string Icon { get; set; }
@@ -163,7 +187,7 @@ public class CommandDiscoveryConfigModel : DiscoveryConfigModel
public string Json_attributes_template { get; set; }
///
- /// (Optional) The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Implies force_update of the current sensor state when a message is received on this topic.
+ /// (Optional) The MQTT topic subscribed to receive a JSON dictionary payload and then set as command attributes. Implies force_update of the current command state when a message is received on this topic.
///
///
public string Json_attributes_topic { get; set; }
@@ -187,18 +211,42 @@ public class CommandDiscoveryConfigModel : DiscoveryConfigModel
public int? Qos { get; set; }
///
- /// (Optional) An ID that uniquely identifies this sensor. If two sensors have the same unique ID, Home Assistant will raise an exception.
+ /// (Optional) An ID that uniquely identifies this command. If two sensors have the same unique ID, Home Assistant will raise an exception.
///
///
public string Unique_id { get; set; }
+ private string _objectId = string.Empty;
+ ///
+ /// (Optional) An ID that will be used by Home Assistant to generate the entity ID.
+ /// If not provided, will be generated based on the sensor name and the device name.
+ /// If not provided and sensor name already includes the device name, will return the sensor name.
+ ///
+ ///
+ public string Object_id
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(_objectId))
+ return _objectId;
+
+ // backward compatibility with HASS.Agent and HA versions below 2023.8 where device name was part of the entity ID
+ // will not mess with the "Home Assistant entity ID" if user already has their own naming convention with device ID included
+ if (Name.Contains(Device.Name))
+ return Name;
+
+ return $"{Device.Name}_{Name}";
+ }
+ set { _objectId = value; }
+ }
+
///
/// (Optional) Defines a template to extract the value.
///
///
public string Value_template { get; set; }
}
-
+
///
/// This information will be used when announcing this device on the mqtt topic
///
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/Internal/AudioSessionInfo.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/Internal/AudioSessionInfo.cs
index 78031748..c884e3ed 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/Internal/AudioSessionInfo.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Models/Internal/AudioSessionInfo.cs
@@ -2,21 +2,6 @@
namespace HASS.Agent.Shared.Models.Internal
{
- public class AudioSessionInfoCollection
- {
- public AudioSessionInfoCollection()
- {
- //
- }
-
- public AudioSessionInfoCollection(List audioSessions)
- {
- foreach (var audioSession in audioSessions) AudioSessions.Add(audioSession);
- }
-
- public List AudioSessions { get; set; } = new List();
- }
-
public class AudioSessionInfo
{
public AudioSessionInfo()
@@ -25,7 +10,9 @@ public AudioSessionInfo()
}
public string Application { get; set; } = string.Empty;
+ public string PlaybackDevice { get; set; } = string.Empty;
public bool Muted { get; set; }
+ public bool Active { get; set; }
public float MasterVolume { get; set; } = 0f;
public float PeakVolume { get; set; } = 0f;
}
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Mqtt/IMqttManager.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Mqtt/IMqttManager.cs
index aca0436d..f8dae560 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Mqtt/IMqttManager.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Mqtt/IMqttManager.cs
@@ -22,7 +22,7 @@ public interface IMqttManager
Task ClearDeviceConfigAsync();
void Disconnect();
Task SubscribeAsync(AbstractCommand command);
- Task UnubscribeAsync(AbstractCommand command);
+ Task UnsubscribeAsync(AbstractCommand command);
Task SubscribeNotificationsAsync();
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.Designer.cs b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.Designer.cs
index 10d1a41d..fac76b2c 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.Designer.cs
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.Designer.cs
@@ -1248,6 +1248,15 @@ internal static string CommandType_PublishAllSensorsCommand {
}
}
+ ///
+ /// Looks up a localized string similar to RadioCommand.
+ ///
+ internal static string CommandType_RadioCommand {
+ get {
+ return ResourceManager.GetString("CommandType_RadioCommand", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Restart.
///
@@ -1266,6 +1275,15 @@ internal static string CommandType_SendWindowToFrontCommand {
}
}
+ ///
+ /// Looks up a localized string similar to SetApplicationVolume.
+ ///
+ internal static string CommandType_SetApplicationVolumeCommand {
+ get {
+ return ResourceManager.GetString("CommandType_SetApplicationVolumeCommand", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to SetVolume.
///
@@ -1293,6 +1311,15 @@ internal static string CommandType_SleepCommand {
}
}
+ ///
+ /// Looks up a localized string similar to SwitchDesktop.
+ ///
+ internal static string CommandType_SwitchDesktopCommand {
+ get {
+ return ResourceManager.GetString("CommandType_SwitchDesktopCommand", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to WebView.
///
@@ -6429,6 +6456,15 @@ internal static string SensorsMod_WmiTestFailed {
}
}
+ ///
+ /// Looks up a localized string similar to ActiveDesktop.
+ ///
+ internal static string SensorType_ActiveDesktopSensor {
+ get {
+ return ResourceManager.GetString("SensorType_ActiveDesktopSensor", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to ActiveWindow.
///
@@ -6546,6 +6582,15 @@ internal static string SensorType_GpuTemperatureSensor {
}
}
+ ///
+ /// Looks up a localized string similar to InternalDeviceSensor.
+ ///
+ internal static string SensorType_InternalDeviceSensor {
+ get {
+ return ResourceManager.GetString("SensorType_InternalDeviceSensor", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to LastActive.
///
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.de.resx b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.de.resx
index ad6987e6..fcd970f4 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.de.resx
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.de.resx
@@ -2732,7 +2732,7 @@ Stelle sicher, dass keine andere Instanz von HASS.Agent läuft und der Port verf
Dies unterscheidet sich von dem „ÖffneUrl“ Befehl, da er keinen vollständigen Browser lädt, sondern nur die bereitgestellte URL in einem eigenen Fenster.
-Du kannst dies benutzen, um zum Beispiel schnell Home Assistant's Dashboard anzuzeigen.
+Du kannst dies benutzen, um zum Beispiel schnell Home Assistant's Dashboard anzuzeigen.
Standardmäßig werden alle Cookies für unbegrenzte Zeit gespeichert, sodass du dich nur einmal einloggen musst.
@@ -2793,7 +2793,7 @@ Hinweis: Diese Meldung wird nur einmal angezeigt.
Fuzzy
- Um auf Anfragen reagieren zu können, muss HASS.Agent's Port in deiner Firewall reserviert und geöffnet werden. Du kannst diese Schaltfläche verwenden, um dies für dich zu erledigen.
+ Um auf Anfragen reagieren zu können, muss HASS.Agent's Port in deiner Firewall reserviert und geöffnet werden. Du kannst diese Schaltfläche verwenden, um dies für dich zu erledigen.
Fuzzy
@@ -3170,13 +3170,13 @@ Es sollte drei Abschnitte enthalten (getrennt durch zwei Punkte).
Sind Sie sicher, dass Sie es so verwenden wollen?
- Die URI Ihres Home-Assistenten sieht nicht richtig aus. Sie sollte etwa so aussehen: "http://homeassistant.local:8123" oder "https://192.168.0.1:8123".
+ Die URI Ihres Home-Assistenten sieht nicht richtig aus. Sie sollte etwa so aussehen: "http://homeassistant.local:8123" oder "https://192.168.0.1:8123".
Sind Sie sicher, dass Sie ihn so verwenden wollen?
Deine MQTT Broker URI sieht nicht richtig aus. So sollte es aussehen
-"homeassistant.local" oder "192.168.0.1"
+"homeassistant.local" oder "192.168.0.1"
Bist Du sicher, es so zu verwenden?
@@ -3333,7 +3333,7 @@ Möchtest Du den Protokollordner öffnen?
Fehler beim Einstellen des Startmodus, überprüfe die Protokolle
- Microsoft's WebView2 Runtime wurde nicht auf diesem Gerät gefunden. Normalerweise wird dies vom Installer ausgeführt, Du kannst es auch manuell installieren.
+ Microsoft's WebView2 Runtime wurde nicht auf diesem Gerät gefunden. Normalerweise wird dies vom Installer ausgeführt, Du kannst es auch manuell installieren.
Willst Du den Runtime Installer herunterladen?
@@ -3343,4 +3343,13 @@ Willst Du den Runtime Installer herunterladen?
domain
+
+ RadioCommand
+
+
+ SwitchDesktop
+
+
+ AktiverDesktop
+
\ No newline at end of file
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.en.resx b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.en.resx
index 9226c43b..4a7ea851 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.en.resx
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.en.resx
@@ -811,10 +811,10 @@ you can probably use the preset address.
Description
- &Run as 'Low Integrity'
+ &Run as 'Low Integrity'
- What's this?
+ What's this?
Type
@@ -1214,7 +1214,7 @@ report bugs or get involved in general chit-chat!
Fetching info, please wait..
- There's a new release available:
+ There's a new release available:
Release notes
@@ -1264,22 +1264,22 @@ If you just want a window with a specific URL (not an entire browser), use a 'We
Logs off the current session.
- Simulates 'Mute' key.
+ Simulates 'Mute' key.
- Simulates 'Media Next' key.
+ Simulates 'Media Next' key.
- Simulates 'Media Pause/Play' key.
+ Simulates 'Media Pause/Play' key.
- Simulates 'Media Previous' key.
+ Simulates 'Media Previous' key.
- Simulates 'Volume Down' key.
+ Simulates 'Volume Down' key.
- Simulates 'Volume Up' key.
+ Simulates 'Volume Up' key.
Simulates pressing mulitple keys.
@@ -1328,7 +1328,7 @@ Note: due to a limitation in Windows, this only works if hibernation is disabled
You can use something like NirCmd (http://www.nirsoft.net/utils/nircmd.html) to circumvent this.
- Please enter the location of your browser's binary! (.exe file)
+ Please enter the location of your browser's binary! (.exe file)
The browser binary provided could not be found, please ensure the path is correct and try again.
@@ -1347,7 +1347,7 @@ Please check the logs for more information.
Please enter a valid API key!
- Please enter a value for your Home Assistant's URI.
+ Please enter a value for your Home Assistant's URI.
Unable to connect, the following error was returned:
@@ -1462,7 +1462,7 @@ Check the HASS.Agent (not the service) logs for more information.
Activating Start-on-Login..
- Something went wrong. You can try again, or skip to the next page and retry after HASS.Agent's restart.
+ Something went wrong. You can try again, or skip to the next page and retry after HASS.Agent's restart.
Enable Start-on-Login
@@ -1471,7 +1471,7 @@ Check the HASS.Agent (not the service) logs for more information.
Please provide a valid API key.
- Please enter your Home Assistant's URI.
+ Please enter your Home Assistant's URI.
Unable to connect, the following error was returned:
@@ -1721,19 +1721,19 @@ Please configure an executor or your command will not run.
This means it will only be able to save and modify files in certain locations,
- such as the '%USERPROFILE%\AppData\LocalLow' folder or
+ such as the '%USERPROFILE%\AppData\LocalLow' folder or
- the 'HKEY_CURRENT_USER\Software\AppDataLow' registry key.
+ the 'HKEY_CURRENT_USER\Software\AppDataLow' registry key.
- You should test your command to make sure it's not influenced by this!
+ You should test your command to make sure it's not influenced by this!
{0} only!
- The MQTT manager hasn't been configured properly, or hasn't yet completed its startup.
+ The MQTT manager hasn't been configured properly, or hasn't yet completed its startup.
Unable to fetch your entities because of missing config, please enter the required values in the config screen.
@@ -1888,10 +1888,10 @@ Please check the logs and make a bug report on GitHub.
Checking..
- You're running the latest version: {0}{1}
+ You're running the latest version: {0}{1}
- There's a new BETA release available:
+ There's a new BETA release available:
HASS.Agent BETA Update
@@ -2088,7 +2088,7 @@ This will also contain users that aren't active. If you only want the current ac
Note: if used in the satellite service, it won't detect userspace applications.
- Provides an ON/OFF value based on whether the window is currently open (doesn't have to be active).
+ Provides an ON/OFF value based on whether the window is currently open (doesn't have to be active).
Provides card info, configuration, transfer- & package statistics and addresses (ip, mac, dhcp, dns) of the selected network card(s).
@@ -2592,7 +2592,7 @@ Do you still want to use the current values?
ApplicationStarted
- You can use the satellite service to run sensors and commands without having to be logged in. Not all types are available, for instance the 'LaunchUrl' command can only be added as a regular command.
+ You can use the satellite service to run sensors and commands without having to be logged in. Not all types are available, for instance the 'LaunchUrl' command can only be added as a regular command.
Last Known Value
@@ -2708,7 +2708,7 @@ Note: this is not required for the new integration to function. Only enable and
&Enable Media Player Functionality
- HASS.Agent can act as a media player for Home Assistant, so you'll be able to see and control any media that's playing, and send text-to-speech. If you have MQTT enabled, your device will automatically get added. Otherwise, manually configure the integration to use the local API.
+ HASS.Agent can act as a media player for Home Assistant, so you'll be able to see and control any media that's playing, and send text-to-speech. If you have MQTT enabled, your device will automatically get added. Otherwise, manually configure the integration to use the local API.
If something is not working, make sure you try the following steps:
@@ -2762,10 +2762,10 @@ Note: this is not required for the new integration to function. Only enable and
Tray Icon
- Your input language '{0}' is known to collide with the default CTRL-ALT-Q hotkey. Please set your own.
+ Your input language '{0}' is known to collide with the default CTRL-ALT-Q hotkey. Please set your own.
- Your input language '{0}' is unknown, and might collide with the default CTRL-ALT-Q hotkey. Please check to be sure. If it does, consider opening a ticket on GitHub so it can be added to the list.
+ Your input language '{0}' is unknown, and might collide with the default CTRL-ALT-Q hotkey. Please check to be sure. If it does, consider opening a ticket on GitHub so it can be added to the list.
No keys found
@@ -2777,7 +2777,7 @@ Note: this is not required for the new integration to function. Only enable and
Error while parsing keys, please check the logs for more information.
- The number of open brackets ('[') does not correspond to the number of closed brackets. (']')! ({0} to {1})
+ The number of open brackets ('[') does not correspond to the number of closed brackets. (']')! ({0} to {1})
Documentation
@@ -2810,7 +2810,7 @@ information.
-Restart Home Assistant
- The same goes for the media player, this integration allows you to control your device as a media_player entity, see what's playing and send text-to-speech.
+ The same goes for the media player, this integration allows you to control your device as a media_player entity, see what's playing and send text-to-speech.
HASS.Agent-MediaPlayer GitHub Page
@@ -2833,7 +2833,7 @@ information.
Do you want to enable it?
- You can choose what modules you want to enable. They require HA integrations, but don't worry, the next page will give you more info on how to set them up.
+ You can choose what modules you want to enable. They require HA integrations, but don't worry, the next page will give you more info on how to set them up.
Note: 5115 is the default port, only change it if you changed it in Home Assistant.
@@ -2864,10 +2864,10 @@ Do you want to use that version?
&Always show centered in screen
- Show the window's &title bar
+ Show the window's &title bar
- Set window as 'Always on &Top'
+ Set window as 'Always on &Top'
Drag and resize this window to set the size and location of your webview command.
@@ -2902,7 +2902,7 @@ Please ensure the keycode field is in focus and press the key you want simulated
Enable State Notifications
- HASS.Agent will sanitize your device name to make sure HA will accept it, you can overrule this rule below if you're sure that your name will be accepted as-is.
+ HASS.Agent will sanitize your device name to make sure HA will accept it, you can overrule this rule below if you're sure that your name will be accepted as-is.
HASS.Agent sends notifications when the state of a module changes, you can adjust whether or not you want to receive these notifications below.
@@ -2974,7 +2974,7 @@ Note: You disabled sanitation, so make sure your device name is accepted by Home
Puts all monitors in sleep (low power) mode.
- Tries to wake up all monitors by simulating a 'arrow up' keypress.
+ Tries to wake up all monitors by simulating a 'arrow up' keypress.
Sets the volume of the current default audiodevice to the specified level.
@@ -3033,7 +3033,7 @@ Are you sure you want to use this URI anyway?
Please start the service first in order to configure it.
- If you want to manage the service (add commands and sensor, change settings) you can do so here, or by using the 'satellite service' button on the main window.
+ If you want to manage the service (add commands and sensor, change settings) you can do so here, or by using the 'satellite service' button on the main window.
Show default menu on mouse left-click
@@ -3219,4 +3219,16 @@ Do you want to download the runtime installer?
domain
+
+ RadioCommand
+
+
+ InternalDeviceSensor
+
+
+ SwitchDesktop
+
+
+ ActiveDesktop
+
\ No newline at end of file
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.es.resx b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.es.resx
index 31250ab3..1bac329d 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.es.resx
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.es.resx
@@ -137,7 +137,7 @@
Puede configurar HASS.Agent para usar un ejecutor específico, como perl o python.
-Use el comando 'ejecutor personalizado' para iniciar este ejecutor.
+Use el comando 'ejecutor personalizado' para iniciar este ejecutor.
nombre del ejecutor personalizado
@@ -191,7 +191,7 @@ la API de Home Assistant.
Por favor, proporcione un token de acceso de larga duración, y la dirección de su instancia de Home Assistant.
-Puedes obtener un token a través de tu página de perfil. Desplácese hasta la parte inferior y haga clic en 'CREAR TOKEN'.
+Puedes obtener un token a través de tu página de perfil. Desplácese hasta la parte inferior y haga clic en 'CREAR TOKEN'.
&api token
@@ -229,7 +229,7 @@ De esta manera, hagas lo que hagas en tu máquina, siempre puedes interactuar co
Algunos elementos, como las imágenes que se muestran en las notificaciones, deben almacenarse temporalmente de forma local. Puede
configurar la cantidad de días que deben conservarse antes de que HASS.Agent los elimine.
-Introduzca '0' para mantenerlas permanentemente.
+Introduzca '0' para mantenerlas permanentemente.
El registro extendido proporciona un registro más detallado, en caso de que el registro predeterminado no sea
@@ -324,7 +324,7 @@ Nota: estos ajustes (excepto el id de cliente) se aplicarán también al servici
El servicio satelital le permite ejecutar sensores y comandos incluso cuando ningún usuario ha iniciado sesión.
-Use el botón 'servicio satelital' en la ventana principal para administrarlo.
+Use el botón 'servicio satelital' en la ventana principal para administrarlo.
estado del servicio:
@@ -393,7 +393,7 @@ Recibirá una notificación (una vez por actualización) que le informará que h
Parece que esta es la primera vez que inicia HASS.Agent.
-Si quieres, podemos pasar por la configuración. Si no, simplemente haga clic en 'cerrar'.
+Si quieres, podemos pasar por la configuración. Si no, simplemente haga clic en 'cerrar'.
El nombre del dispositivo se usa para identificar su máquina en HA.
@@ -455,7 +455,7 @@ información.
la API de Home Assistant.
Por favor, proporcione un token de acceso de larga duración, y la dirección de su instancia de Home Assistant.
-Puedes obtener un token a través de su página de perfil. Desplácese hasta la parte inferior y haga clic en 'CREAR TOKEN'.
+Puedes obtener un token a través de su página de perfil. Desplácese hasta la parte inferior y haga clic en 'CREAR TOKEN'.
&conexión de prueba
@@ -809,7 +809,7 @@ probablemente puedas usar la dirección preestablecida.
descripción
- &ejecutar como 'baja integridad'
+ &ejecutar como 'baja integridad'
¿Qué es esto?
@@ -1010,7 +1010,7 @@ probablemente puedas usar la dirección preestablecida.
los componentes usados para sus licencias individuales:
- Un gran 'gracias' a los desarrolladores de estos proyectos, que tuvieron la amabilidad de compartir
+ Un gran 'gracias' a los desarrolladores de estos proyectos, que tuvieron la amabilidad de compartir
su arduo trabajo con el resto de nosotros, meros mortales.
@@ -1232,14 +1232,14 @@ reportar errores o simplemente hablar de lo que sea.
Ejecute un comando personalizado.
-Estos comandos se ejecutan sin elevación especial. Para ejecutar elevado, cree una tarea programada y use 'schtasks /Run /TN "TaskName"' como comando para ejecutar su tarea.
+Estos comandos se ejecutan sin elevación especial. Para ejecutar elevado, cree una tarea programada y use 'schtasks /Run /TN "TaskName"' como comando para ejecutar su tarea.
-O habilite 'ejecutar como baja integridad' para una ejecución aún más estricta.
+O habilite 'ejecutar como baja integridad' para una ejecución aún más estricta.
Ejecuta el comando a través del ejecutor personalizado configurado (en Configuración -> Herramientas externas).
-Su comando se proporciona como un argumento 'tal cual', por lo que debe proporcionar sus propias comillas, etc., si es necesario.
+Su comando se proporciona como un argumento 'tal cual', por lo que debe proporcionar sus propias comillas, etc., si es necesario.
Pone la máquina en hibernación.
@@ -1247,16 +1247,16 @@ Su comando se proporciona como un argumento 'tal cual', por lo que deb
Simula la pulsación de una sola tecla.
-Haga clic en el cuadro de texto "código de teclas" y pulse la tecla que desea simular. El código de la tecla correspondiente se introducirá por usted.
+Haga clic en el cuadro de texto "código de teclas" y pulse la tecla que desea simular. El código de la tecla correspondiente se introducirá por usted.
Si necesita más teclas y/o modificadores como CTRL, use el comando MultipleKeys.
Lanza la URL proporcionada, por defecto en su navegador predeterminado.
-Para usar 'incógnito', proporcione un navegador específico en Configuración -> Herramientas externas.
+Para usar 'incógnito', proporcione un navegador específico en Configuración -> Herramientas externas.
-Si sólo quiere una ventana con una URL específica (no un navegador completo), use un comando 'WebView'.
+Si sólo quiere una ventana con una URL específica (no un navegador completo), use un comando 'WebView'.
Bloquea la sesión actual.
@@ -1265,22 +1265,22 @@ Si sólo quiere una ventana con una URL específica (no un navegador completo),
Cierra la sesión actual.
- Simula la tecla 'silencio'.
+ Simula la tecla 'silencio'.
- Simula la tecla 'media next'.
+ Simula la tecla 'media next'.
- Simula la tecla 'pausa de reproducción multimedia'.
+ Simula la tecla 'pausa de reproducción multimedia'.
- Simula la tecla 'media anterior'.
+ Simula la tecla 'media anterior'.
- Simula la tecla de 'bajar volumen'.
+ Simula la tecla de 'bajar volumen'.
- Simula la tecla 'subir volumen'.
+ Simula la tecla 'subir volumen'.
Simula la pulsación de varias teclas.
@@ -1314,12 +1314,12 @@ Esto se ejecutará sin elevación especial.
Reinicia la máquina después de un minuto.
-Consejo: ¿activado accidentalmente? Ejecute 'shutdown /a' para cancelar.
+Consejo: ¿activado accidentalmente? Ejecute 'shutdown /a' para cancelar.
Apaga la máquina después de un minuto.
-Consejo: ¿activado accidentalmente? Ejecute 'shutdown /a' para cancelar.
+Consejo: ¿activado accidentalmente? Ejecute 'shutdown /a' para cancelar.
Pone la máquina a dormir.
@@ -1408,7 +1408,7 @@ Recuerde cambiar también el puerto de su regla de firewall.
Consulte los registros de HASS.Agent (no el servicio) para obtener más información.
- El servicio está configurado como 'deshabilitado', por lo que no se puede iniciar.
+ El servicio está configurado como 'deshabilitado', por lo que no se puede iniciar.
Habilite primero el servicio y luego inténtelo de nuevo.
@@ -1583,7 +1583,7 @@ Deje vacío para permitir que todos se conecten.
Este es el nombre con el que el servicio satelital se registra en Home Assistant.
-De manera predeterminada, es el nombre de su PC más '-satélite'.
+De manera predeterminada, es el nombre de su PC más '-satélite'.
La cantidad de tiempo que esperará el servicio satelital antes de informar una conexión perdida al intermediario MQTT.
@@ -1665,12 +1665,12 @@ Por favor, consulte los registros para obtener más información.
Ya hay un comando con ese nombre. Estás seguro de que quieres continuar?
- Si no ingresa un comando, solo puede usar esta entidad con un valor de 'acción' a través de Home Assistant. Ejecutarlo como está no hará nada.
+ Si no ingresa un comando, solo puede usar esta entidad con un valor de 'acción' a través de Home Assistant. Ejecutarlo como está no hará nada.
¿Estás seguro de que quieres esto?
- Si no ingresa un comando o secuencia de comandos, solo puede usar esta entidad con un valor de 'acción' a través de Home Assistant. Ejecutarlo como está no hará nada.
+ Si no ingresa un comando o secuencia de comandos, solo puede usar esta entidad con un valor de 'acción' a través de Home Assistant. Ejecutarlo como está no hará nada.
¿Estás seguro de que quieres esto?
@@ -1681,7 +1681,7 @@ Por favor, consulte los registros para obtener más información.
No se han podido comprobar las claves: {0}
- Si no ingresa una URL, solo puede usar esta entidad con un valor de 'acción' a través de Home Assistant. Ejecutarlo como está no hará nada.
+ Si no ingresa una URL, solo puede usar esta entidad con un valor de 'acción' a través de Home Assistant. Ejecutarlo como está no hará nada.
¿Estás seguro de que quieres esto?
@@ -1726,10 +1726,10 @@ configure un ejecutor o su comando no se ejecutará
Eso significa que solo podrá guardar y modificar archivos en ciertas ubicaciones,
- como la carpeta '%USERPROFILE%\AppData\LocalLow' o
+ como la carpeta '%USERPROFILE%\AppData\LocalLow' o
- la clave de registro 'HKEY_CURRENT_USER\Software\AppDataLow'.
+ la clave de registro 'HKEY_CURRENT_USER\Software\AppDataLow'.
Debe probar su comando para asegurarse de que no esté influenciado por esto.
@@ -1846,7 +1846,7 @@ Todos sus sensores y comandos serán ahora despublicados, y HASS.Agent se reinic
No se preocupe, mantendrán sus nombres actuales, por lo que sus automatizaciones o scripts seguirán funcionando.
-Nota: el nombre será 'saneado', lo que significa que todo, excepto las letras, los dígitos y los espacios en blanco, será reemplazado por un guión bajo. Esto es requerido por HA.
+Nota: el nombre será 'saneado', lo que significa que todo, excepto las letras, los dígitos y los espacios en blanco, será reemplazado por un guión bajo. Esto es requerido por HA.
Ha cambiado el puerto de la API local. Este nuevo puerto necesita ser reservado.
@@ -1876,7 +1876,7 @@ Reinicie manualmente.
Algo ha ido mal al cargar la configuración.
-Compruebe el archivo appsettings.json en la subcarpeta "config" o elimínelo para empezar de cero.
+Compruebe el archivo appsettings.json en la subcarpeta "config" o elimínelo para empezar de cero.
Se ha producido un error al lanzar HASS.Agent.
@@ -2029,7 +2029,7 @@ Asegúrese de que no se esté ejecutando ninguna otra instancia de HASS.Agent y
Brinda información sobre varios aspectos del audio de su dispositivo:
-Nivel de volumen máximo actual (se puede usar como un simple valor de "se está reproduciendo algo").
+Nivel de volumen máximo actual (se puede usar como un simple valor de "se está reproduciendo algo").
Dispositivo de audio predeterminado: nombre, estado y volumen.
@@ -2067,7 +2067,7 @@ Actualmente toma el volumen de su dispositivo predeterminado.
Proporciona un valor de fecha y hora que contiene el último momento en que el sistema (re)arrancó.
-Importante: la opción FastBoot de Windows puede descartar este valor, porque es una forma de hibernación. Puede deshabilitarlo a través de Opciones de energía -> 'Elegir lo que hacen los botones de encendido' -> desmarque 'Activar inicio rápido'. No hace mucha diferencia para las máquinas modernas con SSD, pero la desactivación asegura que obtenga un estado limpio después de reiniciar.
+Importante: la opción FastBoot de Windows puede descartar este valor, porque es una forma de hibernación. Puede deshabilitarlo a través de Opciones de energía -> 'Elegir lo que hacen los botones de encendido' -> desmarque 'Activar inicio rápido'. No hace mucha diferencia para las máquinas modernas con SSD, pero la desactivación asegura que obtenga un estado limpio después de reiniciar.
Proporciona el último cambio de estado del sistema:
@@ -2107,7 +2107,7 @@ Categoría: Procesador
Contador: % de tiempo de procesador
Instancia: _Total
-Puede explorar los contadores a través de la herramienta 'perfmon.exe' de Windows.
+Puede explorar los contadores a través de la herramienta 'perfmon.exe' de Windows.
Proporciona el número de instancias activas del proceso.
@@ -2116,7 +2116,7 @@ Puede explorar los contadores a través de la herramienta 'perfmon.exe&apos
Devuelve el estado del servicio proporcionado: NotFound, Stopped, StartPending, StopPending, Running, ContinuePending, PausePending o Paused.
-Asegúrese de proporcionar el 'Nombre del servicio', no el 'Nombre para mostrar'.
+Asegúrese de proporcionar el 'Nombre del servicio', no el 'Nombre para mostrar'.
Proporciona el estado actual de la sesión:
@@ -2594,7 +2594,7 @@ Sugerencia: asegúrese de no haber cambiado el alcance y los campos de consulta.
Aplicación iniciada
- Puede usar el servicio satelital para ejecutar sensores y comandos sin tener que iniciar sesión. No todos los tipos están disponibles, por ejemplo, el comando 'LaunchUrl' solo se puede agregar como un comando normal.
+ Puede usar el servicio satelital para ejecutar sensores y comandos sin tener que iniciar sesión. No todos los tipos están disponibles, por ejemplo, el comando 'LaunchUrl' solo se puede agregar como un comando normal.
último valor conocido
@@ -2613,7 +2613,7 @@ Asegúrese de que no se esté ejecutando ninguna otra instancia de HASS.Agent y
Muestra una ventana con la URL proporcionada.
-Esto difiere del comando 'LaunchUrl' en que no carga un navegador completo, solo la URL provista en su propia ventana.
+Esto difiere del comando 'LaunchUrl' en que no carga un navegador completo, solo la URL provista en su propia ventana.
Puede usar esto para, por ejemplo, mostrar rápidamente el panel de Home Assistant.
@@ -2627,10 +2627,10 @@ De forma predeterminada, almacena cookies de forma indefinida, por lo que solo t
Si la aplicación está minimizada, se restaurará.
-Ejemplo: si desea enviar VLC al primer plano, use 'vlc'.
+Ejemplo: si desea enviar VLC al primer plano, use 'vlc'.
- Si no configura el comando, solo puede usar esta entidad con un valor de 'acción' a través de Home Assistant y se mostrará con la configuración predeterminada. Ejecutarlo como está no hará nada.
+ Si no configura el comando, solo puede usar esta entidad con un valor de 'acción' a través de Home Assistant y se mostrará con la configuración predeterminada. Ejecutarlo como está no hará nada.
¿Estás seguro de que quieres esto?
@@ -2764,10 +2764,10 @@ Nota: esto no es necesario para que la nueva integración funcione. Sólo actív
Icono de bandeja
- Se sabe que su idioma de entrada '{0}' colisiona con la tecla de acceso directo predeterminada CTRL-ALT-Q. Establezca el suyo propio.
+ Se sabe que su idioma de entrada '{0}' colisiona con la tecla de acceso directo predeterminada CTRL-ALT-Q. Establezca el suyo propio.
- Su idioma de entrada '{0}' es desconocido y podría colisionar con la tecla de acceso directo predeterminada CTRL-ALT-Q. Por favor verifique para estar seguro. Si es así, considere abrir un ticket en GitHub para que pueda agregarse a la lista.
+ Su idioma de entrada '{0}' es desconocido y podría colisionar con la tecla de acceso directo predeterminada CTRL-ALT-Q. Por favor verifique para estar seguro. Si es así, considere abrir un ticket en GitHub para que pueda agregarse a la lista.
no se encontraron llaves
@@ -2779,7 +2779,7 @@ Nota: esto no es necesario para que la nueva integración funcione. Sólo actív
error al analizar las claves, verifique el registro para obtener más información
- el número de corchetes '[' no corresponde a los ']' ({0} a {1})
+ el número de corchetes '[' no corresponde a los ']' ({0} a {1})
Documentación
@@ -2881,7 +2881,7 @@ El nombre final es: {0}
Talla
- consejo: presione 'esc' para cerrar una vista web
+ consejo: presione 'esc' para cerrar una vista web
&URL
@@ -2988,7 +2988,7 @@ Nota: deshabilitó el saneamiento, así que asegúrese de que Home Assistant ace
Comando
- Si no introduce un valor de volumen, sólo podrá usar esta entidad con un valor de "acción" a través del Asistente de Inicio. Ejecutarlo tal cual no hará nada.
+ Si no introduce un valor de volumen, sólo podrá usar esta entidad con un valor de "acción" a través del Asistente de Inicio. Ejecutarlo tal cual no hará nada.
¿Está seguro de que quiere esto?
@@ -3006,7 +3006,7 @@ Debería contener tres secciones (separadas por dos puntos).
¿Está seguro de que quiere usarlo así?
- Su URI no parece correcta. Debería ser algo como 'http://homeassistant.local:8123' o 'http://192.168.0.1:8123'.
+ Su URI no parece correcta. Debería ser algo como 'http://homeassistant.local:8123' o 'http://192.168.0.1:8123'.
¿Está seguro de que quiere usarlo así?
@@ -3034,7 +3034,7 @@ Debería contener tres secciones (separadas por dos puntos).
Asegúrese primero de tenerlo en funcionamiento.
- Si quiere gestionar el servicio (añadir comandos y sensores, cambiar la configuración) puede hacerlo aquí, o usando el botón "servicio de satélite" en la ventana principal.
+ Si quiere gestionar el servicio (añadir comandos y sensores, cambiar la configuración) puede hacerlo aquí, o usando el botón "servicio de satélite" en la ventana principal.
mostrar el menú predeterminado al hacer clic con el botón izquierdo del ratón
@@ -3046,12 +3046,12 @@ Debería contener tres secciones (separadas por dos puntos).
¿Está seguro de que quiere usarlo así?
- Su URI del Asistente de Inicio no se ve bien. Debería ser algo como 'http://homeassistant.local:8123' o 'https://192.168.0.1:8123'.
+ Su URI del Asistente de Inicio no se ve bien. Debería ser algo como 'http://homeassistant.local:8123' o 'https://192.168.0.1:8123'.
¿Está seguro de que quiere usarlo así?
- Su URI del broker MQTT no parece correcta. Debería ser algo como 'homeassistant.local' o '192.168.0.1'.
+ Su URI del broker MQTT no parece correcta. Debería ser algo como 'homeassistant.local' o '192.168.0.1'.
¿Está seguro de que quiere usarlo así?
@@ -3084,7 +3084,7 @@ Debería contener tres secciones (separadas por dos puntos).
¿Está seguro de que quiere usarlo así?
- Su URI no parece correcto. Debería ser algo como 'http://homeassistant.local:8123' o 'http://192.168.0.1:8123'.
+ Su URI no parece correcto. Debería ser algo como 'http://homeassistant.local:8123' o 'http://192.168.0.1:8123'.
¿Está seguro de que quiere usarlo así?
@@ -3123,7 +3123,7 @@ Sólo muestra los dispositivos que fueron vistos desde el último informe, es de
Asegúrese de que los servicios de localización de Windows están activados.
-Dependiendo de su versión de Windows, esto se puede encontrar en el nuevo panel de control -> 'privacidad y seguridad' -> 'ubicación'.
+Dependiendo de su versión de Windows, esto se puede encontrar en el nuevo panel de control -> 'privacidad y seguridad' -> 'ubicación'.
Proporciona el nombre del proceso que está usando actualmente el micrófono.
@@ -3219,4 +3219,13 @@ Oculta, Maximizada, Minimizada, Normal y Desconocida.
domain
+
+ Comando de radio
+
+
+ CambiarEscritorio
+
+
+ EscritorioActivo
+
\ No newline at end of file
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.fr.resx b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.fr.resx
index 3d41353d..f78ca843 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.fr.resx
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.fr.resx
@@ -124,24 +124,24 @@
Nom du navigateur
- Par défaut, HASS.Agent lancera les URL à l'aide de votre navigateur par défaut. Si vous le souhaitez, vous pouvez également configurer un navigateur spécifique. De plus, vous pouvez configurer les arguments utilisés pour lancer
+ Par défaut, HASS.Agent lancera les URL à l'aide de votre navigateur par défaut. Si vous le souhaitez, vous pouvez également configurer un navigateur spécifique. De plus, vous pouvez configurer les arguments utilisés pour lancer
en mode privé.
Exécutable du navigateur
- Lancer avec l'argument incognito
+ Lancer avec l'argument incognito
- Binaire de l'exécuteur personnalisé
+ Binaire de l'exécuteur personnalisé
Vous pouvez configurer HASS.Agent pour utiliser un exécuteur spécifique, comme perl ou python.
-Utilisez la commande 'exécuteur personnalisé' pour lancer cet exécuteur.
+Utilisez la commande 'exécuteur personnalisé' pour lancer cet exécuteur.
- Nom de l'exécuteur personnalisé
+ Nom de l'exécuteur personnalisé
Conseil : double-cliquez pour parcourir
@@ -150,7 +150,7 @@ Utilisez la commande 'exécuteur personnalisé' pour lancer cet exécu
&test
- HASS.Agent attendra un moment avant de vous avertir des déconnexions de MQTT ou de l'API HA.
+ HASS.Agent attendra un moment avant de vous avertir des déconnexions de MQTT ou de l'API HA.
Vous pouvez définir le nombre de secondes ici.
@@ -160,18 +160,18 @@ Vous pouvez définir le nombre de secondes ici.
Délai avant déconnection
- Important : si vous modifiez cette valeur, HASS.Agent dépubliera tous vos capteurs et commandes et forcera un redémarrage de lui-même, afin qu'ils puissent être republiés sous le nouveau nom de l'appareil.
+ Important : si vous modifiez cette valeur, HASS.Agent dépubliera tous vos capteurs et commandes et forcera un redémarrage de lui-même, afin qu'ils puissent être republiés sous le nouveau nom de l'appareil.
Vos automatisations et scripts continueront de fonctionner.
- Le nom de l'appareil est utilisé pour identifier votre machine sur HA.
+ Le nom de l'appareil est utilisé pour identifier votre machine sur HA.
Il est également utilisé comme préfixe pour vos noms de commande/capteur (peut être modifié par entité).
Cette page contient les paramètres généraux. Plus de paramètres dans les onglets sur la gauche.
- Nom de l'appareil
+ Nom de l'appareil
Conseil : double-cliquez sur ce champ pour parcourir
@@ -186,11 +186,11 @@ Il est également utilisé comme préfixe pour vos noms de commande/capteur (peu
Tester la connexion
- Pour connaître les entités que vous avez configurées et envoyer des actions rapides, HASS.Agent utilise l'API de Home Assistant.
+ Pour connaître les entités que vous avez configurées et envoyer des actions rapides, HASS.Agent utilise l'API de Home Assistant.
-Veuillez fournir un jeton d'accès de longue durée et l'adresse de votre instance Home Assistant.
+Veuillez fournir un jeton d'accès de longue durée et l'adresse de votre instance Home Assistant.
-Vous pouvez obtenir un jeton via votre page de profil. Faites défiler vers le bas et cliquez sur "CRÉER UN JETON".
+Vous pouvez obtenir un jeton via votre page de profil. Faites défiler vers le bas et cliquez sur "CRÉER UN JETON".
Fuzzy
@@ -203,7 +203,7 @@ Vous pouvez obtenir un jeton via votre page de profil. Faites défiler vers le b
Effacer
- Un moyen simple d'afficher vos actions rapides consiste à utiliser un raccourci clavier global.
+ Un moyen simple d'afficher vos actions rapides consiste à utiliser un raccourci clavier global.
De cette façon, quoi que vous fassiez sur votre machine, vous pouvez toujours interagir avec Home Assistant.
@@ -214,24 +214,24 @@ De cette façon, quoi que vous fassiez sur votre machine, vous pouvez toujours i
Combinaison du raccourcis clavier
- Effacer le cache d'image
+ Effacer le cache d'image
Ouvrir le dossier
- Emplacement du cache d'images
+ Emplacement du cache d'images
Jours
Les images affichées dans les notifications doivent être temporairement stockées localement. Vous pouvez configurer le nombre de
-jours de conservation avant que HASS.Agent ne les supprimes. Entrez '0' pour les conserver en permanence.
+jours de conservation avant que HASS.Agent ne les supprimes. Entrez '0' pour les conserver en permanence.
Fuzzy
- Les logs étendus fournit un log plus détaillée et plus approfondie, au cas où celle par défaut ne serait pas suffisante. Veuillez noter que l'activation de cette option peut entraîner une augmentation de la taille des fichiers journaux et doit être utilisé seulement lorsque vous soupçonnez que quelque chose ne va pas avec HASS.Agent lui-même ou lorsque demandé par le développeurs.
+ Les logs étendus fournit un log plus détaillée et plus approfondie, au cas où celle par défaut ne serait pas suffisante. Veuillez noter que l'activation de cette option peut entraîner une augmentation de la taille des fichiers journaux et doit être utilisé seulement lorsque vous soupçonnez que quelque chose ne va pas avec HASS.Agent lui-même ou lorsque demandé par le développeurs.
Fuzzy
@@ -259,11 +259,11 @@ jours de conservation avant que HASS.Agent ne les supprimes. Entrez '0&apos
Effacer les paramètres
- (Laisser vide si vous n'êtes pas sûr)
+ (Laisser vide si vous n'êtes pas sûr)
- Les commandes et les capteurs sont envoyés via MQTT. Veuillez fournir les informations d'identification de votre serveur. Si
-vous utilisez l'addon HA, vous pouvez probablement utiliser l'adresse prédéfinie.
+ Les commandes et les capteurs sont envoyés via MQTT. Veuillez fournir les informations d'identification de votre serveur. Si
+vous utilisez l'addon HA, vous pouvez probablement utiliser l'adresse prédéfinie.
Fuzzy
@@ -279,7 +279,7 @@ vous utilisez l'addon HA, vous pouvez probablement utiliser l'adresse
Port
- IP ou nom d'hôte du broker
+ IP ou nom d'hôte du broker
(Laisser vide pour aléatoire)
@@ -288,9 +288,9 @@ vous utilisez l'addon HA, vous pouvez probablement utiliser l'adresse
ID du client
- Si quelque chose ne fonctionne pas, assurez-vous d'avoir suivi ces étapes :
+ Si quelque chose ne fonctionne pas, assurez-vous d'avoir suivi ces étapes :
-- Installer l'intégration HASS.Agent-Notifier
+- Installer l'intégration HASS.Agent-Notifier
- Redémarrez Home Assistant
- Configurer une entité de notification
- Redémarrez Home Assistant
@@ -320,7 +320,7 @@ vous utilisez l'addon HA, vous pouvez probablement utiliser l'adresse
Le Service Windows vous permet de lancer capteurs et commandes même sans utilisateur connecté.
-Utiliser le bouton 'Service Windows' sur la fenêtre principale pour le gérer.
+Utiliser le bouton 'Service Windows' sur la fenêtre principale pour le gérer.
Statuts du service
@@ -346,11 +346,11 @@ Utiliser le bouton 'Service Windows' sur la fenêtre principale pour l
Si vous ne le configurez pas, il ne fera rien. Cependant, vous pouvez le désactiver quand même.
-L'installateur laissera le service désactivé seul (si vous désinstallez le service, l'installateur le réinstallera).
+L'installateur laissera le service désactivé seul (si vous désinstallez le service, l'installateur le réinstallera).
Fuzzy
- Vous pouvez essayer de réinstaller le service s'il ne fonctionne pas correctement.
+ Vous pouvez essayer de réinstaller le service s'il ne fonctionne pas correctement.
Vos paramètres et vos entités ne seront pas supprimées.
@@ -358,7 +358,7 @@ Vos paramètres et vos entités ne seront pas supprimées.
Fuzzy
- Si le service continue d'échouer après réinstallation,
+ Si le service continue d'échouer après réinstallation,
veuillez ouvrir un ticket et envoyer le contenu du dernier journal.
@@ -367,7 +367,7 @@ veuillez ouvrir un ticket et envoyer le contenu du dernier journal.
HASS.Agent étant basé sur un utilisateur, si vous voulez le lancer pour un autre utilisateur, installez et configurez HASS.Agent sur celui-ci.
- Activer le démarrage à l'ouverture de session
+ Activer le démarrage à l'ouverture de session
Statut du démarrage auto :
@@ -377,8 +377,8 @@ HASS.Agent étant basé sur un utilisateur, si vous voulez le lancer pour un aut
Fuzzy
- Lorsqu'il y a une mise à jour, HASS.Agent vous proposera l'option d'ouvrir la page de version.
-Mais si vous voulez HASS.Agent peut également télécharger et lancer l'installateur pour vous - encore moins de choses à faire !
+ Lorsqu'il y a une mise à jour, HASS.Agent vous proposera l'option d'ouvrir la page de version.
+Mais si vous voulez HASS.Agent peut également télécharger et lancer l'installateur pour vous - encore moins de choses à faire !
Le fichier de certificat de téléchargement sera vérifié avant exécution.
Fuzzy
@@ -389,24 +389,24 @@ Le fichier de certificat de téléchargement sera vérifié avant exécution.
Si vous le souhaitez, HASS.Agent peut vérifier les mises à jour en arrière-plan.
-Vous recevrez une notification (une fois par mise à jour), vous informant qu'une nouvelle version est prête à être installée.
+Vous recevrez une notification (une fois par mise à jour), vous informant qu'une nouvelle version est prête à être installée.
- Me notifier lors de la présence d'une nouvelle version
+ Me notifier lors de la présence d'une nouvelle version
Fuzzy
Il semble que ce soit la première fois que vous lanciez HASS.Agent.
Pour vous aider lors de la première configuration, suivez les étapes de configuration ci-dessous
-ou bien, cliquez sur 'Fermer'.
+ou bien, cliquez sur 'Fermer'.
- Le nom de l'appareil est utilisé pour identifier votre machine sur HA.
+ Le nom de l'appareil est utilisé pour identifier votre machine sur HA.
Il est également utilisé comme préfixe suggéré pour vos commandes et capteurs.
- Nom de l'appareil
+ Nom de l'appareil
Fuzzy
@@ -418,10 +418,10 @@ Il est également utilisé comme préfixe suggéré pour vos commandes et capteu
Vous pouvez toujours supprimer (ou recréer) cette clé via la fenêtre de Paramètres.
- Une seconde, détermination de l'état actuel ..
+ Une seconde, détermination de l'état actuel ..
- Remarque : 5115 est le port par défaut, ne le modifiez que si vous l'avez modifié dans Home Assistant.
+ Remarque : 5115 est le port par défaut, ne le modifiez que si vous l'avez modifié dans Home Assistant.
Oui, accepter les notifications sur le port
@@ -435,17 +435,17 @@ Voulez-vous activer cette fonction ?
Page GitHub HASS.Agent-Notifier
- Assurez-vous d'avoir suivi ces étapes :
+ Assurez-vous d'avoir suivi ces étapes :
-- Installer l'intégration HASS.Agent-Notifier
+- Installer l'intégration HASS.Agent-Notifier
- Redémarrez Home Assistant
- Configurer une entité de notification
- Redémarrez Home Assistant
- Pour utiliser les notifications, vous devez installer et configurer l'intégration HASS.Agent-notifier dans Home Assistant.
+ Pour utiliser les notifications, vous devez installer et configurer l'intégration HASS.Agent-notifier dans Home Assistant.
-C'est très facile avec HACS, mais vous pouvez également l'installer manuellement. Visitez le lien ci-dessous pour plus
+C'est très facile avec HACS, mais vous pouvez également l'installer manuellement. Visitez le lien ci-dessous pour plus
informations.
@@ -459,8 +459,8 @@ informations.
Pour connaître les entités que vous avez configurées et envoyer des actions rapides, HASS.Agent utilise
API de Home Assistant.
-Veuillez fournir un jeton d'accès de longue durée et l'adresse de votre instance Home Assistant.
-Vous pouvez obtenir un jeton via votre page de profil. Faites défiler vers le bas et cliquez sur "CRÉER UN JETON".
+Veuillez fournir un jeton d'accès de longue durée et l'adresse de votre instance Home Assistant.
+Vous pouvez obtenir un jeton via votre page de profil. Faites défiler vers le bas et cliquez sur "CRÉER UN JETON".
Fuzzy
@@ -474,26 +474,26 @@ Vous pouvez obtenir un jeton via votre page de profil. Faites défiler vers le b
Mot de passe
- Nom d'utilisateur
+ Nom d'utilisateur
Port
- IP ou nom d'hôte
+ IP ou nom d'hôte
- Les commandes et les capteurs sont envoyés via MQTT. Veuillez fournir les informations d'identification de votre serveur.
-Si vous utilisez l'addon HA, vous pouvez probablement utiliser l'adresse prédéfinie.
+ Les commandes et les capteurs sont envoyés via MQTT. Veuillez fournir les informations d'identification de votre serveur.
+Si vous utilisez l'addon HA, vous pouvez probablement utiliser l'adresse prédéfinie.
-Laissez vide si vous n'utilisez pas de commandes et de capteurs.
+Laissez vide si vous n'utilisez pas de commandes et de capteurs.
Fuzzy
Préfixe de découverte
- (laisser par défaut si vous n'êtes pas sûr)
+ (laisser par défaut si vous n'êtes pas sûr)
Astuce : des paramètres spécialisés peuvent être trouvés dans la fenêtre Paramètres.
@@ -502,7 +502,7 @@ Laissez vide si vous n'utilisez pas de commandes et de capteurs.
Combinaison de touches
- Un moyen simple d'afficher vos actions rapides consiste à utiliser un raccourci clavier global.
+ Un moyen simple d'afficher vos actions rapides consiste à utiliser un raccourci clavier global.
De cette façon, quoi que vous fassiez sur votre machine, vous pouvez toujours interagir avec Home Assistant.
@@ -512,7 +512,7 @@ De cette façon, quoi que vous fassiez sur votre machine, vous pouvez toujours i
Si vous le souhaitez, HASS.Agent peut vérifier les mises à jour en arrière-plan.
-Vous recevrez une notification (une fois par mise à jour) , vous informant qu'une nouvelle version est prête à être installée.
+Vous recevrez une notification (une fois par mise à jour) , vous informant qu'une nouvelle version est prête à être installée.
Voulez-vous activer cette fonctionnalité ?
Fuzzy
@@ -521,23 +521,23 @@ Voulez-vous activer cette fonctionnalité ?
Oui, informez moi des nouvelles mises à jour
- Oui, téléchargez et lancez l'installation pour moi
+ Oui, téléchargez et lancez l'installation pour moi
- Lorsqu'il y a une mise à jour, HASS.Agent offre la possibilité d'ouvrir la page de publication. Mais si vous
-voulez, HASS.Agent peut également télécharger et lancer le programme d'installation pour vous - encore moins à faire !
+ Lorsqu'il y a une mise à jour, HASS.Agent offre la possibilité d'ouvrir la page de publication. Mais si vous
+voulez, HASS.Agent peut également télécharger et lancer le programme d'installation pour vous - encore moins à faire !
-Le certificat du fichier téléchargé sera vérifié. Vous verrez toujours une page avec les notes de version, et vous devrez toujours approuver manuellement - rien n'est fait sans votre consentement.
+Le certificat du fichier téléchargé sera vérifié. Vous verrez toujours une page avec les notes de version, et vous devrez toujours approuver manuellement - rien n'est fait sans votre consentement.
Fuzzy
Page GitHub HASS.Agent
- Astuce : il y a beaucoup plus à tripatouiller, alors assurez-vous de jeter un coup d'œil à la fenêtre de Paramètres !
+ Astuce : il y a beaucoup plus à tripatouiller, alors assurez-vous de jeter un coup d'œil à la fenêtre de Paramètres !
-Merci d'utiliser HASS.Agent, j'espère que cela vous sera utile :-)
+Merci d'utiliser HASS.Agent, j'espère que cela vous sera utile :-)
Fuzzy
@@ -583,7 +583,7 @@ Merci d'utiliser HASS.Agent, j'espère que cela vous sera utile :-)Se connectez au service
- Connexion avec le Service Windows, un instant s'il vous plaît ..
+ Connexion avec le Service Windows, un instant s'il vous plaît ..
Récupérer les paramètres
@@ -596,7 +596,7 @@ Merci d'utiliser HASS.Agent, j'espère que cela vous sera utile :-)Fuzzy
- Nom de l'appareil
+ Nom de l'appareil
Astuce : double-cliquez pour parcourir
@@ -650,11 +650,11 @@ Merci d'utiliser HASS.Agent, j'espère que cela vous sera utile :-)Effacer les paramètres
- (laisser par défaut si vous n'êtes pas sûr)
+ (laisser par défaut si vous n'êtes pas sûr)
- Les commandes et les capteurs sont envoyés via MQTT. Veuillez fournir les informations d'identification de votre serveur. Si vous utilisez l'addon HA,
-vous pouvez probablement utiliser l'adresse prédéfinie.
+ Les commandes et les capteurs sont envoyés via MQTT. Veuillez fournir les informations d'identification de votre serveur. Si vous utilisez l'addon HA,
+vous pouvez probablement utiliser l'adresse prédéfinie.
Préfixe de découverte
@@ -663,13 +663,13 @@ vous pouvez probablement utiliser l'adresse prédéfinie.
Mot de passe
- Nom d'utilisateur
+ Nom d'utilisateur
Port
- Adresse IP ou nom d'hôte du broker
+ Adresse IP ou nom d'hôte du broker
Envoyer et activer la configuration
@@ -738,7 +738,7 @@ vous pouvez probablement utiliser l'adresse prédéfinie.
Veuillez patienter un peu pendant que HASS.Agent redémarre ..
- En attente de la fermeture de l'instance précédente
+ En attente de la fermeture de l'instance précédente
Relancer HASS.Agent
@@ -771,7 +771,7 @@ vous pouvez probablement utiliser l'adresse prédéfinie.
Fermer
- Voici le topic MQTT sur lequel vous pouvez publier des commandes d'action :
+ Voici le topic MQTT sur lequel vous pouvez publier des commandes d'action :
Copier dans le presse papier
@@ -780,7 +780,7 @@ vous pouvez probablement utiliser l'adresse prédéfinie.
Aide et exemples
- Topic d'Action MQTT
+ Topic d'Action MQTT
Supprimer
@@ -823,10 +823,10 @@ vous pouvez probablement utiliser l'adresse prédéfinie.
Description
- Exécuter en 'faible intégrité'
+ Exécuter en 'faible intégrité'
- Qu'est ce que c'est ?
+ Qu'est ce que c'est ?
type
@@ -844,10 +844,10 @@ vous pouvez probablement utiliser l'adresse prédéfinie.
hass.agent seulement !
- Type d'entité
+ Type d'entité
- Afficher le topic d'action MQTT
+ Afficher le topic d'action MQTT
Action
@@ -899,7 +899,7 @@ vous pouvez probablement utiliser l'adresse prédéfinie.
Configuration des actions rapides
- Enregistrer l'action rapide
+ Enregistrer l'action rapide
Domaine
@@ -924,7 +924,7 @@ vous pouvez probablement utiliser l'adresse prédéfinie.
Combinaison de raccourcis
- (optionnel, sera utilisé à la place du nom de l'entité)
+ (optionnel, sera utilisé à la place du nom de l'entité)
Action Rapide
@@ -1027,11 +1027,11 @@ vous pouvez probablement utiliser l'adresse prédéfinie.
composants utilisés pour leurs licences individuelles :
- Un grand 'merci' aux développeurs de ces projets, qui ont eu la gentillesse de partager
-leurs travails acharnés avec le reste d'entre nous, simples mortels.
+ Un grand 'merci' aux développeurs de ces projets, qui ont eu la gentillesse de partager
+leurs travails acharnés avec le reste d'entre nous, simples mortels.
- Et bien sûr; merci à Paulus Shoutsen et à toute l'équipe de développeurs qui
+ Et bien sûr; merci à Paulus Shoutsen et à toute l'équipe de développeurs qui
ont créé et maintiennent Home Assistant :-)
@@ -1050,7 +1050,7 @@ ont créé et maintiennent Home Assistant :-)
Outils Externes
- API d'Home Assistant
+ API d'Home Assistant
Raccourcis
@@ -1111,7 +1111,7 @@ ont créé et maintiennent Home Assistant :-)
fermer
- Vous êtes bloqué lors de l'utilisation de HASS.Agent, vous avez besoin d'aide pour intégrer les capteurs/commandes ou vous avez une idée géniale pour la prochaine version ?
+ Vous êtes bloqué lors de l'utilisation de HASS.Agent, vous avez besoin d'aide pour intégrer les capteurs/commandes ou vous avez une idée géniale pour la prochaine version ?
Il existe plusieurs canaux par lesquels vous pouvez nous joindre :
@@ -1125,13 +1125,13 @@ Il existe plusieurs canaux par lesquels vous pouvez nous joindre :
tickets GitHub
- Un peu de tout, avec en plus l'aide d'autres utilisateurs HA.
+ Un peu de tout, avec en plus l'aide d'autres utilisateurs HA.
Signaler des bugs, demande de fonctionnalités, idées, astuces, ..
- Obtenir de l'aide sur le paramétrage et l'utilisation de HASS.Agent, signaler des problèmes ou juste parler de différents sujets.
+ Obtenir de l'aide sur le paramétrage et l'utilisation de HASS.Agent, signaler des problèmes ou juste parler de différents sujets.
Documentation et exemples.
@@ -1214,7 +1214,7 @@ Il existe plusieurs canaux par lesquels vous pouvez nous joindre :
Actions rapides :
- API d'home assistant :
+ API d'home assistant :
API de notification :
@@ -1235,7 +1235,7 @@ Il existe plusieurs canaux par lesquels vous pouvez nous joindre :
HASS.Agent Onboarding
- une seconde, collecte d'infos ..
+ une seconde, collecte d'infos ..
Il y a une nouvelle version disponible :
@@ -1250,19 +1250,19 @@ Il existe plusieurs canaux par lesquels vous pouvez nous joindre :
page des mises à jour
- Mise à jour d'HASS.Agent
+ Mise à jour d'HASS.Agent
Exécutez une commande personnalisée.
-Ces commandes s'exécutent sans droits spéciaux. Pour exécuter en temps qu'administrateur, créez une tâche planifiée et utilisez la ligne de commande 'schtasks /Run /TN "TaskName"' exécuter votre tâche.
+Ces commandes s'exécutent sans droits spéciaux. Pour exécuter en temps qu'administrateur, créez une tâche planifiée et utilisez la ligne de commande 'schtasks /Run /TN "TaskName"' exécuter votre tâche.
-Ou utilisez 'Exécuter avec une faible intégrité' pour une exécution encore plus stricte.
+Ou utilisez 'Exécuter avec une faible intégrité' pour une exécution encore plus stricte.
Lancer la commande via le programme personnalisé défini (dans Paramètres -> Outils Externes).
-Votre commande est passée en tant qu'argument 'tel quel', vous devez donc fournir vos propres guillemets, etc. si nécessaire.
+Votre commande est passée en tant qu'argument 'tel quel', vous devez donc fournir vos propres guillemets, etc. si nécessaire.
Mettre Windows en veille prolongée
@@ -1270,16 +1270,16 @@ Votre commande est passée en tant qu'argument 'tel quel', vous d
Simule un appui sur une touche de clavier.
-Cliquez sur la zone de texte "Code de touche" et appuyez sur la touche que vous souhaitez simuler. Le code touche correspondant sera saisi pour vous.
+Cliquez sur la zone de texte "Code de touche" et appuyez sur la touche que vous souhaitez simuler. Le code touche correspondant sera saisi pour vous.
-Si vous avez besoin de plus de touches et/ou de combinaison tel que CTRL, utilisez la commande "Séries de touche et combinaisons".
+Si vous avez besoin de plus de touches et/ou de combinaison tel que CTRL, utilisez la commande "Séries de touche et combinaisons".
- Ouvre l'URL fournie, par défaut dans votre navigateur par défaut.
+ Ouvre l'URL fournie, par défaut dans votre navigateur par défaut.
-Pour utiliser le mode 'incognito', fournissez un navigateur spécifique dans Paramètres -> Outils externes.
+Pour utiliser le mode 'incognito', fournissez un navigateur spécifique dans Paramètres -> Outils externes.
-Si vous voulez juste une fenêtre avec une URL spécifique (pas le navigateur entier), utilisez une commande 'WebView'.
+Si vous voulez juste une fenêtre avec une URL spécifique (pas le navigateur entier), utilisez une commande 'WebView'.
Verrouiller la session.
@@ -1288,27 +1288,27 @@ Si vous voulez juste une fenêtre avec une URL spécifique (pas le navigateur en
Se déconnecter de la session.
- Simuler la touche 'mute'
+ Simuler la touche 'mute'
- Simuler la touche 'Media suivant'.
+ Simuler la touche 'Media suivant'.
- Simuler la touche 'lecture/pause du media'.
+ Simuler la touche 'lecture/pause du media'.
- Simuler la touche 'Media précédent'.
+ Simuler la touche 'Media précédent'.
- Simuler la touche 'Baisser le volume'.
+ Simuler la touche 'Baisser le volume'.
- Simuler la touche 'Augmenter le volume'.
+ Simuler la touche 'Augmenter le volume'.
- Simule l'appui de plusieurs touches.
+ Simule l'appui de plusieurs touches.
-Vous devez encadrer chaque touche ou combinaison de touches par des crochets [ ], sinon HASS.Agent ne peut pas les distinguer. Supposons que vous souhaitiez appuyer sur X, TAB, Y, et SHIFT-Z, ça s'écrirai [X] [{TAB}] [Y] [+Z].
+Vous devez encadrer chaque touche ou combinaison de touches par des crochets [ ], sinon HASS.Agent ne peut pas les distinguer. Supposons que vous souhaitiez appuyer sur X, TAB, Y, et SHIFT-Z, ça s'écrirai [X] [{TAB}] [Y] [+Z].
Il y a quelques astuces que vous pouvez utiliser :
@@ -1320,12 +1320,12 @@ Il y a quelques astuces que vous pouvez utiliser :
- Pour plusieurs appuis, utilisez {z 15}, ce qui signifie que Z sera appuyé 15 fois.
-Plus d'informations : https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.sendkeys
+Plus d'informations : https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.sendkeys
Exécutez une commande ou un script Powershell.
-Vous pouvez soit fournir l'emplacement d'un script (*.ps1), soit une seule ligne de commande.
+Vous pouvez soit fournir l'emplacement d'un script (*.ps1), soit une seule ligne de commande.
Cela fonctionnera sans droits particuliers.
@@ -1337,44 +1337,44 @@ Utile par exemple si vous souhaitez forcer HASS.Agent à mettre à jour tous vos
Redémarre la machine après une minute.
-Astuce : déclenché accidentellement ? Exécutez la commande 'shutdown /a' pour annuler.
+Astuce : déclenché accidentellement ? Exécutez la commande 'shutdown /a' pour annuler.
Arrête la machine après une minute.
-Astuce : déclenché accidentellement ? Exécutez 'shutdown /a' pour annuler.
+Astuce : déclenché accidentellement ? Exécutez 'shutdown /a' pour annuler.
Met la machine en veille.
-Remarque : en raison d'une limitation de Windows, cela ne fonctionne que si la veille prolongée est désactivée, sinon il se mettra en veille prolongée.
+Remarque : en raison d'une limitation de Windows, cela ne fonctionne que si la veille prolongée est désactivée, sinon il se mettra en veille prolongée.
Vous pouvez utiliser un outil tel que NirCmd (http://www.nirsoft.net/utils/nircmd.html) pour contourner le problème.
- Veuillez saisir l'emplacement de l'exécutable de votre navigateur (fichier .exe).
+ Veuillez saisir l'emplacement de l'exécutable de votre navigateur (fichier .exe).
- L'exécutable fourni est introuvable.
+ L'exécutable fourni est introuvable.
- Vous n'avez indiqué aucun argument de navigation privée, le navigateur se lancera donc probablement normalement.
+ Vous n'avez indiqué aucun argument de navigation privée, le navigateur se lancera donc probablement normalement.
Voulez-vous continuer?
- Une erreur s'est produite lors du lancement de votre navigateur en mode navigation privée.
+ Une erreur s'est produite lors du lancement de votre navigateur en mode navigation privée.
-Consultez les journaux pour plus d'informations.
+Consultez les journaux pour plus d'informations.
- Merci d'entrer une clef d'API valide.
+ Merci d'entrer une clef d'API valide.
- Merci d'entrer d'adresse de votre Home Assistant.
+ Merci d'entrer d'adresse de votre Home Assistant.
- Impossible de se connecter, l'erreur suivante a été renvoyée :
+ Impossible de se connecter, l'erreur suivante a été renvoyée :
{0}
@@ -1393,7 +1393,7 @@ Version de Home Assistant : {0}
Les notifications sont toujours désactivées. Veuillez les activer, redémarrer HASS.Agent et réessayer.
- La notification doit être apparue. Si ce n'est pas le cas, consultez les journaux ou lisez la documentation pour obtenir des conseils de dépannage.
+ La notification doit être apparue. Si ce n'est pas le cas, consultez les journaux ou lisez la documentation pour obtenir des conseils de dépannage.
Remarque : cela ne teste que localement si les notifications peuvent être affichées !
@@ -1401,14 +1401,14 @@ Remarque : cela ne teste que localement si les notifications peuvent être affic
Ceci est une notification de test.
- en cours d'exécution, veuillez patienter ..
+ en cours d'exécution, veuillez patienter ..
- Quelque chose s'est mal passé !
+ Quelque chose s'est mal passé !
Veuillez exécuter manuellement la commande. Elle a été copiée dans votre presse-papiers, il vous suffit de le coller dans une invite de commande avec droits administrateurs.
-N'oubliez pas de modifier également les règles de port du pare-feu.
+N'oubliez pas de modifier également les règles de port du pare-feu.
Non installé
@@ -1426,44 +1426,44 @@ N'oubliez pas de modifier également les règles de port du pare-feu.Echoué
- Une erreur s'est produite lors de la tentative d'arrêt du service. Avez-vous autorisé l'invite UAC ?
+ Une erreur s'est produite lors de la tentative d'arrêt du service. Avez-vous autorisé l'invite UAC ?
-Consultez les journaux HASS.Agent (pas le service) pour plus d'informations.
+Consultez les journaux HASS.Agent (pas le service) pour plus d'informations.
- Le service est défini sur 'désactivé', il ne peut donc pas être démarré.
+ Le service est défini sur 'désactivé', il ne peut donc pas être démarré.
-Veuillez d'abord activer le service, puis réessayer.
+Veuillez d'abord activer le service, puis réessayer.
- Une erreur s'est produite lors de la tentative de démarrage du service. Avez-vous autorisé l'invite UAC ?
+ Une erreur s'est produite lors de la tentative de démarrage du service. Avez-vous autorisé l'invite UAC ?
-Consultez les journaux HASS.Agent (pas le service) pour plus d'informations.
+Consultez les journaux HASS.Agent (pas le service) pour plus d'informations.
- Une erreur s'est produite lors de la tentative de désactivation du service. Avez-vous autorisé l'invite UAC ?
+ Une erreur s'est produite lors de la tentative de désactivation du service. Avez-vous autorisé l'invite UAC ?
-Consultez les journaux HASS.Agent (pas le service) pour plus d'informations.
+Consultez les journaux HASS.Agent (pas le service) pour plus d'informations.
- Une erreur s'est produite lors de la tentative d'activation du service. Avez-vous autorisé l'invite UAC ?
+ Une erreur s'est produite lors de la tentative d'activation du service. Avez-vous autorisé l'invite UAC ?
-Consultez les journaux HASS.Agent (pas le service) pour plus d'informations.
+Consultez les journaux HASS.Agent (pas le service) pour plus d'informations.
- Une erreur s'est produite lors de la tentative de réinstallation du service. Avez-vous autorisé l'invite UAC ?
+ Une erreur s'est produite lors de la tentative de réinstallation du service. Avez-vous autorisé l'invite UAC ?
-Consultez les journaux HASS.Agent (pas le service) pour plus d'informations.
+Consultez les journaux HASS.Agent (pas le service) pour plus d'informations.
- Une erreur s'est produite lors de la désactivation du démarrage à l'ouverture de session.
+ Une erreur s'est produite lors de la désactivation du démarrage à l'ouverture de session.
-Consultez les journaux pour plus d'informations.
+Consultez les journaux pour plus d'informations.
- Une erreur s'est produite lors de l'activation du démarrage à l'ouverture de session.
+ Une erreur s'est produite lors de l'activation du démarrage à l'ouverture de session.
-Consultez les journaux pour plus d'informations.
+Consultez les journaux pour plus d'informations.
Activé
@@ -1478,31 +1478,31 @@ Consultez les journaux pour plus d'informations.
Activer
- Démarrage à l'ouverture de session activé !
+ Démarrage à l'ouverture de session activé !
- Voulez-vous activer le lancement à l'ouverture de session maintenant ?
+ Voulez-vous activer le lancement à l'ouverture de session maintenant ?
- Le lancement à l'ouverture de session est activé !
+ Le lancement à l'ouverture de session est activé !
- Activation du lancement à l'ouverture de session, patientez ..
+ Activation du lancement à l'ouverture de session, patientez ..
- Une erreur s'est produite. Vous pouvez réessayer, ou passer à la page suivante et réessayer après le redémarrage de HASS.Agent.
+ Une erreur s'est produite. Vous pouvez réessayer, ou passer à la page suivante et réessayer après le redémarrage de HASS.Agent.
- Activer le lancement à l'ouverture de session
+ Activer le lancement à l'ouverture de session
Veuillez saisir une clé API valide.
- Veuillez saisir l'adresse de votre Home Assistant.
+ Veuillez saisir l'adresse de votre Home Assistant.
- Impossible de se connecter, l'erreur suivante a été renvoyée :
+ Impossible de se connecter, l'erreur suivante a été renvoyée :
{0}
@@ -1515,27 +1515,27 @@ Home Assistant version: {0}
test en cours ..
- Une erreur s'est produite lors de l'enregistrement des commandes, consultez les journaux pour plus d'informations.
+ Une erreur s'est produite lors de l'enregistrement des commandes, consultez les journaux pour plus d'informations.
Enregistrement et connexion, veuillez patienter ..
- Connexion avec le Service Windows, un instant s'il vous plaît ..
+ Connexion avec le Service Windows, un instant s'il vous plaît ..
La connexion au service a échoué
- Le service n'a pas été trouvé ! Vous pouvez l'installer et le gérer à partir du panneau de configuration.
+ Le service n'a pas été trouvé ! Vous pouvez l'installer et le gérer à partir du panneau de configuration.
-Lorsqu'il est opérationnel, revenez ici pour configurer les commandes et les capteurs.
+Lorsqu'il est opérationnel, revenez ici pour configurer les commandes et les capteurs.
La communication avec le service a échoué
- Impossible de communiquer avec le service. Consultez les journaux pour plus d'informations.
+ Impossible de communiquer avec le service. Consultez les journaux pour plus d'informations.
Vous pouvez ouvrir les journaux et gérer le service à partir de la fenêtre de paramètres.
@@ -1543,15 +1543,15 @@ Vous pouvez ouvrir les journaux et gérer le service à partir de la fenêtre de
Non autorisé
- Vous n'êtes pas autorisé à vous connecter au service.
+ Vous n'êtes pas autorisé à vous connecter au service.
-Si vous disposez d'un identifiant de connexion valide, vous pouvez le saisir maintenant et réessayer.
+Si vous disposez d'un identifiant de connexion valide, vous pouvez le saisir maintenant et réessayer.
La récupération des paramètres a échoué
- Le service a renvoyé une erreur lors de la récupération de ses paramètres. Consultez les journaux pour plus d'informations.
+ Le service a renvoyé une erreur lors de la récupération de ses paramètres. Consultez les journaux pour plus d'informations.
Vous pouvez ouvrir les journaux et gérer le service à partir de la fenêtre de paramètres.
@@ -1559,7 +1559,7 @@ Vous pouvez ouvrir les journaux et gérer le service à partir de la fenêtre de
La récupération des paramètres MQTT a échoué
- Le service a renvoyé une erreur lors de la récupération des paramètres MQTT. Consultez les journaux pour plus d'informations.
+ Le service a renvoyé une erreur lors de la récupération des paramètres MQTT. Consultez les journaux pour plus d'informations.
Vous pouvez ouvrir les journaux et gérer le service à partir de la fenêtre de paramètres.
@@ -1567,7 +1567,7 @@ Vous pouvez ouvrir les journaux et gérer le service à partir de la fenêtre de
La récupération des commandes configurées a échoué
- Le service a renvoyé une erreur lors de la récupération des commandes configurées. Consultez les journaux pour plus d'informations.
+ Le service a renvoyé une erreur lors de la récupération des commandes configurées. Consultez les journaux pour plus d'informations.
Vous pouvez ouvrir les journaux et gérer le service à partir de la fenêtre de paramètres.
@@ -1575,24 +1575,24 @@ Vous pouvez ouvrir les journaux et gérer le service à partir de la fenêtre de
La récupération des capteurs configurés a échoué
- Le service a renvoyé une erreur lors de la récupération des capteurs configurés. Consultez les journaux pour plus d'informations.
+ Le service a renvoyé une erreur lors de la récupération des capteurs configurés. Consultez les journaux pour plus d'informations.
Vous pouvez ouvrir les journaux et gérer le service à partir de la fenêtre de paramètres.
- La sauvegarde d'identifiant d'authentification vide permettra à tous les HASS.Agents d'accéder au serveur.
+ La sauvegarde d'identifiant d'authentification vide permettra à tous les HASS.Agents d'accéder au serveur.
Êtes-vous sûr de vouloir cela ?
Fuzzy
- Une erreur s'est produite lors de l'enregistrement, consultez les journaux pour plus d'informations.
+ Une erreur s'est produite lors de l'enregistrement, consultez les journaux pour plus d'informations.
- Veuillez d'abord saisir un nom d'appareil.
+ Veuillez d'abord saisir un nom d'appareil.
- Veuillez d'abord sélectionner un programme (astuce : double-cliquez pour parcourir).
+ Veuillez d'abord sélectionner un programme (astuce : double-cliquez pour parcourir).
Le programme sélectionné est introuvable. Veuillez en sélectionner un nouveau.
@@ -1605,41 +1605,41 @@ Seules les instances ayant le bon identifiant peuvent se connecter.
Laissez vide pour permettre à tous de se connecter.
- C'est le nom avec lequel le Service Windows s'enregistre sur Home Assistant.
+ C'est le nom avec lequel le Service Windows s'enregistre sur Home Assistant.
-Par défaut, c'est le nom de votre PC suivi de '-satellite'.
+Par défaut, c'est le nom de votre PC suivi de '-satellite'.
- Le délai qu'attendra le Service Windows avant de signaler une connexion perdue au broker MQTT.
+ Le délai qu'attendra le Service Windows avant de signaler une connexion perdue au broker MQTT.
- Erreur lors de la récupération de l'état, vérifier les journaux
+ Erreur lors de la récupération de l'état, vérifier les journaux
- Une erreur s'est produite lors de l'enregistrement de la configuration, consultez les journaux pour plus d'informations.
+ Une erreur s'est produite lors de l'enregistrement de la configuration, consultez les journaux pour plus d'informations.
enregistrement et connexion, veuillez patienter ..
- Une erreur s'est produite lors de l'enregistrement des capteurs, consultez les journaux pour plus d'informations.
+ Une erreur s'est produite lors de l'enregistrement des capteurs, consultez les journaux pour plus d'informations.
enregistrement et connexion, veuillez patienter ..
- Les étapes n'ont pas toutes été terminées avec succès. Veuillez consulter les journaux pour plus d'informations.
+ Les étapes n'ont pas toutes été terminées avec succès. Veuillez consulter les journaux pour plus d'informations.
- Les étapes n'ont pas toutes été terminées avec succès. Veuillez consulter les journaux pour plus d'informations.
+ Les étapes n'ont pas toutes été terminées avec succès. Veuillez consulter les journaux pour plus d'informations.
HASS.Agent est toujours actif après {0} secondes. Veuillez fermer toutes les instances et redémarrer manuellement.
-Consultez les journaux pour plus d'informations et informez éventuellement les développeurs.
+Consultez les journaux pour plus d'informations et informez éventuellement les développeurs.
- Toutes les étapes ne sont pas terminées avec succès. Veuillez consulter les logs pour plus d'informations.
+ Toutes les étapes ne sont pas terminées avec succès. Veuillez consulter les logs pour plus d'informations.
Activer le Service Windows
@@ -1654,9 +1654,9 @@ Consultez les journaux pour plus d'informations et informez éventuellement
Arrêter le Service Windows
- Une erreur s'est produite lors du changement d'état du service.
+ Une erreur s'est produite lors du changement d'état du service.
-Veuillez consulter les journaux pour plus d'informations.
+Veuillez consulter les journaux pour plus d'informations.
topic copié dans le presse-papier
@@ -1665,7 +1665,7 @@ Veuillez consulter les journaux pour plus d'informations.
enregistrement et connexion, veuillez patienter ..
- Une erreur s'est produite lors de l'enregistrement des commandes, consultez les logs pour plus d'informations.
+ Une erreur s'est produite lors de l'enregistrement des commandes, consultez les logs pour plus d'informations.
Nouvelle commande
@@ -1680,7 +1680,7 @@ Veuillez consulter les journaux pour plus d'informations.
Sélectionner un type de commande valide.
- Sélectionner un type d'entité valide.
+ Sélectionner un type d'entité valide.
Entrer un nom.
@@ -1689,12 +1689,12 @@ Veuillez consulter les journaux pour plus d'informations.
Il existe déjà une commande portant ce nom. Etes-vous sur de vouloir continuer?
- Si vous n'entrez pas de commande, vous ne pouvez utiliser cette entité qu'avec une valeur "action" via Home Assistant. Le faire fonctionner tel quel ne fera rien.
+ Si vous n'entrez pas de commande, vous ne pouvez utiliser cette entité qu'avec une valeur "action" via Home Assistant. Le faire fonctionner tel quel ne fera rien.
Êtes-vous sûr de vouloir cela ?
- Si vous n'entrez pas de commande ou de script, vous ne pouvez utiliser cette entité qu'avec une valeur "action" via Home Assistant. Le faire fonctionner tel quel ne fera rien.
+ Si vous n'entrez pas de commande ou de script, vous ne pouvez utiliser cette entité qu'avec une valeur "action" via Home Assistant. Le faire fonctionner tel quel ne fera rien.
Êtes-vous sûr de vouloir cela ?
@@ -1705,7 +1705,7 @@ Veuillez consulter les journaux pour plus d'informations.
La vérification des clés a échoué : {0}
- Si vous ne saisissez pas d'URL, vous ne pouvez utiliser cette entité qu'avec une valeur "action" via Home Assistant. Le faire fonctionner tel quel ne fera rien.
+ Si vous ne saisissez pas d'URL, vous ne pouvez utiliser cette entité qu'avec une valeur "action" via Home Assistant. Le faire fonctionner tel quel ne fera rien.
Êtes-vous sûr de vouloir cela ?
@@ -1748,46 +1748,46 @@ veuillez configurer un interpréteur de commandes ou votre commande ne fonctionn
Une faible intégrité signifie que votre commande sera exécutée avec des privilèges restreints.
- Cela signifie qu'il ne pourra enregistrer et modifier des fichiers qu'à certains endroits,
+ Cela signifie qu'il ne pourra enregistrer et modifier des fichiers qu'à certains endroits,
- comme le dossier '%USERPROFILE%\AppData\LocalLow' ou
+ comme le dossier '%USERPROFILE%\AppData\LocalLow' ou
- la clé de registre 'HKEY_CURRENT_USER\Software\AppDataLow'.
+ la clé de registre 'HKEY_CURRENT_USER\Software\AppDataLow'.
- Vous devriez tester votre commande pour vous assurer qu'elle n'est pas influencée par cela.
+ Vous devriez tester votre commande pour vous assurer qu'elle n'est pas influencée par cela.
{0} seulement !
- Le gestionnaire MQTT n'a pas été correctement configuré ou n'a pas encore terminé son démarrage.
+ Le gestionnaire MQTT n'a pas été correctement configuré ou n'a pas encore terminé son démarrage.
- Impossible de récupérer vos entités en raison d'une configuration manquante, veuillez saisir les valeurs requises dans l'écran de configuration.
+ Impossible de récupérer vos entités en raison d'une configuration manquante, veuillez saisir les valeurs requises dans l'écran de configuration.
- Une erreur s'est produite lors de la tentative de récupération de vos entités.
+ Une erreur s'est produite lors de la tentative de récupération de vos entités.
Nouvelle Action Rapide
- Modification de l'action rapide
+ Modification de l'action rapide
- Impossible de récupérer vos entités en raison d'une configuration manquante, veuillez saisir les valeurs requises dans l'écran de configuration.
+ Impossible de récupérer vos entités en raison d'une configuration manquante, veuillez saisir les valeurs requises dans l'écran de configuration.
- Une erreur s'est produite lors de la tentative de récupération de vos entités.
+ Une erreur s'est produite lors de la tentative de récupération de vos entités.
- Sélectionnez d'abord une entité.
+ Sélectionnez d'abord une entité.
- Sélectionnez d'abord un domaine.
+ Sélectionnez d'abord un domaine.
Action inconnue, veuillez en sélectionner une valide.
@@ -1796,7 +1796,7 @@ veuillez configurer un interpréteur de commandes ou votre commande ne fonctionn
enregistrement et connexion, veuillez patienter ..
- Une erreur s'est produite lors de l'enregistrement des capteurs, consultez les journaux pour plus d'informations.
+ Une erreur s'est produite lors de l'enregistrement des capteurs, consultez les journaux pour plus d'informations.
Nouveau capteur
@@ -1829,13 +1829,13 @@ veuillez configurer un interpréteur de commandes ou votre commande ne fonctionn
Service
- Sélectionnez d'abord un type de capteur.
+ Sélectionnez d'abord un type de capteur.
- Sélectionnez d'abord un type de capteur valide.
+ Sélectionnez d'abord un type de capteur valide.
- Entrez d'abord un nom.
+ Entrez d'abord un nom.
Il existe déjà un capteur à valeur unique portant ce nom. Voulez-vous vraiment continuer ?
@@ -1844,22 +1844,22 @@ veuillez configurer un interpréteur de commandes ou votre commande ne fonctionn
Il existe déjà un capteur à valeur multiple portant ce nom. Voulez-vous vraiment continuer ?
- Entrez d'abord un intervalle entre 1 et 43200 (12 heures).
+ Entrez d'abord un intervalle entre 1 et 43200 (12 heures).
- Entrez d'abord un nom de fenêtre.
+ Entrez d'abord un nom de fenêtre.
- Saisissez d'abord une requête.
+ Saisissez d'abord une requête.
- Entrez d'abord une catégorie et une instance.
+ Entrez d'abord une catégorie et une instance.
- Entrez d'abord le nom d'un processus.
+ Entrez d'abord le nom d'un processus.
- Saisissez d'abord le nom d'un service.
+ Saisissez d'abord le nom d'un service.
{0} seulement !
@@ -1871,20 +1871,20 @@ Tous vos capteurs et commandes seront désormais dépubliés, et HASS.Agent red
Ne vous inquiétez pas, ils conserveront leur nom actuel, de sorte que vos automatisations ou scripts continueront de fonctionner.
-Remarque : le nom sera 'nettoyé', ce qui signifie que tout, sauf les lettres, les chiffres et les espaces, sera remplacé par un trait de soulignement. Ceci est requis par HA.
+Remarque : le nom sera 'nettoyé', ce qui signifie que tout, sauf les lettres, les chiffres et les espaces, sera remplacé par un trait de soulignement. Ceci est requis par HA.
- Vous avez modifié le port de l'API de notification. Ce nouveau port doit être réservé.
+ Vous avez modifié le port de l'API de notification. Ce nouveau port doit être réservé.
Vous recevrez une demande UAC pour le faire, veuillez approuver.
Fuzzy
- Quelque chose s'est mal passé !
+ Quelque chose s'est mal passé !
Veuillez exécuter manuellement la commande. Elle a été copié dans votre presse-papiers, il vous suffit de la coller dans une invite de commande en mode administrateur.
-N'oubliez pas de modifier également le port dans la règle du pare-feu.
+N'oubliez pas de modifier également le port dans la règle du pare-feu.
Le port a été réservé avec succès !
@@ -1892,7 +1892,7 @@ N'oubliez pas de modifier également le port dans la règle du pare-feu.
- Une erreur s'est produite lors de la préparation du redémarrage.
+ Une erreur s'est produite lors de la préparation du redémarrage.
Veuillez redémarrer manuellement.
@@ -1901,13 +1901,13 @@ Veuillez redémarrer manuellement.
Voulez-vous redémarrer maintenant ?
- Une erreur s'est produite lors du chargement de vos paramètres.
+ Une erreur s'est produite lors du chargement de vos paramètres.
-Vérifiez appsettings.json dans le sous-dossier 'Config', ou supprimez le simplement pour recommencer à zéro.
+Vérifiez appsettings.json dans le sous-dossier 'Config', ou supprimez le simplement pour recommencer à zéro.
Fuzzy
- Une erreur s'est produite lors du lancement de HASS.Agent.
+ Une erreur s'est produite lors du lancement de HASS.Agent.
Veuillez vérifier les journaux et faire un rapport de bug sur github.
Fuzzy
@@ -1931,7 +1931,7 @@ Veuillez vérifier les journaux et faire un rapport de bug sur github.
Mise à jour HASS.Agent BETA
- Voulez-vous télécharger et lancer le programme d'installation ?
+ Voulez-vous télécharger et lancer le programme d'installation ?
Voulez-vous accéder à la page des releases ?
@@ -1982,7 +1982,7 @@ Veuillez vérifier les journaux et faire un rapport de bug sur github.
HASS.Agent intégration : Terminée [{0}/{1}]
- Voulez-vous vraiment abandonner le processus d'intégration ?
+ Voulez-vous vraiment abandonner le processus d'intégration ?
Votre progression ne sera pas enregistrée et ne sera plus affichée au prochain lancement.
@@ -1990,26 +1990,26 @@ Votre progression ne sera pas enregistrée et ne sera plus affichée au prochain
Erreur lors de la récupération des informations, vérifiez les journaux
- Impossible de préparer le téléchargement de la mise à jour, consultez les journaux pour plus d'informations.
+ Impossible de préparer le téléchargement de la mise à jour, consultez les journaux pour plus d'informations.
-La page de mise à jour s'ouvrira maintenant à la place.
+La page de mise à jour s'ouvrira maintenant à la place.
- Impossible de télécharger la mise à jour, consultez les journaux pour plus d'informations.
+ Impossible de télécharger la mise à jour, consultez les journaux pour plus d'informations.
-La page de mise à jour s'ouvrira maintenant à la place.
+La page de mise à jour s'ouvrira maintenant à la place.
- Le fichier téléchargé n'a pas pu être vérifié.
+ Le fichier téléchargé n'a pas pu être vérifié.
-Il peut s'agir d'une erreur technique, mais aussi d'un fichier trafiqué !
+Il peut s'agir d'une erreur technique, mais aussi d'un fichier trafiqué !
Veuillez vérifier les journaux et poster un ticket avec les résultats.
- Impossible de lancer le programme d'installation (avez-vous approuvé l'invite UAC ?), consultez les journaux pour plus d'informations.
+ Impossible de lancer le programme d'installation (avez-vous approuvé l'invite UAC ?), consultez les journaux pour plus d'informations.
-La page de mise à jour s'ouvrira maintenant à la place.
+La page de mise à jour s'ouvrira maintenant à la place.
HASS API : échec de la configuration de la connexion
@@ -2024,19 +2024,19 @@ La page de mise à jour s'ouvrira maintenant à la place.
Fichier de certificat client introuvable
- Impossible de se connecter, vérifier l'adresse
+ Impossible de se connecter, vérifier l'adresse
Impossible de récupérer la configuration, vérifiez la clé API
- Impossible de se connecter, vérifiez l'adresse et la configuration
+ Impossible de se connecter, vérifiez l'adresse et la configuration
- Action Rapide : échec de l'action, consultez les journaux pour plus d'informations
+ Action Rapide : échec de l'action, consultez les journaux pour plus d'informations
- Action Rapide : échec de l'action, entité introuvable
+ Action Rapide : échec de l'action, entité introuvable
MQTT : erreur lors de la connexion
@@ -2048,31 +2048,31 @@ La page de mise à jour s'ouvrira maintenant à la place.
MQTT: déconnecté
- Erreur lors de la tentative d'appairage de l'API au port {0}.
+ Erreur lors de la tentative d'appairage de l'API au port {0}.
-Assurez-vous qu'aucune autre instance de HASS.Agent n'est en cours d'exécution et que le port est disponible et enregistré.
+Assurez-vous qu'aucune autre instance de HASS.Agent n'est en cours d'exécution et que le port est disponible et enregistré.
Fournit le titre de la fenêtre active actuelle.
- Fournit des informations sur divers aspects de l'audio de votre appareil :
+ Fournit des informations sur divers aspects de l'audio de votre appareil :
Niveau de volume maximal actuel (peut être utilisé comme une simple valeur ‘quelque chose joue’).
Périphérique audio par défaut : nom, état et volume.
-Résumé de vos sessions audio : nom de l'application, état muet, volume et volume maximal actuel.
+Résumé de vos sessions audio : nom de l'application, état muet, volume et volume maximal actuel.
- Fournit à un capteur l'état de charge actuel, le nombre estimé de minutes sur une charge complète, la charge restante en pourcentage, la charge restante en minutes et l'état du branchement au courant.
+ Fournit à un capteur l'état de charge actuel, le nombre estimé de minutes sur une charge complète, la charge restante en pourcentage, la charge restante en minutes et l'état du branchement au courant.
Fuzzy
Fournit la charge actuelle du premier processeur sous forme de pourcentage.
- Fournit la vitesse d'horloge actuelle du premier processeur.
+ Fournit la vitesse d'horloge actuelle du premier processeur.
Fournit le niveau de volume actuel sous forme de pourcentage.
@@ -2080,7 +2080,7 @@ Résumé de vos sessions audio : nom de l'application, état muet, volume e
Indique le volume de votre appareil par défaut.
- Créé un capteur avec le nombre d'écrans, le nom de l'écran principal et pour chaque écran, son nom, sa résolution et ses points par pixel.
+ Créé un capteur avec le nombre d'écrans, le nom de l'écran principal et pour chaque écran, son nom, sa résolution et ses points par pixel.
Capteur factice à des fins de test, envoie une valeur entière aléatoire entre 0 et 100.
@@ -2092,12 +2092,12 @@ Indique le volume de votre appareil par défaut.
Fournit la température actuelle du premier GPU.
- Fournit la date et l'heure de la dernière utilisation d'un périphérique par l'utilisateur.
+ Fournit la date et l'heure de la dernière utilisation d'un périphérique par l'utilisateur.
Provides a datetime value containing the last moment the system (re)booted.
-Important: Windows' FastBoot option can throw this value off, because that's a form of hibernation. You can disable it through Power Options -> 'Choose what the power buttons do' -> uncheck 'Turn on fast start-up'. It doesn't make much difference for modern machines with SSDs, but disabling makes sure you get a clean state after rebooting.
+Important: Windows' FastBoot option can throw this value off, because that's a form of hibernation. You can disable it through Power Options -> 'Choose what the power buttons do' -> uncheck 'Turn on fast start-up'. It doesn't make much difference for modern machines with SSDs, but disabling makes sure you get a clean state after rebooting.
Provides the last system state change:
@@ -2105,7 +2105,7 @@ Important: Windows' FastBoot option can throw this value off, because that&
ApplicationStarted, Logoff, SystemShutdown, Resume, Suspend, ConsoleConnect, ConsoleDisconnect, RemoteConnect, RemoteDisconnect, SessionLock, SessionLogoff, SessionLogon, SessionRemoteControl and SessionUnlock.
- Renvoie le nom de l'utilisateur actuellement connecté.
+ Renvoie le nom de l'utilisateur actuellement connecté.
Fuzzy
@@ -2120,15 +2120,15 @@ ApplicationStarted, Logoff, SystemShutdown, Resume, Suspend, ConsoleConnect, Con
Fuzzy
- Fournit une valeur ON/OFF selon si la fenêtre est actuellement ouverte (elle n'a pas besoin d'être active).
+ Fournit une valeur ON/OFF selon si la fenêtre est actuellement ouverte (elle n'a pas besoin d'être active).
Fournit des informations sur la carte, la configuration, les statistiques de transfert et les adresses (ip, mac, dhcp, dns) de la ou des cartes réseau sélectionnées.
-Il s'agit d'un capteur multi-valeur.
+Il s'agit d'un capteur multi-valeur.
- Fournit les valeurs d'un compteur de performance.
+ Fournit les valeurs d'un compteur de performance.
Par exemple, le capteur de charge du processeur utilise ces valeurs :
@@ -2136,16 +2136,16 @@ Catégorie : Processeur
Compteur : % du temps processeur
Instance : _Total
-Vous pouvez explorer les compteurs via l'outil 'perfmon.exe' de Windows.
+Vous pouvez explorer les compteurs via l'outil 'perfmon.exe' de Windows.
- Fournit le nombre d'instances actives du processus.
+ Fournit le nombre d'instances actives du processus.
Fuzzy
Returns the state of the provided service: NotFound, Stopped, StartPending, StopPending, Running, ContinuePending, PausePending or Paused.
-Make sure to provide the 'Service name', not the 'Display name'.
+Make sure to provide the 'Service name', not the 'Display name'.
Provides the current session state:
@@ -2155,7 +2155,7 @@ Locked, Unlocked or Unknown.
Use a LastSystemStateChangeSensor to monitor session state changes.
- Fournit les libellés, la taille totale (MB), l'espace disponible (MB), l'espace utilisé (MB) et le système de fichiers de tous les disques non amovibles présents.
+ Fournit les libellés, la taille totale (MB), l'espace disponible (MB), l'espace utilisé (MB) et le système de fichiers de tous les disques non amovibles présents.
Provides the current user state:
@@ -2167,12 +2167,12 @@ Can for instance be used to determine whether to send notifications or TTS messa
Provides a bool value based on whether the webcam is currently being used.
-Note: if used in the satellite service, it won't detect userspace applications.
+Note: if used in the satellite service, it won't detect userspace applications.
- Provides a sensor with the amount of pending driver updates, a sensor with the amount of pending software updates, a sensor containing all pending driver updates information (title, kb article id's, hidden, type and categories) and a sensor containing the same for pending software updates.
+ Provides a sensor with the amount of pending driver updates, a sensor with the amount of pending software updates, a sensor containing all pending driver updates information (title, kb article id's, hidden, type and categories) and a sensor containing the same for pending software updates.
-This is a costly request, so the recommended interval is 15 minutes (900 seconds). But it's capped at 10 minutes, if you provide a lower value, you'll get the last known list.
+This is a costly request, so the recommended interval is 15 minutes (900 seconds). But it's capped at 10 minutes, if you provide a lower value, you'll get the last known list.
Fournit le résultat de la requête WMI.
@@ -2183,12 +2183,12 @@ This is a costly request, so the recommended interval is 15 minutes (900 seconds
{0}
- Erreur lors de l'enregistrement des paramètres initiaux :
+ Erreur lors de l'enregistrement des paramètres initiaux :
{0}
- Erreur lors de l'enregistrement des paramètres :
+ Erreur lors de l'enregistrement des paramètres :
{0}
@@ -2198,7 +2198,7 @@ This is a costly request, so the recommended interval is 15 minutes (900 seconds
{0}
- Erreur lors de l'enregistrement des commandes :
+ Erreur lors de l'enregistrement des commandes :
{0}
@@ -2208,7 +2208,7 @@ This is a costly request, so the recommended interval is 15 minutes (900 seconds
{0}
- Erreur lors de l'enregistrement des actions rapides :
+ Erreur lors de l'enregistrement des actions rapides :
{0}
@@ -2218,7 +2218,7 @@ This is a costly request, so the recommended interval is 15 minutes (900 seconds
{0}
- Erreur lors de l'enregistrement des capteurs :
+ Erreur lors de l'enregistrement des capteurs :
{0}
@@ -2232,7 +2232,7 @@ This is a costly request, so the recommended interval is 15 minutes (900 seconds
Occupé, Patientez ..
- Langage de l'interface
+ Langage de l'interface
ou
@@ -2241,7 +2241,7 @@ This is a costly request, so the recommended interval is 15 minutes (900 seconds
Terminer
- Langage de l'interface
+ Langage de l'interface
Configuration manquante
@@ -2394,7 +2394,7 @@ This is a costly request, so the recommended interval is 15 minutes (900 seconds
Charge CPU
- Vitesse d'horloge
+ Vitesse d'horloge
Volume actuel
@@ -2418,7 +2418,7 @@ This is a costly request, so the recommended interval is 15 minutes (900 seconds
Dernier démarrage
- Dernier changement d'état du système
+ Dernier changement d'état du système
Utilisateur connecté
@@ -2577,7 +2577,7 @@ This is a costly request, so the recommended interval is 15 minutes (900 seconds
Carte du reseau
- Entrez d'abord une catégorie et un compteur.
+ Entrez d'abord une catégorie et un compteur.
Test exécuté avec succès, valeur du résultat :
@@ -2585,14 +2585,14 @@ This is a costly request, so the recommended interval is 15 minutes (900 seconds
{0}
- Le test n'a pas réussi a s'exécuter :
+ Le test n'a pas réussi a s'exécuter :
{0}
Voulez-vous ouvrir le dossier des journaux ?
- Saisissez d'abord une requête WMI.
+ Saisissez d'abord une requête WMI.
Requête exécutée avec succès, valeur du résultat :
@@ -2600,7 +2600,7 @@ Voulez-vous ouvrir le dossier des journaux ?
{0}
- La requête n'a pas réussi a s'exécuter :
+ La requête n'a pas réussi a s'exécuter :
{0}
@@ -2615,7 +2615,7 @@ The scope you entered:
{0}
-Tip: make sure you haven't switched the scope and query fields around.
+Tip: make sure you haven't switched the scope and query fields around.
Do you still want to use the current values?
@@ -2623,15 +2623,15 @@ Do you still want to use the current values?
Application démarrée
- Vous pouvez utiliser le Service Windows pour faire fonctionner les capteurs et commandes sans avoir à vous connecter. Tous ne sont pas disponibles, par exemple la commande 'LaunchUrl' ne peut pas être lancée par le service.
+ Vous pouvez utiliser le Service Windows pour faire fonctionner les capteurs et commandes sans avoir à vous connecter. Tous ne sont pas disponibles, par exemple la commande 'LaunchUrl' ne peut pas être lancée par le service.
Dernière valeur connue
- Erreur lors de la tentative de connexion de l'API au port {0}.
+ Erreur lors de la tentative de connexion de l'API au port {0}.
-Assurez vous qu'aucune autre instance de HASS.Agent n'est en cours d'exécution et que le port est disponible et enregistré.
+Assurez vous qu'aucune autre instance de HASS.Agent n'est en cours d'exécution et que le port est disponible et enregistré.
Afficher la fenêtre au premier plan
@@ -2640,26 +2640,26 @@ Assurez vous qu'aucune autre instance de HASS.Agent n'est en cours d&a
WebView
- Affiche une fenêtre avec l'URL fournie.
+ Affiche une fenêtre avec l'URL fournie.
-Cela diffère de la commande 'LaunchUrl' en ce qu'elle ne charge pas un navigateur à part entière, juste l'URL fournie dans sa propre fenêtre.
+Cela diffère de la commande 'LaunchUrl' en ce qu'elle ne charge pas un navigateur à part entière, juste l'URL fournie dans sa propre fenêtre.
-Vous pouvez l'utiliser par exemple pour afficher rapidement le tableau de bord de Home Assistant.
+Vous pouvez l'utiliser par exemple pour afficher rapidement le tableau de bord de Home Assistant.
-Par défaut, il stocke les cookies indéfiniment, vous n'avez donc qu'à vous connecter une seule fois.
+Par défaut, il stocke les cookies indéfiniment, vous n'avez donc qu'à vous connecter une seule fois.
Commandes HASS.Agent
- Recherche le processus spécifié et essaie d'afficher sa fenêtre principale au premier plan.
+ Recherche le processus spécifié et essaie d'afficher sa fenêtre principale au premier plan.
-Si l'application est réduite, elle sera restaurée.
+Si l'application est réduite, elle sera restaurée.
-Exemple : si vous voulez envoyer VLC au premier plan, utilisez 'vlc'.
+Exemple : si vous voulez envoyer VLC au premier plan, utilisez 'vlc'.
- Si vous ne configurez pas la commande, vous ne pouvez utiliser cette entité qu'avec une valeur 'action' via Home Assistant et elle s'affichera en utilisant les paramètres par défaut. La faire fonctionner tel quel ne fera rien.
+ Si vous ne configurez pas la commande, vous ne pouvez utiliser cette entité qu'avec une valeur 'action' via Home Assistant et elle s'affichera en utilisant les paramètres par défaut. La faire fonctionner tel quel ne fera rien.
Etes vous sûr de vouloir cela ?
@@ -2682,11 +2682,11 @@ Etes vous sûr de vouloir cela ?
Le cache WebView a été nettoyé !
- Il semble que vous utilisiez une mise à l'échelle personnalisée. Il se peut que certaines parties de HASS.Agent ne s'affichent pas comme prévu.
+ Il semble que vous utilisiez une mise à l'échelle personnalisée. Il se peut que certaines parties de HASS.Agent ne s'affichent pas comme prévu.
Veuillez signaler tout aspect inutilisable sur GitHub. Merci!
-Remarque : ce message ne s'affiche qu'une seule fois.
+Remarque : ce message ne s'affiche qu'une seule fois.
Impossible de charger les paramètres enregistrés de la commande, réinitialisation par défaut.
@@ -2698,12 +2698,12 @@ Remarque : ce message ne s'affiche qu'une seule fois.
Lancer la réservation des ports
- Activer l'API locale
+ Activer l'API locale
HASS.Agent a sa propre API locale, donc Home Assistant peut envoyer des requêtes (par exemple pour envoyer une notification). Vous pouvez le configurer globalement ici, et ensuite vous pouvez configurer les sections qui en dépendent (actuellement les notifications et le lecteur multimédia).
-Remarque : ceci n'est pas nécessaire pour que la nouvelle intégration fonctionne. Activez-le et utilisez-le uniquement si vous n'utilisez pas MQTT.
+Remarque : ceci n'est pas nécessaire pour que la nouvelle intégration fonctionne. Activez-le et utilisez-le uniquement si vous n'utilisez pas MQTT.
Pour pouvoir écouter les requêtes, HASS.Agents doit avoir son port réservé et ouvert dans votre pare-feu. Vous pouvez utiliser ce bouton pour le faire pour vous.
@@ -2719,10 +2719,10 @@ Remarque : ceci n'est pas nécessaire pour que la nouvelle intégration fon
jours
- Emplacement du cache d'images
+ Emplacement du cache d'images
- Garder l'audio pendant
+ Garder l'audio pendant
Garder les images pendant
@@ -2740,31 +2740,31 @@ Remarque : ceci n'est pas nécessaire pour que la nouvelle intégration fon
Activer la fonctionnalité lecteur multimédia
- HASS.Agent peut agir comme un lecteur multimédia pour Home Assistant, vous pourrez donc contrôler tous les médias en cours de lecture et envoyer de la synthèse vocale. L'API locale doit être activée pour que cela fonctionne.
+ HASS.Agent peut agir comme un lecteur multimédia pour Home Assistant, vous pourrez donc contrôler tous les médias en cours de lecture et envoyer de la synthèse vocale. L'API locale doit être activée pour que cela fonctionne.
Fuzzy
Si quelque chose ne fonctionne pas, suivez les étapes suivantes:
-- Installer l'intégration HASS.Agent-MediaPlayer
+- Installer l'intégration HASS.Agent-MediaPlayer
- Redémarrer Home Assistant
- Configurer une entité media_player
- Redémarrer Home Assistant
Fuzzy
- L'API locale est désactivée, mais le lecteur multimédia en a besoin pour fonctionner
+ L'API locale est désactivée, mais le lecteur multimédia en a besoin pour fonctionner
Fuzzy
TLS
- L'API locale est désactivée, le lecteur multimédia en a besoin pour fonctionner
+ L'API locale est désactivée, le lecteur multimédia en a besoin pour fonctionner
Fuzzy
- Afficher l'aperçu
+ Afficher l'aperçu
Afficher le menu &default
@@ -2776,7 +2776,7 @@ Remarque : ceci n'est pas nécessaire pour que la nouvelle intégration fon
Garder la page chargée en arrière-plan
- Contrôler la façon dont l'icone de la barre d'état se comporte suite à un clique droit.
+ Contrôler la façon dont l'icone de la barre d'état se comporte suite à un clique droit.
Cela utilise plus de ressource, mais réduit le temps de chargement
@@ -2794,13 +2794,13 @@ Remarque : ceci n'est pas nécessaire pour que la nouvelle intégration fon
Lecteur Multimédia
- Icon de la barre d'état
+ Icon de la barre d'état
- Votre langue de saisie '{0}' est connue pour entrer en conflit avec le raccourci clavier par défaut CTRL-ALT-Q. Veuillez en définir un autre.
+ Votre langue de saisie '{0}' est connue pour entrer en conflit avec le raccourci clavier par défaut CTRL-ALT-Q. Veuillez en définir un autre.
- Your input language '{0}' is unknown, and might collide with the default CTRL-ALT-Q hotkey. Please check to be sure. If it does, consider opening a ticket on GitHub so it can be added to the list.
+ Your input language '{0}' is unknown, and might collide with the default CTRL-ALT-Q hotkey. Please check to be sure. If it does, consider opening a ticket on GitHub so it can be added to the list.
Aucune touche trouvée
@@ -2809,7 +2809,7 @@ Remarque : ceci n'est pas nécessaire pour que la nouvelle intégration fon
Crochets manquants, démarrez et terminez toutes les combinaisons de touche avec [ ]
- Erreur sur une touche, vérifier le journal pour plus d'informations
+ Erreur sur une touche, vérifier le journal pour plus d'informations
Le nombre de crochets ouverts [ ne correspond pas au nombre de crochets fermés ] ! ({0} contre {1})
@@ -2818,7 +2818,7 @@ Remarque : ceci n'est pas nécessaire pour que la nouvelle intégration fon
Documentation
- Documentation et exemples d'utilisation.
+ Documentation et exemples d'utilisation.
Vérifier les mises à jour
@@ -2830,31 +2830,31 @@ Remarque : ceci n'est pas nécessaire pour que la nouvelle intégration fon
Gérer le Service Windows
- Pour utiliser les notifications, vous devez installer et configurer l'intégration HASS.Agent-notifier dans
+ Pour utiliser les notifications, vous devez installer et configurer l'intégration HASS.Agent-notifier dans
Home Assistant.
-C'est très facile avec HACS, mais vous pouvez également l'installer manuellement. Visitez le lien ci-dessous pour plus
+C'est très facile avec HACS, mais vous pouvez également l'installer manuellement. Visitez le lien ci-dessous pour plus
informations.
Suivez les étapes suivantes :
-- Installer l'intégration HASS.Agent-Notifier et/ou HASS.Agent-MediaPlayer
+- Installer l'intégration HASS.Agent-Notifier et/ou HASS.Agent-MediaPlayer
- Redémarrez Home Assistant
-Configurer une notification et/ou une entité media_player
-Redémarrer Home Assistant
- Il en va de même pour le lecteur multimédia. Cette intégration vous permet de contrôler votre appareil en tant qu'entité media_player, de voir ce qui se joue et d'utiliser la synthèse vocale.
+ Il en va de même pour le lecteur multimédia. Cette intégration vous permet de contrôler votre appareil en tant qu'entité media_player, de voir ce qui se joue et d'utiliser la synthèse vocale.
Page GitHub HASS.Agent-MediaPlayer
- Github de l'integration HASS.Agent
+ Github de l'integration HASS.Agent
- Oui, activez l'API locale sur le port
+ Oui, activez l'API locale sur le port
Activer le lecteur multimédia et la synthèse vocale
@@ -2865,13 +2865,13 @@ informations.
HASS.Agent a sa propre API interne, donc Home Assistant peut envoyer des requêtes (comme des notifications ou une synthèse vocale).
-Voulez-vous l'activer ?
+Voulez-vous l'activer ?
- Vous pouvez choisir les modules que vous souhaitez activer. Ils nécessitent des intégrations HA, mais ne vous inquiétez pas, la page suivante vous donnera plus d'informations sur la façon de les configurer.
+ Vous pouvez choisir les modules que vous souhaitez activer. Ils nécessitent des intégrations HA, mais ne vous inquiétez pas, la page suivante vous donnera plus d'informations sur la façon de les configurer.
- Remarque : 5115 est le port par défaut, ne le modifiez que si vous l'avez modifié dans Home Assistant.
+ Remarque : 5115 est le port par défaut, ne le modifiez que si vous l'avez modifié dans Home Assistant.
TLS
@@ -2896,7 +2896,7 @@ Do you want to use that version?
Sauvegarder
- Toujours afficher au centre de l'écran
+ Toujours afficher au centre de l'écran
Afficher la barre de titre de la fenêtre
@@ -2905,7 +2905,7 @@ Do you want to use that version?
Définir la fenêtre comme toujours en haut
- Déplacez et redimensionnez cette fenêtre pour définir la taille et l'emplacement de l'affichage WebView.
+ Déplacez et redimensionnez cette fenêtre pour définir la taille et l'emplacement de l'affichage WebView.
Localisation
@@ -2914,7 +2914,7 @@ Do you want to use that version?
Taille
- Conseil : Appuyez sur "ESC" pour fermer une vue WebView
+ Conseil : Appuyez sur "ESC" pour fermer une vue WebView
URL
@@ -2926,21 +2926,21 @@ Do you want to use that version?
WebView
- Le code de touche que vous avez entré n'est pas valide !
+ Le code de touche que vous avez entré n'est pas valide !
Assurez vous que le champ du code de touche est sélectionné et appuyez sur la touche que vous souhaitez simuler, le code de touche devrait alors être rempli pour vous.
- Activer le nettoyage du nom de l'appareil
+ Activer le nettoyage du nom de l'appareil
- Activer les notifications d'état
+ Activer les notifications d'état
- HASS.Agent va nettoyer le nom de votre appareil pour s'assurer que HA l'acceptera, vous pouvez annuler cette règle ci-dessous si vous êtes sûr que votre nom sera accepté tel quel.
+ HASS.Agent va nettoyer le nom de votre appareil pour s'assurer que HA l'acceptera, vous pouvez annuler cette règle ci-dessous si vous êtes sûr que votre nom sera accepté tel quel.
- HASS.Agent envoie des notifications lorsque l'état d'un module change, vous pouvez définir si vous souhaitez ou non recevoir ces notifications ci-dessous.
+ HASS.Agent envoie des notifications lorsque l'état d'un module change, vous pouvez définir si vous souhaitez ou non recevoir ces notifications ci-dessous.
Vous avez changé le nom de votre appareil.
@@ -3009,7 +3009,7 @@ Remarque : vous avez désactivé le nettoyage du nom, assurez vous donc que le n
Met tous les moniteurs en mode veille.
- Essaie de réveiller tous les écrans en simulant une pression sur la touche "flèche vers le haut".
+ Essaie de réveiller tous les écrans en simulant une pression sur la touche "flèche vers le haut".
Régler le volume du périphérique audio par défaut actuel au niveau spécifié.
@@ -3021,7 +3021,7 @@ Remarque : vous avez désactivé le nettoyage du nom, assurez vous donc que le n
Commande
- Si vous ne saisissez pas de valeur de volume, vous ne pouvez utiliser cette entité qu'avec une commande "action" via Home Assistant. Le faire fonctionner tel quel ne fera rien.
+ Si vous ne saisissez pas de valeur de volume, vous ne pouvez utiliser cette entité qu'avec une commande "action" via Home Assistant. Le faire fonctionner tel quel ne fera rien.
Êtes-vous sûr de vouloir cela ?
@@ -3033,21 +3033,21 @@ Remarque : vous avez désactivé le nettoyage du nom, assurez vous donc que le n
Voulez-vous utiliser cette version ?
- Votre jeton d'API n'a pas l'air correct. Assurez vous d'avoir sélectionné le jeton entier (n'utilisez pas CTRL+A ou double-clic).
+ Votre jeton d'API n'a pas l'air correct. Assurez vous d'avoir sélectionné le jeton entier (n'utilisez pas CTRL+A ou double-clic).
Il doit contenir trois parties (séparées par deux points).
-Etes-vous sûr de vouloir l'utiliser comme ça ?
+Etes-vous sûr de vouloir l'utiliser comme ça ?
- Votre URI ne semble pas correct. Cela devrait ressembler à quelque chose comme 'http://homeassistant.local:8123' ou 'http://192.168.0.1:8123'.
+ Votre URI ne semble pas correct. Cela devrait ressembler à quelque chose comme 'http://homeassistant.local:8123' ou 'http://192.168.0.1:8123'.
-Etes-vous sûr de vouloir l'utiliser comme ça ?
+Etes-vous sûr de vouloir l'utiliser comme ça ?
test ...
- L'API locale et MQTT sont tous deux désactivés, l'intégration a besoin d'au moins l'un des deux pour fonctionner.
+ L'API locale et MQTT sont tous deux désactivés, l'intégration a besoin d'au moins l'un des deux pour fonctionner.
Activer MQTT
@@ -3056,43 +3056,43 @@ Etes-vous sûr de vouloir l'utiliser comme ça ?
Sans MQTT, Les commandes et capteurs ne fonctionneront pas !
- L'API locale et MQTT sont tous deux désactivés, l'intégration a besoin d'au moins l'un des deux pour fonctionner.
+ L'API locale et MQTT sont tous deux désactivés, l'intégration a besoin d'au moins l'un des deux pour fonctionner.
Gérer le service
- Le service est actuellement à l'arrêt, vous ne pourrez donc pas le configurer.
+ Le service est actuellement à l'arrêt, vous ne pourrez donc pas le configurer.
-Assurez vous d'abord qu'il soit opérationnel.
+Assurez vous d'abord qu'il soit opérationnel.
- Si vous souhaitez gérer le service (ajouter des commandes et capteurs, modifier les paramètres), vous pouvez le faire ici ou en utilisant le bouton "Service Windows" de la fenêtre principale.
+ Si vous souhaitez gérer le service (ajouter des commandes et capteurs, modifier les paramètres), vous pouvez le faire ici ou en utilisant le bouton "Service Windows" de la fenêtre principale.
Afficher le menu par défaut en cliquant avec le bouton gauche de la souris
- Votre jeton d'API Home Assistant ne semble pas correct. Assurez-vous d'avoir sélectionné le jeton entier (n'utilisez pas CTRL+A ou double-clic).
+ Votre jeton d'API Home Assistant ne semble pas correct. Assurez-vous d'avoir sélectionné le jeton entier (n'utilisez pas CTRL+A ou double-clic).
Il doit contenir trois parties (séparées par deux points).
-Etes-vous sûr de vouloir l'utiliser comme ça ?
+Etes-vous sûr de vouloir l'utiliser comme ça ?
- L'URI de votre assistant domestique semble incorrect. Cela devrait ressembler à quelque chose comme 'http://homeassistant.local:8123' ou 'https://192.168.0.1:8123'.
+ L'URI de votre assistant domestique semble incorrect. Cela devrait ressembler à quelque chose comme 'http://homeassistant.local:8123' ou 'https://192.168.0.1:8123'.
-Etes-vous sûr de vouloir l'utiliser comme ça ?
+Etes-vous sûr de vouloir l'utiliser comme ça ?
- L'URI de votre broker MQTT ne semble pas correct. Il devrait ressembler à quelque chose comme 'homeassistant.local' ou '192.168.0.1'.
+ L'URI de votre broker MQTT ne semble pas correct. Il devrait ressembler à quelque chose comme 'homeassistant.local' ou '192.168.0.1'.
-Etes-vous sûr de vouloir l'utiliser comme ça ?
+Etes-vous sûr de vouloir l'utiliser comme ça ?
Fermer
- J'ai déjà fait un don, cachez le bouton dans la fenêtre principale.
+ J'ai déjà fait un don, cachez le bouton dans la fenêtre principale.
HASS.Agent is completely free, and will always stay that way without restrictions!
@@ -3111,21 +3111,21 @@ Like most developers, I run on caffeïne - so if you can spare it, a cup of coff
Vérifier les mises à jour
- Votre jeton d'API ne semble pas correct. Assurez vous d'avoir sélectionné le jeton entier (n'utilisez pas CTRL+A ou double-clic).
+ Votre jeton d'API ne semble pas correct. Assurez vous d'avoir sélectionné le jeton entier (n'utilisez pas CTRL+A ou double-clic).
Il doit contenir trois parties (séparées par deux points).
-Etes-vous sûr de vouloir l'utiliser comme ça ?
+Etes-vous sûr de vouloir l'utiliser comme ça ?
- Votre URI ne semble pas correct. Cela devrait ressembler à quelque chose comme 'http://homeassistant.local:8123' ou 'http://192.168.0.1:8123'.
+ Votre URI ne semble pas correct. Cela devrait ressembler à quelque chose comme 'http://homeassistant.local:8123' ou 'http://192.168.0.1:8123'.
-Etes-vous sûr de vouloir l'utiliser ainsi ?
+Etes-vous sûr de vouloir l'utiliser ainsi ?
- Développer et maintenir cet outil (et tout ce qui l'entoure) prend beaucoup de temps. Comme la plupart des développeurs, je fonctionne à la caféine - donc si vous pouvez vous le permettre, une tasse de café est toujours très appréciée !
+ Développer et maintenir cet outil (et tout ce qui l'entoure) prend beaucoup de temps. Comme la plupart des développeurs, je fonctionne à la caféine - donc si vous pouvez vous le permettre, une tasse de café est toujours très appréciée !
- Astuce : d'autres méthodes de dons sont disponibles dans la fenêtre À propos.
+ Astuce : d'autres méthodes de dons sont disponibles dans la fenêtre À propos.
Activer le lecteur multimédia (et le text-to-speech)
@@ -3140,28 +3140,28 @@ Etes-vous sûr de vouloir l'utiliser ainsi ?
HASS.Agent Post Update
- Fournit un capteur avec le nombre d'appareils Bluetooth trouvés.
+ Fournit un capteur avec le nombre d'appareils Bluetooth trouvés.
-Les appareils et leur état de connexion sont ajoutés en tant qu'attributs.
+Les appareils et leur état de connexion sont ajoutés en tant qu'attributs.
- Fournit à des capteurs le nombre d'appareils Bluetooth LE trouvés.
+ Fournit à des capteurs le nombre d'appareils Bluetooth LE trouvés.
-Les appareils et leur état de connexion sont ajoutés en tant qu'attributs.
+Les appareils et leur état de connexion sont ajoutés en tant qu'attributs.
-Affiche uniquement les appareils qui ont été vus depuis le dernier rapport, c'est-à-dire que lorsque le capteur publie, la liste s'efface.
+Affiche uniquement les appareils qui ont été vus depuis le dernier rapport, c'est-à-dire que lorsque le capteur publie, la liste s'efface.
Renvoie votre latitude, longitude et altitude actuelles sous forme de valeurs séparées par des virgules.
Assurez-vous que les services de localisation de Windows sont activés !
-Selon votre version de Windows, cela peut être trouvé dans le nouveau panneau de configuration -> 'confidentialité et sécurité' -> 'emplacement'.
+Selon votre version de Windows, cela peut être trouvé dans le nouveau panneau de configuration -> 'confidentialité et sécurité' -> 'emplacement'.
- Provides the name of the process that's currently using the microphone.
+ Provides the name of the process that's currently using the microphone.
-Note: if used in the satellite service, it won't detect userspace applications.
+Note: if used in the satellite service, it won't detect userspace applications.
Provides the last monitor power state change:
@@ -3174,15 +3174,15 @@ Dimmed, PowerOff, PowerOn and Unkown.
Converts the outcome to text.
- Fournit des informations sur toutes les imprimantes installées et leurs files d'attente.
+ Fournit des informations sur toutes les imprimantes installées et leurs files d'attente.
Fournit le nom du processus qui utilise actuellement la webcam.
-Remarque : s'il est utilisé dans le Service Windows, il ne détectera pas les applications de l'espace utilisateur.
+Remarque : s'il est utilisé dans le Service Windows, il ne détectera pas les applications de l'espace utilisateur.
- Provides the current state of the process' window:
+ Provides the current state of the process' window:
Hidden, Maximized, Minimized, Normal and Unknown.
@@ -3208,7 +3208,7 @@ Voulez-vous utiliser cette version ?
{0}
- Le test n'a pas pu s'exécuter :
+ Le test n'a pas pu s'exécuter :
{0}
@@ -3224,16 +3224,16 @@ Voulez-vous ouvrir le dossier des logs ?
Erreur fatale, consultez les logs
- Délai d'attente expiré
+ Délai d'attente expiré
Raison inconnue
- Impossible d'ouvrir le gestionnaire de service
+ Impossible d'ouvrir le gestionnaire de service
- Impossible d'ouvrir le service
+ Impossible d'ouvrir le service
Erreur de configuration du mode de démarrage, consultez les logs
@@ -3242,14 +3242,23 @@ Voulez-vous ouvrir le dossier des logs ?
Erreur lors de la mise en place du mode de démarrage, vérifier les journaux
- Microsoft's WebView2 runtime isn't found on your machine. Usually this is handled by the installer, but you can install it manually.
+ Microsoft's WebView2 runtime isn't found on your machine. Usually this is handled by the installer, but you can install it manually.
Do you want to download the runtime installer?
- Une erreur s'est produite lors de l'initialisation de WebView ! Veuillez vérifier vos journaux et ouvrir un ticket GitHub pour obtenir de l'aide.
+ Une erreur s'est produite lors de l'initialisation de WebView ! Veuillez vérifier vos journaux et ouvrir un ticket GitHub pour obtenir de l'aide.
domain
+
+ CommandeRadio
+
+
+ SwitchDesktop
+
+
+ ActiveDesktop
+
\ No newline at end of file
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.nl.resx b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.nl.resx
index 8723f4b6..8765dac7 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.nl.resx
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.nl.resx
@@ -118,13 +118,13 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- Op deze pagina kun je koppelingen met externe programma's configureren.
+ Op deze pagina kun je koppelingen met externe programma's configureren.
browser naam
- Standaard start HASS.Agent URL's met je standaardbrowser. Als je wilt, kun je ook een specifieke browser configureren. Daarnaast kan je de argumenten configureren die worden gebruikt om in privémodus te starten.
+ Standaard start HASS.Agent URL's met je standaardbrowser. Als je wilt, kun je ook een specifieke browser configureren. Daarnaast kan je de argumenten configureren die worden gebruikt om in privémodus te starten.
browser binary
@@ -137,7 +137,7 @@
Je kunt HASS.Agent configureren om een eigen uitvoerder te gebruiken, zoals perl of python.
-Gebruik het 'eigen uitvoerder' commando om 'm te starten.
+Gebruik het 'eigen uitvoerder' commando om 'm te starten.
eigen uitvoerder naam
@@ -149,7 +149,7 @@ Gebruik het 'eigen uitvoerder' commando om 'm te starten.
&test
- HASS.Agent wacht even voordat je een bericht krijgt over een verbroken verbinding met MQTT of HA's API.
+ HASS.Agent wacht even voordat je een bericht krijgt over een verbroken verbinding met MQTT of HA's API.
Je kunt het aantal seconden hier instellen.
@@ -187,11 +187,11 @@ Je automatiseringen en scripts blijven werken.
&test verbinding
- Om te leren welke entiteiten je geconfigureerd hebt, en om snelle acties te versturen, gebruikt HASS.Agent Home Assistant's API.
+ Om te leren welke entiteiten je geconfigureerd hebt, en om snelle acties te versturen, gebruikt HASS.Agent Home Assistant's API.
-Geef een 'long-lived access token' op, en het adres van je Home Assistant installatie.
+Geef een 'long-lived access token' op, en het adres van je Home Assistant installatie.
-Je kunt zo'n token krijgen via je profiel pagina. Blader naar onderaan de pagina en klik op 'TOKEN AANMAKEN'.
+Je kunt zo'n token krijgen via je profiel pagina. Blader naar onderaan de pagina en klik op 'TOKEN AANMAKEN'.
Fuzzy
@@ -229,7 +229,7 @@ Op deze manier kun je, wat je ook aan het doen bent op je machine, altijd commun
Sommige objecten, zoals afbeeldingen getoond in notificaties, moeten tijdelijk lokaal opgeslagen worden. Je kunt het aantal dagen dat ze bewaard worden instellen, voordat HASS.Agent ze verwijdert.
-Voer '0' in om ze permanent te behouden.
+Voer '0' in om ze permanent te behouden.
Uitgebreide logging biedt uitgebreidere logging, voor het geval dat de standaard logging niet voldoende is. Het is belangrijk te weten dat het inschakelen hiervan ervoor zorgt dat de logbestanden flink groeien, en zou dus alleen gebruikt moeten worden als je vermoedt dat er iets mis is met HASS.Agent of als een ontwikkelaar het vraagt.
@@ -263,7 +263,7 @@ Voer '0' in om ze permanent te behouden.
(leeglaten bij twijfel)
- Commando's en sensoren worden verstuurd via MQTT, net als notificaties en mediaspeler functies als je de nieuwe integratie gebruikt.
+ Commando's en sensoren worden verstuurd via MQTT, net als notificaties en mediaspeler functies als je de nieuwe integratie gebruikt.
Geef hier de inloggegevens van je server op. Als je de HA addon gebruikt, kun je waarschijnlijk de vooringevulde gegevens gebruiken.
@@ -324,8 +324,8 @@ Notitie: deze instellingen (behalve de cliënt id) zullen ook toegepast worden o
cert&ificaat fouten voor afbeeldingen negeren
- De satelliet service laat je sensoren en commando's uitvoeren, zelfs wanneer er geen gebruiker ingelogd is.
-Gebruik de 'satelliet service' knop in het hoofdscherm om 'm te beheren.
+ De satelliet service laat je sensoren en commando's uitvoeren, zelfs wanneer er geen gebruiker ingelogd is.
+Gebruik de 'satelliet service' knop in het hoofdscherm om 'm te beheren.
service status:
@@ -346,8 +346,8 @@ Gebruik de 'satelliet service' knop in het hoofdscherm om 'm te b
se&rvice herinstalleren
- Als je de service niet configureert, doet hij niks. Je kunt alsnog kiezen om 'm helemaal uit te schakelen.
-De installer zal de uitgeschakelde service met rust laten (als je 'm verwijdert, zal de installer hem terugzetten).
+ Als je de service niet configureert, doet hij niks. Je kunt alsnog kiezen om 'm helemaal uit te schakelen.
+De installer zal de uitgeschakelde service met rust laten (als je 'm verwijdert, zal de installer hem terugzetten).
Je kunt proberen om de service opnieuw te installeren als hij niet goed werkt.
@@ -362,7 +362,7 @@ Je configuratie en entiteiten blijven bewaard.
HASS.Agent kan starten als je inlogt via het register van je gebruikersprofiel.
-Aangezien HASS.Agent gebruiker-gebaseerd is, als je 'm voor een andere gebruiker wilt starten, kun je daar de configuratie uitvoeren.
+Aangezien HASS.Agent gebruiker-gebaseerd is, als je 'm voor een andere gebruiker wilt starten, kun je daar de configuratie uitvoeren.
start-bij-inlogg&en inschakelen
@@ -392,11 +392,11 @@ Je krijgt een notificatie (eenmalig per update) om je te laten weten dat er een
Het lijkt erop dat dit de eerste keer is dat je HASS.Agent start.
-Als je wilt, kunnen we de configuratie doorlopen. Zo niet, klik dan op 'sluiten'.
+Als je wilt, kunnen we de configuratie doorlopen. Zo niet, klik dan op 'sluiten'.
Apparaatnaam wordt gebruikt om je machine te identificeren binnen HA.
-Het wordt ook gebruikt om een voorvoegsel voor te stellen voor je commando's en sensoren.
+Het wordt ook gebruikt om een voorvoegsel voor te stellen voor je commando's en sensoren.
apparaat&naam
@@ -437,7 +437,7 @@ Wil je deze functionaliteit inschakelen?
Om notificaties te gebruiken, moet je de HASS.Agent-Notifier integratie installeren en configureren in Home Assistant.
-Dit is simpel met HACS, maar je kunt 'm ook handmatig installeren.
+Dit is simpel met HACS, maar je kunt 'm ook handmatig installeren.
Bezoek de onderstaande link voor meer informatie.
@@ -447,11 +447,11 @@ Bezoek de onderstaande link voor meer informatie.
server &uri (zou al goed moeten zijn)
- Om te leren welke entiteiten je geconfigureerd hebt, en om snelle acties te versturen, gebruikt HASS.Agent Home Assistant's API.
+ Om te leren welke entiteiten je geconfigureerd hebt, en om snelle acties te versturen, gebruikt HASS.Agent Home Assistant's API.
-Geef een 'long-lived access token' op, en het adres van je Home Assistant installatie.
+Geef een 'long-lived access token' op, en het adres van je Home Assistant installatie.
-Je kunt zo'n token krijgen via je profiel pagina. Blader naar onderaan de pagina en klik op 'TOKEN AANMAKEN'.
+Je kunt zo'n token krijgen via je profiel pagina. Blader naar onderaan de pagina en klik op 'TOKEN AANMAKEN'.
Fuzzy
@@ -473,7 +473,7 @@ Je kunt zo'n token krijgen via je profiel pagina. Blader naar onderaan de p
ip adres of hostname
- Commando's en sensoren worden via MQTT verstuurd. De notificaties- en mediaspeler integratie gebruikt het ook.
+ Commando's en sensoren worden via MQTT verstuurd. De notificaties- en mediaspeler integratie gebruikt het ook.
Tip: als je de HA addon gebruikt, kan je het vooringevulde adres waarschijnlijk gebruiken - geef alleen nog credenties.
Fuzzy
@@ -555,10 +555,10 @@ Bedankt voor het gebruiken van HASS.Agent, hopelijk heb je er wat aan :-)nieuwe toevoegen
- ver&stuur en activeer commando's
+ ver&stuur en activeer commando's
- commando's opgeslagen!
+ commando's opgeslagen!
toep&assen
@@ -579,7 +579,7 @@ Bedankt voor het gebruiken van HASS.Agent, hopelijk heb je er wat aan :-)Configuratie ophalen
- Deze pagina bevat generieke configuratie opties. Blader door de tabbladen bovenaan voor MQTT instellingen, sensoren en commando's.
+ Deze pagina bevat generieke configuratie opties. Blader door de tabbladen bovenaan voor MQTT instellingen, sensoren en commando's.
auth id
@@ -643,7 +643,7 @@ Bedankt voor het gebruiken van HASS.Agent, hopelijk heb je er wat aan :-)(leeglaten bij twijfel)
- Commando's en sensoren worden verstuurd via MQTT. Geef de inloggegevens op voor je server. Als je de HA addon gebruikt, kan je waarschijnlijk het vooringevulde adres gebruiken.
+ Commando's en sensoren worden verstuurd via MQTT. Geef de inloggegevens op voor je server. Als je de HA addon gebruikt, kan je waarschijnlijk het vooringevulde adres gebruiken.
discovery voorvoegsel
@@ -781,7 +781,7 @@ Bedankt voor het gebruiken van HASS.Agent, hopelijk heb je er wat aan :-)nieuwe toevoegen
- op&slaan en activeren commando's
+ op&slaan en activeren commando's
naam
@@ -796,7 +796,7 @@ Bedankt voor het gebruiken van HASS.Agent, hopelijk heb je er wat aan :-)actie
- Commando's Config
+ Commando's Config
commando op&slaan
@@ -811,7 +811,7 @@ Bedankt voor het gebruiken van HASS.Agent, hopelijk heb je er wat aan :-)omschrijving
- uitvoe&ren als 'verlaagde integriteit'
+ uitvoe&ren als 'verlaagde integriteit'
wat is dit?
@@ -993,7 +993,7 @@ Bedankt voor het gebruiken van HASS.Agent, hopelijk heb je er wat aan :-) MQTT
- Commando's
+ Commando's
Sensoren
@@ -1008,10 +1008,10 @@ Bedankt voor het gebruiken van HASS.Agent, hopelijk heb je er wat aan :-)Een Windows-gebaseerde cliënt voor het Home Assistant platform.
- Deze applicatie is open source en volledig gratis. Bekijk de project-pagina's van de gebruikte componenten voor hun individuele licenties.
+ Deze applicatie is open source en volledig gratis. Bekijk de project-pagina's van de gebruikte componenten voor hun individuele licenties.
- Een oprechte 'bedankt' voor de ontwikkelaars van deze projecten, die zo aardig waren om hun harde werken te delen met de rest van de stervelingen ..
+ Een oprechte 'bedankt' voor de ontwikkelaars van deze projecten, die zo aardig waren om hun harde werken te delen met de rest van de stervelingen ..
En natuurlijk; bedankt Paulus Shoutsen en het hele team van ontwikkelaars dat Home Assistant gebouwd hebben en onderhouden :-)
@@ -1092,7 +1092,7 @@ Bedankt voor het gebruiken van HASS.Agent, hopelijk heb je er wat aan :-)sluiten
- Zit je vast tijdens het gebruik van HASS.Agent, heb je hulp nodig bij het integreren van sensoren/commando's of heb je een top idee voor de volgende versie?
+ Zit je vast tijdens het gebruik van HASS.Agent, heb je hulp nodig bij het integreren van sensoren/commando's of heb je een top idee voor de volgende versie?
Er zijn een paar kanalen waar je ons kunt bereiken:
@@ -1136,7 +1136,7 @@ Er zijn een paar kanalen waar je ons kunt bereiken:
lokale sensoren beheren
- commando's beheren
+ commando's beheren
controleren op updates
@@ -1186,7 +1186,7 @@ Er zijn een paar kanalen waar je ons kunt bereiken:
satelliet service:
- commando's:
+ commando's:
sensoren:
@@ -1233,12 +1233,12 @@ Er zijn een paar kanalen waar je ons kunt bereiken:
Een eigen commando uitvoeren.
-Deze commando's draaien zonder speciale privileges. Om met verhoogde privileges uit te voeren, maak een Geplande Taak en gebruik 'schtasks /Run /TN "TaskName"' als commando om the taak uit te voeren.
+Deze commando's draaien zonder speciale privileges. Om met verhoogde privileges uit te voeren, maak een Geplande Taak en gebruik 'schtasks /Run /TN "TaskName"' als commando om the taak uit te voeren.
-Of schakel 'uitvoeren met verlaagde integriteit' in voor een strictere uitvoering.
+Of schakel 'uitvoeren met verlaagde integriteit' in voor een strictere uitvoering.
- Voert het commando uit via de geconfigureerde eigen executor (in Configuratie -> Externe Programma's).
+ Voert het commando uit via de geconfigureerde eigen executor (in Configuratie -> Externe Programma's).
Je commando wordt onveranderd toegevoegd als argument, dus je moet je eigen haakjes etc. toevoegen indien nodig.
@@ -1248,7 +1248,7 @@ Je commando wordt onveranderd toegevoegd als argument, dus je moet je eigen haak
Simuleert een enkele toetsaanslag.
-Klik op het 'keycode' veld en druk de toets in die je gesimuleerd wilt hebben. De corresponderende keycode wordt voor je ingevuld.
+Klik op het 'keycode' veld en druk de toets in die je gesimuleerd wilt hebben. De corresponderende keycode wordt voor je ingevuld.
Als je meer toetsen nodig hebt en/of extra opties zoals CTRL, gebruik dan de MeerdereToetsen commando.
Fuzzy
@@ -1256,9 +1256,9 @@ Als je meer toetsen nodig hebt en/of extra opties zoals CTRL, gebruik dan de Mee
Opent de opgegeven URL, normaliter in je standaard browser.
-Om 'privémodus' te gebruiken, moet je een specifieke browser toevoegen in Configuratie -> Externe Programma's.
+Om 'privémodus' te gebruiken, moet je een specifieke browser toevoegen in Configuratie -> Externe Programma's.
-Als je alleen een scherm wilt met een specifieke URL (niet een complete browser), gebruik dan een 'WebView' commando.
+Als je alleen een scherm wilt met een specifieke URL (niet een complete browser), gebruik dan een 'WebView' commando.
Vergrendelt de huidige sessie.
@@ -1267,22 +1267,22 @@ Als je alleen een scherm wilt met een specifieke URL (niet een complete browser)
Logt de huidige sessie uit.
- Simuleert de 'demp' (mute) knop.
+ Simuleert de 'demp' (mute) knop.
- Simuleert de 'media volgende' knop.
+ Simuleert de 'media volgende' knop.
- Simuleert de 'media afspelen/pauze' knop.
+ Simuleert de 'media afspelen/pauze' knop.
- Simuleert de 'media vorige' knop.
+ Simuleert de 'media vorige' knop.
- Simuleert de 'volume lager' knop.
+ Simuleert de 'volume lager' knop.
- Simuleert de 'volume hoger' knop.
+ Simuleert de 'volume hoger' knop.
Simuleert het indrukken van meerdere toetsen:
@@ -1291,7 +1291,7 @@ Je moet [ ] om elke toets heen zetten, anders kan HASS.Agent ze niet onderscheid
Er zijn een paar trucs die je kunt gebruiken:
-- Als je een haakje wilt indrukken, 'escape' die dan, dus [ is [\[] en ] is [\]]
+- Als je een haakje wilt indrukken, 'escape' die dan, dus [ is [\[] en ] is [\]]
- Speciale tekens moeten tussen { }, zoals {TAB} of {UP}
@@ -1316,12 +1316,12 @@ Handig om bijvoorbeeld HASS.Agent te forceren om al je sensoren te updaten na ee
Herstart de machine na één minuut.
-Tip: per ongeluk geactiveerd? Voer 'shutdown /a' uit om te annuleren.
+Tip: per ongeluk geactiveerd? Voer 'shutdown /a' uit om te annuleren.
Sluit de machine af na één minuut.
-Tip: per ongeluk geactiveerd? Voer 'shutdown /a' uit om te annuleren.
+Tip: per ongeluk geactiveerd? Voer 'shutdown /a' uit om te annuleren.
Zet de machine in slaap modus.
@@ -1331,7 +1331,7 @@ Info: vanwege een limiet van Windows, werkt dit alleen als hibernation uitgescha
Je kunt iets als NirCmd (http://www.nirsoft.net/utils/nircmd.html) gebruiken om dit te omzeilen.
- Voer de locatie van je browser's binary in (.exe bestand).
+ Voer de locatie van je browser's binary in (.exe bestand).
De opgegeven binary is niet gevonden.
@@ -1350,7 +1350,7 @@ Controleer de logs voor meer info.
Voer een geldige API sleutel in.
- Voeg je Home Assistant's URI in.
+ Voeg je Home Assistant's URI in.
Kan niet verbinden, de volgende error werd opgegeven:
@@ -1385,7 +1385,7 @@ Ter info: dit test alleen of lokaal notificaties getoond kunnen worden!
Er ging iets mis!
-Probeer handmatig het vereiste commando uit te voeren. Die is gekopieerd naar je klembord, je hoeft 'm alleen maar te plakken in een 'command prompt' met verhoogde privileges.
+Probeer handmatig het vereiste commando uit te voeren. Die is gekopieerd naar je klembord, je hoeft 'm alleen maar te plakken in een 'command prompt' met verhoogde privileges.
Vergeet niet om de poort van je firewall regel ook aan te passen.
@@ -1410,7 +1410,7 @@ Vergeet niet om de poort van je firewall regel ook aan te passen.
Controleer de HASS.Agent (niet de service) logs voor meer info.
- De service staat op 'uitgeschakeld', dus kan niet gestart worden.
+ De service staat op 'uitgeschakeld', dus kan niet gestart worden.
Schakel eerst de service in, en probeer het dan opnieuw.
@@ -1478,7 +1478,7 @@ Controleer de logs voor meer info.
Vul een geldige API sleutel in.
- Vul Home Assistant's URI in.
+ Vul Home Assistant's URI in.
Kan niet verbinden, de volgende error was teruggegeven:
@@ -1494,7 +1494,7 @@ Home Assistant versie: {0}
testen ..
- Er is iets mis gegaan bij het opslaan van de commando's, controleer de logs voor meer info.
+ Er is iets mis gegaan bij het opslaan van de commando's, controleer de logs voor meer info.
opslaan en registreren, ogenblik geduld ..
@@ -1506,9 +1506,9 @@ Home Assistant versie: {0}
verbinden met de service is gefaald
- The service is niet gevonden! Je kunt 'm installeren en beheren vanuit het configuratie paneel.
+ The service is niet gevonden! Je kunt 'm installeren en beheren vanuit het configuratie paneel.
-Wanneer hij weer draait, kun je hier terugkomen om de commando's en sensoren te configureren.
+Wanneer hij weer draait, kun je hier terugkomen om de commando's en sensoren te configureren.
communiceren met de service is gefaald
@@ -1543,10 +1543,10 @@ Je kunt de logs openen en de service beheren via het configuratie paneel.
- ophalen geconfigureerde commando's gefaald
+ ophalen geconfigureerde commando's gefaald
- De service heeft een fout teruggegeven tijdens het ophalen van de opgeslagen commando's. Controleer de logs voor meer info.
+ De service heeft een fout teruggegeven tijdens het ophalen van de opgeslagen commando's. Controleer de logs voor meer info.
Je kunt de logs openen en de service beheren via het configuratie paneel.
@@ -1586,7 +1586,7 @@ Leeglaten om ze allemaal te laten verbinden.
Met deze naam registreert de satelliet service zichzelf bij Home Assistant.
-Standaard is het je PC naam plus '-satellite'.
+Standaard is het je PC naam plus '-satellite'.
De hoeveelheid tijd dat de satelliet service wacht voordat hij een verbroken verbinding met de MQTT broker meldt.
@@ -1644,7 +1644,7 @@ Controleer de logs voor meer informatie.
opslaan en registreren, ogenblik geduld ..
- Er is iets mis gegaan bij het opslaan van de commando's, controleer de logs voor meer info.
+ Er is iets mis gegaan bij het opslaan van de commando's, controleer de logs voor meer info.
Nieuwe Commando
@@ -1668,12 +1668,12 @@ Controleer de logs voor meer informatie.
Er is al een commando met die naam. Weet je zeker dat je door wilt gaan?
- Als je geen commando invult, kun je deze entiteit alleen gebruiken met een 'actie' waarde via Home Assistant. Uitvoeren in de huidige vorm doet niks.
+ Als je geen commando invult, kun je deze entiteit alleen gebruiken met een 'actie' waarde via Home Assistant. Uitvoeren in de huidige vorm doet niks.
Weet je zeker dat je dit wilt?
- Als je geen commando of script invult, kun je deze entiteit alleen gebruiken met een 'actie' waarde via Home Assistant. Uitvoeren in de huidige vorm doet niks.
+ Als je geen commando of script invult, kun je deze entiteit alleen gebruiken met een 'actie' waarde via Home Assistant. Uitvoeren in de huidige vorm doet niks.
Weet je zeker dat je dit wilt?
@@ -1684,7 +1684,7 @@ Weet je zeker dat je dit wilt?
Controleer van keys gefaald: {0}
- Als je geen URL invult, kun je deze entiteit alleen gebruiken met een 'actie' waarde via Home Assistant. Uitvoeren in de huidige vorm doet niks.
+ Als je geen URL invult, kun je deze entiteit alleen gebruiken met een 'actie' waarde via Home Assistant. Uitvoeren in de huidige vorm doet niks.
Weet je zeker dat je dit wilt?
@@ -1730,10 +1730,10 @@ configureer een executor, anders kan het commando niet uitvoeren
Dat betekent dat het alleen bestanden kan opslaan en aanpassen op bepaalde plekken,
- zoals de '%USERPROFILE%\AppData\LocalLow' map of
+ zoals de '%USERPROFILE%\AppData\LocalLow' map of
- de 'HKEY_CURRENT_USER\Software\AppDataLow' register sleutel.
+ de 'HKEY_CURRENT_USER\Software\AppDataLow' register sleutel.
Je kunt het beste je commando testen om zeker te weten dat hij hier niet door wordt beïnvloed.
@@ -1847,11 +1847,11 @@ configureer een executor, anders kan het commando niet uitvoeren
Je hebt je apparaatnaam aangepast.
-Al je sensoren en commando's worden nu ongepubliceerd, waarna HASS.Agent zal herstarten en ze daarna opnieuw zal publiceren.
+Al je sensoren en commando's worden nu ongepubliceerd, waarna HASS.Agent zal herstarten en ze daarna opnieuw zal publiceren.
Geen zorgen, ze behouden hun huidige namen, dus al je automatiseringen en scripts blijven werken.
-Ter info: de naam zal 'opgeschoond' worden, wat betekent dat alles behalve letters, cijfers en spaties wordt omgezet naar een laag streepje. Dit is vereist door HA.
+Ter info: de naam zal 'opgeschoond' worden, wat betekent dat alles behalve letters, cijfers en spaties wordt omgezet naar een laag streepje. Dit is vereist door HA.
Je hebt de poort van de lokale API aangepast. Deze nieuwe poort moet gereserveerd wordt.
@@ -1862,7 +1862,7 @@ Je krijgt een UAC verzoek te zien om dat te doen, deze graag toestemming geven.<
Er is iets misgegaan!
-Voer het vereiste commando handmatig uit. Hij is gekopieerd naar je klembord, je hoeft 'm alleen maar te plakken in een 'command prompt' met verhoogde privileges.
+Voer het vereiste commando handmatig uit. Hij is gekopieerd naar je klembord, je hoeft 'm alleen maar te plakken in een 'command prompt' met verhoogde privileges.
Vergeet niet om de poort van je firewall regel ook aan te passen.
@@ -1883,7 +1883,7 @@ Wil je nu herstarten?
Er is iets misgegaan bij het laden van je instellingen.
-Controleer appsettings.json in de 'config' subfolder, or verwijder 'm gewoon om schoon te starten.
+Controleer appsettings.json in de 'config' subfolder, or verwijder 'm gewoon om schoon te starten.
Fuzzy
@@ -1896,7 +1896,7 @@ Controleer de logs en rapporteer eventuele bugs op GitHub.
Fuzzy
- &commando's
+ &commando's
Fuzzy
@@ -2039,7 +2039,7 @@ Controleer of er niet nog een andere instantie van HASS.Agent actief is, en of d
Geeft informatie over meerdere aspecten van het geluid van je apparaat:
-Huidige piek volumeniveau (kan gebruikt worden als een simpele 'speelt er iets' waarde).
+Huidige piek volumeniveau (kan gebruikt worden als een simpele 'speelt er iets' waarde).
Standaard geluidsapparaat: naam, status en volume.
@@ -2078,7 +2078,7 @@ Pakt momenteel het volume van je standaardapparaat.
Geeft een datetime waarde met het laatste moment dat het systeem (her)startte.
-Belangrijk: Windows' FastBoot optie kan deze waarde beïnvloeden, omdat dat een vorm van hibernation is. Je kunt het uitschakelen via Energiebeheer. Het maakt niet veel verschil voor moderne machines met SSDs, maar het uitschakelen ervan zorgt ervoor dat je altijd een schone lei hebt na een herstart.
+Belangrijk: Windows' FastBoot optie kan deze waarde beïnvloeden, omdat dat een vorm van hibernation is. Je kunt het uitschakelen via Energiebeheer. Het maakt niet veel verschil voor moderne machines met SSDs, maar het uitschakelen ervan zorgt ervoor dat je altijd een schone lei hebt na een herstart.
Geeft de volgende systeemstatus veranderingen:
@@ -2120,7 +2120,7 @@ Categorie: Processor
Teller: % Processor Time
Instance: _Total
-Je kunt de tellers verkennen via Windows' 'perfmon.exe' applicatie.
+Je kunt de tellers verkennen via Windows' 'perfmon.exe' applicatie.
Geeft het aantal actieve instanties van het proces.
@@ -2129,7 +2129,7 @@ Je kunt de tellers verkennen via Windows' 'perfmon.exe' applicati
Geeft de staat van de opgegeven service: NotFound, Stopped, StartPending, StopPending, Running, ContinuePending, PausePending or Paused.
-Zorg dat je de 'Service naam' geeft, niet de 'Weergavenaam'.
+Zorg dat je de 'Service naam' geeft, niet de 'Weergavenaam'.
Geeft de huidige sessie staat:
@@ -2155,7 +2155,7 @@ Notitie: als hij gebruikt wordt in de satelliet service, zal hij geen gebruikers
Fuzzy
- Geeft een sensor met het aantal beschikbare driver updates, een sensor met het aantal beschikbare software updates, een sensor met info over de beschikbare driver updates (titel, kb, artikel id's, verborgen, type en categorieën) en een sensor met hetzelfde voor de beschikbare software updates.
+ Geeft een sensor met het aantal beschikbare driver updates, een sensor met het aantal beschikbare software updates, een sensor met info over de beschikbare driver updates (titel, kb, artikel id's, verborgen, type en categorieën) en een sensor met hetzelfde voor de beschikbare software updates.
Dit is een duur verzoek, dus de aanbevolen interval is 15 minuten (900 seconden). Maar de ondergrens is 10 minuten, als je een lagere waarde geeft krijg je de laatst-bekende lijst terug.
Fuzzy
@@ -2179,12 +2179,12 @@ Dit is een duur verzoek, dus de aanbevolen interval is 15 minuten (900 seconden)
{0}
- Fout tijdens laden commando's:
+ Fout tijdens laden commando's:
{0}
- Fout tijdens opslaan commando's:
+ Fout tijdens opslaan commando's:
{0}
@@ -2609,7 +2609,7 @@ Wil je alsnog met de huidige waardes testen?
ApplicatieGestart
- Je kunt de satelliet service gebruiken om sensoren en commando's uit te voeren zonder ingelogd te hoeven zijn. Niet alle types zijn beschikbaar, bijvoorbeeld het 'LanceerUrl' commando kan alleen als regulier commando toegevoegd worden.
+ Je kunt de satelliet service gebruiken om sensoren en commando's uit te voeren zonder ingelogd te hoeven zijn. Niet alle types zijn beschikbaar, bijvoorbeeld het 'LanceerUrl' commando kan alleen als regulier commando toegevoegd worden.
laatst bekende waarde
@@ -2628,24 +2628,24 @@ Controleer of er geen andere HASS.Agent instanties actief zijn, en of de poort b
Toont een scherm met de opgegeven URL.
-Dit wijkt af van het 'LanceerUrl' commando in dat het geen volledige browser laadt, alleen de opgegeven URL in een eigen scherm.
+Dit wijkt af van het 'LanceerUrl' commando in dat het geen volledige browser laadt, alleen de opgegeven URL in een eigen scherm.
Je kunt dit bijvoorbeeld gebruiken om snel een dashboard van Home Assistant te tonen.
Standaard slaat hij cookies oneindig op, dus je hoeft maar één keer in te loggen.
- HASS.Agent Commando's
+ HASS.Agent Commando's
- Zoekt het opgegeven proces, en probeert z'n hoofdscherm naar de voorgrond te halen.
+ Zoekt het opgegeven proces, en probeert z'n hoofdscherm naar de voorgrond te halen.
Als de applicatie geminimaliseerd is, wordt hij hersteld.
-Voorbeeld: als je VLC naar de voorgrond wilt sturen, gebruik dan 'vlc'.
+Voorbeeld: als je VLC naar de voorgrond wilt sturen, gebruik dan 'vlc'.
- Als je het commando niet configureert, kan je deze entiteit alleen gebruiken met een 'actie' waarde via Home Assistant en hij toont met de standaard instellingen. Uitvoeren zonder een actie doet niks.
+ Als je het commando niet configureert, kan je deze entiteit alleen gebruiken met een 'actie' waarde via Home Assistant en hij toont met de standaard instellingen. Uitvoeren zonder een actie doet niks.
Weet je zeker dat je dit wilt?
@@ -2687,7 +2687,7 @@ Ter info: deze melding toont éénmalig.
lokal&e api uitvoeren
- HASS.Agent heeft z'n eigen lokale API, zodat Home Assistant verzoeken kan sturen (bijvoorbeeld om een notificatie te versturen). Je kunt hem hier globlaal configureren, en daarna kun je de afhankelijke onderdelen configureren (momenteel notificaties en mediaspeler).
+ HASS.Agent heeft z'n eigen lokale API, zodat Home Assistant verzoeken kan sturen (bijvoorbeeld om een notificatie te versturen). Je kunt hem hier globlaal configureren, en daarna kun je de afhankelijke onderdelen configureren (momenteel notificaties en mediaspeler).
Notitie: dit is niet vereist om de nieuwe integratie te laten werken. Alleen inschakelen en gebruiken als je geen MQTT gebruikt.
Fuzzy
@@ -2741,14 +2741,14 @@ Notitie: dit is niet vereist om de nieuwe integratie te laten werken. Alleen ins
Fuzzy
- de lokale API is uitgeschakeld, maar de mediaspeler heeft 'm nodig om te functioneren
+ de lokale API is uitgeschakeld, maar de mediaspeler heeft 'm nodig om te functioneren
Fuzzy
&TLS
- de lokale API is uitgeschakeld, maar de mediaspeler heeft 'm nodig om te functioneren
+ de lokale API is uitgeschakeld, maar de mediaspeler heeft 'm nodig om te functioneren
Fuzzy
@@ -2785,10 +2785,10 @@ Notitie: dit is niet vereist om de nieuwe integratie te laten werken. Alleen ins
Systeemvak Pictogram
- Je invoertaal '{0}' staat erom bekend te botsen met de standaard CTRL-ALT-Q sneltoets. Stel daarom je eigen in.
+ Je invoertaal '{0}' staat erom bekend te botsen met de standaard CTRL-ALT-Q sneltoets. Stel daarom je eigen in.
- Je invoertaal '{0}' is onbekend, en kan botsen met de standaard CTRL-ALT-Q sneltoets. Controleer dit voor de zekerheid. Als het zo is, overweeg dan een ticket te openen op GitHub om 'm aan de lijst toe te laten voegen.
+ Je invoertaal '{0}' is onbekend, en kan botsen met de standaard CTRL-ALT-Q sneltoets. Controleer dit voor de zekerheid. Als het zo is, overweeg dan een ticket te openen op GitHub om 'm aan de lijst toe te laten voegen.
geen toetsen gevonden
@@ -2800,7 +2800,7 @@ Notitie: dit is niet vereist om de nieuwe integratie te laten werken. Alleen ins
fout tijdens verwerken toetsen, controleer de logs voor meer info
- het aantal '[' haakjes komt niet overeen met het aantal ']' haakjes ({0} tegenover {1})
+ het aantal '[' haakjes komt niet overeen met het aantal ']' haakjes ({0} tegenover {1})
Documentatie
@@ -2852,7 +2852,7 @@ Dit is makkelijk via HACS, maar je kunt ook handmatig installeren. Bezoek de lin
activeer ¬ificaties
- HASS.Agent gebruikt z'n eigen ingebouwde API, zodat Home Assistant verzoeken kan sturen (zoals notificaties of tekst-naar-spraak).
+ HASS.Agent gebruikt z'n eigen ingebouwde API, zodat Home Assistant verzoeken kan sturen (zoals notificaties of tekst-naar-spraak).
Wil je dit activeren?
@@ -2860,7 +2860,7 @@ Wil je dit activeren?
Je kunt kiezen welke modules te wilt activeren. Ze vereisen HA integraties, maar geen zorgen, de volgende pagina geeft je meer info over hoe je ze in kunt stellen.
- Ter info: 5115 is de standaard poort, verander 'm alleen als je dit ook in Home Assistant hebt gedaan.
+ Ter info: 5115 is de standaard poort, verander 'm alleen als je dit ook in Home Assistant hebt gedaan.
&TLS
@@ -2903,7 +2903,7 @@ Wil je die versie gebruiken?
grootte
- tip: druk op 'esc' om een webview te sluiten
+ tip: druk op 'esc' om een webview te sluiten
&URL
@@ -2926,7 +2926,7 @@ Controleer of het keycode veld focus heeft, en druk dan op de toets die je gesim
status notificaties inschakelen
- HASS.Agent zal je apparaatnaam opschonen, om zeker te zijn dat HA 'm accepteert. Je kunt dit uitschakelen als je zeker weet dat je naam wordt geaccepteerd.
+ HASS.Agent zal je apparaatnaam opschonen, om zeker te zijn dat HA 'm accepteert. Je kunt dit uitschakelen als je zeker weet dat je naam wordt geaccepteerd.
Als je wilt, kun je status notificaties compleet uitschakelen. HASS.Agent zal je niet melden dat een verbinding verbroken of hersteld is.
@@ -2934,7 +2934,7 @@ Controleer of het keycode veld focus heeft, en druk dan op de toets die je gesim
Je hebt je apparaatnaam aangepast.
-Al je sensoren en commando's worden nu ongepubliceerd, waarna HASS.Agent zal herstarten en ze daarna opnieuw zal publiceren.
+Al je sensoren en commando's worden nu ongepubliceerd, waarna HASS.Agent zal herstarten en ze daarna opnieuw zal publiceren.
Geen zorgen, ze behouden hun huidige namen, dus al je automatiseringen en scripts blijven werken.
@@ -2998,7 +2998,7 @@ Ter info: je hebt opschoning uitgeschakeld, dus verzeker je ervan dat je apparaa
Zet alle beeldschermen in slaap (laag energieverbruik) modus.
- Probeert alle beeldschermen wakker te maken door de 'pijl omhoog' knop te simuleren.
+ Probeert alle beeldschermen wakker te maken door de 'pijl omhoog' knop te simuleren.
Stelt de volume van de huidige standaard geluidapparaat in op het opgegeven niveau.
@@ -3010,7 +3010,7 @@ Ter info: je hebt opschoning uitgeschakeld, dus verzeker je ervan dat je apparaa
Commando
- Als je geen volume waarde invult, kun je deze entiteit alleen gebruiken met een 'actie' waarde via Home Assistant. Zonder activeren doet niks.
+ Als je geen volume waarde invult, kun je deze entiteit alleen gebruiken met een 'actie' waarde via Home Assistant. Zonder activeren doet niks.
Weet je zeker dat je dit wilt?
@@ -3025,12 +3025,12 @@ Wil je deze variant gebruiken?
Je API token ziet er verkeerd uit. Controleer dat je de hele token geselecteerd hebt (geen CTRL+A of dubbelklik gebruiken).
Er zouden drie secties moeten zijn (gescheiden door twee punten).
-Weet je zeker dat je 'm zo wilt gebruiken?
+Weet je zeker dat je 'm zo wilt gebruiken?
- Je URI ziet er verkeerd uit. Het zou moeten lijken op 'http://homeassistant.local:8123' of 'https://192.168.0.1:8123'.
+ Je URI ziet er verkeerd uit. Het zou moeten lijken op 'http://homeassistant.local:8123' of 'https://192.168.0.1:8123'.
-Weet je zeker dat je 'm zo wilt gebruiken?
+Weet je zeker dat je 'm zo wilt gebruiken?
testen ..
@@ -3042,7 +3042,7 @@ Weet je zeker dat je 'm zo wilt gebruiken?
mqtt inschakelen
- zonder mqtt, zullen commando's en sensoren niet werken!
+ zonder mqtt, zullen commando's en sensoren niet werken!
zowel de lokale API als MQTT zijn uitgeschakeld, maar de integratie heeft ten minste één nodig om te werken
@@ -3053,10 +3053,10 @@ Weet je zeker dat je 'm zo wilt gebruiken?
De service is momenteel gestopt, dus je kunt hem niet configureren.
-Zorg dat je 'm eerst geactiveerd en gestart hebt.
+Zorg dat je 'm eerst geactiveerd en gestart hebt.
- Als je de service wilt beheren (commando's en sensors toevoegen, instellingen aanpassen) dan kan dat hier, of door de 'satellite service' knop op het hoofdscherm.
+ Als je de service wilt beheren (commando's en sensors toevoegen, instellingen aanpassen) dan kan dat hier, of door de 'satellite service' knop op het hoofdscherm.
toon standaard menu bij linker muisknop klik
@@ -3065,17 +3065,17 @@ Zorg dat je 'm eerst geactiveerd en gestart hebt.
Je Home Assistant API token ziet er verkeerd uit. Controleer dat je de hele token geselecteerd hebt (geen CTRL+A of dubbelklik gebruiken).
Er zouden drie secties moeten zijn (gescheiden door twee punten).
-Weet je zeker dat je 'm zo wilt gebruiken?
+Weet je zeker dat je 'm zo wilt gebruiken?
- Je Home Assistant URI ziet er verkeerd uit. Het zou moeten lijken op 'http://homeassistant.local:8123' of 'https://192.168.0.1:8123'.
+ Je Home Assistant URI ziet er verkeerd uit. Het zou moeten lijken op 'http://homeassistant.local:8123' of 'https://192.168.0.1:8123'.
-Weet je zeker dat je 'm zo wilt gebruiken?
+Weet je zeker dat je 'm zo wilt gebruiken?
- Je MQTT broker URI ziet er verkeerd uit. Het zou moeten lijken op 'homeassistant.local' or '192.168.0.1'.
+ Je MQTT broker URI ziet er verkeerd uit. Het zou moeten lijken op 'homeassistant.local' or '192.168.0.1'.
-Weet je zeker dat je 'm zo wilt gebruiken?
+Weet je zeker dat je 'm zo wilt gebruiken?
sluiten
@@ -3088,7 +3088,7 @@ Weet je zeker dat je 'm zo wilt gebruiken?
Het ontwikkelen en onderhouden van deze tool (en alles wat erbij komt kijken, zoals support, deze vertaling en de documentatie) neemt een hoop tijd in beslag.
-Zoals de meeste ontwikkelaars draai ik op caffeïne - dus als je 't kunt missen, wordt een kop koffie altijd erg gewaardeerd!
+Zoals de meeste ontwikkelaars draai ik op caffeïne - dus als je 't kunt missen, wordt een kop koffie altijd erg gewaardeerd!
Doneren
@@ -3103,15 +3103,15 @@ Zoals de meeste ontwikkelaars draai ik op caffeïne - dus als je 't kunt mi
Je API token ziet er verkeerd uit. Controleer dat je de hele token geselecteerd hebt (geen CTRL+A of dubbelklik gebruiken).
Er zouden drie secties moeten zijn (gescheiden door twee punten).
-Weet je zeker dat je 'm zo wilt gebruiken?
+Weet je zeker dat je 'm zo wilt gebruiken?
- Je URI ziet er verkeerd uit. Het zou moeten lijken op 'http://homeassistant.local:8123' of 'https://192.168.0.1:8123'.
+ Je URI ziet er verkeerd uit. Het zou moeten lijken op 'http://homeassistant.local:8123' of 'https://192.168.0.1:8123'.
-Weet je zeker dat je 'm zo wilt gebruiken?
+Weet je zeker dat je 'm zo wilt gebruiken?
- Het ontwikkelen en onderhouden van deze tool (en alles wat erbij komt kijken, zoals support, deze vertaling en de documentatie) neemt een hoop tijd in beslag. Zoals de meeste ontwikkelaars draai ik op caffeïne - dus als je 't kunt missen, wordt een kop koffie altijd erg gewaardeerd!
+ Het ontwikkelen en onderhouden van deze tool (en alles wat erbij komt kijken, zoals support, deze vertaling en de documentatie) neemt een hoop tijd in beslag. Zoals de meeste ontwikkelaars draai ik op caffeïne - dus als je 't kunt missen, wordt een kop koffie altijd erg gewaardeerd!
Tip: andere donatie methodes zijn beschikbaar in het Over scherm.
@@ -3143,9 +3143,9 @@ Toont alleen apparaten die zijn gezien sinds het laatste rapport, oftewel, zodra
Geeft je huidige latitude, longitude en altitude als een kommagescheiden waarde.
-Verzeker dat Windows' localisatieservices ingeschakeld zijn!
+Verzeker dat Windows' localisatieservices ingeschakeld zijn!
-Afhankelijk van je Windows versie, kan dit gevonden worden in het nieuwe configuratiescherm -> 'privacy en beveiliging' -> 'locatie'.
+Afhankelijk van je Windows versie, kan dit gevonden worden in het nieuwe configuratiescherm -> 'privacy en beveiliging' -> 'locatie'.
Geeft de naam van het proces dat momenteel de microfoon gebruikt.
@@ -3231,7 +3231,7 @@ Wil je de logmap openen?
error tijdens instellen opstartmodus, controleer logs
- Microsoft's WebView2 runtime is niet op je machine gevonden. Normaliter handelt de installatie dit af, maar je kunt het ook handmatig installeren.
+ Microsoft's WebView2 runtime is niet op je machine gevonden. Normaliter handelt de installatie dit af, maar je kunt het ook handmatig installeren.
Wil je de runtime installatie downloaden?
@@ -3241,4 +3241,13 @@ Wil je de runtime installatie downloaden?
domein
+
+ RadioCommando
+
+
+ SwitchDesktop
+
+
+ ActiveDesktop
+
\ No newline at end of file
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.pl.resx b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.pl.resx
index c3c1de48..23625103 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.pl.resx
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.pl.resx
@@ -239,7 +239,7 @@ W ten sposób, cokolwiek robisz na swoim komputerze, zawsze możesz wchodzić w
Niektóre elementy, takie jak obrazy wyświetlane w powiadomieniach, muszą być tymczasowo przechowywane lokalnie. Możesz
skonfigurować, przez ile dni mają być przechowywane, zanim HASS.Agent je usunie.
-Aby zachować je na stałe, wpisz "0".
+Aby zachować je na stałe, wpisz "0".
Rozszerzone rejestrowanie logów zapewnia bardziej szczegółowe i wnikliwe informacje w przypadku, gdy domyślne rejestrowanie nie jest wystarczające.
@@ -775,7 +775,7 @@ HASS.Agent do nasłuchiwania na określonym porcie.
HASS.Agent Aktualizacja
- Poczekaj na ponowne uruchomienie HASS.Agent'a..
+ Poczekaj na ponowne uruchomienie HASS.Agent'a..
Czakam na zamkniecie poprzedniej instancji..
@@ -1199,7 +1199,7 @@ zgłaszaj błędy lub po prostu rozmawiaj o czymkolwiek.
Pomoc
- pokaż HASS.Agent'a
+ pokaż HASS.Agent'a
pokaż szybkie akcje
@@ -1277,7 +1277,7 @@ k&onfiguracja
szybkie akcje:
- api home assistant'a:
+ api home assistant'a:
api powiadomień
@@ -1319,7 +1319,7 @@ k&onfiguracja
Wykonaj niestandardowe polecenie.
-Te polecenia działają bez podwyższonych uprawnień. Aby uruchomić z podwyższonym poziomem uprawnień, utwórz Zaplanowane zadanie i użyj 'schtasks /Run /TN "NazwaZadania"' jako polecenia do wykonania zadania.
+Te polecenia działają bez podwyższonych uprawnień. Aby uruchomić z podwyższonym poziomem uprawnień, utwórz Zaplanowane zadanie i użyj 'schtasks /Run /TN "NazwaZadania"' jako polecenia do wykonania zadania.
Lub włącz opcję „uruchom jako niską integralność”, aby uzyskać jeszcze bardziej rygorystyczne wykonanie.
@@ -1402,12 +1402,12 @@ Przydatne na przykład, jeśli chcesz zmusić HASS.Agent do aktualizacji wszystk
Ponowne uruchomi maszynę po jednej minucie.
-Wskazówka: włączono przypadkowo? Uruchom 'shutdown /a', aby przerwać.
+Wskazówka: włączono przypadkowo? Uruchom 'shutdown /a', aby przerwać.
Wyłączy maszynę po jednej minucie.
-Wskazówka: włączono przypadkowo? Uruchom 'shutdown /a', aby przerwać.
+Wskazówka: włączono przypadkowo? Uruchom 'shutdown /a', aby przerwać.
Usypia maszynę.
@@ -1555,7 +1555,7 @@ Sprawdź logi, aby uzyskać więcej informacji.
Aktywowanie Uruchomienie-przy-logowaniu..
- Coś poszło nie tak. Możesz spróbować ponownie, lub przejść do następnej strony i spróbować ponownie po ponownym uruchomieniu HASS.Agent'a.
+ Coś poszło nie tak. Możesz spróbować ponownie, lub przejść do następnej strony i spróbować ponownie po ponownym uruchomieniu HASS.Agent'a.
Włącz Uruchomienie-przy-logowaniu
@@ -1663,7 +1663,7 @@ Czy jesteś pewien?
Wybrane środowisko wykonania nie zostało znalezione. Wybierz nowe.
- Ustawia klucz autoryzacji, jeżeli chcesz aby tylko jedna instancja HASS.Agent'a na tym komputerze łączyła się z usługą usługą Satellite.
+ Ustawia klucz autoryzacji, jeżeli chcesz aby tylko jedna instancja HASS.Agent'a na tym komputerze łączyła się z usługą usługą Satellite.
Tylko instancja z odpowiednim kluczem autoryzacji może się połączyć.
@@ -1673,7 +1673,7 @@ Pozostaw puste aby pozwolić łączyć się wszystkim.
Nazwa pod którą usługa Satellite zostanie zarejestrowana w Home Assistant.
-Domyślnie jest to nazwa twojego komputera oraz '-satellite'.
+Domyślnie jest to nazwa twojego komputera oraz '-satellite'.
Czas po jakim usługa Satellite wyśle informacje o utracie połączenia przez MQTT.
@@ -2132,7 +2132,7 @@ Upewnij się, że żadne inna instancja HASS.Agent nie jest uruchomiona, a port
Zwraca informacje na temat urządzenia audio:
-Aktualny maksymalny poziom głośności (może być używany jako prosta wartość 'czy coś aktualnie gra').
+Aktualny maksymalny poziom głośności (może być używany jako prosta wartość 'czy coś aktualnie gra').
Domyślne urządzenie audio: nazwa, stan, głośność.
@@ -2212,7 +2212,7 @@ Category: Processor
Counter: % Processor Time
Instance: _Total
-Możesz odnaleźć liczniki wydajności przez narzędzie Windows 'perfmon.exe'.
+Możesz odnaleźć liczniki wydajności przez narzędzie Windows 'perfmon.exe'.
Zwraca ilość instancji danego procesu.
@@ -2221,7 +2221,7 @@ Możesz odnaleźć liczniki wydajności przez narzędzie Windows 'perfmon.e
Zwraca stan usługi: NotFound, Stopped, StartPending, StopPending, Running, ContinuePending, PausePending or Paused.
-Upewnij się że wpisujesz 'Service name', nie 'Dispaly name'.
+Upewnij się że wpisujesz 'Service name', nie 'Dispaly name'.
Fuzzy
@@ -2702,7 +2702,7 @@ Czy chcesz użyć obecnej ścieżki?
ApplicationStarted
- Możesz użyć usługi Satellite aby przesyłać czujniki i komendy bez potrzeby bycia zalogowanym. Nie wszystkie typy działają, na przykład komenda 'UruchomUrl' może zostać dodana tylko jako normalna komenda.
+ Możesz użyć usługi Satellite aby przesyłać czujniki i komendy bez potrzeby bycia zalogowanym. Nie wszystkie typy działają, na przykład komenda 'UruchomUrl' może zostać dodana tylko jako normalna komenda.
Ostatnie Znana Wartość
@@ -2978,7 +2978,7 @@ Czy akceptujesz taką nazwę?
Pokazuje nazwe okna
- Ustawia okno jako '&Zawsze na wierzchu'
+ Ustawia okno jako '&Zawsze na wierzchu'
Złap i przeciągnij okno aby ustalić rozmiar i miejsce komendy WebView
@@ -3085,7 +3085,7 @@ Uwaga: wyłączyłeś czyszczenie nazw, więc upewnij się, że nazwa Twojego ur
Usypia wszystkie monitory (niski zużycie energii).
- Stara się wybudzić wszystkie monitory poprzez symulowanie wciśnięcia przycisku "do góry".
+ Stara się wybudzić wszystkie monitory poprzez symulowanie wciśnięcia przycisku "do góry".
Ustawia poziom głośności domyślnego urządzenia na podaną wartość.
@@ -3097,7 +3097,7 @@ Uwaga: wyłączyłeś czyszczenie nazw, więc upewnij się, że nazwa Twojego ur
komenda
- Nie podając żadnej wartości głośności musisz używać encji z 'akcją' w Home Assistant. Uruchomienie jej tak jak teraz nie przyniesie żadnego efektu.
+ Nie podając żadnej wartości głośności musisz używać encji z 'akcją' w Home Assistant. Uruchomienie jej tak jak teraz nie przyniesie żadnego efektu.
Czy jesteś pewien?
@@ -3155,12 +3155,12 @@ Proszę włącz usługę aby ją skonfigurować.
Czy jesteś pewien, że chcesz użyć tego tokenu?
- Twój adres Home Assistant wygląda na błędny. Powinien wyglądać mniej więcej tak 'http://homeassistant.local:8123' lub tak 'https://192.168.0.1:8123'.
+ Twój adres Home Assistant wygląda na błędny. Powinien wyglądać mniej więcej tak 'http://homeassistant.local:8123' lub tak 'https://192.168.0.1:8123'.
Jesteś pewien że chcesz używać takiego?
- Twój adres brokera MQTT wygląda na błędny. Powinien wyglądać mniej więcej tak 'homeassistant.local' lub tak '192.168.0.1'.
+ Twój adres brokera MQTT wygląda na błędny. Powinien wyglądać mniej więcej tak 'homeassistant.local' lub tak '192.168.0.1'.
Jesteś pewien że chcesz używać takiego?
@@ -3233,7 +3233,7 @@ Pokazuje tylko te urządzenia które zgłaszały się w okresie od ostatniego ra
Upewnij się że lokalizacja jest włączona w systemie Windows!
-W zalezności od Twojej wersji Windows'a opcje te możesz znaleźć w Ustawienia -> Prywatność i Zabezpieczenia -> Lokalizacja
+W zalezności od Twojej wersji Windows'a opcje te możesz znaleźć w Ustawienia -> Prywatność i Zabezpieczenia -> Lokalizacja
Zwraca nazwę procesu który obecnie używa mikrofonu.
@@ -3319,7 +3319,7 @@ Czy chcesz otworzyć plik log?
Błąd podczas ustawiania trybu uruchamiania. Sprawdź logi, aby uzyskać więcej informacji.
- Na twoim komputerze nie ma zainstalowanego Microsoft's WebView2 runtime. Zazwyczaj jest on instalowany automatycznie, ale możesz to zrobić też ręcznie.
+ Na twoim komputerze nie ma zainstalowanego Microsoft's WebView2 runtime. Zazwyczaj jest on instalowany automatycznie, ale możesz to zrobić też ręcznie.
Czy chcesz pobrać plik instalacyjny?
@@ -3329,4 +3329,13 @@ Czy chcesz pobrać plik instalacyjny?
domain
+
+ SterowanieRadiem
+
+
+ ZmienPulpit
+
+
+ AktywnyPulpit
+
\ No newline at end of file
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.pt-br.resx b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.pt-br.resx
index 82d1b56a..32ffbfff 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.pt-br.resx
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.pt-br.resx
@@ -131,7 +131,7 @@
páginas dos componentes usados para suas licenças individuais:
- Um grande 'obrigado' aos desenvolvedores desses projetos, que foram gentis o
+ Um grande 'obrigado' aos desenvolvedores desses projetos, que foram gentis o
suficiente para compartilhar seu trabalho duro com o resto de nós, meros mortais.
@@ -219,19 +219,19 @@ uma xícara de café:
Se o aplicativo for minimizado, ele será restaurado.
-Exemplo: se você deseja enviar o VLC para o primeiro plano, use 'vlc'.
+Exemplo: se você deseja enviar o VLC para o primeiro plano, use 'vlc'.
Execute um comando personalizado.
-Esses comandos são executados sem elevação especial. Para executar elevado, crie uma tarefa agendada e use 'schtasks /Run /TN "TaskName"' como o comando para executar sua tarefa.
+Esses comandos são executados sem elevação especial. Para executar elevado, crie uma tarefa agendada e use 'schtasks /Run /TN "TaskName"' como o comando para executar sua tarefa.
-Ou habilite 'executar como baixa integridade' para uma execução ainda mais rigorosa.
+Ou habilite 'executar como baixa integridade' para uma execução ainda mais rigorosa.
Executa o comando através do executor personalizado configurado (em Configuração -> Ferramentas Externas).
-Seu comando é fornecido como um argumento 'as is', então você deve fornecer suas próprias cotações, etc., se necessário.
+Seu comando é fornecido como um argumento 'as is', então você deve fornecer suas próprias cotações, etc., se necessário.
Coloca a máquina em hibernação.
@@ -247,7 +247,7 @@ Se você precisar de mais teclas e/ou modificadores como CTRL, use o comando Mul
Inicia a URL fornecida, por padrão em seu navegador padrão.
-Para usar o modo 'anônimo', forneça um navegador específico em Configuração -> Ferramentas Externas.
+Para usar o modo 'anônimo', forneça um navegador específico em Configuração -> Ferramentas Externas.
Fuzzy
@@ -257,28 +257,28 @@ Para usar o modo 'anônimo', forneça um navegador específico em Conf
Faz logoff da sessão atual.
- Simula a tecla 'mute'.
+ Simula a tecla 'mute'.
- Simula a tecla 'próxima mídia'.
+ Simula a tecla 'próxima mídia'.
- Simula a tecla 'play/pause mídia'.
+ Simula a tecla 'play/pause mídia'.
- Simula a tecla 'mídia anterior'.
+ Simula a tecla 'mídia anterior'.
- Simula a tecla 'diminuir volume'.
+ Simula a tecla 'diminuir volume'.
- Simula a tecla 'aumentar o volume'.
+ Simula a tecla 'aumentar o volume'.
Coloca todos os monitores no modo de suspensão (baixo consumo de energia).
- Tente acordar todos os monitores simulando um pressionamento de tecla 'seta para cima'.
+ Tente acordar todos os monitores simulando um pressionamento de tecla 'seta para cima'.
Simula o pressionamento de várias teclas.
@@ -311,7 +311,7 @@ Isso será executado sem elevação especial.
Reinicia a máquina após um minuto.
-Dica: acionado acidentalmente? Execute 'shutdown /a' para abortar.
+Dica: acionado acidentalmente? Execute 'shutdown /a' para abortar.
Define o volume do dispositivo de áudio padrão atual para o nível especificado.
@@ -319,7 +319,7 @@ Dica: acionado acidentalmente? Execute 'shutdown /a' para abortar.
Desliga a máquina após um minuto.
-Dica: acionado acidentalmente? Execute 'shutdown /a' para abortar.
+Dica: acionado acidentalmente? Execute 'shutdown /a' para abortar.
Coloca a máquina em sleep.
@@ -331,7 +331,7 @@ Você pode usar algo como NirCmd (http://www.nirsoft.net/utils/nircmd.html) para
Mostra uma janela com a URL fornecida.
-Isso difere do comando 'LaunchUrl', pois não carrega um navegador completo, apenas o URL fornecido em sua própria janela.
+Isso difere do comando 'LaunchUrl', pois não carrega um navegador completo, apenas o URL fornecido em sua própria janela.
Você pode usar isso para, por exemplo, mostrar rapidamente o painel do Home Assistant.
@@ -356,7 +356,7 @@ Por padrão, ele armazena cookies indefinidamente, então você só precisa faze
Já existe um comando com esse nome. Você tem certeza que quer continuar?
- Se você não inserir um comando, só poderá usar essa entidade com um valor de 'ação' por meio do Home Assistant. Executá-lo como está não fará nada.
+ Se você não inserir um comando, só poderá usar essa entidade com um valor de 'ação' por meio do Home Assistant. Executá-lo como está não fará nada.
Tem certeza de que quer isso?
@@ -367,12 +367,12 @@ Tem certeza de que quer isso?
Falha na verificação das chaves: {0}
- Se você não inserir uma URL, só poderá usar essa entidade com um valor de 'ação' por meio do Home Assistant. Executá-lo como está não fará nada.
+ Se você não inserir uma URL, só poderá usar essa entidade com um valor de 'ação' por meio do Home Assistant. Executá-lo como está não fará nada.
Tem certeza de que quer isso?
- Se você não configurar o comando, só poderá usar esta entidade com um valor de 'ação' por meio do Home Assistant e ela será exibida usando as configurações padrão. Executar ela como está não fará nada.
+ Se você não configurar o comando, só poderá usar esta entidade com um valor de 'ação' por meio do Home Assistant e ela será exibida usando as configurações padrão. Executar ela como está não fará nada.
Tem certeza que quer isso?
@@ -385,7 +385,7 @@ Certifique-se de que o campo de código de acesso esteja em foco e pressione a t
iniciar no modo de navegação anônima
- &executar como 'baixa integridade'
+ &executar como 'baixa integridade'
tipo
@@ -432,10 +432,10 @@ por favor configure um executor ou seu comando não será executado
Isso significa que ele só poderá salvar e modificar arquivos em determinados locais,
- como a pasta '%USERPROFILE%\AppData\LocalLow' ou
+ como a pasta '%USERPROFILE%\AppData\LocalLow' ou
- a chave de registro 'HKEY_CURRENT_USER\Software\AppDataLow'.
+ a chave de registro 'HKEY_CURRENT_USER\Software\AppDataLow'.
Você deve testar seu comando para garantir que ele não seja influenciado por isso.
@@ -478,12 +478,12 @@ por favor configure um executor ou seu comando não será executado
hass.agent apenas!
- Se você não inserir um comando ou script, só poderá usar essa entidade com um valor de 'ação' por meio do Home Assistant. Executá-lo como está não fará nada.
+ Se você não inserir um comando ou script, só poderá usar essa entidade com um valor de 'ação' por meio do Home Assistant. Executá-lo como está não fará nada.
Tem certeza de que quer isso?
- Se você não inserir um valor de volume, só poderá usar essa entidade com um valor de 'ação' por meio do Home Assistant. Executá-lo como está não fará nada.
+ Se você não inserir um valor de volume, só poderá usar essa entidade com um valor de 'ação' por meio do Home Assistant. Executá-lo como está não fará nada.
Tem certeza de que quer isso?
@@ -643,7 +643,7 @@ os argumentos usados para iniciar em modo privado.
Você pode configurar o HASS.Agent para usar um executor específico, como perl ou python.
-Use o comando 'custom executor' para iniciar este executor.
+Use o comando 'custom executor' para iniciar este executor.
iniciar incógnito argumento
@@ -718,7 +718,7 @@ Deve conter três seções (separadas por dois pontos).
Tem certeza de que deseja usá-lo assim?
- Sua URL não parece correta. Deve ser algo como 'http://homeassistant.local:8123' ou 'http://192.168.0.1:8123'.
+ Sua URL não parece correta. Deve ser algo como 'http://homeassistant.local:8123' ou 'http://192.168.0.1:8123'.
Tem certeza de que deseja usá-la assim?
@@ -740,7 +740,7 @@ API do Home Assistant.
Forneça um token de acesso de longa duração e o endereço da sua instância do Home Assistant.
-Você pode obter um token através da sua página de perfil. Role até o final e clique em 'CRIAR TOKEN'
+Você pode obter um token através da sua página de perfil. Role até o final e clique em 'CRIAR TOKEN'
Fuzzy
@@ -829,7 +829,7 @@ poderá interagir com o Home Assistant.
As imagens mostradas nas notificações devem ser armazenadas temporariamente localmente.
Você pode configurar a quantidade de dias eles devem ser mantidos antes que o HASS.Agent
-os exclua. Digite '0' para mantê-los permanentemente.
+os exclua. Digite '0' para mantê-los permanentemente.
Fuzzy
@@ -1037,7 +1037,7 @@ Verifique os logs do HASS.Agent (não do serviço) para obter mais informações
&começar serviço
- O serviço está definido como 'desativado', portanto, não pode ser iniciado.
+ O serviço está definido como 'desativado', portanto, não pode ser iniciado.
Ative o serviço primeiro e tente novamente.
@@ -1062,7 +1062,7 @@ Verifique os logs do HASS.Agent (não do serviço) para obter mais informações
O serviço satélite permite que você execute sensores e comandos mesmo quando nenhum usuário
-estiver conectado. Use o botão 'serviço de satélite' na janela principal para gerenciá-lo.
+estiver conectado. Use o botão 'serviço de satélite' na janela principal para gerenciá-lo.
Se você não configurar o serviço, ele não fará nada. No entanto, você ainda pode decidir desativá-lo
@@ -1078,7 +1078,7 @@ Sua configuração e entidades não serão removidas.
Se o serviço ainda falhar após a reinstalação, abra um ticket e envie o conteúdo do log mais recente.
- Se você deseja gerenciar o serviço (adicionar comandos e sensores, alterar configurações), pode fazê-lo aqui ou usando o botão 'serviço satélite' na janela principal.
+ Se você deseja gerenciar o serviço (adicionar comandos e sensores, alterar configurações), pode fazê-lo aqui ou usando o botão 'serviço satélite' na janela principal.
status do serviço:
@@ -1199,12 +1199,12 @@ Deve conter três seções (separadas por dois pontos).
Tem certeza de que deseja usá-lo assim?
- Sua URL não parece correta. Deve ser algo como 'http://homeassistant.local:8123' ou 'http://192.168.0.1:8123'.
+ Sua URL não parece correta. Deve ser algo como 'http://homeassistant.local:8123' ou 'http://192.168.0.1:8123'.
Tem certeza de que deseja usá-la assim?
- Sua URL do broker MQTT não está correta. Deve ser algo como 'homeassistant.local' ou '192.168.0.1'.
+ Sua URL do broker MQTT não está correta. Deve ser algo como 'homeassistant.local' ou '192.168.0.1'.
Tem certeza de que deseja usá-la assim?
@@ -1457,10 +1457,10 @@ conosco:
Ajuda
- Seu idioma de entrada '{0}' é conhecido por colidir com a tecla de atalho CTRL-ALT-Q padrão. Por favor, defina o seu próprio.
+ Seu idioma de entrada '{0}' é conhecido por colidir com a tecla de atalho CTRL-ALT-Q padrão. Por favor, defina o seu próprio.
- Seu idioma de entrada '{0}' é desconhecido e pode colidir com a tecla de atalho CTRL-ALT-Q padrão. Por favor, verifique para ter certeza. Se isso acontecer, considere abrir um ticket no GitHub para que possa ser adicionado à lista.
+ Seu idioma de entrada '{0}' é desconhecido e pode colidir com a tecla de atalho CTRL-ALT-Q padrão. Por favor, verifique para ter certeza. Se isso acontecer, considere abrir um ticket no GitHub para que possa ser adicionado à lista.
nenhuma tecla encontrada
@@ -1472,7 +1472,7 @@ conosco:
erro ao analisar as teclas, verifique o log para obter mais informações
- o número de colchetes '[' não corresponde aos ']' ({0} a {1})
+ o número de colchetes '[' não corresponde aos ']' ({0} a {1})
Certifique-se de que nenhuma outra instância do HASS.Agent esteja em execução e que a porta esteja disponível e registrada.
@@ -1569,7 +1569,7 @@ Nota: esta mensagem é exibida apenas uma vez.
Algo deu errado ao carregar suas configurações.
-Verifique appsettings.json na subpasta 'Config' ou apenas exclua-o para começar de novo.
+Verifique appsettings.json na subpasta 'Config' ou apenas exclua-o para começar de novo.
Fuzzy
@@ -1683,7 +1683,7 @@ Deve conter três seções (separadas por dois pontos).
Tem certeza de que deseja usá-lo assim?
- Sua URL não parece correta. Deve ser algo como 'http://homeassistant.local:8123' ou 'http://192.168.0.1:8123'.
+ Sua URL não parece correta. Deve ser algo como 'http://homeassistant.local:8123' ou 'http://192.168.0.1:8123'.
Tem certeza de que deseja usá-la assim?
@@ -1699,7 +1699,7 @@ HASS.Agent usa API do Home Assistant.
Forneça um token de acesso de longa duração e o endereço da sua instância do Home
Assistant. Você pode obter um token através da sua página de perfil. Role até o final e
-clique em 'CRIAR TOKEN'.
+clique em 'CRIAR TOKEN'.
Fuzzy
@@ -1956,7 +1956,7 @@ O certificado do arquivo baixado será verificado.
Parece que esta é a primeira vez que você iniciou o HASS.Agent.
-Se você quiser, podemos passar pela configuração. Se não, basta clicar em 'fechar'.
+Se você quiser, podemos passar pela configuração. Se não, basta clicar em 'fechar'.
O nome do dispositivo é usado para identificar sua máquina no HA.
@@ -2165,7 +2165,7 @@ Verifique os logs para obter mais informações e, opcionalmente, informe os des
Fornece informações sobre vários aspectos do áudio do seu dispositivo:
-Nível de volume de pico atual (pode ser usado como um valor simples de 'algo está tocando').
+Nível de volume de pico atual (pode ser usado como um valor simples de 'algo está tocando').
Dispositivo de áudio padrão: nome, estado e volume.
@@ -2209,7 +2209,7 @@ Atualmente leva o volume do seu dispositivo padrão.
Certifique-se de que os serviços de localização do Windows estejam ativados!
-Dependendo da sua versão do Windows, isso pode ser encontrado no novo painel de controle -> 'privacidade e segurança' -> 'localização'.
+Dependendo da sua versão do Windows, isso pode ser encontrado no novo painel de controle -> 'privacidade e segurança' -> 'localização'.
Fornece a carga atual da GPU como uma porcentagem.
@@ -2223,7 +2223,7 @@ Dependendo da sua versão do Windows, isso pode ser encontrado no novo painel de
Fornece um valor de data e hora contendo o último momento em que o sistema (re)inicializou.
-Importante: a opção FastBoot do Windows pode prejudicar esse valor, porque é uma forma de hibernação. Você pode desativá-lo através de Opções de energia -> 'Escolha o que os botões de energia fazem' -> desmarque 'Ativar inicialização rápida'. Não faz muita diferença para máquinas modernas com SSDs, mas desabilitar garante que você obtenha um estado limpo após a reinicialização.
+Importante: a opção FastBoot do Windows pode prejudicar esse valor, porque é uma forma de hibernação. Você pode desativá-lo através de Opções de energia -> 'Escolha o que os botões de energia fazem' -> desmarque 'Ativar inicialização rápida'. Não faz muita diferença para máquinas modernas com SSDs, mas desabilitar garante que você obtenha um estado limpo após a reinicialização.
Fornece a última alteração de estado do sistema:
@@ -2273,7 +2273,7 @@ Categoria: Processador
Contador: % de tempo do processador
Instância: _Total
-Você pode explorar os contadores através da ferramenta 'perfmon.exe' do Windows.
+Você pode explorar os contadores através da ferramenta 'perfmon.exe' do Windows.
Retorna o resultado do comando ou script do Powershell fornecido.
@@ -2290,7 +2290,7 @@ Converte o resultado em texto.
Retorna o estado do serviço fornecido: NotFound, Stopped, StartPending, StopPending, Running, ContinuePending, PausePending ou Paused.
-Certifique-se de fornecer o 'Nome do serviço', não o 'Nome de exibição'.
+Certifique-se de fornecer o 'Nome do serviço', não o 'Nome de exibição'.
Fornece o estado da sessão atual:
@@ -2810,7 +2810,7 @@ Deixe em branco para permitir que todos se conectem.
Este é o nome com o qual o serviço satélite se registra no Home Assistant.
-Por padrão, é o nome do seu PC mais '-satellite'.
+Por padrão, é o nome do seu PC mais '-satellite'.
&período de desconexão
@@ -2822,7 +2822,7 @@ Por padrão, é o nome do seu PC mais '-satellite'.
Esta página contém itens de configuração geral. Para configurações, sensores e comandos do MQTT, navegue nas guias na parte superior.
- Você pode usar o serviço satélite para executar sensores e comandos sem precisar estar logado. Nem todos os tipos estão disponíveis, por exemplo, o comando 'Iniciar Url' só pode ser adicionado como um comando regular.
+ Você pode usar o serviço satélite para executar sensores e comandos sem precisar estar logado. Nem todos os tipos estão disponíveis, por exemplo, o comando 'Iniciar Url' só pode ser adicionado como um comando regular.
segundos
@@ -3240,7 +3240,7 @@ Deseja baixar o Microsoft WebView2 runtime?
tamanho
- dica: pressione 'esc' para fechar uma visualização da web
+ dica: pressione 'esc' para fechar uma visualização da web
&URL
@@ -3266,4 +3266,13 @@ Deseja baixar o Microsoft WebView2 runtime?
Desconhecido
+
+ Comando de rádio
+
+
+ SwitchDesktop
+
+
+ ActiveDesktop
+
\ No newline at end of file
diff --git a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.resx b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.resx
index e4ae07d5..f033ea56 100644
--- a/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.resx
+++ b/src/HASS.Agent.Staging/HASS.Agent.Shared/Resources/Localization/Languages.resx
@@ -1,6 +1,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 1.3
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 1.3
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
This page allows you to configure bindings with external tools.
-
+
Clear Image Cache
-
+
Open Folder
-
+
Image Cache Location
-
+
days
-
+
Port
-
+
Show Test Notification
-
+
Execute Port Reservation
-
+
Note: 5115 is the default port, only change it if you changed it in Home Assistant.
-
+
Yes, accept notifications on port
-
+
HASS.Agent can receive notifications from Home Assistant, using text and/or images.
Do you want to enable this function?
-
+
HASS.Agent-Notifier GitHub Page
-
+
Make sure you follow these steps:
- Install HASS.Agent-Notifier integration
@@ -144,241 +143,241 @@ Do you want to enable this function?
- Configure a notifier entity
- Restart Home Assistant
-
+
To use notifications, you need to install and configure the HASS.Agent-notifier integration in
Home Assistant.
This is very easy using HACS but may also be installed manually, visit the link below for more
information.
-
+
Name
-
+
Type
-
+
Apply
-
+
Stored!
-
+
Name
-
+
Type
-
+
HASS.Agent Port Reservation
-
+
HASS.Agent Post Update
-
+
HASS.Agent Restarter
-
+
Name
-
+
Type
-
+
Type
-
+
Domain
-
+
Entity
-
+
Action
-
+
Hotkey
-
+
Description
-
+
Domain
-
+
enable hotkey
-
+
Name
-
+
Type
-
+
Sensors Configuration
-
+
setting 1
-
+
Setting 2
-
+
Setting 3
-
+
Type
-
+
General
-
+
MQTT
-
+
Commands
-
+
Sensors
-
+
General
-
+
External Tools
-
+
Home Assistant API
-
+
Hotkey
-
+
Local Storage
-
+
Logging
-
+
MQTT
-
+
Notifications
-
+
Satellite Service
-
+
Startup
-
+
Updates
-
+
Browse HASS.Agent documentation and usage examples.
-
+
Show HASS.Agent
-
+
Show Quick Actions
-
+
Configuration
-
+
Manage Quick Actions
-
+
Manage Local Sensors
-
+
Manage Commands
-
+
Check for Updates
-
+
Donate
-
+
Help && Contact
-
+
About
-
+
Exit HASS.Agent
-
+
Loading..
-
+
Loading..
-
+
notification api:
-
+
HASS.Agent Onboarding
-
+
Fetching info, please wait..
-
+
Execute a custom command.
These commands run without special elevation. To run elevated, create a Scheduled Task, and use 'schtasks /Run /TN "TaskName"' as the command to execute your task.
Or enable 'run as low integrity' for even stricter execution.
-
+
Executes the command through the configured custom executor (in Configuration -> External Tools).
Your command is provided as an argument 'as is', so you have to supply your own quotes etc. if necessary.
-
+
Sets the machine in hibernation.
-
+
Simulates a single keypress.
Click on the 'keycode' textbox and press the key you want simulated. The corresponding keycode will be entered for you.
If you need more keys and/or modifiers like CTRL, use the MultipleKeys command.
-
+
Launches the provided URL, by default in your default browser.
To use 'incognito', provide a specific browser in Configuration -> External Tools.
If you just want a window with a specific URL (not an entire browser), use a 'WebView' command.
-
+
Locks the current session.
-
+
Logs off the current session.
-
+
Simulates 'Mute' key.
-
+
Simulates 'Media Next' key.
-
+
Simulates 'Media Pause/Play' key.
-
+
Simulates 'Media Previous' key.
-
+
Simulates 'Volume Down' key.
-
+
Simulates 'Volume Up' key.
-
+
Simulates pressing mulitple keys.
You need to put [ ] between every key, otherwise HASS.Agent can't tell them apart. So say you want to press X TAB Y SHIFT-Z, it'd be [X] [{TAB}] [Y] [+Z].
@@ -395,540 +394,540 @@ There are a few tricks you can use:
More info: https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.sendkeys
-
+
Execute a Powershell command or script.
You can either provide the location of a script (*.ps1), or a single-line command.
This will run without special elevation.
-
+
Resets all sensor checks, forcing all sensors to process and send their value.
Useful for example if you want to force HASS.Agent to update all your sensors after a HA reboot.
-
+
Restarts the machine after one minute.
Tip: Accidentally triggered? Run 'shutdown /a' to abort shutdown.
-
+
Shuts down the machine after one minute.
Tip: Accidentally triggered? Run 'shutdown /a' to abort shutdown.
-
+
Puts the machine to sleep.
Note: due to a limitation in Windows, this only works if hibernation is disabled, otherwise it will just hibernate.
You can use something like NirCmd (http://www.nirsoft.net/utils/nircmd.html) to circumvent this.
-
+
Please enter the location of your browser's binary! (.exe file)
-
+
The browser binary provided could not be found, please ensure the path is correct and try again.
-
+
No incognito arguments were provided so the browser will likely launch normally.
Do you want to continue?
-
+
Something went wrong while launching your browser in incognito mode!
Please check the logs for more information.
-
+
Please enter a valid API key!
-
+
Please enter a value for your Home Assistant's URI.
-
+
Unable to connect, the following error was returned:
{0}
-
+
Connection OK!
Home Assistant version: {0}
-
+
Image cache has been cleared!
-
+
Cleaning..
-
+
Notifications are currently disabled, please enable them and restart the HASS.Agent, then try again.
-
+
The test notification should have appeared, if you did not receive it please check the logs or consult the documentation for troubleshooting tips.
Note: This only tests locally whether notifications can be shown!
-
+
This is a test notification!
-
+
Executing, please wait..
-
+
Something went wrong whilst reserving the port!
Manual execution is required and a command has been copied to your clipboard, please open an elevated terminal and paste the command.
Additionally, remember to change your Firewall Rules port!
-
+
Not Installed
-
+
Disabled
-
+
Running
-
+
Stopped
-
+
Failed
-
+
Something went wrong whilst stopping the service, did you allow the UAC prompt?
Check the HASS.Agent (not the service) logs for more information.
-
+
The service is set to 'disabled', so it cannot be started.
Please enable the service first and try again.
-
+
Something went wrong whilst starting the service, did you allow the UAC prompt?
Check the HASS.Agent (not the service) logs for more information.
-
+
Something went wrong whilst disabling the service, did you allow the UAC prompt?
Check the HASS.Agent (not the service) logs for more information.
-
+
Something went wrong whilst enabling the service, did you allow the UAC prompt?
Check the HASS.Agent (not the service) logs for more information.
-
+
Something went wrong whilst reinstalling the service, did you allow the UAC prompt?
Check the HASS.Agent (not the service) logs for more information.
-
+
Something went wrong whilst disabling Start-on-Login, please check the logs for more information.
-
+
Something went wrong whilst disabling Start-on-Login, please check the logs for more information.
-
+
Enabled
-
+
Disable Start-on-Login
-
+
Disabled
-
+
Enable Start-on-Login
-
+
Start-on-Login has been activated!
-
+
Do you want to enable Start-on-Login now?
-
+
Start-on-Login is already activated, all set!
-
+
Activating Start-on-Login..
-
+
Something went wrong. You can try again, or skip to the next page and retry after HASS.Agent's restart.
-
+
Enable Start-on-Login
-
+
Please provide a valid API key.
-
+
Please enter your Home Assistant's URI.
-
+
Unable to connect, the following error was returned:
{0}
-
+
Connection OK!
Home Assistant version: {0}
-
+
Testing..
-
+
An error occurred whilst saving your commands, please check the logs for more information.
-
+
Storing and registering, please wait..
-
+
Connecting with satellite service, please wait..
-
+
Connecting to the service has failed!
-
+
The service hasn't been found! You can install and manage it from the configuration panel.
When it's up and running, come back here to configure the commands and sensors.
-
+
Communicating with the service has failed!
-
+
Unable to communicate with the service. Check the logs for more info.
You can open the logs and manage the service from the configuration panel.
-
+
Unauthorized
-
+
You are not authorized to contact the service.
If you have the correct auth ID, you can set it now and try again.
-
+
Fetching settings failed!
-
+
The service returned an error while requesting its settings. Check the logs for more info.
You can open the logs and manage the service from the configuration panel.
-
+
Fetching MQTT settings failed!
-
+
The service returned an error while requesting its MQTT settings. Check the logs for more info.
You can open the logs and manage the service from the configuration panel.
-
+
Fetching configured commands failed!
-
+
The service returned an error while requesting its configured commands. Check the logs for more info.
You can open the logs and manage the service from the configuration panel.
-
+
Fetching configured sensors failed!
-
+
The service returned an error while requesting its configured sensors. Check the logs for more info.
You can open the logs and manage the service from the configuration panel.
-
+
Storing an empty auth ID will allow all HASS.Agent to access the service.
Are you sure you want this?
-
+
An error occurred whilst saving, check the logs for more information.
-
+
Please provide a device name!
-
+
Please select an executor first. (Tip: Double click to Browse)
-
+
The selected executor could not be found, please ensure the path provided is correct and try again.
-
+
Set an auth ID if you don't want every instance of HASS.Agent on this PC to connect with the satellite service.
Only the instances that have the correct ID, can connect.
Leave empty to allow all to connect.
-
+
This is the name with which the satellite service registers itself on Home Assistant.
By default, it's your PC's name plus '-satellite'.
-
+
The amount of time the satellite service will wait before reporting a lost connection to the MQTT broker.
-
+
Error fetching status, please check logs for information.
-
+
An error occurred whilst saving the configuration, please check the logs for more information.
-
+
Storing and registering, please wait..
-
+
An error occurred whilst saving the sensors, please check the logs for more information.
-
+
Storing and registering, please wait..
-
+
Not all steps completed succesfully. Please consult the logs for more information.
-
+
Not all steps completed succesfully. Please consult the logs for more information.
-
+
HASS.Agent is still active after {0} seconds. Please close all instances and restart manually.
Check the logs for more info, and optionally inform the developers.
-
+
Not all steps completed successfully, please check the logs for more information.
-
+
Enable Satellite Service
-
+
Disable Satellite Service
-
+
Start Satellite Service
-
+
Stop Satellite Service
-
+
Something went wrong while processing the desired service state.
Please consult the logs for more information.
-
+
Topic copied to clipboard!
-
+
Storing and registering, please wait..
-
+
An error occurred whilst saving commands, please check the logs for more information.
-
+
New Command
-
+
Mod Command
-
+
Please select a command type!
-
+
Please select a valid command type!
-
+
Select a valid entity type first.
-
+
Please provide a name!
-
+
A command with that name already exists, are you sure you want to continue?
-
+
If a command is not provided, you may only use this entity with an 'action' value via Home Assistant, running it as-is will have no action.
Are you sure you want to proceed?
-
+
If you don't enter a command or script, you can only use this entity with an 'action' value through Home Assistant. Running it as-is won't do anything.
Are you sure you want this?
-
+
Please enter a key code!
-
+
Checking keys failed: {0}
-
+
If a URL is not provided, you may only use this entity with an 'action' value via Home Assistant, running it as-is will have no action.
Are you sure you want to proceed?
-
+
Command
-
+
Command or Script
-
+
Keycode
-
+
Keycodes
-
+
Launch in Incognito Mode
-
+
Browser: Default
Please configure a custom browser to enable incognito mode.
-
+
URL
-
+
Browser: {0}
-
+
Executor: None
Please configure an executor or your command will not run.
-
+
Executor: {0}
-
+
Low integrity means your command will be executed with restricted privileges.
-
+
This means it will only be able to save and modify files in certain locations,
-
+
such as the '%USERPROFILE%\AppData\LocalLow' folder or
-
+
the 'HKEY_CURRENT_USER\Software\AppDataLow' registry key.
-
+
You should test your command to make sure it's not influenced by this!
-
+
{0} only!
-
+
The MQTT manager hasn't been configured properly, or hasn't yet completed its startup.
-
+
Unable to fetch your entities because of missing config, please enter the required values in the config screen.
-
+