Class AcController
- Namespace
- PanasonicComfortCloudClient
- Assembly
- PanasonicComfortCloudClient.dll
Owns upstream-style preference buffering for one AC when automatic power-on is disabled.
public sealed class AcController : IDisposable
- Inheritance
-
AcController
- Implements
- Inherited Members
Constructors
AcController(ComfortCloudClient, string, bool)
Owns upstream-style preference buffering for one AC when automatic power-on is disabled.
public AcController(ComfortCloudClient client, string deviceGuid, bool autoPowerOn = true)
Parameters
clientComfortCloudClientThe application-owned cloud client.
deviceGuidstringThe AC whose queued settings this controller owns.
autoPowerOnboolWhether to use immediate upstream-style command submission; false buffers preferences while off.
Properties
HasPendingChanges
Gets whether this controller retains preferences for the next explicit power-on.
public bool HasPendingChanges { get; }
Property Value
- bool
True when preferences are buffered; no files or automatic writes are created.
Methods
ApplyAsync(AcSnapshot, AcUpdate, CancellationToken)
Applies or buffers changes based on the explicitly supplied current device state.
public Task<bool> ApplyAsync(AcSnapshot snapshot, AcUpdate changes, CancellationToken cancellationToken = default)
Parameters
snapshotAcSnapshotThe current snapshot of this controller's device.
changesAcUpdateThe intended settings, including explicit power-on when buffered settings should be submitted.
cancellationTokenCancellationTokenCancels waiting or submission.
Returns
Remarks
Queued preferences are consumed before a write attempt, so a lost acknowledgement never causes them to be replayed automatically.
CreateChangeRequest(AcSnapshot)
Creates a builder with this controller's power policy.
public AcCommandBuilder CreateChangeRequest(AcSnapshot snapshot)
Parameters
snapshotAcSnapshotThe recent device snapshot used for swing and power decisions.
Returns
- AcCommandBuilder
A new independent command builder.
Dispose()
Discards queued preferences and cancels this controller's pending operations without disposing the shared client.
public void Dispose()