//------------------------------------------------------------------------------ // // Generated using NetDaemon CodeGenerator nd-codegen v26.3.0.0 // At: 2026-03-01T17:23:03.1325697+02:00 // // *** Make sure the version of the codegen tool and your nugets NetDaemon.* have the same version.*** // You can use following command to keep it up to date with the latest version: // dotnet tool update NetDaemon.HassModel.CodeGen // // To update this file with latest entities run this command in your project directory: // dotnet tool run nd-codegen // // In the template projects we provided a convenience powershell script that will update // the codegen and nugets to latest versions update_all_dependencies.ps1. // // For more information: https://netdaemon.xyz/docs/user/hass_model/hass_model_codegen // For more information about NetDaemon: https://netdaemon.xyz/ // //------------------------------------------------------------------------------ #nullable enable using System; using System.Linq; using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using System.Text.Json; using System.Text.Json.Serialization; using NetDaemon.HassModel; using NetDaemon.HassModel.Entities; using NetDaemon.HassModel.Entities.Core; namespace HomeAssistantGenerated; public static class GeneratedExtensions { ///Registers all injectable generated types in the serviceCollection public static IServiceCollection AddHomeAssistantGenerated(this IServiceCollection serviceCollection) { serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); serviceCollection.AddTransient(); return serviceCollection; } } /// /// Allows HassModel to instantiate the correct generated Entity types /// public class GeneratedEntityFactory : IEntityFactory { public Entity CreateEntity(IHaContext haContext, string entityId) { var dot = entityId.IndexOf('.', StringComparison.Ordinal); var domain = dot < 0 ? entityId.AsSpan() : entityId[..dot]; return domain switch { "automation" => new AutomationEntity(haContext, entityId), "binary_sensor" => new BinarySensorEntity(haContext, entityId), "button" => new ButtonEntity(haContext, entityId), "climate" => new ClimateEntity(haContext, entityId), "conversation" => new ConversationEntity(haContext, entityId), "counter" => new CounterEntity(haContext, entityId), "device_tracker" => new DeviceTrackerEntity(haContext, entityId), "event" => new EventEntity(haContext, entityId), "fan" => new FanEntity(haContext, entityId), "humidifier" => new HumidifierEntity(haContext, entityId), "input_boolean" => new InputBooleanEntity(haContext, entityId), "input_datetime" => new InputDatetimeEntity(haContext, entityId), "input_number" => new InputNumberEntity(haContext, entityId), "light" => new LightEntity(haContext, entityId), "media_player" => new MediaPlayerEntity(haContext, entityId), "number" => new NumberEntity(haContext, entityId), "person" => new PersonEntity(haContext, entityId), "remote" => new RemoteEntity(haContext, entityId), "script" => new ScriptEntity(haContext, entityId), "select" => new SelectEntity(haContext, entityId), "sensor" when IsNumeric() => new NumericSensorEntity(haContext, entityId), "sensor" => new SensorEntity(haContext, entityId), "sun" => new SunEntity(haContext, entityId), "switch" => new SwitchEntity(haContext, entityId), "tts" => new TtsEntity(haContext, entityId), "update" => new UpdateEntity(haContext, entityId), "weather" => new WeatherEntity(haContext, entityId), "zone" => new ZoneEntity(haContext, entityId), _ => new Entity(haContext, entityId)}; bool IsNumeric() => haContext.GetState(entityId)?.AttributesJson?.TryGetProperty("unit_of_measurement", out _) ?? false; } } public interface IEntities { LightEntities Light { get; } MediaPlayerEntities MediaPlayer { get; } AutomationEntities Automation { get; } BinarySensorEntities BinarySensor { get; } ButtonEntities Button { get; } ClimateEntities Climate { get; } ConversationEntities Conversation { get; } CounterEntities Counter { get; } DeviceTrackerEntities DeviceTracker { get; } EventEntities Event { get; } FanEntities Fan { get; } HumidifierEntities Humidifier { get; } InputBooleanEntities InputBoolean { get; } InputDatetimeEntities InputDatetime { get; } InputNumberEntities InputNumber { get; } NumberEntities Number { get; } PersonEntities Person { get; } RemoteEntities Remote { get; } ScriptEntities Script { get; } SelectEntities Select { get; } SensorEntities Sensor { get; } SunEntities Sun { get; } SwitchEntities Switch { get; } TtsEntities Tts { get; } UpdateEntities Update { get; } WeatherEntities Weather { get; } ZoneEntities Zone { get; } } public partial class Entities : IEntities { private readonly IHaContext _haContext; public Entities(IHaContext haContext) { _haContext = haContext; } public LightEntities Light => new(_haContext); public MediaPlayerEntities MediaPlayer => new(_haContext); public AutomationEntities Automation => new(_haContext); public BinarySensorEntities BinarySensor => new(_haContext); public ButtonEntities Button => new(_haContext); public ClimateEntities Climate => new(_haContext); public ConversationEntities Conversation => new(_haContext); public CounterEntities Counter => new(_haContext); public DeviceTrackerEntities DeviceTracker => new(_haContext); public EventEntities Event => new(_haContext); public FanEntities Fan => new(_haContext); public HumidifierEntities Humidifier => new(_haContext); public InputBooleanEntities InputBoolean => new(_haContext); public InputDatetimeEntities InputDatetime => new(_haContext); public InputNumberEntities InputNumber => new(_haContext); public NumberEntities Number => new(_haContext); public PersonEntities Person => new(_haContext); public RemoteEntities Remote => new(_haContext); public ScriptEntities Script => new(_haContext); public SelectEntities Select => new(_haContext); public SensorEntities Sensor => new(_haContext); public SunEntities Sun => new(_haContext); public SwitchEntities Switch => new(_haContext); public TtsEntities Tts => new(_haContext); public UpdateEntities Update => new(_haContext); public WeatherEntities Weather => new(_haContext); public ZoneEntities Zone => new(_haContext); } public partial class LightEntities { private readonly IHaContext _haContext; public LightEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all light entities currently registered (at runtime) in Home Assistant as LightEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("light.")).Select(e => new LightEntity(e)); ///Edge LED public LightEntity Sonoff1002214d40 => new(_haContext, "light.sonoff_1002214d40"); } public partial class MediaPlayerEntities { private readonly IHaContext _haContext; public MediaPlayerEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all media_player entities currently registered (at runtime) in Home Assistant as MediaPlayerEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("media_player.")).Select(e => new MediaPlayerEntity(e)); ///123PrasauNenuplysk (QE75Q77DATXXH) public MediaPlayerEntity _123prasaunenuplyskQe75q77datxxh => new(_haContext, "media_player.123prasaunenuplysk_qe75q77datxxh"); } public partial class AutomationEntities { private readonly IHaContext _haContext; public AutomationEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all automation entities currently registered (at runtime) in Home Assistant as AutomationEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("automation.")).Select(e => new AutomationEntity(e)); ///AC cool on public AutomationEntity AcCoolOn => new(_haContext, "automation.ac_cool_on"); ///AC tun off public AutomationEntity AcTunOff => new(_haContext, "automation.ac_tun_off"); ///Auto turn off boiler public AutomationEntity AutoTurnOffBoiler => new(_haContext, "automation.auto_turn_off_boiler"); ///Boiler turn on counter public AutomationEntity BoilerTurnOnCounter => new(_haContext, "automation.boiler_turn_on_counter"); ///Christmas lights sync public AutomationEntity ChristmasLightsSync => new(_haContext, "automation.christmas_lights_sync"); ///Christmas lights sync v2 public AutomationEntity ChristmasLightsSyncV2 => new(_haContext, "automation.christmas_lights_sync_v2"); ///Dehumidifier on counter public AutomationEntity DehumidifierOnOffCounter => new(_haContext, "automation.dehumidifier_on_off_counter"); ///Lamp sync off public AutomationEntity LampSyncOff => new(_haContext, "automation.lamp_sync_off"); ///Lamp sync on public AutomationEntity LampSyncOn => new(_haContext, "automation.lamp_sync_on"); ///Turn off dehumidifier public AutomationEntity TurnOfDehumidifier => new(_haContext, "automation.turn_of_dehumidifier"); ///Turn Off all lights public AutomationEntity TurnOffAllLights => new(_haContext, "automation.turn_off_all_lights"); ///TurnOn Dehumidifier then not at home public AutomationEntity TurnonDehumidifierThenNotAtHome => new(_haContext, "automation.turnon_dehumidifier_then_not_at_home"); } public partial class BinarySensorEntities { private readonly IHaContext _haContext; public BinarySensorEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all binary_sensor entities currently registered (at runtime) in Home Assistant as BinarySensorEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("binary_sensor.")).Select(e => new BinarySensorEntity(e)); ///Boiler Moisture public BinarySensorEntity BoilerMoisture => new(_haContext, "binary_sensor.boiler_moisture"); ///Low Storage public BinarySensorEntity LowStorage => new(_haContext, "binary_sensor.low_storage"); ///Marius Watch Is charging public BinarySensorEntity MariusWatchIsCharging => new(_haContext, "binary_sensor.marius_watch_is_charging"); ///Marius Watch On body sensor public BinarySensorEntity MariusWatchOnBodySensor => new(_haContext, "binary_sensor.marius_watch_on_body_sensor"); ///Marius Phone Is charging public BinarySensorEntity SmS936bIsCharging => new(_haContext, "binary_sensor.sm_s936b_is_charging"); ///Marius Phone Mobile data public BinarySensorEntity SmS936bMobileData => new(_haContext, "binary_sensor.sm_s936b_mobile_data"); ///Marius Phone Wi-Fi state public BinarySensorEntity SmS936bWiFiState => new(_haContext, "binary_sensor.sm_s936b_wi_fi_state"); ///Connection State public BinarySensorEntity WellbeingAirPurifier2Connectionstate => new(_haContext, "binary_sensor.wellbeing_air_purifier_2_connectionstate"); ///Ionizer public BinarySensorEntity WellbeingAirPurifier2Ionizer => new(_haContext, "binary_sensor.wellbeing_air_purifier_2_ionizer"); ///Safety Lock public BinarySensorEntity WellbeingAirPurifier2Safetylock => new(_haContext, "binary_sensor.wellbeing_air_purifier_2_safetylock"); ///Status public BinarySensorEntity WellbeingAirPurifier2Status => new(_haContext, "binary_sensor.wellbeing_air_purifier_2_status"); ///UI Light public BinarySensorEntity WellbeingAirPurifier2Uilight => new(_haContext, "binary_sensor.wellbeing_air_purifier_2_uilight"); } public partial class ButtonEntities { private readonly IHaContext _haContext; public ButtonEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all button entities currently registered (at runtime) in Home Assistant as ButtonEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("button.")).Select(e => new ButtonEntity(e)); ///Boiler Moisture Identify public ButtonEntity BoilerMoistureIdentify => new(_haContext, "button.boiler_moisture_identify"); ///Boiler Temp Identify public ButtonEntity BoilerTempIdentify => new(_haContext, "button.boiler_temp_identify"); ///Home Assistant Reload public ButtonEntity HomeassistantReload => new(_haContext, "button.homeassistant_reload"); ///Home Assistant Restart public ButtonEntity HomeassistantRestart => new(_haContext, "button.homeassistant_restart"); ///Repairs Ignore all public ButtonEntity IgnoreAllIssues => new(_haContext, "button.ignore_all_issues"); ///Repairs Unignore all public ButtonEntity UnignoreAllIssues => new(_haContext, "button.unignore_all_issues"); } public partial class ClimateEntities { private readonly IHaContext _haContext; public ClimateEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all climate entities currently registered (at runtime) in Home Assistant as ClimateEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("climate.")).Select(e => new ClimateEntity(e)); ///AC public ClimateEntity AirConditioner => new(_haContext, "climate.air_conditioner"); ///Bathroom Thermostat public ClimateEntity BathroomThermostat => new(_haContext, "climate.bathroom_thermostat"); ///Main Home Termostat public ClimateEntity MainHomeTermostat => new(_haContext, "climate.main_home_termostat"); ///Windows Termostat public ClimateEntity WindowsTermostat => new(_haContext, "climate.windows_termostat"); } public partial class ConversationEntities { private readonly IHaContext _haContext; public ConversationEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all conversation entities currently registered (at runtime) in Home Assistant as ConversationEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("conversation.")).Select(e => new ConversationEntity(e)); ///Home Assistant public ConversationEntity HomeAssistant => new(_haContext, "conversation.home_assistant"); } public partial class CounterEntities { private readonly IHaContext _haContext; public CounterEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all counter entities currently registered (at runtime) in Home Assistant as CounterEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("counter.")).Select(e => new CounterEntity(e)); ///AC on/off counter public CounterEntity AcOnOffCounter => new(_haContext, "counter.ac_on_off_counter"); ///Boiler turn on count public CounterEntity BoilerTurnOnCount => new(_haContext, "counter.boiler_turn_on_count"); ///Dehumidifier on counter public CounterEntity DehumidifierOnOffCounter => new(_haContext, "counter.dehumidifier_on_off_counter"); } public partial class DeviceTrackerEntities { private readonly IHaContext _haContext; public DeviceTrackerEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all device_tracker entities currently registered (at runtime) in Home Assistant as DeviceTrackerEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("device_tracker.")).Select(e => new DeviceTrackerEntity(e)); ///Erika's iPhone public DeviceTrackerEntity ErikaSIphone => new(_haContext, "device_tracker.erika_s_iphone"); ///Home Phone public DeviceTrackerEntity HomePhone => new(_haContext, "device_tracker.home_phone"); ///Marius Phone public DeviceTrackerEntity SmS936b => new(_haContext, "device_tracker.sm_s936b"); } public partial class EventEntities { private readonly IHaContext _haContext; public EventEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all event entities currently registered (at runtime) in Home Assistant as EventEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("event.")).Select(e => new EventEntity(e)); ///Repairs public EventEntity Repair => new(_haContext, "event.repair"); } public partial class FanEntities { private readonly IHaContext _haContext; public FanEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all fan entities currently registered (at runtime) in Home Assistant as FanEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("fan.")).Select(e => new FanEntity(e)); ///Fan Speed public FanEntity WellbeingAirPurifier2Fanspeed => new(_haContext, "fan.wellbeing_air_purifier_2_fanspeed"); } public partial class HumidifierEntities { private readonly IHaContext _haContext; public HumidifierEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all humidifier entities currently registered (at runtime) in Home Assistant as HumidifierEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("humidifier.")).Select(e => new HumidifierEntity(e)); ///Auto Dehumidifier public HumidifierEntity AutoDehumidifier => new(_haContext, "humidifier.auto_dehumidifier"); } public partial class InputBooleanEntities { private readonly IHaContext _haContext; public InputBooleanEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all input_boolean entities currently registered (at runtime) in Home Assistant as InputBooleanEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("input_boolean.")).Select(e => new InputBooleanEntity(e)); ///AC on/off public InputBooleanEntity AcOnOff => new(_haContext, "input_boolean.ac_on_off"); ///Boiler Boost Mode public InputBooleanEntity BoilerBoostMode => new(_haContext, "input_boolean.boiler_boost_mode"); ///Christmas lights public InputBooleanEntity ChristmasLights => new(_haContext, "input_boolean.christmas_lights"); ///dev_netdaemon_nord_pool_manager_nord_pool_init public InputBooleanEntity DevNetdaemonNordPoolManagerNordPoolInit => new(_haContext, "input_boolean.dev_netdaemon_nord_pool_manager_nord_pool_init"); } public partial class InputDatetimeEntities { private readonly IHaContext _haContext; public InputDatetimeEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all input_datetime entities currently registered (at runtime) in Home Assistant as InputDatetimeEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("input_datetime.")).Select(e => new InputDatetimeEntity(e)); ///Boiler Ready By public InputDatetimeEntity BoilerReadyBy => new(_haContext, "input_datetime.boiler_ready_by"); ///input_datetime.price_alert_time_marius public InputDatetimeEntity InputDatetimePriceAlertTimeMarius => new(_haContext, "input_datetime.input_datetime_price_alert_time_marius"); } public partial class InputNumberEntities { private readonly IHaContext _haContext; public InputNumberEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all input_number entities currently registered (at runtime) in Home Assistant as InputNumberEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("input_number.")).Select(e => new InputNumberEntity(e)); ///Boiler Daily Hours public InputNumberEntity BoilerDailyHours => new(_haContext, "input_number.boiler_daily_hours"); ///Boiler price cap public InputNumberEntity BoilerPriceCap => new(_haContext, "input_number.boiler_price_cap"); } public partial class NumberEntities { private readonly IHaContext _haContext; public NumberEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all number entities currently registered (at runtime) in Home Assistant as NumberEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("number.")).Select(e => new NumberEntity(e)); ///Boiler Temp Comfort humidity max public NumberEntity BoilerTempComfortHumidityMax => new(_haContext, "number.boiler_temp_comfort_humidity_max"); ///Boiler Temp Comfort humidity min public NumberEntity BoilerTempComfortHumidityMin => new(_haContext, "number.boiler_temp_comfort_humidity_min"); ///Boiler Temp Comfort temperature max public NumberEntity BoilerTempComfortTemperatureMax => new(_haContext, "number.boiler_temp_comfort_temperature_max"); ///Boiler Temp Comfort temperature min public NumberEntity BoilerTempComfortTemperatureMin => new(_haContext, "number.boiler_temp_comfort_temperature_min"); ///Boiler Temp Humidity offset public NumberEntity BoilerTempHumidityOffset => new(_haContext, "number.boiler_temp_humidity_offset"); ///Boiler Temp Temperature offset public NumberEntity BoilerTempTemperatureOffset => new(_haContext, "number.boiler_temp_temperature_offset"); } public partial class PersonEntities { private readonly IHaContext _haContext; public PersonEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all person entities currently registered (at runtime) in Home Assistant as PersonEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("person.")).Select(e => new PersonEntity(e)); ///Erika public PersonEntity Erika => new(_haContext, "person.erika"); ///Home Phone public PersonEntity HomePhone => new(_haContext, "person.home_phone"); ///Marius public PersonEntity Marius => new(_haContext, "person.marius"); } public partial class RemoteEntities { private readonly IHaContext _haContext; public RemoteEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all remote entities currently registered (at runtime) in Home Assistant as RemoteEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("remote.")).Select(e => new RemoteEntity(e)); ///123PrasauNenuplysk (QE75Q77DATXXH) public RemoteEntity _123prasaunenuplyskQe75q77datxxh => new(_haContext, "remote.123prasaunenuplysk_qe75q77datxxh"); } public partial class ScriptEntities { private readonly IHaContext _haContext; public ScriptEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all script entities currently registered (at runtime) in Home Assistant as ScriptEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("script.")).Select(e => new ScriptEntity(e)); ///System: Purge Device History public ScriptEntity SystemPurgeDeviceHistory => new(_haContext, "script.system_purge_device_history"); ///Update NordPool Prices public ScriptEntity Updatenordpoolprices => new(_haContext, "script.updatenordpoolprices"); } public partial class SelectEntities { private readonly IHaContext _haContext; public SelectEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all select entities currently registered (at runtime) in Home Assistant as SelectEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("select.")).Select(e => new SelectEntity(e)); ///Akvariumas Start-up behavior public SelectEntity AkvariumasStartUpBehavior => new(_haContext, "select.akvariumas_start_up_behavior"); ///3D print Start-up behavior public SelectEntity BalkonyLapsStartUpBehavior => new(_haContext, "select.balkony_laps_start_up_behavior"); ///Boiler Temp Display unit public SelectEntity BoilerTempDisplayUnit => new(_haContext, "select.boiler_temp_display_unit"); ///Dishwasher Start-up behavior public SelectEntity DishwasherStartUpBehavior => new(_haContext, "select.dishwasher_start_up_behavior"); ///Exhaust Fan Start-up behavior public SelectEntity ExhaustFanStartUpBehavior => new(_haContext, "select.exhaust_fan_start_up_behavior"); ///Fridge Start-up behavior public SelectEntity FridgeStartUpBehavior => new(_haContext, "select.fridge_start_up_behavior"); ///Heating Relay Far Start-up behavior public SelectEntity HeatingStartUpBehavior => new(_haContext, "select.heating_start_up_behavior"); ///Heating Relay Bathroom Start-up behavior public SelectEntity HeatingStartUpBehavior2 => new(_haContext, "select.heating_start_up_behavior_2"); ///Heating Relay Middle Start-up behavior public SelectEntity HeatingStartUpBehavior3 => new(_haContext, "select.heating_start_up_behavior_3"); ///LED power Start-up behavior public SelectEntity SonoffS60zbtpfStartUpBehavior => new(_haContext, "select.sonoff_s60zbtpf_start_up_behavior"); ///Air Purifirier Start-up behavior public SelectEntity SonoffS60zbtpfStartUpBehavior2 => new(_haContext, "select.sonoff_s60zbtpf_start_up_behavior_2"); ///Network Infra Start-up behavior public SelectEntity TempStartUpBehavior => new(_haContext, "select.temp_start_up_behavior"); ///TV Start-up behavior public SelectEntity TvStartUpBehavior => new(_haContext, "select.tv_start_up_behavior"); ///Washing room Display unit public SelectEntity WashingRoomDisplayUnit => new(_haContext, "select.washing_room_display_unit"); } public partial class SensorEntities { private readonly IHaContext _haContext; public SensorEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all sensor entities currently registered (at runtime) in Home Assistant as SensorEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("sensor.")).Select(e => new SensorEntity(e)); /// Enumerates all non-numeric sensor entities currently registered (at runtime) in Home Assistant as SensorEntity public IEnumerable EnumerateAllNonNumeric() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("sensor.") && !(e.EntityState?.AttributesJson?.TryGetProperty("unit_of_measurement", out _) ?? false)).Select(e => new SensorEntity(e)); /// Enumerates all numeric sensor entities currently registered (at runtime) in Home Assistant as NumericSensorEntity public IEnumerable EnumerateAllNumeric() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("sensor.") && (e.EntityState?.AttributesJson?.TryGetProperty("unit_of_measurement", out _) ?? false)).Select(e => new NumericSensorEntity(e)); ///AC status public SensorEntity AcStatus => new(_haContext, "sensor.ac_status"); ///Air Purified Status public SensorEntity AirPurifiedStatus => new(_haContext, "sensor.air_purified_status"); ///Home Assistant Air quality public SensorEntity AirQuality => new(_haContext, "sensor.air_quality"); ///Akvariumas Status public SensorEntity AkvariumasStatus => new(_haContext, "sensor.akvariumas_status"); ///Home Assistant Alarm control panels public SensorEntity AlarmControlPanels => new(_haContext, "sensor.alarm_control_panels"); ///Home Assistant Areas public SensorEntity Areas => new(_haContext, "sensor.areas"); ///Home Assistant Automations public SensorEntity Automations => new(_haContext, "sensor.automations"); ///Backup Last attempted automatic backup public SensorEntity BackupLastAttemptedAutomaticBackup => new(_haContext, "sensor.backup_last_attempted_automatic_backup"); ///Backup Last successful automatic backup public SensorEntity BackupLastSuccessfulAutomaticBackup => new(_haContext, "sensor.backup_last_successful_automatic_backup"); ///Home Assistant Binary sensors public SensorEntity BinarySensors => new(_haContext, "sensor.binary_sensors"); ///Boiler running public SensorEntity BoilerRunning => new(_haContext, "sensor.boiler_running"); ///Home Assistant Buttons public SensorEntity Buttons => new(_haContext, "sensor.buttons"); ///Home Assistant Calendars public SensorEntity Calendars => new(_haContext, "sensor.calendars"); ///Home Assistant Cameras public SensorEntity Cameras => new(_haContext, "sensor.cameras"); ///Home Assistant Climate public SensorEntity Climate => new(_haContext, "sensor.climate"); ///Home Assistant Covers public SensorEntity Covers => new(_haContext, "sensor.covers"); ///Home Assistant Custom integrations public SensorEntity CustomIntegrations => new(_haContext, "sensor.custom_integrations"); ///Home Assistant Dates public SensorEntity Dates => new(_haContext, "sensor.dates"); ///Home Assistant Date/times public SensorEntity Datetimes => new(_haContext, "sensor.datetimes"); ///Dehumidifier status public SensorEntity DehumidifierStatus => new(_haContext, "sensor.dehumidifier_status"); ///Home Assistant Device trackers public SensorEntity DeviceTrackers => new(_haContext, "sensor.device_trackers"); ///Home Assistant Devices public SensorEntity Devices => new(_haContext, "sensor.devices"); ///Dishwasher status public SensorEntity DishwasherStatus => new(_haContext, "sensor.dishwasher_status"); ///Dryer Status public SensorEntity DryerStatus => new(_haContext, "sensor.dryer_status"); ///Home Assistant Entities public SensorEntity Entities => new(_haContext, "sensor.entities"); ///Erika's iPhone Battery State public SensorEntity ErikaSIphoneBatteryState => new(_haContext, "sensor.erika_s_iphone_battery_state"); ///Erika's iPhone Connection Type public SensorEntity ErikaSIphoneConnectionType => new(_haContext, "sensor.erika_s_iphone_connection_type"); ///Erika's iPhone Geocoded Location public SensorEntity ErikaSIphoneGeocodedLocation => new(_haContext, "sensor.erika_s_iphone_geocoded_location"); ///Erika's iPhone SSID public SensorEntity ErikaSIphoneSsid => new(_haContext, "sensor.erika_s_iphone_ssid"); ///Home Assistant Fans public SensorEntity Fans => new(_haContext, "sensor.fans"); ///Home Assistant Operating System Newest version public SensorEntity HomeAssistantOperatingSystemNewestVersion => new(_haContext, "sensor.home_assistant_operating_system_newest_version"); ///Home Assistant Operating System Version public SensorEntity HomeAssistantOperatingSystemVersion => new(_haContext, "sensor.home_assistant_operating_system_version"); ///Home Phone Battery state public SensorEntity HomePhoneBatteryState => new(_haContext, "sensor.home_phone_battery_state"); ///Home Phone Charger type public SensorEntity HomePhoneChargerType => new(_haContext, "sensor.home_phone_charger_type"); ///Home Assistant Humidifiers public SensorEntity Humidifiers => new(_haContext, "sensor.humidifiers"); ///Home Assistant Images public SensorEntity Images => new(_haContext, "sensor.images"); ///Home Assistant Input booleans public SensorEntity InputBooleans => new(_haContext, "sensor.input_booleans"); ///Home Assistant Input buttons public SensorEntity InputButtons => new(_haContext, "sensor.input_buttons"); ///Home Assistant Input date/times public SensorEntity InputDatetimes => new(_haContext, "sensor.input_datetimes"); ///Home Assistant Input numbers public SensorEntity InputNumbers => new(_haContext, "sensor.input_numbers"); ///Home Assistant Input selects public SensorEntity InputSelects => new(_haContext, "sensor.input_selects"); ///Home Assistant Input texts public SensorEntity InputTexts => new(_haContext, "sensor.input_texts"); ///Home Assistant Integrations public SensorEntity Integrations => new(_haContext, "sensor.integrations"); ///Kaunas Noreikiskes, Lithuania Air quality index public SensorEntity KaunasNoreikiskesLithuaniaAirQualityIndex => new(_haContext, "sensor.kaunas_noreikiskes_lithuania_air_quality_index"); ///Kaunas Noreikiskes, Lithuania Carbon monoxide public SensorEntity KaunasNoreikiskesLithuaniaCarbonMonoxide => new(_haContext, "sensor.kaunas_noreikiskes_lithuania_carbon_monoxide"); ///Kaunas Noreikiskes, Lithuania Dominant pollutant public SensorEntity KaunasNoreikiskesLithuaniaDominantPollutant => new(_haContext, "sensor.kaunas_noreikiskes_lithuania_dominant_pollutant"); ///Kaunas Noreikiskes, Lithuania Ozone public SensorEntity KaunasNoreikiskesLithuaniaOzone => new(_haContext, "sensor.kaunas_noreikiskes_lithuania_ozone"); ///Kaunas Noreikiskes, Lithuania PM10 public SensorEntity KaunasNoreikiskesLithuaniaPm10 => new(_haContext, "sensor.kaunas_noreikiskes_lithuania_pm10"); ///Kaunas Noreikiskes, Lithuania PM2.5 public SensorEntity KaunasNoreikiskesLithuaniaPm25 => new(_haContext, "sensor.kaunas_noreikiskes_lithuania_pm2_5"); ///Kaunas Noreikiskes, Lithuania Sulphur dioxide public SensorEntity KaunasNoreikiskesLithuaniaSulphurDioxide => new(_haContext, "sensor.kaunas_noreikiskes_lithuania_sulphur_dioxide"); ///Home Assistant Lights public SensorEntity Lights => new(_haContext, "sensor.lights"); ///Home Assistant Locks public SensorEntity Locks => new(_haContext, "sensor.locks"); ///Marius Watch Activity state public SensorEntity MariusWatchActivityState => new(_haContext, "sensor.marius_watch_activity_state"); ///Marius Watch Battery health public SensorEntity MariusWatchBatteryHealth => new(_haContext, "sensor.marius_watch_battery_health"); ///Marius Watch Battery state public SensorEntity MariusWatchBatteryState => new(_haContext, "sensor.marius_watch_battery_state"); ///Marius Watch Charger type public SensorEntity MariusWatchChargerType => new(_haContext, "sensor.marius_watch_charger_type"); ///Marius Watch Network type public SensorEntity MariusWatchNetworkType => new(_haContext, "sensor.marius_watch_network_type"); ///Home Assistant Media players public SensorEntity MediaPlayers => new(_haContext, "sensor.media_players"); ///Nord Pool LT Last updated public SensorEntity NordPoolLtLastUpdated => new(_haContext, "sensor.nord_pool_lt_last_updated"); ///Boiler water ready public SensorEntity NordpoolBoilerWaterReady => new(_haContext, "sensor.nordpool_boiler_water_ready"); ///NordPool cheapest boiler intervals public SensorEntity NordpoolCheapestIntervals => new(_haContext, "sensor.nordpool_cheapest_intervals"); ///NordPool price last pull date public SensorEntity NordpoolLastPullDate => new(_haContext, "sensor.nordpool_last_pull_date"); ///NordPool last update time public SensorEntity NordpoolLastUpdateTime => new(_haContext, "sensor.nordpool_last_update_time"); ///NordPool price alerts public SensorEntity NordpoolPriceAlerts => new(_haContext, "sensor.nordpool_price_alerts"); ///NordPool today prices public SensorEntity NordpoolTodayPrices => new(_haContext, "sensor.nordpool_today_prices"); ///NordPool tomorrow prices public SensorEntity NordpoolTomorrowPrices => new(_haContext, "sensor.nordpool_tomorrow_prices"); ///Home Assistant Numbers public SensorEntity Numbers => new(_haContext, "sensor.numbers"); ///Home Assistant Persistent notifications public SensorEntity PersistentNotifications => new(_haContext, "sensor.persistent_notifications"); ///Home Assistant Persons public SensorEntity Persons => new(_haContext, "sensor.persons"); ///Home Assistant Remotes public SensorEntity Remotes => new(_haContext, "sensor.remotes"); ///Home Assistant Scenes public SensorEntity Scenes => new(_haContext, "sensor.scenes"); ///Home Assistant Scripts public SensorEntity Scripts => new(_haContext, "sensor.scripts"); ///Home Assistant Selects public SensorEntity Selects => new(_haContext, "sensor.selects"); ///Home Assistant Sensors public SensorEntity Sensors => new(_haContext, "sensor.sensors"); ///Home Assistant Sirens public SensorEntity Sirens => new(_haContext, "sensor.sirens"); ///System Monitor Last boot public SensorEntity SystemMonitorLastBoot => new(_haContext, "sensor.system_monitor_last_boot"); ///Marius Phone Battery health public SensorEntity SmS936bBatteryHealth => new(_haContext, "sensor.sm_s936b_battery_health"); ///Marius Phone Battery state public SensorEntity SmS936bBatteryState => new(_haContext, "sensor.sm_s936b_battery_state"); ///Marius Phone Detected activity public SensorEntity SmS936bDetectedActivity => new(_haContext, "sensor.sm_s936b_detected_activity"); ///Marius Phone Geocoded location public SensorEntity SmS936bGeocodedLocation => new(_haContext, "sensor.sm_s936b_geocoded_location"); ///Marius Phone Network type public SensorEntity SmS936bNetworkType => new(_haContext, "sensor.sm_s936b_network_type"); ///Marius Phone Phone state public SensorEntity SmS936bPhoneState => new(_haContext, "sensor.sm_s936b_phone_state"); ///Marius Phone SIM 1 public SensorEntity SmS936bSim1 => new(_haContext, "sensor.sm_s936b_sim_1"); ///Marius Phone Wi-Fi connection public SensorEntity SmS936bWiFiConnection => new(_haContext, "sensor.sm_s936b_wi_fi_connection"); ///Home Assistant Speech-to-text public SensorEntity Stt => new(_haContext, "sensor.stt"); ///Sun Next dawn public SensorEntity SunNextDawn => new(_haContext, "sensor.sun_next_dawn"); ///Sun Next dusk public SensorEntity SunNextDusk => new(_haContext, "sensor.sun_next_dusk"); ///Sun Next midnight public SensorEntity SunNextMidnight => new(_haContext, "sensor.sun_next_midnight"); ///Sun Next noon public SensorEntity SunNextNoon => new(_haContext, "sensor.sun_next_noon"); ///Sun Next rising public SensorEntity SunNextRising => new(_haContext, "sensor.sun_next_rising"); ///Sun Next setting public SensorEntity SunNextSetting => new(_haContext, "sensor.sun_next_setting"); ///Home Assistant Suns public SensorEntity Suns => new(_haContext, "sensor.suns"); ///Home Assistant Switches public SensorEntity Switches => new(_haContext, "sensor.switches"); ///Home Assistant Texts public SensorEntity Texts => new(_haContext, "sensor.texts"); ///Home Assistant Times public SensorEntity Times => new(_haContext, "sensor.times"); ///Home Assistant Text-to-speech public SensorEntity Tts => new(_haContext, "sensor.tts"); ///Home Assistant Update public SensorEntity Update => new(_haContext, "sensor.update"); ///Home Assistant Vacuums public SensorEntity Vacuums => new(_haContext, "sensor.vacuums"); ///Washer Status public SensorEntity WasherStatus => new(_haContext, "sensor.washer_status"); ///Home Assistant Water heaters public SensorEntity WaterHeaters => new(_haContext, "sensor.water_heaters"); ///Home Assistant Weather public SensorEntity Weather => new(_haContext, "sensor.weather"); ///Home Assistant Zones public SensorEntity Zones => new(_haContext, "sensor.zones"); ///Repairs Active public NumericSensorEntity ActiveIssues => new(_haContext, "sensor.active_issues"); ///Akvariumas Power public NumericSensorEntity AkvariumasPower => new(_haContext, "sensor.akvariumas_power"); ///Akvariumas Voltage public NumericSensorEntity AkvariumasVoltage => new(_haContext, "sensor.akvariumas_voltage"); ///3D print Power public NumericSensorEntity BalkonyLapsPower => new(_haContext, "sensor.balkony_laps_power"); ///3D print Voltage public NumericSensorEntity BalkonyLapsVoltage => new(_haContext, "sensor.balkony_laps_voltage"); ///Boiler Moisture Battery public NumericSensorEntity BoilerMoistureBattery => new(_haContext, "sensor.boiler_moisture_battery"); ///Boiler run time public NumericSensorEntity BoilerRunTime => new(_haContext, "sensor.boiler_run_time"); ///Boiler Temp Battery public NumericSensorEntity BoilerTempBattery => new(_haContext, "sensor.boiler_temp_battery"); ///Boiler Temp Humidity public NumericSensorEntity BoilerTempHumidity => new(_haContext, "sensor.boiler_temp_humidity"); ///Boiler Temp Temperature public NumericSensorEntity BoilerTempTemperature => new(_haContext, "sensor.boiler_temp_temperature"); ///Cat Area Temp Battery public NumericSensorEntity CatAreaTempBattery => new(_haContext, "sensor.cat_area_temp_battery"); ///Cat Area Temp Humidity public NumericSensorEntity CatAreaTempHumidity => new(_haContext, "sensor.cat_area_temp_humidity"); ///Cat Area Temp Temperature public NumericSensorEntity CatAreaTempTemperature => new(_haContext, "sensor.cat_area_temp_temperature"); ///Christmas lights power usage public NumericSensorEntity ChristmasLightsPowerUsage => new(_haContext, "sensor.christmas_lights_power_usage"); ///Daily power usage public NumericSensorEntity DailyPowerUsage => new(_haContext, "sensor.daily_power_usage"); ///Dehumidifier running time public NumericSensorEntity DehumidifierRunningTime => new(_haContext, "sensor.dehumidifier_running_time"); ///Dishwasher Power public NumericSensorEntity DishwasherPower => new(_haContext, "sensor.dishwasher_power"); ///Dishwasher Voltage public NumericSensorEntity DishwasherVoltage => new(_haContext, "sensor.dishwasher_voltage"); ///Erika's iPhone Battery Level public NumericSensorEntity ErikaSIphoneBatteryLevel => new(_haContext, "sensor.erika_s_iphone_battery_level"); ///Fridge Power public NumericSensorEntity FridgePower => new(_haContext, "sensor.fridge_power"); ///Fridge Voltage public NumericSensorEntity FridgeVoltage => new(_haContext, "sensor.fridge_voltage"); ///Home Phone Battery level public NumericSensorEntity HomePhoneBatteryLevel => new(_haContext, "sensor.home_phone_battery_level"); ///Repairs Ignored public NumericSensorEntity IgnoredIssues => new(_haContext, "sensor.ignored_issues"); ///Repairs Total public NumericSensorEntity Issues => new(_haContext, "sensor.issues"); ///Kaunas Noreikiskes, Lithuania Humidity public NumericSensorEntity KaunasNoreikiskesLithuaniaHumidity => new(_haContext, "sensor.kaunas_noreikiskes_lithuania_humidity"); ///Kaunas Noreikiskes, Lithuania Pressure public NumericSensorEntity KaunasNoreikiskesLithuaniaPressure => new(_haContext, "sensor.kaunas_noreikiskes_lithuania_pressure"); ///Kaunas Noreikiskes, Lithuania Temperature public NumericSensorEntity KaunasNoreikiskesLithuaniaTemperature => new(_haContext, "sensor.kaunas_noreikiskes_lithuania_temperature"); ///Marius Watch Battery level public NumericSensorEntity MariusWatchBatteryLevel => new(_haContext, "sensor.marius_watch_battery_level"); ///Marius Watch Battery temperature public NumericSensorEntity MariusWatchBatteryTemperature => new(_haContext, "sensor.marius_watch_battery_temperature"); ///Marius Watch Daily steps public NumericSensorEntity MariusWatchDailySteps => new(_haContext, "sensor.marius_watch_daily_steps"); ///Marius Watch Heart rate public NumericSensorEntity MariusWatchHeartRate => new(_haContext, "sensor.marius_watch_heart_rate"); ///Marius Watch Light sensor public NumericSensorEntity MariusWatchLightSensor => new(_haContext, "sensor.marius_watch_light_sensor"); ///Marius Watch Steps sensor public NumericSensorEntity MariusWatchStepsSensor => new(_haContext, "sensor.marius_watch_steps_sensor"); ///NetDaemon V6 (.NET 10) CPU percent public NumericSensorEntity NetdaemonV6Net10CpuPercent => new(_haContext, "sensor.netdaemon_v6_net_10_cpu_percent"); ///NetDaemon V6 (.NET 10) Memory percent public NumericSensorEntity NetdaemonV6Net10MemoryPercent => new(_haContext, "sensor.netdaemon_v6_net_10_memory_percent"); ///Nord Pool LT Current price public NumericSensorEntity NordPoolLtCurrentPrice => new(_haContext, "sensor.nord_pool_lt_current_price"); ///Nord Pool LT Daily average public NumericSensorEntity NordPoolLtDailyAverage => new(_haContext, "sensor.nord_pool_lt_daily_average"); ///Nord Pool LT Highest price public NumericSensorEntity NordPoolLtHighestPrice => new(_haContext, "sensor.nord_pool_lt_highest_price"); ///Nord Pool LT Lowest price public NumericSensorEntity NordPoolLtLowestPrice => new(_haContext, "sensor.nord_pool_lt_lowest_price"); ///NordPool current price public NumericSensorEntity NordpoolCurrentPrice => new(_haContext, "sensor.nordpool_current_price"); ///Nordpool price public NumericSensorEntity NordpoolPrice => new(_haContext, "sensor.nordpool_price"); ///System Monitor Disk free / public NumericSensorEntity SystemMonitorDiskFree => new(_haContext, "sensor.system_monitor_disk_free"); ///System Monitor Disk usage / public NumericSensorEntity SystemMonitorDiskUsage => new(_haContext, "sensor.system_monitor_disk_usage"); ///System Monitor Disk use / public NumericSensorEntity SystemMonitorDiskUse => new(_haContext, "sensor.system_monitor_disk_use"); ///System Monitor Memory usage public NumericSensorEntity SystemMonitorMemoryUsage => new(_haContext, "sensor.system_monitor_memory_usage"); ///System Monitor Network in end0 public NumericSensorEntity SystemMonitorNetworkInEnd0 => new(_haContext, "sensor.system_monitor_network_in_end0"); ///System Monitor Network throughput in end0 public NumericSensorEntity SystemMonitorNetworkThroughputInEnd0 => new(_haContext, "sensor.system_monitor_network_throughput_in_end0"); ///System Monitor Processor temperature public NumericSensorEntity SystemMonitorProcessorTemperature => new(_haContext, "sensor.system_monitor_processor_temperature"); ///System Monitor Processor use public NumericSensorEntity SystemMonitorProcessorUse => new(_haContext, "sensor.system_monitor_processor_use"); ///System Monitor Swap usage public NumericSensorEntity SystemMonitorSwapUsage => new(_haContext, "sensor.system_monitor_swap_usage"); ///Marius Phone Battery level public NumericSensorEntity SmS936bBatteryLevel => new(_haContext, "sensor.sm_s936b_battery_level"); ///Marius Phone Battery power public NumericSensorEntity SmS936bBatteryPower => new(_haContext, "sensor.sm_s936b_battery_power"); ///Marius Phone Battery temperature public NumericSensorEntity SmS936bBatteryTemperature => new(_haContext, "sensor.sm_s936b_battery_temperature"); ///Marius Phone Light sensor public NumericSensorEntity SmS936bLightSensor => new(_haContext, "sensor.sm_s936b_light_sensor"); ///Marius Phone Pressure sensor public NumericSensorEntity SmS936bPressureSensor => new(_haContext, "sensor.sm_s936b_pressure_sensor"); ///Marius Phone Remaining charge time public NumericSensorEntity SmS936bRemainingChargeTime => new(_haContext, "sensor.sm_s936b_remaining_charge_time"); ///Marius Phone Signal strength (SIM 1) public NumericSensorEntity SmS936bSignalStrengthSim1 => new(_haContext, "sensor.sm_s936b_signal_strength_sim_1"); ///Marius Phone Sleep confidence public NumericSensorEntity SmS936bSleepConfidence => new(_haContext, "sensor.sm_s936b_sleep_confidence"); ///Marius Phone Sleep segment public NumericSensorEntity SmS936bSleepSegment => new(_haContext, "sensor.sm_s936b_sleep_segment"); ///Marius Phone Steps sensor public NumericSensorEntity SmS936bStepsSensor => new(_haContext, "sensor.sm_s936b_steps_sensor"); ///Induction Power public NumericSensorEntity Sonoff10018909cbPower => new(_haContext, "sensor.sonoff_10018909cb_power"); ///Induction Voltage public NumericSensorEntity Sonoff10018909cbVoltage => new(_haContext, "sensor.sonoff_10018909cb_voltage"); ///AC Power public NumericSensorEntity Sonoff100215c534Power => new(_haContext, "sensor.sonoff_100215c534_power"); ///AC Voltage public NumericSensorEntity Sonoff100215c534Voltage => new(_haContext, "sensor.sonoff_100215c534_voltage"); ///Lamp Power public NumericSensorEntity Sonoff100222f7bePower => new(_haContext, "sensor.sonoff_100222f7be_power"); ///Christmas tree Power public NumericSensorEntity Sonoff100222ff36Power => new(_haContext, "sensor.sonoff_100222ff36_power"); ///Christmas tree Voltage public NumericSensorEntity Sonoff100222ff36Voltage => new(_haContext, "sensor.sonoff_100222ff36_voltage"); ///Stair lamps Power public NumericSensorEntity Sonoff100222ff63Power => new(_haContext, "sensor.sonoff_100222ff63_power"); ///Po laiptais Power public NumericSensorEntity Sonoff1002230a48Power => new(_haContext, "sensor.sonoff_1002230a48_power"); ///Po laiptais Voltage public NumericSensorEntity Sonoff1002230a48Voltage => new(_haContext, "sensor.sonoff_1002230a48_voltage"); ///Boiler Power public NumericSensorEntity Sonoff1002230e32Power => new(_haContext, "sensor.sonoff_1002230e32_power"); ///Boiler Voltage public NumericSensorEntity Sonoff1002230e32Voltage => new(_haContext, "sensor.sonoff_1002230e32_voltage"); ///Washer Power public NumericSensorEntity Sonoff100255ead8Power => new(_haContext, "sensor.sonoff_100255ead8_power"); ///Washer Voltage public NumericSensorEntity Sonoff100255ead8Voltage => new(_haContext, "sensor.sonoff_100255ead8_voltage"); ///Dryer Power public NumericSensorEntity Sonoff100255f06cPower => new(_haContext, "sensor.sonoff_100255f06c_power"); ///Dryer Voltage public NumericSensorEntity Sonoff100255f06cVoltage => new(_haContext, "sensor.sonoff_100255f06c_voltage"); ///Cat Christmas lamps Power public NumericSensorEntity Sonoff100255f738Power => new(_haContext, "sensor.sonoff_100255f738_power"); ///Dehumidifier Power public NumericSensorEntity Sonoff10025606e6Power => new(_haContext, "sensor.sonoff_10025606e6_power"); ///Dehumidifier Voltage public NumericSensorEntity Sonoff10025606e6Voltage => new(_haContext, "sensor.sonoff_10025606e6_voltage"); ///Salt Lamp Power public NumericSensorEntity Sonoff10025609cePower => new(_haContext, "sensor.sonoff_10025609ce_power"); ///Salt Lamp Voltage public NumericSensorEntity Sonoff10025609ceVoltage => new(_haContext, "sensor.sonoff_10025609ce_voltage"); ///Home meter Current public NumericSensorEntity Sonoff100267d63fCurrent => new(_haContext, "sensor.sonoff_100267d63f_current"); ///Home meter Energy public NumericSensorEntity Sonoff100267d63fEnergy => new(_haContext, "sensor.sonoff_100267d63f_energy"); ///Home meter Energy Day public NumericSensorEntity Sonoff100267d63fEnergyDay => new(_haContext, "sensor.sonoff_100267d63f_energy_day"); ///Home meter Energy Month public NumericSensorEntity Sonoff100267d63fEnergyMonth => new(_haContext, "sensor.sonoff_100267d63f_energy_month"); ///Total Home Power Usage public NumericSensorEntity Sonoff100267d63fPower => new(_haContext, "sensor.sonoff_100267d63f_power"); ///Home meter Voltage public NumericSensorEntity Sonoff100267d63fVoltage => new(_haContext, "sensor.sonoff_100267d63f_voltage"); ///Main Home Battery public NumericSensorEntity SonoffA4800e66a0Battery => new(_haContext, "sensor.sonoff_a4800e66a0_battery"); ///Main Home Humidity public NumericSensorEntity SonoffA4800e66a0Humidity => new(_haContext, "sensor.sonoff_a4800e66a0_humidity"); ///Main Home Temperature public NumericSensorEntity SonoffA4800e66a0Temperature => new(_haContext, "sensor.sonoff_a4800e66a0_temperature"); ///Outside Battery public NumericSensorEntity SonoffA4800f07b4Battery => new(_haContext, "sensor.sonoff_a4800f07b4_battery"); ///Outside Humidity public NumericSensorEntity SonoffA4800f07b4Humidity => new(_haContext, "sensor.sonoff_a4800f07b4_humidity"); ///Outside Temperature public NumericSensorEntity SonoffA4800f07b4Temperature => new(_haContext, "sensor.sonoff_a4800f07b4_temperature"); ///Bedroom Battery public NumericSensorEntity SonoffA4800f07ddBattery => new(_haContext, "sensor.sonoff_a4800f07dd_battery"); ///Bedroom Humidity public NumericSensorEntity SonoffA4800f07ddHumidity => new(_haContext, "sensor.sonoff_a4800f07dd_humidity"); ///Bedroom Temperature public NumericSensorEntity SonoffA4800f07ddTemperature => new(_haContext, "sensor.sonoff_a4800f07dd_temperature"); ///Bathroom Battery public NumericSensorEntity SonoffA4800f07dfBattery => new(_haContext, "sensor.sonoff_a4800f07df_battery"); ///Bathroom Humidity public NumericSensorEntity SonoffA4800f07dfHumidity => new(_haContext, "sensor.sonoff_a4800f07df_humidity"); ///Bathroom Temperature public NumericSensorEntity SonoffA4800f07dfTemperature => new(_haContext, "sensor.sonoff_a4800f07df_temperature"); ///LED power Power public NumericSensorEntity SonoffS60zbtpfPower => new(_haContext, "sensor.sonoff_s60zbtpf_power"); ///Air Purifirier Power public NumericSensorEntity SonoffS60zbtpfPower2 => new(_haContext, "sensor.sonoff_s60zbtpf_power_2"); ///LED power Voltage public NumericSensorEntity SonoffS60zbtpfVoltage => new(_haContext, "sensor.sonoff_s60zbtpf_voltage"); ///Air Purifirier Voltage public NumericSensorEntity SonoffS60zbtpfVoltage2 => new(_haContext, "sensor.sonoff_s60zbtpf_voltage_2"); ///Network Infra Power public NumericSensorEntity TempPower => new(_haContext, "sensor.temp_power"); ///Network Infra Voltage public NumericSensorEntity TempVoltage => new(_haContext, "sensor.temp_voltage"); ///Total KWH public NumericSensorEntity TotalKwh => new(_haContext, "sensor.total_kwh"); ///Total sensors public NumericSensorEntity TotalPower => new(_haContext, "sensor.total_power"); ///TV Power public NumericSensorEntity TvPower => new(_haContext, "sensor.tv_power"); ///TV Voltage public NumericSensorEntity TvVoltage => new(_haContext, "sensor.tv_voltage"); ///Voltage min public NumericSensorEntity VoltageMin => new(_haContext, "sensor.voltage_min"); ///Voltage min 99% public NumericSensorEntity VoltageMin99 => new(_haContext, "sensor.voltage_min_99"); ///Voltage min standard deviation public NumericSensorEntity VoltageMinStandardDeviation => new(_haContext, "sensor.voltage_min_standard_deviation"); ///Washing room Battery public NumericSensorEntity WashingRoomBattery => new(_haContext, "sensor.washing_room_battery"); ///Washing room Humidity public NumericSensorEntity WashingRoomHumidity => new(_haContext, "sensor.washing_room_humidity"); ///Washing room Temperature public NumericSensorEntity WashingRoomTemperature => new(_haContext, "sensor.washing_room_temperature"); ///eCO2 public NumericSensorEntity WellbeingAirPurifier2Eco2 => new(_haContext, "sensor.wellbeing_air_purifier_2_eco2"); ///Fresh 360 filter Life public NumericSensorEntity WellbeingAirPurifier2Filterlife => new(_haContext, "sensor.wellbeing_air_purifier_2_filterlife"); ///PM1 public NumericSensorEntity WellbeingAirPurifier2Pm1 => new(_haContext, "sensor.wellbeing_air_purifier_2_pm1"); ///PM10 public NumericSensorEntity WellbeingAirPurifier2Pm10 => new(_haContext, "sensor.wellbeing_air_purifier_2_pm10"); ///PM2.5 public NumericSensorEntity WellbeingAirPurifier2Pm25 => new(_haContext, "sensor.wellbeing_air_purifier_2_pm2_5"); ///TVOC public NumericSensorEntity WellbeingAirPurifier2Tvoc => new(_haContext, "sensor.wellbeing_air_purifier_2_tvoc"); ///Mode public NumericSensorEntity WellbeingAirPurifier2Workmode => new(_haContext, "sensor.wellbeing_air_purifier_2_workmode"); } public partial class SunEntities { private readonly IHaContext _haContext; public SunEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all sun entities currently registered (at runtime) in Home Assistant as SunEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("sun.")).Select(e => new SunEntity(e)); ///Sun public SunEntity Sun => new(_haContext, "sun.sun"); } public partial class SwitchEntities { private readonly IHaContext _haContext; public SwitchEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all switch entities currently registered (at runtime) in Home Assistant as SwitchEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("switch.")).Select(e => new SwitchEntity(e)); ///Akvariumas public SwitchEntity Akvariumas => new(_haContext, "switch.akvariumas"); ///3D print public SwitchEntity BalkonyLaps => new(_haContext, "switch.balkony_laps"); ///Dishwasher public SwitchEntity Dishwasher => new(_haContext, "switch.dishwasher"); ///Exhaust Fan public SwitchEntity ExhaustFan => new(_haContext, "switch.exhaust_fan"); ///Fridge public SwitchEntity Fridge => new(_haContext, "switch.fridge"); ///Heating Relay Far public SwitchEntity Heating => new(_haContext, "switch.heating"); ///Heating Relay Bathroom public SwitchEntity Heating2 => new(_haContext, "switch.heating_2"); ///Heating Relay Middle public SwitchEntity Heating3 => new(_haContext, "switch.heating_3"); ///Induction public SwitchEntity Sonoff10018909cb => new(_haContext, "switch.sonoff_10018909cb"); ///AC public SwitchEntity Sonoff100215c534 => new(_haContext, "switch.sonoff_100215c534"); ///Plant Lamp public SwitchEntity Sonoff100222f7be => new(_haContext, "switch.sonoff_100222f7be"); ///Christmas tree public SwitchEntity Sonoff100222ff36 => new(_haContext, "switch.sonoff_100222ff36"); ///Stair lamps public SwitchEntity Sonoff100222ff63 => new(_haContext, "switch.sonoff_100222ff63"); ///Po laiptais public SwitchEntity Sonoff1002230a48 => new(_haContext, "switch.sonoff_1002230a48"); ///Boiler public SwitchEntity Sonoff1002230e32 => new(_haContext, "switch.sonoff_1002230e32"); ///Washer public SwitchEntity Sonoff100255ead8 => new(_haContext, "switch.sonoff_100255ead8"); ///Dryer public SwitchEntity Sonoff100255f06c => new(_haContext, "switch.sonoff_100255f06c"); ///Cat Christmas lamps public SwitchEntity Sonoff100255f738 => new(_haContext, "switch.sonoff_100255f738"); ///Dehumidifier public SwitchEntity Sonoff10025606e6 => new(_haContext, "switch.sonoff_10025606e6"); ///Salt Lamp public SwitchEntity Sonoff10025609ce => new(_haContext, "switch.sonoff_10025609ce"); ///LED power public SwitchEntity SonoffS60zbtpf => new(_haContext, "switch.sonoff_s60zbtpf"); ///Air Purifirier public SwitchEntity SonoffS60zbtpf2 => new(_haContext, "switch.sonoff_s60zbtpf_2"); ///Network Infra public SwitchEntity Temp => new(_haContext, "switch.temp"); ///TV public SwitchEntity Tv => new(_haContext, "switch.tv"); ///Ionizer public SwitchEntity WellbeingAirPurifier2Ionizer => new(_haContext, "switch.wellbeing_air_purifier_2_ionizer"); ///Safety Lock public SwitchEntity WellbeingAirPurifier2Safetylock => new(_haContext, "switch.wellbeing_air_purifier_2_safetylock"); ///UI Light public SwitchEntity WellbeingAirPurifier2Uilight => new(_haContext, "switch.wellbeing_air_purifier_2_uilight"); } public partial class TtsEntities { private readonly IHaContext _haContext; public TtsEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all tts entities currently registered (at runtime) in Home Assistant as TtsEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("tts.")).Select(e => new TtsEntity(e)); ///Google Translate en com public TtsEntity GoogleTranslateEnCom => new(_haContext, "tts.google_translate_en_com"); } public partial class UpdateEntities { private readonly IHaContext _haContext; public UpdateEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all update entities currently registered (at runtime) in Home Assistant as UpdateEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("update.")).Select(e => new UpdateEntity(e)); ///Advanced SSH & Web Terminal Update public UpdateEntity AdvancedSshWebTerminalUpdate => new(_haContext, "update.advanced_ssh_web_terminal_update"); ///Akvariumas Firmware public UpdateEntity AkvariumasFirmware => new(_haContext, "update.akvariumas_firmware"); ///apexcharts-card update public UpdateEntity ApexchartsCardUpdate => new(_haContext, "update.apexcharts_card_update"); ///3D print Firmware public UpdateEntity BalkonyLapsFirmware => new(_haContext, "update.balkony_laps_firmware"); ///Boiler Moisture Firmware public UpdateEntity BoilerMoistureFirmware => new(_haContext, "update.boiler_moisture_firmware"); ///Boiler Temp Firmware public UpdateEntity BoilerTempFirmware => new(_haContext, "update.boiler_temp_firmware"); ///Cat Area Temp Firmware public UpdateEntity CatAreaTempFirmware => new(_haContext, "update.cat_area_temp_firmware"); ///Dynamic Energy Cost update public UpdateEntity DynamicEnergyCostUpdate => new(_haContext, "update.dynamic_energy_cost_update"); ///Dishwasher Firmware public UpdateEntity DishwasherFirmware => new(_haContext, "update.dishwasher_firmware"); ///Electrolux Wellbeing update public UpdateEntity ElectroluxWellbeingUpdate => new(_haContext, "update.electrolux_wellbeing_update"); ///Exhaust Fan Firmware public UpdateEntity ExhaustFanFirmware => new(_haContext, "update.exhaust_fan_firmware"); ///Fridge Firmware public UpdateEntity FridgeFirmware => new(_haContext, "update.fridge_firmware"); ///Get HACS Update public UpdateEntity GetHacsUpdate => new(_haContext, "update.get_hacs_update"); ///HACS update public UpdateEntity HacsUpdate => new(_haContext, "update.hacs_update"); ///Heating Relay Far Firmware public UpdateEntity HeatingFirmware => new(_haContext, "update.heating_firmware"); ///Heating Relay Bathroom Firmware public UpdateEntity HeatingFirmware2 => new(_haContext, "update.heating_firmware_2"); ///Heating Relay Middle Firmware public UpdateEntity HeatingFirmware3 => new(_haContext, "update.heating_firmware_3"); ///Home Assistant Core Update public UpdateEntity HomeAssistantCoreUpdate => new(_haContext, "update.home_assistant_core_update"); ///Home Assistant Operating System Update public UpdateEntity HomeAssistantOperatingSystemUpdate => new(_haContext, "update.home_assistant_operating_system_update"); ///Home Assistant Supervisor Update public UpdateEntity HomeAssistantSupervisorUpdate => new(_haContext, "update.home_assistant_supervisor_update"); ///Let's Encrypt Update public UpdateEntity LetSEncryptUpdate => new(_haContext, "update.let_s_encrypt_update"); ///Local Tuya update public UpdateEntity LocalTuyaUpdate => new(_haContext, "update.local_tuya_update"); ///mini-graph-card update public UpdateEntity MiniGraphCardUpdate => new(_haContext, "update.mini_graph_card_update"); ///Modern Circular Gauge update public UpdateEntity ModernCircularGaugeUpdate => new(_haContext, "update.modern_circular_gauge_update"); ///Mosquitto broker Update public UpdateEntity MosquittoBrokerUpdate => new(_haContext, "update.mosquitto_broker_update"); ///NetDaemon V6 (.NET 10) Update public UpdateEntity NetdaemonV6Net10Update => new(_haContext, "update.netdaemon_v6_net_10_update"); ///Nginx Proxy Manager Update public UpdateEntity NginxProxyManagerUpdate => new(_haContext, "update.nginx_proxy_manager_update"); ///Samba share Update public UpdateEntity SambaShareUpdate => new(_haContext, "update.samba_share_update"); ///Sonoff LAN update public UpdateEntity SonoffLanUpdate => new(_haContext, "update.sonoff_lan_update"); ///LED power Firmware public UpdateEntity SonoffS60zbtpfFirmware => new(_haContext, "update.sonoff_s60zbtpf_firmware"); ///Air Purifirier Firmware public UpdateEntity SonoffS60zbtpfFirmware2 => new(_haContext, "update.sonoff_s60zbtpf_firmware_2"); ///Spook 👻 Your homie update public UpdateEntity SpookYourHomieUpdate => new(_haContext, "update.spook_your_homie_update"); ///Studio Code Server Update public UpdateEntity StudioCodeServerUpdate => new(_haContext, "update.studio_code_server_update"); ///Network Infra Firmware public UpdateEntity TempFirmware => new(_haContext, "update.temp_firmware"); ///Tibber Graph update public UpdateEntity TibberGraphUpdate => new(_haContext, "update.tibber_graph_update"); ///TV Firmware public UpdateEntity TvFirmware => new(_haContext, "update.tv_firmware"); ///UniFi Network Application Update public UpdateEntity UnifiNetworkApplicationUpdate => new(_haContext, "update.unifi_network_application_update"); ///Vaultwarden Update public UpdateEntity VaultwardenBitwardenUpdate => new(_haContext, "update.vaultwarden_bitwarden_update"); ///Washing room Firmware public UpdateEntity WashingRoomFirmware => new(_haContext, "update.washing_room_firmware"); ///🧰 ZHA Toolkit - Service for advanced Zigbee Usage update public UpdateEntity ZhaToolkitServiceForAdvancedZigbeeUsageUpdate => new(_haContext, "update.zha_toolkit_service_for_advanced_zigbee_usage_update"); } public partial class WeatherEntities { private readonly IHaContext _haContext; public WeatherEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all weather entities currently registered (at runtime) in Home Assistant as WeatherEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("weather.")).Select(e => new WeatherEntity(e)); ///Kaunas (Žaliakalnis) public WeatherEntity KaunasZaliakalnis => new(_haContext, "weather.kaunas_zaliakalnis"); } public partial class ZoneEntities { private readonly IHaContext _haContext; public ZoneEntities(IHaContext haContext) { _haContext = haContext; } /// Enumerates all zone entities currently registered (at runtime) in Home Assistant as ZoneEntity public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("zone.")).Select(e => new ZoneEntity(e)); ///Home public ZoneEntity Home => new(_haContext, "zone.home"); } public partial record LightEntity : Entity, LightAttributes>, ILightEntityCore { public LightEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public LightEntity(IEntityCore entity) : base(entity) { } } public partial record LightAttributes { [JsonPropertyName("supported_color_modes")] public IReadOnlyList? SupportedColorModes { get; init; } [JsonPropertyName("supported_features")] public double? SupportedFeatures { get; init; } [JsonPropertyName("color_mode")] public string? ColorMode { get; init; } [JsonPropertyName("min_color_temp_kelvin")] public double? MinColorTempKelvin { get; init; } [JsonPropertyName("max_color_temp_kelvin")] public double? MaxColorTempKelvin { get; init; } [JsonPropertyName("min_mireds")] public double? MinMireds { get; init; } [JsonPropertyName("max_mireds")] public double? MaxMireds { get; init; } [JsonPropertyName("brightness")] public double? Brightness { get; init; } [JsonPropertyName("color_temp_kelvin")] public double? ColorTempKelvin { get; init; } [JsonPropertyName("color_temp")] public double? ColorTemp { get; init; } [JsonPropertyName("hs_color")] public IReadOnlyList? HsColor { get; init; } [JsonPropertyName("rgb_color")] public IReadOnlyList? RgbColor { get; init; } [JsonPropertyName("xy_color")] public IReadOnlyList? XyColor { get; init; } [JsonPropertyName("entity_id")] public IReadOnlyList? EntityId { get; init; } [JsonPropertyName("effect_list")] public IReadOnlyList? EffectList { get; init; } [JsonPropertyName("color")] public object? Color { get; init; } [JsonPropertyName("effect")] public object? Effect { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } } public partial record MediaPlayerEntity : Entity, MediaPlayerAttributes>, IMediaPlayerEntityCore { public MediaPlayerEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public MediaPlayerEntity(IEntityCore entity) : base(entity) { } } public partial record MediaPlayerAttributes { [JsonPropertyName("app_id")] public string? AppId { get; init; } [JsonPropertyName("app_name")] public string? AppName { get; init; } [JsonPropertyName("device_class")] public string? DeviceClass { get; init; } [JsonPropertyName("entity_picture_local")] public string? EntityPictureLocal { get; init; } [JsonPropertyName("entity_picture")] public string? EntityPicture { get; init; } [JsonPropertyName("icon")] public string? Icon { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("supported_features")] public double? SupportedFeatures { get; init; } [JsonPropertyName("volume_level")] public double? VolumeLevel { get; init; } [JsonPropertyName("is_volume_muted")] public bool? IsVolumeMuted { get; init; } [JsonPropertyName("media_content_id")] public string? MediaContentId { get; init; } [JsonPropertyName("media_content_type")] public string? MediaContentType { get; init; } [JsonPropertyName("media_duration")] public double? MediaDuration { get; init; } [JsonPropertyName("media_position")] public double? MediaPosition { get; init; } [JsonPropertyName("media_position_updated_at")] public string? MediaPositionUpdatedAt { get; init; } [JsonPropertyName("media_title")] public string? MediaTitle { get; init; } [JsonPropertyName("media_album_name")] public string? MediaAlbumName { get; init; } [JsonPropertyName("media_image_url")] public string? MediaImageUrl { get; init; } [JsonPropertyName("media_artist")] public string? MediaArtist { get; init; } [JsonPropertyName("sound_mode_list")] public IReadOnlyList? SoundModeList { get; init; } [JsonPropertyName("media_track")] public object? MediaTrack { get; init; } [JsonPropertyName("shuffle")] public bool? Shuffle { get; init; } [JsonPropertyName("repeat")] public string? Repeat { get; init; } [JsonPropertyName("source_list")] public IReadOnlyList? SourceList { get; init; } [JsonPropertyName("source")] public string? Source { get; init; } [JsonPropertyName("adb_response")] public object? AdbResponse { get; init; } [JsonPropertyName("hdmi_input")] public object? HdmiInput { get; init; } [JsonPropertyName("sound_mode")] public string? SoundMode { get; init; } [JsonPropertyName("sound_mode_raw")] public string? SoundModeRaw { get; init; } } public partial record AutomationEntity : Entity, AutomationAttributes>, IAutomationEntityCore { public AutomationEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public AutomationEntity(IEntityCore entity) : base(entity) { } } public partial record AutomationAttributes { [JsonPropertyName("id")] public string? Id { get; init; } [JsonPropertyName("last_triggered")] public string? LastTriggered { get; init; } [JsonPropertyName("mode")] public string? Mode { get; init; } [JsonPropertyName("current")] public double? Current { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } } public partial record BinarySensorEntity : Entity, BinarySensorAttributes>, IBinarySensorEntityCore { public BinarySensorEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public BinarySensorEntity(IEntityCore entity) : base(entity) { } } public partial record BinarySensorAttributes { [JsonPropertyName("entity_id")] public string? EntityId { get; init; } [JsonPropertyName("hysteresis")] public double? Hysteresis { get; init; } [JsonPropertyName("lower")] public double? Lower { get; init; } [JsonPropertyName("position")] public string? Position { get; init; } [JsonPropertyName("sensor_value")] public double? SensorValue { get; init; } [JsonPropertyName("type")] public string? Type { get; init; } [JsonPropertyName("upper")] public double? Upper { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("device_class")] public string? DeviceClass { get; init; } [JsonPropertyName("icon")] public string? Icon { get; init; } [JsonPropertyName("integration")] public string? Integration { get; init; } [JsonPropertyName("capabilities")] public IReadOnlyList? Capabilities { get; init; } } public partial record ButtonEntity : Entity, ButtonAttributes>, IButtonEntityCore { public ButtonEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public ButtonEntity(IEntityCore entity) : base(entity) { } } public partial record ButtonAttributes { [JsonPropertyName("icon")] public string? Icon { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("device_class")] public string? DeviceClass { get; init; } } public partial record ClimateEntity : Entity, ClimateAttributes>, IClimateEntityCore { public ClimateEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public ClimateEntity(IEntityCore entity) : base(entity) { } } public partial record ClimateAttributes { [JsonPropertyName("hvac_modes")] public IReadOnlyList? HvacModes { get; init; } [JsonPropertyName("min_temp")] public double? MinTemp { get; init; } [JsonPropertyName("max_temp")] public double? MaxTemp { get; init; } [JsonPropertyName("target_temp_step")] public double? TargetTempStep { get; init; } [JsonPropertyName("current_temperature")] public double? CurrentTemperature { get; init; } [JsonPropertyName("temperature")] public double? Temperature { get; init; } [JsonPropertyName("hvac_action")] public string? HvacAction { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("supported_features")] public double? SupportedFeatures { get; init; } [JsonPropertyName("current_humidity")] public double? CurrentHumidity { get; init; } [JsonPropertyName("icon")] public string? Icon { get; init; } } public partial record ConversationEntity : Entity, ConversationAttributes> { public ConversationEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public ConversationEntity(IEntityCore entity) : base(entity) { } } public partial record ConversationAttributes { [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("supported_features")] public double? SupportedFeatures { get; init; } } public partial record CounterEntity : Entity, CounterAttributes> { public CounterEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public CounterEntity(IEntityCore entity) : base(entity) { } } public partial record CounterAttributes { [JsonPropertyName("editable")] public bool? Editable { get; init; } [JsonPropertyName("initial")] public double? Initial { get; init; } [JsonPropertyName("step")] public double? Step { get; init; } [JsonPropertyName("icon")] public string? Icon { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } } public partial record DeviceTrackerEntity : Entity, DeviceTrackerAttributes>, IDeviceTrackerEntityCore { public DeviceTrackerEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public DeviceTrackerEntity(IEntityCore entity) : base(entity) { } } public partial record DeviceTrackerAttributes { [JsonPropertyName("source_type")] public string? SourceType { get; init; } [JsonPropertyName("latitude")] public double? Latitude { get; init; } [JsonPropertyName("longitude")] public double? Longitude { get; init; } [JsonPropertyName("gps_accuracy")] public double? GpsAccuracy { get; init; } [JsonPropertyName("altitude")] public double? Altitude { get; init; } [JsonPropertyName("course")] public double? Course { get; init; } [JsonPropertyName("speed")] public double? Speed { get; init; } [JsonPropertyName("vertical_accuracy")] public double? VerticalAccuracy { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("battery_level")] public double? BatteryLevel { get; init; } } public partial record EventEntity : Entity, EventAttributes> { public EventEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public EventEntity(IEntityCore entity) : base(entity) { } } public partial record EventAttributes { [JsonPropertyName("event_types")] public IReadOnlyList? EventTypes { get; init; } [JsonPropertyName("event_type")] public string? EventType { get; init; } [JsonPropertyName("domain")] public string? Domain { get; init; } [JsonPropertyName("issue_id")] public string? IssueId { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } } public partial record FanEntity : Entity, FanAttributes> { public FanEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public FanEntity(IEntityCore entity) : base(entity) { } } public partial record FanAttributes { [JsonPropertyName("preset_modes")] public IReadOnlyList? PresetModes { get; init; } [JsonPropertyName("percentage")] public double? Percentage { get; init; } [JsonPropertyName("percentage_step")] public double? PercentageStep { get; init; } [JsonPropertyName("preset_mode")] public string? PresetMode { get; init; } [JsonPropertyName("integration")] public string? Integration { get; init; } [JsonPropertyName("capabilities")] public IReadOnlyList? Capabilities { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("supported_features")] public double? SupportedFeatures { get; init; } } public partial record HumidifierEntity : Entity, HumidifierAttributes> { public HumidifierEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public HumidifierEntity(IEntityCore entity) : base(entity) { } } public partial record HumidifierAttributes { [JsonPropertyName("min_humidity")] public double? MinHumidity { get; init; } [JsonPropertyName("max_humidity")] public double? MaxHumidity { get; init; } [JsonPropertyName("action")] public string? Action { get; init; } [JsonPropertyName("current_humidity")] public double? CurrentHumidity { get; init; } [JsonPropertyName("humidity")] public double? Humidity { get; init; } [JsonPropertyName("device_class")] public string? DeviceClass { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("supported_features")] public double? SupportedFeatures { get; init; } } public partial record InputBooleanEntity : Entity, InputBooleanAttributes>, IInputBooleanEntityCore { public InputBooleanEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public InputBooleanEntity(IEntityCore entity) : base(entity) { } } public partial record InputBooleanAttributes { [JsonPropertyName("editable")] public bool? Editable { get; init; } [JsonPropertyName("icon")] public string? Icon { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } } public partial record InputDatetimeEntity : Entity, InputDatetimeAttributes>, IInputDatetimeEntityCore { public InputDatetimeEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public InputDatetimeEntity(IEntityCore entity) : base(entity) { } } public partial record InputDatetimeAttributes { [JsonPropertyName("has_date")] public bool? HasDate { get; init; } [JsonPropertyName("has_time")] public bool? HasTime { get; init; } [JsonPropertyName("editable")] public bool? Editable { get; init; } [JsonPropertyName("hour")] public double? Hour { get; init; } [JsonPropertyName("minute")] public double? Minute { get; init; } [JsonPropertyName("second")] public double? Second { get; init; } [JsonPropertyName("timestamp")] public double? Timestamp { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("icon")] public string? Icon { get; init; } } public partial record InputNumberEntity : NumericEntity, InputNumberAttributes>, IInputNumberEntityCore { public InputNumberEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public InputNumberEntity(IEntityCore entity) : base(entity) { } } public partial record InputNumberAttributes { [JsonPropertyName("initial")] public object? Initial { get; init; } [JsonPropertyName("editable")] public bool? Editable { get; init; } [JsonPropertyName("min")] public double? Min { get; init; } [JsonPropertyName("max")] public double? Max { get; init; } [JsonPropertyName("step")] public double? Step { get; init; } [JsonPropertyName("mode")] public string? Mode { get; init; } [JsonPropertyName("unit_of_measurement")] public string? UnitOfMeasurement { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } } public partial record NumberEntity : NumericEntity, NumberAttributes>, INumberEntityCore { public NumberEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public NumberEntity(IEntityCore entity) : base(entity) { } } public partial record NumberAttributes { [JsonPropertyName("min")] public double? Min { get; init; } [JsonPropertyName("max")] public double? Max { get; init; } [JsonPropertyName("step")] public double? Step { get; init; } [JsonPropertyName("mode")] public string? Mode { get; init; } [JsonPropertyName("unit_of_measurement")] public string? UnitOfMeasurement { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } } public partial record PersonEntity : Entity, PersonAttributes>, IPersonEntityCore { public PersonEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public PersonEntity(IEntityCore entity) : base(entity) { } } public partial record PersonAttributes { [JsonPropertyName("editable")] public bool? Editable { get; init; } [JsonPropertyName("id")] public string? Id { get; init; } [JsonPropertyName("device_trackers")] public IReadOnlyList? DeviceTrackers { get; init; } [JsonPropertyName("latitude")] public double? Latitude { get; init; } [JsonPropertyName("longitude")] public double? Longitude { get; init; } [JsonPropertyName("gps_accuracy")] public double? GpsAccuracy { get; init; } [JsonPropertyName("source")] public string? Source { get; init; } [JsonPropertyName("user_id")] public string? UserId { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } } public partial record RemoteEntity : Entity, RemoteAttributes>, IRemoteEntityCore { public RemoteEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public RemoteEntity(IEntityCore entity) : base(entity) { } } public partial record RemoteAttributes { [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("supported_features")] public double? SupportedFeatures { get; init; } } public partial record ScriptEntity : Entity, ScriptAttributes>, IScriptEntityCore { public ScriptEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public ScriptEntity(IEntityCore entity) : base(entity) { } } public partial record ScriptAttributes { [JsonPropertyName("last_triggered")] public string? LastTriggered { get; init; } [JsonPropertyName("mode")] public string? Mode { get; init; } [JsonPropertyName("current")] public double? Current { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("icon")] public string? Icon { get; init; } } public partial record SelectEntity : Entity, SelectAttributes>, ISelectEntityCore { public SelectEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public SelectEntity(IEntityCore entity) : base(entity) { } } public partial record SelectAttributes { [JsonPropertyName("options")] public IReadOnlyList? Options { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } } public partial record SensorEntity : Entity, SensorAttributes>, ISensorEntityCore { public SensorEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public SensorEntity(IEntityCore entity) : base(entity) { } } public partial record SensorAttributes { [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("device_class")] public string? DeviceClass { get; init; } [JsonPropertyName("options")] public IReadOnlyList? Options { get; init; } [JsonPropertyName("still")] public double? Still { get; init; } [JsonPropertyName("unknown")] public double? Unknown { get; init; } [JsonPropertyName("icon")] public string? Icon { get; init; } [JsonPropertyName("administrative_area")] public string? AdministrativeArea_0 { get; init; } [JsonPropertyName("Administrative Area")] public string? AdministrativeArea_1 { get; init; } [JsonPropertyName("country")] public string? Country_0 { get; init; } [JsonPropertyName("Country")] public string? Country_1 { get; init; } [JsonPropertyName("iso_country_code")] public string? IsoCountryCode { get; init; } [JsonPropertyName("locality")] public string? Locality_0 { get; init; } [JsonPropertyName("Locality")] public string? Locality_1 { get; init; } [JsonPropertyName("location")] public IReadOnlyList? Location_0 { get; init; } [JsonPropertyName("Location")] public IReadOnlyList? Location_1 { get; init; } [JsonPropertyName("name")] public string? Name_0 { get; init; } [JsonPropertyName("Name")] public string? Name_1 { get; init; } [JsonPropertyName("phone")] public string? Phone { get; init; } [JsonPropertyName("postal_code")] public string? PostalCode_0 { get; init; } [JsonPropertyName("Postal Code")] public string? PostalCode_1 { get; init; } [JsonPropertyName("premises")] public string? Premises { get; init; } [JsonPropertyName("sub_administrative_area")] public string? SubAdministrativeArea_0 { get; init; } [JsonPropertyName("Sub Administrative Area")] public string? SubAdministrativeArea_1 { get; init; } [JsonPropertyName("sub_locality")] public string? SubLocality_0 { get; init; } [JsonPropertyName("Sub Locality")] public string? SubLocality_1 { get; init; } [JsonPropertyName("sub_thoroughfare")] public string? SubThoroughfare_0 { get; init; } [JsonPropertyName("Sub Thoroughfare")] public string? SubThoroughfare_1 { get; init; } [JsonPropertyName("thoroughfare")] public string? Thoroughfare_0 { get; init; } [JsonPropertyName("Thoroughfare")] public string? Thoroughfare_1 { get; init; } [JsonPropertyName("url")] public string? Url { get; init; } [JsonPropertyName("is_hidden")] public bool? IsHidden { get; init; } [JsonPropertyName("metered")] public bool? Metered { get; init; } [JsonPropertyName("carrier id")] public double? Carrierid { get; init; } [JsonPropertyName("carrier name")] public string? Carriername { get; init; } [JsonPropertyName("data roaming")] public string? Dataroaming { get; init; } [JsonPropertyName("is opportunistic")] public bool? Isopportunistic { get; init; } [JsonPropertyName("iso country code")] public string? Isocountrycode { get; init; } [JsonPropertyName("mcc")] public string? Mcc { get; init; } [JsonPropertyName("mnc")] public string? Mnc { get; init; } [JsonPropertyName("Low Power Mode")] public bool? LowPowerMode { get; init; } [JsonPropertyName("Areas Of Interest")] public string? AreasOfInterest { get; init; } [JsonPropertyName("Inland Water")] public string? InlandWater { get; init; } [JsonPropertyName("ISO Country Code")] public string? ISOCountryCode { get; init; } [JsonPropertyName("Ocean")] public string? Ocean { get; init; } [JsonPropertyName("Time Zone")] public string? TimeZone { get; init; } [JsonPropertyName("Zones")] public IReadOnlyList? Zones { get; init; } [JsonPropertyName("exercise_type")] public string? ExerciseType { get; init; } [JsonPropertyName("time")] public string? Time { get; init; } [JsonPropertyName("state_class")] public string? StateClass { get; init; } [JsonPropertyName("attribution")] public string? Attribution { get; init; } [JsonPropertyName("prices")] public IReadOnlyList? Prices { get; init; } [JsonPropertyName("last_updated")] public string? LastUpdated { get; init; } [JsonPropertyName("intervals")] public IReadOnlyList? Intervals { get; init; } [JsonPropertyName("configured_hours")] public double? ConfiguredHours { get; init; } [JsonPropertyName("configured_interval_count")] public double? ConfiguredIntervalCount { get; init; } [JsonPropertyName("configured_price_cap")] public double? ConfiguredPriceCap { get; init; } [JsonPropertyName("configured_ready_by")] public string? ConfiguredReadyBy { get; init; } [JsonPropertyName("total_heating_minutes")] public double? TotalHeatingMinutes { get; init; } [JsonPropertyName("is_now_cheap")] public bool? IsNowCheap { get; init; } [JsonPropertyName("next_cheap_interval")] public object? NextCheapInterval { get; init; } [JsonPropertyName("boiler_switch_state")] public string? BoilerSwitchState { get; init; } [JsonPropertyName("boiler_power_watts")] public double? BoilerPowerWatts { get; init; } [JsonPropertyName("power_threshold_watts")] public double? PowerThresholdWatts { get; init; } [JsonPropertyName("active_rules")] public double? ActiveRules { get; init; } [JsonPropertyName("thresholds")] public IReadOnlyList? Thresholds { get; init; } [JsonPropertyName("last_notified")] public IReadOnlyList? LastNotified { get; init; } } public partial record NumericSensorEntity : NumericEntity, NumericSensorAttributes>, ISensorEntityCore { public NumericSensorEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public NumericSensorEntity(IEntityCore entity) : base(entity) { } } public partial record NumericSensorAttributes { [JsonPropertyName("state_class")] public string? StateClass { get; init; } [JsonPropertyName("unit_of_measurement")] public string? UnitOfMeasurement { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("age_coverage_ratio")] public double? AgeCoverageRatio { get; init; } [JsonPropertyName("source_value_valid")] public bool? SourceValueValid { get; init; } [JsonPropertyName("icon")] public string? Icon { get; init; } [JsonPropertyName("device_class")] public string? DeviceClass { get; init; } [JsonPropertyName("entity_id")] public IReadOnlyList? EntityId { get; init; } [JsonPropertyName("min_entity_id")] public string? MinEntityId { get; init; } [JsonPropertyName("light")] public double? Light { get; init; } [JsonPropertyName("motion")] public double? Motion { get; init; } [JsonPropertyName("timestamp")] public double? Timestamp { get; init; } [JsonPropertyName("end")] public object? End { get; init; } [JsonPropertyName("start")] public object? Start { get; init; } [JsonPropertyName("status")] public string? Status { get; init; } [JsonPropertyName("current")] public double? Current { get; init; } [JsonPropertyName("voltage")] public double? Voltage { get; init; } [JsonPropertyName("asu")] public double? Asu { get; init; } [JsonPropertyName("quality")] public string? Quality { get; init; } [JsonPropertyName("accuracy")] public string? Accuracy { get; init; } [JsonPropertyName("last_period")] public string? LastPeriod { get; init; } [JsonPropertyName("last_valid_state")] public string? LastValidState { get; init; } [JsonPropertyName("last_reset")] public string? LastReset { get; init; } [JsonPropertyName("next_reset")] public string? NextReset { get; init; } [JsonPropertyName("attribution")] public string? Attribution { get; init; } [JsonPropertyName("integration")] public string? Integration { get; init; } [JsonPropertyName("capabilities")] public IReadOnlyList? Capabilities { get; init; } [JsonPropertyName("source")] public string? Source { get; init; } [JsonPropertyName("last_updated")] public string? LastUpdated { get; init; } [JsonPropertyName("last_api_fetch")] public string? LastApiFetch { get; init; } [JsonPropertyName("using_cached_data")] public bool? UsingCachedData { get; init; } [JsonPropertyName("current_quarter_index")] public double? CurrentQuarterIndex { get; init; } [JsonPropertyName("measurement_type")] public string? MeasurementType { get; init; } [JsonPropertyName("battery_voltage")] public double? BatteryVoltage { get; init; } } public partial record SunEntity : Entity, SunAttributes>, ISunEntityCore { public SunEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public SunEntity(IEntityCore entity) : base(entity) { } } public partial record SunAttributes { [JsonPropertyName("next_dawn")] public string? NextDawn { get; init; } [JsonPropertyName("next_dusk")] public string? NextDusk { get; init; } [JsonPropertyName("next_midnight")] public string? NextMidnight { get; init; } [JsonPropertyName("next_noon")] public string? NextNoon { get; init; } [JsonPropertyName("next_rising")] public string? NextRising { get; init; } [JsonPropertyName("next_setting")] public string? NextSetting { get; init; } [JsonPropertyName("elevation")] public double? Elevation { get; init; } [JsonPropertyName("azimuth")] public double? Azimuth { get; init; } [JsonPropertyName("rising")] public bool? Rising { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } } public partial record SwitchEntity : Entity, SwitchAttributes>, ISwitchEntityCore { public SwitchEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public SwitchEntity(IEntityCore entity) : base(entity) { } } public partial record SwitchAttributes { [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("integration")] public string? Integration { get; init; } [JsonPropertyName("capabilities")] public IReadOnlyList? Capabilities { get; init; } [JsonPropertyName("device_class")] public string? DeviceClass { get; init; } } public partial record TtsEntity : Entity, TtsAttributes> { public TtsEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public TtsEntity(IEntityCore entity) : base(entity) { } } public partial record TtsAttributes { [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } } public partial record UpdateEntity : Entity, UpdateAttributes>, IUpdateEntityCore { public UpdateEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public UpdateEntity(IEntityCore entity) : base(entity) { } } public partial record UpdateAttributes { [JsonPropertyName("auto_update")] public bool? AutoUpdate { get; init; } [JsonPropertyName("display_precision")] public double? DisplayPrecision { get; init; } [JsonPropertyName("installed_version")] public string? InstalledVersion { get; init; } [JsonPropertyName("in_progress")] public bool? InProgress { get; init; } [JsonPropertyName("latest_version")] public string? LatestVersion { get; init; } [JsonPropertyName("release_summary")] public object? ReleaseSummary { get; init; } [JsonPropertyName("release_url")] public string? ReleaseUrl { get; init; } [JsonPropertyName("skipped_version")] public object? SkippedVersion { get; init; } [JsonPropertyName("title")] public string? Title { get; init; } [JsonPropertyName("update_percentage")] public object? UpdatePercentage { get; init; } [JsonPropertyName("entity_picture")] public string? EntityPicture { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("supported_features")] public double? SupportedFeatures { get; init; } [JsonPropertyName("device_class")] public string? DeviceClass { get; init; } } public partial record WeatherEntity : Entity, WeatherAttributes>, IWeatherEntityCore { public WeatherEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public WeatherEntity(IEntityCore entity) : base(entity) { } } public partial record WeatherAttributes { [JsonPropertyName("temperature")] public double? Temperature { get; init; } [JsonPropertyName("apparent_temperature")] public double? ApparentTemperature { get; init; } [JsonPropertyName("temperature_unit")] public string? TemperatureUnit { get; init; } [JsonPropertyName("humidity")] public double? Humidity { get; init; } [JsonPropertyName("cloud_coverage")] public double? CloudCoverage { get; init; } [JsonPropertyName("pressure")] public double? Pressure { get; init; } [JsonPropertyName("pressure_unit")] public string? PressureUnit { get; init; } [JsonPropertyName("wind_bearing")] public double? WindBearing { get; init; } [JsonPropertyName("wind_gust_speed")] public double? WindGustSpeed { get; init; } [JsonPropertyName("wind_speed")] public double? WindSpeed { get; init; } [JsonPropertyName("wind_speed_unit")] public string? WindSpeedUnit { get; init; } [JsonPropertyName("visibility_unit")] public string? VisibilityUnit { get; init; } [JsonPropertyName("precipitation_unit")] public string? PrecipitationUnit { get; init; } [JsonPropertyName("attribution")] public string? Attribution { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } [JsonPropertyName("supported_features")] public double? SupportedFeatures { get; init; } } public partial record ZoneEntity : Entity, ZoneAttributes>, IZoneEntityCore { public ZoneEntity(IHaContext haContext, string entityId) : base(haContext, entityId) { } public ZoneEntity(IEntityCore entity) : base(entity) { } } public partial record ZoneAttributes { [JsonPropertyName("latitude")] public double? Latitude { get; init; } [JsonPropertyName("longitude")] public double? Longitude { get; init; } [JsonPropertyName("radius")] public double? Radius { get; init; } [JsonPropertyName("passive")] public bool? Passive { get; init; } [JsonPropertyName("persons")] public IReadOnlyList? Persons { get; init; } [JsonPropertyName("editable")] public bool? Editable { get; init; } [JsonPropertyName("icon")] public string? Icon { get; init; } [JsonPropertyName("friendly_name")] public string? FriendlyName { get; init; } } public interface IServices { AlarmControlPanelServices AlarmControlPanel { get; } AutomationServices Automation { get; } BackupServices Backup { get; } BlueprintServices Blueprint { get; } ButtonServices Button { get; } CameraServices Camera { get; } ClimateServices Climate { get; } CloudServices Cloud { get; } ConversationServices Conversation { get; } CounterServices Counter { get; } CoverServices Cover { get; } DeviceTrackerServices DeviceTracker { get; } FanServices Fan { get; } FfmpegServices Ffmpeg { get; } FileServices File { get; } FrontendServices Frontend { get; } HassioServices Hassio { get; } HomeassistantServices Homeassistant { get; } HumidifierServices Humidifier { get; } InputBooleanServices InputBoolean { get; } InputButtonServices InputButton { get; } InputDatetimeServices InputDatetime { get; } InputNumberServices InputNumber { get; } InputSelectServices InputSelect { get; } InputTextServices InputText { get; } LightServices Light { get; } LockServices Lock { get; } LogbookServices Logbook { get; } LoggerServices Logger { get; } MediaPlayerServices MediaPlayer { get; } MqttServices Mqtt { get; } NordpoolServices Nordpool { get; } NotifyServices Notify { get; } NumberServices Number { get; } PersistentNotificationServices PersistentNotification { get; } PersonServices Person { get; } RecorderServices Recorder { get; } RemoteServices Remote { get; } RepairsServices Repairs { get; } SceneServices Scene { get; } ScheduleServices Schedule { get; } ScriptServices Script { get; } SelectServices Select { get; } SirenServices Siren { get; } SystemLogServices SystemLog { get; } SonoffServices Sonoff { get; } SpookServices Spook { get; } SwitchServices Switch { get; } TemplateServices Template { get; } TimeServices Time { get; } TimerServices Timer { get; } TtsServices Tts { get; } UpdateServices Update { get; } UtilityMeterServices UtilityMeter { get; } VacuumServices Vacuum { get; } ValveServices Valve { get; } WeatherServices Weather { get; } ZhaServices Zha { get; } ZhaToolkitServices ZhaToolkit { get; } ZoneServices Zone { get; } } public partial class Services : IServices { private readonly IHaContext _haContext; public Services(IHaContext haContext) { _haContext = haContext; } public AlarmControlPanelServices AlarmControlPanel => new(_haContext); public AutomationServices Automation => new(_haContext); public BackupServices Backup => new(_haContext); public BlueprintServices Blueprint => new(_haContext); public ButtonServices Button => new(_haContext); public CameraServices Camera => new(_haContext); public ClimateServices Climate => new(_haContext); public CloudServices Cloud => new(_haContext); public ConversationServices Conversation => new(_haContext); public CounterServices Counter => new(_haContext); public CoverServices Cover => new(_haContext); public DeviceTrackerServices DeviceTracker => new(_haContext); public FanServices Fan => new(_haContext); public FfmpegServices Ffmpeg => new(_haContext); public FileServices File => new(_haContext); public FrontendServices Frontend => new(_haContext); public HassioServices Hassio => new(_haContext); public HomeassistantServices Homeassistant => new(_haContext); public HumidifierServices Humidifier => new(_haContext); public InputBooleanServices InputBoolean => new(_haContext); public InputButtonServices InputButton => new(_haContext); public InputDatetimeServices InputDatetime => new(_haContext); public InputNumberServices InputNumber => new(_haContext); public InputSelectServices InputSelect => new(_haContext); public InputTextServices InputText => new(_haContext); public LightServices Light => new(_haContext); public LockServices Lock => new(_haContext); public LogbookServices Logbook => new(_haContext); public LoggerServices Logger => new(_haContext); public MediaPlayerServices MediaPlayer => new(_haContext); public MqttServices Mqtt => new(_haContext); public NordpoolServices Nordpool => new(_haContext); public NotifyServices Notify => new(_haContext); public NumberServices Number => new(_haContext); public PersistentNotificationServices PersistentNotification => new(_haContext); public PersonServices Person => new(_haContext); public RecorderServices Recorder => new(_haContext); public RemoteServices Remote => new(_haContext); public RepairsServices Repairs => new(_haContext); public SceneServices Scene => new(_haContext); public ScheduleServices Schedule => new(_haContext); public ScriptServices Script => new(_haContext); public SelectServices Select => new(_haContext); public SirenServices Siren => new(_haContext); public SystemLogServices SystemLog => new(_haContext); public SonoffServices Sonoff => new(_haContext); public SpookServices Spook => new(_haContext); public SwitchServices Switch => new(_haContext); public TemplateServices Template => new(_haContext); public TimeServices Time => new(_haContext); public TimerServices Timer => new(_haContext); public TtsServices Tts => new(_haContext); public UpdateServices Update => new(_haContext); public UtilityMeterServices UtilityMeter => new(_haContext); public VacuumServices Vacuum => new(_haContext); public ValveServices Valve => new(_haContext); public WeatherServices Weather => new(_haContext); public ZhaServices Zha => new(_haContext); public ZhaToolkitServices ZhaToolkit => new(_haContext); public ZoneServices Zone => new(_haContext); } public partial class AlarmControlPanelServices { private readonly IHaContext _haContext; public AlarmControlPanelServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void AlarmArmAway(ServiceTarget target, AlarmControlPanelAlarmArmAwayParameters data) { _haContext.CallService("alarm_control_panel", "alarm_arm_away", target, data); } /// eg: 1234 public void AlarmArmAway(ServiceTarget target, string? code = null) { _haContext.CallService("alarm_control_panel", "alarm_arm_away", target, new AlarmControlPanelAlarmArmAwayParameters { Code = code }); } ///The target for this service call public void AlarmArmCustomBypass(ServiceTarget target, AlarmControlPanelAlarmArmCustomBypassParameters data) { _haContext.CallService("alarm_control_panel", "alarm_arm_custom_bypass", target, data); } /// eg: 1234 public void AlarmArmCustomBypass(ServiceTarget target, string? code = null) { _haContext.CallService("alarm_control_panel", "alarm_arm_custom_bypass", target, new AlarmControlPanelAlarmArmCustomBypassParameters { Code = code }); } ///The target for this service call public void AlarmArmHome(ServiceTarget target, AlarmControlPanelAlarmArmHomeParameters data) { _haContext.CallService("alarm_control_panel", "alarm_arm_home", target, data); } /// eg: 1234 public void AlarmArmHome(ServiceTarget target, string? code = null) { _haContext.CallService("alarm_control_panel", "alarm_arm_home", target, new AlarmControlPanelAlarmArmHomeParameters { Code = code }); } ///The target for this service call public void AlarmArmNight(ServiceTarget target, AlarmControlPanelAlarmArmNightParameters data) { _haContext.CallService("alarm_control_panel", "alarm_arm_night", target, data); } /// eg: 1234 public void AlarmArmNight(ServiceTarget target, string? code = null) { _haContext.CallService("alarm_control_panel", "alarm_arm_night", target, new AlarmControlPanelAlarmArmNightParameters { Code = code }); } ///The target for this service call public void AlarmArmVacation(ServiceTarget target, AlarmControlPanelAlarmArmVacationParameters data) { _haContext.CallService("alarm_control_panel", "alarm_arm_vacation", target, data); } /// eg: 1234 public void AlarmArmVacation(ServiceTarget target, string? code = null) { _haContext.CallService("alarm_control_panel", "alarm_arm_vacation", target, new AlarmControlPanelAlarmArmVacationParameters { Code = code }); } ///The target for this service call public void AlarmDisarm(ServiceTarget target, AlarmControlPanelAlarmDisarmParameters data) { _haContext.CallService("alarm_control_panel", "alarm_disarm", target, data); } /// eg: 1234 public void AlarmDisarm(ServiceTarget target, string? code = null) { _haContext.CallService("alarm_control_panel", "alarm_disarm", target, new AlarmControlPanelAlarmDisarmParameters { Code = code }); } ///The target for this service call public void AlarmTrigger(ServiceTarget target, AlarmControlPanelAlarmTriggerParameters data) { _haContext.CallService("alarm_control_panel", "alarm_trigger", target, data); } /// eg: 1234 public void AlarmTrigger(ServiceTarget target, string? code = null) { _haContext.CallService("alarm_control_panel", "alarm_trigger", target, new AlarmControlPanelAlarmTriggerParameters { Code = code }); } } public partial record AlarmControlPanelAlarmArmAwayParameters { /// eg: 1234 [JsonPropertyName("code")] public string? Code { get; init; } } public partial record AlarmControlPanelAlarmArmCustomBypassParameters { /// eg: 1234 [JsonPropertyName("code")] public string? Code { get; init; } } public partial record AlarmControlPanelAlarmArmHomeParameters { /// eg: 1234 [JsonPropertyName("code")] public string? Code { get; init; } } public partial record AlarmControlPanelAlarmArmNightParameters { /// eg: 1234 [JsonPropertyName("code")] public string? Code { get; init; } } public partial record AlarmControlPanelAlarmArmVacationParameters { /// eg: 1234 [JsonPropertyName("code")] public string? Code { get; init; } } public partial record AlarmControlPanelAlarmDisarmParameters { /// eg: 1234 [JsonPropertyName("code")] public string? Code { get; init; } } public partial record AlarmControlPanelAlarmTriggerParameters { /// eg: 1234 [JsonPropertyName("code")] public string? Code { get; init; } } public partial class AutomationServices { private readonly IHaContext _haContext; public AutomationServices(IHaContext haContext) { _haContext = haContext; } public void Reload(object? data = null) { _haContext.CallService("automation", "reload", null, data); } ///The target for this service call public void Toggle(ServiceTarget target, object? data = null) { _haContext.CallService("automation", "toggle", target, data); } ///The target for this service call public void Trigger(ServiceTarget target, AutomationTriggerParameters data) { _haContext.CallService("automation", "trigger", target, data); } /// public void Trigger(ServiceTarget target, bool? skipCondition = null) { _haContext.CallService("automation", "trigger", target, new AutomationTriggerParameters { SkipCondition = skipCondition }); } ///The target for this service call public void TurnOff(ServiceTarget target, AutomationTurnOffParameters data) { _haContext.CallService("automation", "turn_off", target, data); } /// public void TurnOff(ServiceTarget target, bool? stopActions = null) { _haContext.CallService("automation", "turn_off", target, new AutomationTurnOffParameters { StopActions = stopActions }); } ///The target for this service call public void TurnOn(ServiceTarget target, object? data = null) { _haContext.CallService("automation", "turn_on", target, data); } } public partial record AutomationTriggerParameters { [JsonPropertyName("skip_condition")] public bool? SkipCondition { get; init; } } public partial record AutomationTurnOffParameters { [JsonPropertyName("stop_actions")] public bool? StopActions { get; init; } } public partial class BackupServices { private readonly IHaContext _haContext; public BackupServices(IHaContext haContext) { _haContext = haContext; } public void CreateAutomatic(object? data = null) { _haContext.CallService("backup", "create_automatic", null, data); } } public partial class BlueprintServices { private readonly IHaContext _haContext; public BlueprintServices(IHaContext haContext) { _haContext = haContext; } ///Import a blueprint. public void Import(BlueprintImportParameters data) { _haContext.CallService("blueprint", "import", null, data); } ///Import a blueprint. ///The URL to import the blueprint from. public void Import(string url) { _haContext.CallService("blueprint", "import", null, new BlueprintImportParameters { Url = url }); } } public partial record BlueprintImportParameters { ///The URL to import the blueprint from. [JsonPropertyName("url")] public string? Url { get; init; } } public partial class ButtonServices { private readonly IHaContext _haContext; public ButtonServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void Press(ServiceTarget target, object? data = null) { _haContext.CallService("button", "press", target, data); } } public partial class CameraServices { private readonly IHaContext _haContext; public CameraServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void DisableMotionDetection(ServiceTarget target, object? data = null) { _haContext.CallService("camera", "disable_motion_detection", target, data); } ///The target for this service call public void EnableMotionDetection(ServiceTarget target, object? data = null) { _haContext.CallService("camera", "enable_motion_detection", target, data); } ///The target for this service call public void PlayStream(ServiceTarget target, CameraPlayStreamParameters data) { _haContext.CallService("camera", "play_stream", target, data); } /// /// public void PlayStream(ServiceTarget target, string mediaPlayer, object? format = null) { _haContext.CallService("camera", "play_stream", target, new CameraPlayStreamParameters { MediaPlayer = mediaPlayer, Format = format }); } ///The target for this service call public void Record(ServiceTarget target, CameraRecordParameters data) { _haContext.CallService("camera", "record", target, data); } /// eg: /tmp/snapshot_{{ entity_id.name }}.mp4 /// /// public void Record(ServiceTarget target, string filename, long? duration = null, long? lookback = null) { _haContext.CallService("camera", "record", target, new CameraRecordParameters { Filename = filename, Duration = duration, Lookback = lookback }); } ///The target for this service call public void Snapshot(ServiceTarget target, CameraSnapshotParameters data) { _haContext.CallService("camera", "snapshot", target, data); } /// eg: /tmp/snapshot_{{ entity_id.name }}.jpg public void Snapshot(ServiceTarget target, string filename) { _haContext.CallService("camera", "snapshot", target, new CameraSnapshotParameters { Filename = filename }); } ///The target for this service call public void TurnOff(ServiceTarget target, object? data = null) { _haContext.CallService("camera", "turn_off", target, data); } ///The target for this service call public void TurnOn(ServiceTarget target, object? data = null) { _haContext.CallService("camera", "turn_on", target, data); } } public partial record CameraPlayStreamParameters { [JsonPropertyName("media_player")] public string? MediaPlayer { get; init; } [JsonPropertyName("format")] public object? Format { get; init; } } public partial record CameraRecordParameters { /// eg: /tmp/snapshot_{{ entity_id.name }}.mp4 [JsonPropertyName("filename")] public string? Filename { get; init; } [JsonPropertyName("duration")] public long? Duration { get; init; } [JsonPropertyName("lookback")] public long? Lookback { get; init; } } public partial record CameraSnapshotParameters { /// eg: /tmp/snapshot_{{ entity_id.name }}.jpg [JsonPropertyName("filename")] public string? Filename { get; init; } } public partial class ClimateServices { private readonly IHaContext _haContext; public ClimateServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void SetFanMode(ServiceTarget target, ClimateSetFanModeParameters data) { _haContext.CallService("climate", "set_fan_mode", target, data); } /// eg: low public void SetFanMode(ServiceTarget target, string fanMode) { _haContext.CallService("climate", "set_fan_mode", target, new ClimateSetFanModeParameters { FanMode = fanMode }); } ///The target for this service call public void SetHumidity(ServiceTarget target, ClimateSetHumidityParameters data) { _haContext.CallService("climate", "set_humidity", target, data); } /// public void SetHumidity(ServiceTarget target, long humidity) { _haContext.CallService("climate", "set_humidity", target, new ClimateSetHumidityParameters { Humidity = humidity }); } ///The target for this service call public void SetHvacMode(ServiceTarget target, ClimateSetHvacModeParameters data) { _haContext.CallService("climate", "set_hvac_mode", target, data); } /// public void SetHvacMode(ServiceTarget target, object? hvacMode = null) { _haContext.CallService("climate", "set_hvac_mode", target, new ClimateSetHvacModeParameters { HvacMode = hvacMode }); } ///The target for this service call public void SetPresetMode(ServiceTarget target, ClimateSetPresetModeParameters data) { _haContext.CallService("climate", "set_preset_mode", target, data); } /// eg: away public void SetPresetMode(ServiceTarget target, string presetMode) { _haContext.CallService("climate", "set_preset_mode", target, new ClimateSetPresetModeParameters { PresetMode = presetMode }); } ///The target for this service call public void SetSwingHorizontalMode(ServiceTarget target, ClimateSetSwingHorizontalModeParameters data) { _haContext.CallService("climate", "set_swing_horizontal_mode", target, data); } /// eg: on public void SetSwingHorizontalMode(ServiceTarget target, string swingHorizontalMode) { _haContext.CallService("climate", "set_swing_horizontal_mode", target, new ClimateSetSwingHorizontalModeParameters { SwingHorizontalMode = swingHorizontalMode }); } ///The target for this service call public void SetSwingMode(ServiceTarget target, ClimateSetSwingModeParameters data) { _haContext.CallService("climate", "set_swing_mode", target, data); } /// eg: on public void SetSwingMode(ServiceTarget target, string swingMode) { _haContext.CallService("climate", "set_swing_mode", target, new ClimateSetSwingModeParameters { SwingMode = swingMode }); } ///The target for this service call public void SetTemperature(ServiceTarget target, ClimateSetTemperatureParameters data) { _haContext.CallService("climate", "set_temperature", target, data); } /// /// /// /// public void SetTemperature(ServiceTarget target, double? temperature = null, double? targetTempHigh = null, double? targetTempLow = null, object? hvacMode = null) { _haContext.CallService("climate", "set_temperature", target, new ClimateSetTemperatureParameters { Temperature = temperature, TargetTempHigh = targetTempHigh, TargetTempLow = targetTempLow, HvacMode = hvacMode }); } ///The target for this service call public void Toggle(ServiceTarget target, object? data = null) { _haContext.CallService("climate", "toggle", target, data); } ///The target for this service call public void TurnOff(ServiceTarget target, object? data = null) { _haContext.CallService("climate", "turn_off", target, data); } ///The target for this service call public void TurnOn(ServiceTarget target, object? data = null) { _haContext.CallService("climate", "turn_on", target, data); } } public partial record ClimateSetFanModeParameters { /// eg: low [JsonPropertyName("fan_mode")] public string? FanMode { get; init; } } public partial record ClimateSetHumidityParameters { [JsonPropertyName("humidity")] public long? Humidity { get; init; } } public partial record ClimateSetHvacModeParameters { [JsonPropertyName("hvac_mode")] public object? HvacMode { get; init; } } public partial record ClimateSetPresetModeParameters { /// eg: away [JsonPropertyName("preset_mode")] public string? PresetMode { get; init; } } public partial record ClimateSetSwingHorizontalModeParameters { /// eg: on [JsonPropertyName("swing_horizontal_mode")] public string? SwingHorizontalMode { get; init; } } public partial record ClimateSetSwingModeParameters { /// eg: on [JsonPropertyName("swing_mode")] public string? SwingMode { get; init; } } public partial record ClimateSetTemperatureParameters { [JsonPropertyName("temperature")] public double? Temperature { get; init; } [JsonPropertyName("target_temp_high")] public double? TargetTempHigh { get; init; } [JsonPropertyName("target_temp_low")] public double? TargetTempLow { get; init; } [JsonPropertyName("hvac_mode")] public object? HvacMode { get; init; } } public partial class CloudServices { private readonly IHaContext _haContext; public CloudServices(IHaContext haContext) { _haContext = haContext; } public void RemoteConnect(object? data = null) { _haContext.CallService("cloud", "remote_connect", null, data); } public void RemoteDisconnect(object? data = null) { _haContext.CallService("cloud", "remote_disconnect", null, data); } } public partial class ConversationServices { private readonly IHaContext _haContext; public ConversationServices(IHaContext haContext) { _haContext = haContext; } public void Process(ConversationProcessParameters data) { _haContext.CallService("conversation", "process", null, data); } /// eg: Turn all lights on /// eg: NL /// eg: homeassistant /// eg: my_conversation_1 public void Process(string text, string? language = null, object? agentId = null, string? conversationId = null) { _haContext.CallService("conversation", "process", null, new ConversationProcessParameters { Text = text, Language = language, AgentId = agentId, ConversationId = conversationId }); } public Task ProcessAsync(ConversationProcessParameters data) { return _haContext.CallServiceWithResponseAsync("conversation", "process", null, data); } /// eg: Turn all lights on /// eg: NL /// eg: homeassistant /// eg: my_conversation_1 public Task ProcessAsync(string text, string? language = null, object? agentId = null, string? conversationId = null) { return _haContext.CallServiceWithResponseAsync("conversation", "process", null, new ConversationProcessParameters { Text = text, Language = language, AgentId = agentId, ConversationId = conversationId }); } public void Reload(ConversationReloadParameters data) { _haContext.CallService("conversation", "reload", null, data); } /// eg: NL /// eg: homeassistant public void Reload(string? language = null, object? agentId = null) { _haContext.CallService("conversation", "reload", null, new ConversationReloadParameters { Language = language, AgentId = agentId }); } } public partial record ConversationProcessParameters { /// eg: Turn all lights on [JsonPropertyName("text")] public string? Text { get; init; } /// eg: NL [JsonPropertyName("language")] public string? Language { get; init; } /// eg: homeassistant [JsonPropertyName("agent_id")] public object? AgentId { get; init; } /// eg: my_conversation_1 [JsonPropertyName("conversation_id")] public string? ConversationId { get; init; } } public partial record ConversationReloadParameters { /// eg: NL [JsonPropertyName("language")] public string? Language { get; init; } /// eg: homeassistant [JsonPropertyName("agent_id")] public object? AgentId { get; init; } } public partial class CounterServices { private readonly IHaContext _haContext; public CounterServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void Decrement(ServiceTarget target, object? data = null) { _haContext.CallService("counter", "decrement", target, data); } ///The target for this service call public void Increment(ServiceTarget target, object? data = null) { _haContext.CallService("counter", "increment", target, data); } ///The target for this service call public void Reset(ServiceTarget target, object? data = null) { _haContext.CallService("counter", "reset", target, data); } ///The target for this service call public void SetValue(ServiceTarget target, CounterSetValueParameters data) { _haContext.CallService("counter", "set_value", target, data); } /// public void SetValue(ServiceTarget target, long value) { _haContext.CallService("counter", "set_value", target, new CounterSetValueParameters { Value = value }); } } public partial record CounterSetValueParameters { [JsonPropertyName("value")] public long? Value { get; init; } } public partial class CoverServices { private readonly IHaContext _haContext; public CoverServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void CloseCover(ServiceTarget target, object? data = null) { _haContext.CallService("cover", "close_cover", target, data); } ///The target for this service call public void CloseCoverTilt(ServiceTarget target, object? data = null) { _haContext.CallService("cover", "close_cover_tilt", target, data); } ///The target for this service call public void OpenCover(ServiceTarget target, object? data = null) { _haContext.CallService("cover", "open_cover", target, data); } ///The target for this service call public void OpenCoverTilt(ServiceTarget target, object? data = null) { _haContext.CallService("cover", "open_cover_tilt", target, data); } ///The target for this service call public void SetCoverPosition(ServiceTarget target, CoverSetCoverPositionParameters data) { _haContext.CallService("cover", "set_cover_position", target, data); } /// public void SetCoverPosition(ServiceTarget target, long position) { _haContext.CallService("cover", "set_cover_position", target, new CoverSetCoverPositionParameters { Position = position }); } ///The target for this service call public void SetCoverTiltPosition(ServiceTarget target, CoverSetCoverTiltPositionParameters data) { _haContext.CallService("cover", "set_cover_tilt_position", target, data); } /// public void SetCoverTiltPosition(ServiceTarget target, long tiltPosition) { _haContext.CallService("cover", "set_cover_tilt_position", target, new CoverSetCoverTiltPositionParameters { TiltPosition = tiltPosition }); } ///The target for this service call public void StopCover(ServiceTarget target, object? data = null) { _haContext.CallService("cover", "stop_cover", target, data); } ///The target for this service call public void StopCoverTilt(ServiceTarget target, object? data = null) { _haContext.CallService("cover", "stop_cover_tilt", target, data); } ///The target for this service call public void Toggle(ServiceTarget target, object? data = null) { _haContext.CallService("cover", "toggle", target, data); } ///The target for this service call public void ToggleCoverTilt(ServiceTarget target, object? data = null) { _haContext.CallService("cover", "toggle_cover_tilt", target, data); } } public partial record CoverSetCoverPositionParameters { [JsonPropertyName("position")] public long? Position { get; init; } } public partial record CoverSetCoverTiltPositionParameters { [JsonPropertyName("tilt_position")] public long? TiltPosition { get; init; } } public partial class DeviceTrackerServices { private readonly IHaContext _haContext; public DeviceTrackerServices(IHaContext haContext) { _haContext = haContext; } public void See(DeviceTrackerSeeParameters data) { _haContext.CallService("device_tracker", "see", null, data); } /// eg: FF:FF:FF:FF:FF:FF /// eg: phonedave /// eg: Dave /// eg: home /// eg: [51.509802, -0.086692] /// /// public void See(string? mac = null, string? devId = null, string? hostName = null, string? locationName = null, object? gps = null, long? gpsAccuracy = null, long? battery = null) { _haContext.CallService("device_tracker", "see", null, new DeviceTrackerSeeParameters { Mac = mac, DevId = devId, HostName = hostName, LocationName = locationName, Gps = gps, GpsAccuracy = gpsAccuracy, Battery = battery }); } } public partial record DeviceTrackerSeeParameters { /// eg: FF:FF:FF:FF:FF:FF [JsonPropertyName("mac")] public string? Mac { get; init; } /// eg: phonedave [JsonPropertyName("dev_id")] public string? DevId { get; init; } /// eg: Dave [JsonPropertyName("host_name")] public string? HostName { get; init; } /// eg: home [JsonPropertyName("location_name")] public string? LocationName { get; init; } /// eg: [51.509802, -0.086692] [JsonPropertyName("gps")] public object? Gps { get; init; } [JsonPropertyName("gps_accuracy")] public long? GpsAccuracy { get; init; } [JsonPropertyName("battery")] public long? Battery { get; init; } } public partial class FanServices { private readonly IHaContext _haContext; public FanServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void DecreaseSpeed(ServiceTarget target, FanDecreaseSpeedParameters data) { _haContext.CallService("fan", "decrease_speed", target, data); } /// public void DecreaseSpeed(ServiceTarget target, long? percentageStep = null) { _haContext.CallService("fan", "decrease_speed", target, new FanDecreaseSpeedParameters { PercentageStep = percentageStep }); } ///The target for this service call public void IncreaseSpeed(ServiceTarget target, FanIncreaseSpeedParameters data) { _haContext.CallService("fan", "increase_speed", target, data); } /// public void IncreaseSpeed(ServiceTarget target, long? percentageStep = null) { _haContext.CallService("fan", "increase_speed", target, new FanIncreaseSpeedParameters { PercentageStep = percentageStep }); } ///The target for this service call public void Oscillate(ServiceTarget target, FanOscillateParameters data) { _haContext.CallService("fan", "oscillate", target, data); } /// public void Oscillate(ServiceTarget target, bool oscillating) { _haContext.CallService("fan", "oscillate", target, new FanOscillateParameters { Oscillating = oscillating }); } ///The target for this service call public void SetDirection(ServiceTarget target, FanSetDirectionParameters data) { _haContext.CallService("fan", "set_direction", target, data); } /// public void SetDirection(ServiceTarget target, object direction) { _haContext.CallService("fan", "set_direction", target, new FanSetDirectionParameters { Direction = direction }); } ///The target for this service call public void SetPercentage(ServiceTarget target, FanSetPercentageParameters data) { _haContext.CallService("fan", "set_percentage", target, data); } /// public void SetPercentage(ServiceTarget target, long percentage) { _haContext.CallService("fan", "set_percentage", target, new FanSetPercentageParameters { Percentage = percentage }); } ///The target for this service call public void SetPresetMode(ServiceTarget target, FanSetPresetModeParameters data) { _haContext.CallService("fan", "set_preset_mode", target, data); } /// eg: auto public void SetPresetMode(ServiceTarget target, string presetMode) { _haContext.CallService("fan", "set_preset_mode", target, new FanSetPresetModeParameters { PresetMode = presetMode }); } ///The target for this service call public void Toggle(ServiceTarget target, object? data = null) { _haContext.CallService("fan", "toggle", target, data); } ///The target for this service call public void TurnOff(ServiceTarget target, object? data = null) { _haContext.CallService("fan", "turn_off", target, data); } ///The target for this service call public void TurnOn(ServiceTarget target, FanTurnOnParameters data) { _haContext.CallService("fan", "turn_on", target, data); } /// /// eg: auto public void TurnOn(ServiceTarget target, long? percentage = null, string? presetMode = null) { _haContext.CallService("fan", "turn_on", target, new FanTurnOnParameters { Percentage = percentage, PresetMode = presetMode }); } } public partial record FanDecreaseSpeedParameters { [JsonPropertyName("percentage_step")] public long? PercentageStep { get; init; } } public partial record FanIncreaseSpeedParameters { [JsonPropertyName("percentage_step")] public long? PercentageStep { get; init; } } public partial record FanOscillateParameters { [JsonPropertyName("oscillating")] public bool? Oscillating { get; init; } } public partial record FanSetDirectionParameters { [JsonPropertyName("direction")] public object? Direction { get; init; } } public partial record FanSetPercentageParameters { [JsonPropertyName("percentage")] public long? Percentage { get; init; } } public partial record FanSetPresetModeParameters { /// eg: auto [JsonPropertyName("preset_mode")] public string? PresetMode { get; init; } } public partial record FanTurnOnParameters { [JsonPropertyName("percentage")] public long? Percentage { get; init; } /// eg: auto [JsonPropertyName("preset_mode")] public string? PresetMode { get; init; } } public partial class FfmpegServices { private readonly IHaContext _haContext; public FfmpegServices(IHaContext haContext) { _haContext = haContext; } public void Restart(FfmpegRestartParameters data) { _haContext.CallService("ffmpeg", "restart", null, data); } /// public void Restart(string? entityId = null) { _haContext.CallService("ffmpeg", "restart", null, new FfmpegRestartParameters { EntityId = entityId }); } public void Start(FfmpegStartParameters data) { _haContext.CallService("ffmpeg", "start", null, data); } /// public void Start(string? entityId = null) { _haContext.CallService("ffmpeg", "start", null, new FfmpegStartParameters { EntityId = entityId }); } public void Stop(FfmpegStopParameters data) { _haContext.CallService("ffmpeg", "stop", null, data); } /// public void Stop(string? entityId = null) { _haContext.CallService("ffmpeg", "stop", null, new FfmpegStopParameters { EntityId = entityId }); } } public partial record FfmpegRestartParameters { [JsonPropertyName("entity_id")] public string? EntityId { get; init; } } public partial record FfmpegStartParameters { [JsonPropertyName("entity_id")] public string? EntityId { get; init; } } public partial record FfmpegStopParameters { [JsonPropertyName("entity_id")] public string? EntityId { get; init; } } public partial class FileServices { private readonly IHaContext _haContext; public FileServices(IHaContext haContext) { _haContext = haContext; } public void ReadFile(FileReadFileParameters data) { _haContext.CallService("file", "read_file", null, data); } /// eg: www/my_file.json /// eg: JSON public void ReadFile(string? fileName = null, object? fileEncoding = null) { _haContext.CallService("file", "read_file", null, new FileReadFileParameters { FileName = fileName, FileEncoding = fileEncoding }); } public Task ReadFileAsync(FileReadFileParameters data) { return _haContext.CallServiceWithResponseAsync("file", "read_file", null, data); } /// eg: www/my_file.json /// eg: JSON public Task ReadFileAsync(string? fileName = null, object? fileEncoding = null) { return _haContext.CallServiceWithResponseAsync("file", "read_file", null, new FileReadFileParameters { FileName = fileName, FileEncoding = fileEncoding }); } } public partial record FileReadFileParameters { /// eg: www/my_file.json [JsonPropertyName("file_name")] public string? FileName { get; init; } /// eg: JSON [JsonPropertyName("file_encoding")] public object? FileEncoding { get; init; } } public partial class FrontendServices { private readonly IHaContext _haContext; public FrontendServices(IHaContext haContext) { _haContext = haContext; } public void ReloadThemes(object? data = null) { _haContext.CallService("frontend", "reload_themes", null, data); } public void SetTheme(FrontendSetThemeParameters data) { _haContext.CallService("frontend", "set_theme", null, data); } /// eg: default /// eg: default public void SetTheme(object? name = null, object? nameDark = null) { _haContext.CallService("frontend", "set_theme", null, new FrontendSetThemeParameters { Name = name, NameDark = nameDark }); } } public partial record FrontendSetThemeParameters { /// eg: default [JsonPropertyName("name")] public object? Name { get; init; } /// eg: default [JsonPropertyName("name_dark")] public object? NameDark { get; init; } } public partial class HassioServices { private readonly IHaContext _haContext; public HassioServices(IHaContext haContext) { _haContext = haContext; } public void AddonRestart(HassioAddonRestartParameters data) { _haContext.CallService("hassio", "addon_restart", null, data); } /// eg: core_ssh public void AddonRestart(object addon) { _haContext.CallService("hassio", "addon_restart", null, new HassioAddonRestartParameters { Addon = addon }); } public void AddonStart(HassioAddonStartParameters data) { _haContext.CallService("hassio", "addon_start", null, data); } /// eg: core_ssh public void AddonStart(object addon) { _haContext.CallService("hassio", "addon_start", null, new HassioAddonStartParameters { Addon = addon }); } public void AddonStdin(HassioAddonStdinParameters data) { _haContext.CallService("hassio", "addon_stdin", null, data); } /// eg: core_ssh public void AddonStdin(object addon) { _haContext.CallService("hassio", "addon_stdin", null, new HassioAddonStdinParameters { Addon = addon }); } public void AddonStop(HassioAddonStopParameters data) { _haContext.CallService("hassio", "addon_stop", null, data); } /// eg: core_ssh public void AddonStop(object addon) { _haContext.CallService("hassio", "addon_stop", null, new HassioAddonStopParameters { Addon = addon }); } public void AppRestart(HassioAppRestartParameters data) { _haContext.CallService("hassio", "app_restart", null, data); } /// eg: core_ssh public void AppRestart(object app) { _haContext.CallService("hassio", "app_restart", null, new HassioAppRestartParameters { App = app }); } public void AppStart(HassioAppStartParameters data) { _haContext.CallService("hassio", "app_start", null, data); } /// eg: core_ssh public void AppStart(object app) { _haContext.CallService("hassio", "app_start", null, new HassioAppStartParameters { App = app }); } public void AppStdin(HassioAppStdinParameters data) { _haContext.CallService("hassio", "app_stdin", null, data); } /// eg: core_ssh /// public void AppStdin(object app, object input) { _haContext.CallService("hassio", "app_stdin", null, new HassioAppStdinParameters { App = app, Input = input }); } public void AppStop(HassioAppStopParameters data) { _haContext.CallService("hassio", "app_stop", null, data); } /// eg: core_ssh public void AppStop(object app) { _haContext.CallService("hassio", "app_stop", null, new HassioAppStopParameters { App = app }); } public void BackupFull(HassioBackupFullParameters data) { _haContext.CallService("hassio", "backup_full", null, data); } /// eg: Backup 1 /// eg: password /// /// eg: my_backup_mount /// public void BackupFull(string? name = null, string? password = null, bool? compressed = null, object? location = null, bool? homeassistantExcludeDatabase = null) { _haContext.CallService("hassio", "backup_full", null, new HassioBackupFullParameters { Name = name, Password = password, Compressed = compressed, Location = location, HomeassistantExcludeDatabase = homeassistantExcludeDatabase }); } public void BackupPartial(HassioBackupPartialParameters data) { _haContext.CallService("hassio", "backup_partial", null, data); } /// /// /// eg: ["core_ssh","core_samba","core_mosquitto"] /// eg: ["core_ssh","core_samba","core_mosquitto"] /// eg: ["homeassistant","share"] /// eg: Partial backup 1 /// eg: password /// /// eg: my_backup_mount public void BackupPartial(bool? homeassistant = null, bool? homeassistantExcludeDatabase = null, object? apps = null, object? addons = null, object? folders = null, string? name = null, string? password = null, bool? compressed = null, object? location = null) { _haContext.CallService("hassio", "backup_partial", null, new HassioBackupPartialParameters { Homeassistant = homeassistant, HomeassistantExcludeDatabase = homeassistantExcludeDatabase, Apps = apps, Addons = addons, Folders = folders, Name = name, Password = password, Compressed = compressed, Location = location }); } public void HostReboot(object? data = null) { _haContext.CallService("hassio", "host_reboot", null, data); } public void HostShutdown(object? data = null) { _haContext.CallService("hassio", "host_shutdown", null, data); } public void RestoreFull(HassioRestoreFullParameters data) { _haContext.CallService("hassio", "restore_full", null, data); } /// /// eg: password public void RestoreFull(string slug, string? password = null) { _haContext.CallService("hassio", "restore_full", null, new HassioRestoreFullParameters { Slug = slug, Password = password }); } public void RestorePartial(HassioRestorePartialParameters data) { _haContext.CallService("hassio", "restore_partial", null, data); } /// /// /// eg: ["homeassistant","share"] /// eg: ["core_ssh","core_samba","core_mosquitto"] /// eg: ["core_ssh","core_samba","core_mosquitto"] /// eg: password public void RestorePartial(string slug, bool? homeassistant = null, object? folders = null, object? apps = null, object? addons = null, string? password = null) { _haContext.CallService("hassio", "restore_partial", null, new HassioRestorePartialParameters { Slug = slug, Homeassistant = homeassistant, Folders = folders, Apps = apps, Addons = addons, Password = password }); } } public partial record HassioAddonRestartParameters { /// eg: core_ssh [JsonPropertyName("addon")] public object? Addon { get; init; } } public partial record HassioAddonStartParameters { /// eg: core_ssh [JsonPropertyName("addon")] public object? Addon { get; init; } } public partial record HassioAddonStdinParameters { /// eg: core_ssh [JsonPropertyName("addon")] public object? Addon { get; init; } } public partial record HassioAddonStopParameters { /// eg: core_ssh [JsonPropertyName("addon")] public object? Addon { get; init; } } public partial record HassioAppRestartParameters { /// eg: core_ssh [JsonPropertyName("app")] public object? App { get; init; } } public partial record HassioAppStartParameters { /// eg: core_ssh [JsonPropertyName("app")] public object? App { get; init; } } public partial record HassioAppStdinParameters { /// eg: core_ssh [JsonPropertyName("app")] public object? App { get; init; } [JsonPropertyName("input")] public object? Input { get; init; } } public partial record HassioAppStopParameters { /// eg: core_ssh [JsonPropertyName("app")] public object? App { get; init; } } public partial record HassioBackupFullParameters { /// eg: Backup 1 [JsonPropertyName("name")] public string? Name { get; init; } /// eg: password [JsonPropertyName("password")] public string? Password { get; init; } [JsonPropertyName("compressed")] public bool? Compressed { get; init; } /// eg: my_backup_mount [JsonPropertyName("location")] public object? Location { get; init; } [JsonPropertyName("homeassistant_exclude_database")] public bool? HomeassistantExcludeDatabase { get; init; } } public partial record HassioBackupPartialParameters { [JsonPropertyName("homeassistant")] public bool? Homeassistant { get; init; } [JsonPropertyName("homeassistant_exclude_database")] public bool? HomeassistantExcludeDatabase { get; init; } /// eg: ["core_ssh","core_samba","core_mosquitto"] [JsonPropertyName("apps")] public object? Apps { get; init; } /// eg: ["core_ssh","core_samba","core_mosquitto"] [JsonPropertyName("addons")] public object? Addons { get; init; } /// eg: ["homeassistant","share"] [JsonPropertyName("folders")] public object? Folders { get; init; } /// eg: Partial backup 1 [JsonPropertyName("name")] public string? Name { get; init; } /// eg: password [JsonPropertyName("password")] public string? Password { get; init; } [JsonPropertyName("compressed")] public bool? Compressed { get; init; } /// eg: my_backup_mount [JsonPropertyName("location")] public object? Location { get; init; } } public partial record HassioRestoreFullParameters { [JsonPropertyName("slug")] public string? Slug { get; init; } /// eg: password [JsonPropertyName("password")] public string? Password { get; init; } } public partial record HassioRestorePartialParameters { [JsonPropertyName("slug")] public string? Slug { get; init; } [JsonPropertyName("homeassistant")] public bool? Homeassistant { get; init; } /// eg: ["homeassistant","share"] [JsonPropertyName("folders")] public object? Folders { get; init; } /// eg: ["core_ssh","core_samba","core_mosquitto"] [JsonPropertyName("apps")] public object? Apps { get; init; } /// eg: ["core_ssh","core_samba","core_mosquitto"] [JsonPropertyName("addons")] public object? Addons { get; init; } /// eg: password [JsonPropertyName("password")] public string? Password { get; init; } } public partial class HomeassistantServices { private readonly IHaContext _haContext; public HomeassistantServices(IHaContext haContext) { _haContext = haContext; } ///Adds an alias to an area. public void AddAliasToArea(HomeassistantAddAliasToAreaParameters data) { _haContext.CallService("homeassistant", "add_alias_to_area", null, data); } ///Adds an alias to an area. ///The ID of the area to add the alias to. ///The alias (or list of aliasses) to add to the area. public void AddAliasToArea(string areaId, object @alias) { _haContext.CallService("homeassistant", "add_alias_to_area", null, new HomeassistantAddAliasToAreaParameters { AreaId = areaId, Alias = @alias }); } ///Adds an alias to a floor. public void AddAliasToFloor(HomeassistantAddAliasToFloorParameters data) { _haContext.CallService("homeassistant", "add_alias_to_floor", null, data); } ///Adds an alias to a floor. ///The ID of the floor to add the alias to. ///The alias (or list of aliasses) to add to the floor. public void AddAliasToFloor(object floorId, object @alias) { _haContext.CallService("homeassistant", "add_alias_to_floor", null, new HomeassistantAddAliasToFloorParameters { FloorId = floorId, Alias = @alias }); } ///Adds an area to a floor. Please note, if the area is already on a floor, it will be removed from the previous floor. public void AddAreaToFloor(HomeassistantAddAreaToFloorParameters data) { _haContext.CallService("homeassistant", "add_area_to_floor", null, data); } ///Adds an area to a floor. Please note, if the area is already on a floor, it will be removed from the previous floor. ///The ID of the floor to add the area on. ///The ID of the area(s) to add to the floor. public void AddAreaToFloor(object floorId, IEnumerable areaId) { _haContext.CallService("homeassistant", "add_area_to_floor", null, new HomeassistantAddAreaToFloorParameters { FloorId = floorId, AreaId = areaId }); } ///Adds an device to an area. Please note, if the device is already in an area, it will be removed from the previous area. public void AddDeviceToArea(HomeassistantAddDeviceToAreaParameters data) { _haContext.CallService("homeassistant", "add_device_to_area", null, data); } ///Adds an device to an area. Please note, if the device is already in an area, it will be removed from the previous area. ///The ID of the area to add the device to. ///The ID of the device(s) to add to the area. public void AddDeviceToArea(string areaId, IEnumerable deviceId) { _haContext.CallService("homeassistant", "add_device_to_area", null, new HomeassistantAddDeviceToAreaParameters { AreaId = areaId, DeviceId = deviceId }); } ///Adds an entity to an area. Please note, if the enity is already in an area, it will be removed from the previous area. This will override the area the device, that provides this entity, is in. public void AddEntityToArea(HomeassistantAddEntityToAreaParameters data) { _haContext.CallService("homeassistant", "add_entity_to_area", null, data); } ///Adds an entity to an area. Please note, if the enity is already in an area, it will be removed from the previous area. This will override the area the device, that provides this entity, is in. ///The ID of the area to add the entity to. ///The ID of the entity (or entities) to add to the area. public void AddEntityToArea(string areaId, IEnumerable entityId) { _haContext.CallService("homeassistant", "add_entity_to_area", null, new HomeassistantAddEntityToAreaParameters { AreaId = areaId, EntityId = entityId }); } ///Adds a label to an area. If multiple labels or multiple areas are provided, all combinations will be added. public void AddLabelToArea(HomeassistantAddLabelToAreaParameters data) { _haContext.CallService("homeassistant", "add_label_to_area", null, data); } ///Adds a label to an area. If multiple labels or multiple areas are provided, all combinations will be added. ///The ID(s) of the label(s) to add the area(s). ///The ID(s) of the area(s) to add the label(s) to. public void AddLabelToArea(IEnumerable labelId, IEnumerable areaId) { _haContext.CallService("homeassistant", "add_label_to_area", null, new HomeassistantAddLabelToAreaParameters { LabelId = labelId, AreaId = areaId }); } ///Adds a label to a device. If multiple labels or multiple devices are provided, all combinations will be added. public void AddLabelToDevice(HomeassistantAddLabelToDeviceParameters data) { _haContext.CallService("homeassistant", "add_label_to_device", null, data); } ///Adds a label to a device. If multiple labels or multiple devices are provided, all combinations will be added. ///The ID(s) of the label(s) to add the device(s). ///The ID(s) of the device(s) to add the label(s) to. public void AddLabelToDevice(IEnumerable labelId, IEnumerable deviceId) { _haContext.CallService("homeassistant", "add_label_to_device", null, new HomeassistantAddLabelToDeviceParameters { LabelId = labelId, DeviceId = deviceId }); } ///Adds a label to an entity. If multiple labels or multiple entities are provided, all combinations will be added. public void AddLabelToEntity(HomeassistantAddLabelToEntityParameters data) { _haContext.CallService("homeassistant", "add_label_to_entity", null, data); } ///Adds a label to an entity. If multiple labels or multiple entities are provided, all combinations will be added. ///The ID(s) of the label(s) to add the entity/entities. ///The ID(s) of the entity/entities to add the label(s) to. public void AddLabelToEntity(IEnumerable labelId, IEnumerable entityId) { _haContext.CallService("homeassistant", "add_label_to_entity", null, new HomeassistantAddLabelToEntityParameters { LabelId = labelId, EntityId = entityId }); } public void CheckConfig(object? data = null) { _haContext.CallService("homeassistant", "check_config", null, data); } ///Creates a new area on the fly. public void CreateArea(HomeassistantCreateAreaParameters data) { _haContext.CallService("homeassistant", "create_area", null, data); } ///Creates a new area on the fly. ///The name of the area to create. ///Icon to use for the area. ///A list of aliases for the area. This is useful if you want to use the area in a different language or different nickname. public void CreateArea(string name, object? icon = null, object? aliases = null) { _haContext.CallService("homeassistant", "create_area", null, new HomeassistantCreateAreaParameters { Name = name, Icon = icon, Aliases = aliases }); } ///Creates a new floor on the fly. public void CreateFloor(HomeassistantCreateFloorParameters data) { _haContext.CallService("homeassistant", "create_floor", null, data); } ///Creates a new floor on the fly. ///The name of the floor to create. ///Icon to use for the floor. ///The level the floor is on in your home. ///A list of aliases for the floor. This is useful if you want to use the floor in a different language or different nickname. public void CreateFloor(string name, object? icon = null, long? level = null, object? aliases = null) { _haContext.CallService("homeassistant", "create_floor", null, new HomeassistantCreateFloorParameters { Name = name, Icon = icon, Level = level, Aliases = aliases }); } ///Creates a new label on the fly. public void CreateLabel(HomeassistantCreateLabelParameters data) { _haContext.CallService("homeassistant", "create_label", null, data); } ///Creates a new label on the fly. ///The name of the label to create. ///Description for the label. ///Icon to use for the label. ///Color to use for the label. Can be a color name from the list, or a hex color code (like #FF0000). public void CreateLabel(string name, string description, object? icon = null, object? color = null) { _haContext.CallService("homeassistant", "create_label", null, new HomeassistantCreateLabelParameters { Name = name, Description = description, Icon = icon, Color = color }); } ///Deletes all orphaned entities that no longer have an integration that claim/provide them. Please note, if the integration was just removed, it might need a restart for Home Assistant to realize they are orphaned. **WARNING** Entities might have been marked orphaned because an integration is offline or not working since Home Assistant started. Calling this action will delete those entities as well. public void DeleteAllOrphanedEntities(object? data = null) { _haContext.CallService("homeassistant", "delete_all_orphaned_entities", null, data); } ///Deletes a new area on the fly. public void DeleteArea(HomeassistantDeleteAreaParameters data) { _haContext.CallService("homeassistant", "delete_area", null, data); } ///Deletes a new area on the fly. ///The ID of the area to delete. public void DeleteArea(string areaId) { _haContext.CallService("homeassistant", "delete_area", null, new HomeassistantDeleteAreaParameters { AreaId = areaId }); } ///Deletes a floor on the fly. public void DeleteFloor(HomeassistantDeleteFloorParameters data) { _haContext.CallService("homeassistant", "delete_floor", null, data); } ///Deletes a floor on the fly. ///The ID of the floor to delete. public void DeleteFloor(object floorId) { _haContext.CallService("homeassistant", "delete_floor", null, new HomeassistantDeleteFloorParameters { FloorId = floorId }); } ///Deletes a label on the fly. public void DeleteLabel(HomeassistantDeleteLabelParameters data) { _haContext.CallService("homeassistant", "delete_label", null, data); } ///Deletes a label on the fly. ///The ID of the label to delete. public void DeleteLabel(object labelId) { _haContext.CallService("homeassistant", "delete_label", null, new HomeassistantDeleteLabelParameters { LabelId = labelId }); } ///Disables an integration configuration entry. public void DisableConfigEntry(HomeassistantDisableConfigEntryParameters data) { _haContext.CallService("homeassistant", "disable_config_entry", null, data); } ///Disables an integration configuration entry. ///The integration configuration entry to disable. public void DisableConfigEntry(object configEntryId) { _haContext.CallService("homeassistant", "disable_config_entry", null, new HomeassistantDisableConfigEntryParameters { ConfigEntryId = configEntryId }); } ///Disables a device on the fly. public void DisableDevice(HomeassistantDisableDeviceParameters data) { _haContext.CallService("homeassistant", "disable_device", null, data); } ///Disables a device on the fly. ///The device(s) to disable. public void DisableDevice(IEnumerable deviceId) { _haContext.CallService("homeassistant", "disable_device", null, new HomeassistantDisableDeviceParameters { DeviceId = deviceId }); } ///Disables an entity (or entities) on the fly. public void DisableEntity(HomeassistantDisableEntityParameters data) { _haContext.CallService("homeassistant", "disable_entity", null, data); } ///Disables an entity (or entities) on the fly. ///The entity/entities to disable. public void DisableEntity(IEnumerable entityId) { _haContext.CallService("homeassistant", "disable_entity", null, new HomeassistantDisableEntityParameters { EntityId = entityId }); } ///Disables polling for updates for an integration configuration entry. public void DisablePolling(HomeassistantDisablePollingParameters data) { _haContext.CallService("homeassistant", "disable_polling", null, data); } ///Disables polling for updates for an integration configuration entry. ///The integration configuration entry to disable polling for. public void DisablePolling(object configEntryId) { _haContext.CallService("homeassistant", "disable_polling", null, new HomeassistantDisablePollingParameters { ConfigEntryId = configEntryId }); } ///Enables an integration configuration entry. public void EnableConfigEntry(HomeassistantEnableConfigEntryParameters data) { _haContext.CallService("homeassistant", "enable_config_entry", null, data); } ///Enables an integration configuration entry. ///The integration configuration entry to enable. public void EnableConfigEntry(object configEntryId) { _haContext.CallService("homeassistant", "enable_config_entry", null, new HomeassistantEnableConfigEntryParameters { ConfigEntryId = configEntryId }); } ///Enables a device on the fly. public void EnableDevice(HomeassistantEnableDeviceParameters data) { _haContext.CallService("homeassistant", "enable_device", null, data); } ///Enables a device on the fly. ///The device(s) to enable. public void EnableDevice(IEnumerable deviceId) { _haContext.CallService("homeassistant", "enable_device", null, new HomeassistantEnableDeviceParameters { DeviceId = deviceId }); } ///Enables an entity (or entities) on the fly. public void EnableEntity(HomeassistantEnableEntityParameters data) { _haContext.CallService("homeassistant", "enable_entity", null, data); } ///Enables an entity (or entities) on the fly. ///The entity/entities to enable. public void EnableEntity(IEnumerable entityId) { _haContext.CallService("homeassistant", "enable_entity", null, new HomeassistantEnableEntityParameters { EntityId = entityId }); } ///Enables polling for updates for an integration configuration entry. public void EnablePolling(HomeassistantEnablePollingParameters data) { _haContext.CallService("homeassistant", "enable_polling", null, data); } ///Enables polling for updates for an integration configuration entry. ///The integration configuration entry to enable polling for. public void EnablePolling(object configEntryId) { _haContext.CallService("homeassistant", "enable_polling", null, new HomeassistantEnablePollingParameters { ConfigEntryId = configEntryId }); } ///Hides an entity (or entities) on the fly. public void HideEntity(HomeassistantHideEntityParameters data) { _haContext.CallService("homeassistant", "hide_entity", null, data); } ///Hides an entity (or entities) on the fly. ///The entity/entities to hide. public void HideEntity(IEnumerable entityId) { _haContext.CallService("homeassistant", "hide_entity", null, new HomeassistantHideEntityParameters { EntityId = entityId }); } ///Ignore all currently discovered devices that are shown on the integrations dashboard. This will not ignore devices that are discovered after this. public void IgnoreAllDiscovered(HomeassistantIgnoreAllDiscoveredParameters data) { _haContext.CallService("homeassistant", "ignore_all_discovered", null, data); } ///Ignore all currently discovered devices that are shown on the integrations dashboard. This will not ignore devices that are discovered after this. ///The integration domain to ignore all discovered devices for. If not provided, all domains will be considered to be ignored. public void IgnoreAllDiscovered(string? domain = null) { _haContext.CallService("homeassistant", "ignore_all_discovered", null, new HomeassistantIgnoreAllDiscoveredParameters { Domain = domain }); } ///Lists all orphaned database entities unclaimed by any integration. public void ListOrphanedDatabaseEntities(object? data = null) { _haContext.CallService("homeassistant", "list_orphaned_database_entities", null, data); } ///Lists all orphaned database entities unclaimed by any integration. public Task ListOrphanedDatabaseEntitiesAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("homeassistant", "list_orphaned_database_entities", null, data); } public void ReloadAll(object? data = null) { _haContext.CallService("homeassistant", "reload_all", null, data); } ///The target for this service call public void ReloadConfigEntry(ServiceTarget target, HomeassistantReloadConfigEntryParameters data) { _haContext.CallService("homeassistant", "reload_config_entry", target, data); } /// eg: 8955375327824e14ba89e4b29cc3ec9a public void ReloadConfigEntry(ServiceTarget target, object? entryId = null) { _haContext.CallService("homeassistant", "reload_config_entry", target, new HomeassistantReloadConfigEntryParameters { EntryId = entryId }); } public void ReloadCoreConfig(object? data = null) { _haContext.CallService("homeassistant", "reload_core_config", null, data); } public void ReloadCustomTemplates(object? data = null) { _haContext.CallService("homeassistant", "reload_custom_templates", null, data); } ///Removes an alias from an area. public void RemoveAliasFromArea(HomeassistantRemoveAliasFromAreaParameters data) { _haContext.CallService("homeassistant", "remove_alias_from_area", null, data); } ///Removes an alias from an area. ///The ID of the area to remove the alias from. ///The alias (or list of aliasses) to remove from the area. public void RemoveAliasFromArea(string areaId, object @alias) { _haContext.CallService("homeassistant", "remove_alias_from_area", null, new HomeassistantRemoveAliasFromAreaParameters { AreaId = areaId, Alias = @alias }); } ///Removes an alias from a floor. public void RemoveAliasFromFloor(HomeassistantRemoveAliasFromFloorParameters data) { _haContext.CallService("homeassistant", "remove_alias_from_floor", null, data); } ///Removes an alias from a floor. ///The ID of the floor to remove the alias from. ///The alias (or list of aliasses) to remove from the floor. public void RemoveAliasFromFloor(object floorId, object @alias) { _haContext.CallService("homeassistant", "remove_alias_from_floor", null, new HomeassistantRemoveAliasFromFloorParameters { FloorId = floorId, Alias = @alias }); } ///Removes an area from a floor. As an area can only be on one floor, this call doesn't need to specify the floor. public void RemoveAreaFromFloor(HomeassistantRemoveAreaFromFloorParameters data) { _haContext.CallService("homeassistant", "remove_area_from_floor", null, data); } ///Removes an area from a floor. As an area can only be on one floor, this call doesn't need to specify the floor. ///The ID of the area to remove the floor from. public void RemoveAreaFromFloor(IEnumerable areaId) { _haContext.CallService("homeassistant", "remove_area_from_floor", null, new HomeassistantRemoveAreaFromFloorParameters { AreaId = areaId }); } ///Removes a device from an area. As a device can only be in one area, this call doesn't need to specify the area. public void RemoveDeviceFromArea(HomeassistantRemoveDeviceFromAreaParameters data) { _haContext.CallService("homeassistant", "remove_device_from_area", null, data); } ///Removes a device from an area. As a device can only be in one area, this call doesn't need to specify the area. ///The ID of the device to remove the area from. public void RemoveDeviceFromArea(IEnumerable deviceId) { _haContext.CallService("homeassistant", "remove_device_from_area", null, new HomeassistantRemoveDeviceFromAreaParameters { DeviceId = deviceId }); } ///Removes an entity from an area. As an entity can only be in one area, this call doesn't need to specify the area. Please note, the entity will still be in the area of the device that provides it after this call. public void RemoveEntityFromArea(HomeassistantRemoveEntityFromAreaParameters data) { _haContext.CallService("homeassistant", "remove_entity_from_area", null, data); } ///Removes an entity from an area. As an entity can only be in one area, this call doesn't need to specify the area. Please note, the entity will still be in the area of the device that provides it after this call. ///The ID of the entity (or entities) to remove the area from. public void RemoveEntityFromArea(IEnumerable entityId) { _haContext.CallService("homeassistant", "remove_entity_from_area", null, new HomeassistantRemoveEntityFromAreaParameters { EntityId = entityId }); } ///Removes a label to an area. If multiple labels or multiple areas are provided, all combinations will be removed. public void RemoveLabelFromArea(HomeassistantRemoveLabelFromAreaParameters data) { _haContext.CallService("homeassistant", "remove_label_from_area", null, data); } ///Removes a label to an area. If multiple labels or multiple areas are provided, all combinations will be removed. ///The ID(s) of the label(s) to remove from the area(s). ///The ID(s) of the area(s) to remove the label(s) from. public void RemoveLabelFromArea(IEnumerable labelId, IEnumerable areaId) { _haContext.CallService("homeassistant", "remove_label_from_area", null, new HomeassistantRemoveLabelFromAreaParameters { LabelId = labelId, AreaId = areaId }); } ///Removes a label from a device. If multiple labels or multiple devices are provided, all combinations will be removed. public void RemoveLabelFromDevice(HomeassistantRemoveLabelFromDeviceParameters data) { _haContext.CallService("homeassistant", "remove_label_from_device", null, data); } ///Removes a label from a device. If multiple labels or multiple devices are provided, all combinations will be removed. ///The ID(s) of the label(s) to remove from the device(s). ///The ID(s) of the device(s) to remove the label(s) from. public void RemoveLabelFromDevice(IEnumerable labelId, IEnumerable deviceId) { _haContext.CallService("homeassistant", "remove_label_from_device", null, new HomeassistantRemoveLabelFromDeviceParameters { LabelId = labelId, DeviceId = deviceId }); } ///Removes a label from an entity. If multiple labels or multiple entities are provided, all combinations will be removed. public void RemoveLabelFromEntity(HomeassistantRemoveLabelFromEntityParameters data) { _haContext.CallService("homeassistant", "remove_label_from_entity", null, data); } ///Removes a label from an entity. If multiple labels or multiple entities are provided, all combinations will be removed. ///The ID(s) of the label(s) to remove from the entity/entities. ///The ID(s) of the entity/entities to remove the label(s) from. public void RemoveLabelFromEntity(IEnumerable labelId, IEnumerable entityId) { _haContext.CallService("homeassistant", "remove_label_from_entity", null, new HomeassistantRemoveLabelFromEntityParameters { LabelId = labelId, EntityId = entityId }); } ///Renames an entity (or entities) on the fly. public void RenameEntity(HomeassistantRenameEntityParameters data) { _haContext.CallService("homeassistant", "rename_entity", null, data); } ///Renames an entity (or entities) on the fly. ///The entity/entities to rename. ///The new name for the entity/entities. public void RenameEntity(IEnumerable entityId, string name) { _haContext.CallService("homeassistant", "rename_entity", null, new HomeassistantRenameEntityParameters { EntityId = entityId, Name = name }); } ///Restart the Home Assistant action. public void Restart(HomeassistantRestartParameters data) { _haContext.CallService("homeassistant", "restart", null, data); } ///Restart the Home Assistant action. ///If the restart should be done in safe mode. This will disable all custom integrations and frontend modules. ///Force the restart. WARNING! This will not gracefully shutdown Home Assistant, it will skip configuration checks and ignore running database migrations. Only use this if you know what you are doing. public void Restart(bool? safeMode = null, bool? force = null) { _haContext.CallService("homeassistant", "restart", null, new HomeassistantRestartParameters { SafeMode = safeMode, Force = force }); } public void SavePersistentStates(object? data = null) { _haContext.CallService("homeassistant", "save_persistent_states", null, data); } ///Sets aliases for an area. Overwrite and removed any existing aliases, fully replacing them with the new ones. public void SetAreaAliases(HomeassistantSetAreaAliasesParameters data) { _haContext.CallService("homeassistant", "set_area_aliases", null, data); } ///Sets aliases for an area. Overwrite and removed any existing aliases, fully replacing them with the new ones. ///The ID of the area to set the aliases for. ///The aliases to set for the area. public void SetAreaAliases(string areaId, object aliases) { _haContext.CallService("homeassistant", "set_area_aliases", null, new HomeassistantSetAreaAliasesParameters { AreaId = areaId, Aliases = aliases }); } ///Sets aliases for a floor. Overwrite and removed any existing aliases, fully replacing them with the new ones. public void SetFloorAliases(HomeassistantSetFloorAliasesParameters data) { _haContext.CallService("homeassistant", "set_floor_aliases", null, data); } ///Sets aliases for a floor. Overwrite and removed any existing aliases, fully replacing them with the new ones. ///The ID of the floor to set the aliases for. ///The aliases to set for the floor. public void SetFloorAliases(object floorId, object aliases) { _haContext.CallService("homeassistant", "set_floor_aliases", null, new HomeassistantSetFloorAliasesParameters { FloorId = floorId, Aliases = aliases }); } public void SetLocation(HomeassistantSetLocationParameters data) { _haContext.CallService("homeassistant", "set_location", null, data); } /// eg: 32.87336 /// eg: 117.22743 /// eg: 120 public void SetLocation(double latitude, double longitude, double? elevation = null) { _haContext.CallService("homeassistant", "set_location", null, new HomeassistantSetLocationParameters { Latitude = latitude, Longitude = longitude, Elevation = elevation }); } public void Stop(object? data = null) { _haContext.CallService("homeassistant", "stop", null, data); } ///The target for this service call public void Toggle(ServiceTarget target, object? data = null) { _haContext.CallService("homeassistant", "toggle", target, data); } ///The target for this service call public void TurnOff(ServiceTarget target, object? data = null) { _haContext.CallService("homeassistant", "turn_off", target, data); } ///The target for this service call public void TurnOn(ServiceTarget target, object? data = null) { _haContext.CallService("homeassistant", "turn_on", target, data); } ///Unhides an entity (or entities) on the fly. public void UnhideEntity(HomeassistantUnhideEntityParameters data) { _haContext.CallService("homeassistant", "unhide_entity", null, data); } ///Unhides an entity (or entities) on the fly. ///The entity/entities to unhide. public void UnhideEntity(IEnumerable entityId) { _haContext.CallService("homeassistant", "unhide_entity", null, new HomeassistantUnhideEntityParameters { EntityId = entityId }); } public void UpdateEntity(HomeassistantUpdateEntityParameters data) { _haContext.CallService("homeassistant", "update_entity", null, data); } /// public void UpdateEntity(IEnumerable entityId) { _haContext.CallService("homeassistant", "update_entity", null, new HomeassistantUpdateEntityParameters { EntityId = entityId }); } ///Updates an entity's ID on the fly. public void UpdateEntityId(HomeassistantUpdateEntityIdParameters data) { _haContext.CallService("homeassistant", "update_entity_id", null, data); } ///Updates an entity's ID on the fly. ///The entity/entities to update. ///The new ID for the entity public void UpdateEntityId(string entityId, string newEntityId) { _haContext.CallService("homeassistant", "update_entity_id", null, new HomeassistantUpdateEntityIdParameters { EntityId = entityId, NewEntityId = newEntityId }); } } public partial record HomeassistantAddAliasToAreaParameters { ///The ID of the area to add the alias to. [JsonPropertyName("area_id")] public string? AreaId { get; init; } ///The alias (or list of aliasses) to add to the area. [JsonPropertyName("alias")] public object? Alias { get; init; } } public partial record HomeassistantAddAliasToFloorParameters { ///The ID of the floor to add the alias to. [JsonPropertyName("floor_id")] public object? FloorId { get; init; } ///The alias (or list of aliasses) to add to the floor. [JsonPropertyName("alias")] public object? Alias { get; init; } } public partial record HomeassistantAddAreaToFloorParameters { ///The ID of the floor to add the area on. [JsonPropertyName("floor_id")] public object? FloorId { get; init; } ///The ID of the area(s) to add to the floor. [JsonPropertyName("area_id")] public IEnumerable? AreaId { get; init; } } public partial record HomeassistantAddDeviceToAreaParameters { ///The ID of the area to add the device to. [JsonPropertyName("area_id")] public string? AreaId { get; init; } ///The ID of the device(s) to add to the area. [JsonPropertyName("device_id")] public IEnumerable? DeviceId { get; init; } } public partial record HomeassistantAddEntityToAreaParameters { ///The ID of the area to add the entity to. [JsonPropertyName("area_id")] public string? AreaId { get; init; } ///The ID of the entity (or entities) to add to the area. [JsonPropertyName("entity_id")] public IEnumerable? EntityId { get; init; } } public partial record HomeassistantAddLabelToAreaParameters { ///The ID(s) of the label(s) to add the area(s). [JsonPropertyName("label_id")] public IEnumerable? LabelId { get; init; } ///The ID(s) of the area(s) to add the label(s) to. [JsonPropertyName("area_id")] public IEnumerable? AreaId { get; init; } } public partial record HomeassistantAddLabelToDeviceParameters { ///The ID(s) of the label(s) to add the device(s). [JsonPropertyName("label_id")] public IEnumerable? LabelId { get; init; } ///The ID(s) of the device(s) to add the label(s) to. [JsonPropertyName("device_id")] public IEnumerable? DeviceId { get; init; } } public partial record HomeassistantAddLabelToEntityParameters { ///The ID(s) of the label(s) to add the entity/entities. [JsonPropertyName("label_id")] public IEnumerable? LabelId { get; init; } ///The ID(s) of the entity/entities to add the label(s) to. [JsonPropertyName("entity_id")] public IEnumerable? EntityId { get; init; } } public partial record HomeassistantCreateAreaParameters { ///The name of the area to create. [JsonPropertyName("name")] public string? Name { get; init; } ///Icon to use for the area. [JsonPropertyName("icon")] public object? Icon { get; init; } ///A list of aliases for the area. This is useful if you want to use the area in a different language or different nickname. [JsonPropertyName("aliases")] public object? Aliases { get; init; } } public partial record HomeassistantCreateFloorParameters { ///The name of the floor to create. [JsonPropertyName("name")] public string? Name { get; init; } ///Icon to use for the floor. [JsonPropertyName("icon")] public object? Icon { get; init; } ///The level the floor is on in your home. [JsonPropertyName("level")] public long? Level { get; init; } ///A list of aliases for the floor. This is useful if you want to use the floor in a different language or different nickname. [JsonPropertyName("aliases")] public object? Aliases { get; init; } } public partial record HomeassistantCreateLabelParameters { ///The name of the label to create. [JsonPropertyName("name")] public string? Name { get; init; } ///Description for the label. [JsonPropertyName("description")] public string? Description { get; init; } ///Icon to use for the label. [JsonPropertyName("icon")] public object? Icon { get; init; } ///Color to use for the label. Can be a color name from the list, or a hex color code (like #FF0000). [JsonPropertyName("color")] public object? Color { get; init; } } public partial record HomeassistantDeleteAreaParameters { ///The ID of the area to delete. [JsonPropertyName("area_id")] public string? AreaId { get; init; } } public partial record HomeassistantDeleteFloorParameters { ///The ID of the floor to delete. [JsonPropertyName("floor_id")] public object? FloorId { get; init; } } public partial record HomeassistantDeleteLabelParameters { ///The ID of the label to delete. [JsonPropertyName("label_id")] public object? LabelId { get; init; } } public partial record HomeassistantDisableConfigEntryParameters { ///The integration configuration entry to disable. [JsonPropertyName("config_entry_id")] public object? ConfigEntryId { get; init; } } public partial record HomeassistantDisableDeviceParameters { ///The device(s) to disable. [JsonPropertyName("device_id")] public IEnumerable? DeviceId { get; init; } } public partial record HomeassistantDisableEntityParameters { ///The entity/entities to disable. [JsonPropertyName("entity_id")] public IEnumerable? EntityId { get; init; } } public partial record HomeassistantDisablePollingParameters { ///The integration configuration entry to disable polling for. [JsonPropertyName("config_entry_id")] public object? ConfigEntryId { get; init; } } public partial record HomeassistantEnableConfigEntryParameters { ///The integration configuration entry to enable. [JsonPropertyName("config_entry_id")] public object? ConfigEntryId { get; init; } } public partial record HomeassistantEnableDeviceParameters { ///The device(s) to enable. [JsonPropertyName("device_id")] public IEnumerable? DeviceId { get; init; } } public partial record HomeassistantEnableEntityParameters { ///The entity/entities to enable. [JsonPropertyName("entity_id")] public IEnumerable? EntityId { get; init; } } public partial record HomeassistantEnablePollingParameters { ///The integration configuration entry to enable polling for. [JsonPropertyName("config_entry_id")] public object? ConfigEntryId { get; init; } } public partial record HomeassistantHideEntityParameters { ///The entity/entities to hide. [JsonPropertyName("entity_id")] public IEnumerable? EntityId { get; init; } } public partial record HomeassistantIgnoreAllDiscoveredParameters { ///The integration domain to ignore all discovered devices for. If not provided, all domains will be considered to be ignored. [JsonPropertyName("domain")] public string? Domain { get; init; } } public partial record HomeassistantReloadConfigEntryParameters { /// eg: 8955375327824e14ba89e4b29cc3ec9a [JsonPropertyName("entry_id")] public object? EntryId { get; init; } } public partial record HomeassistantRemoveAliasFromAreaParameters { ///The ID of the area to remove the alias from. [JsonPropertyName("area_id")] public string? AreaId { get; init; } ///The alias (or list of aliasses) to remove from the area. [JsonPropertyName("alias")] public object? Alias { get; init; } } public partial record HomeassistantRemoveAliasFromFloorParameters { ///The ID of the floor to remove the alias from. [JsonPropertyName("floor_id")] public object? FloorId { get; init; } ///The alias (or list of aliasses) to remove from the floor. [JsonPropertyName("alias")] public object? Alias { get; init; } } public partial record HomeassistantRemoveAreaFromFloorParameters { ///The ID of the area to remove the floor from. [JsonPropertyName("area_id")] public IEnumerable? AreaId { get; init; } } public partial record HomeassistantRemoveDeviceFromAreaParameters { ///The ID of the device to remove the area from. [JsonPropertyName("device_id")] public IEnumerable? DeviceId { get; init; } } public partial record HomeassistantRemoveEntityFromAreaParameters { ///The ID of the entity (or entities) to remove the area from. [JsonPropertyName("entity_id")] public IEnumerable? EntityId { get; init; } } public partial record HomeassistantRemoveLabelFromAreaParameters { ///The ID(s) of the label(s) to remove from the area(s). [JsonPropertyName("label_id")] public IEnumerable? LabelId { get; init; } ///The ID(s) of the area(s) to remove the label(s) from. [JsonPropertyName("area_id")] public IEnumerable? AreaId { get; init; } } public partial record HomeassistantRemoveLabelFromDeviceParameters { ///The ID(s) of the label(s) to remove from the device(s). [JsonPropertyName("label_id")] public IEnumerable? LabelId { get; init; } ///The ID(s) of the device(s) to remove the label(s) from. [JsonPropertyName("device_id")] public IEnumerable? DeviceId { get; init; } } public partial record HomeassistantRemoveLabelFromEntityParameters { ///The ID(s) of the label(s) to remove from the entity/entities. [JsonPropertyName("label_id")] public IEnumerable? LabelId { get; init; } ///The ID(s) of the entity/entities to remove the label(s) from. [JsonPropertyName("entity_id")] public IEnumerable? EntityId { get; init; } } public partial record HomeassistantRenameEntityParameters { ///The entity/entities to rename. [JsonPropertyName("entity_id")] public IEnumerable? EntityId { get; init; } ///The new name for the entity/entities. [JsonPropertyName("name")] public string? Name { get; init; } } public partial record HomeassistantRestartParameters { ///If the restart should be done in safe mode. This will disable all custom integrations and frontend modules. [JsonPropertyName("safe_mode")] public bool? SafeMode { get; init; } ///Force the restart. WARNING! This will not gracefully shutdown Home Assistant, it will skip configuration checks and ignore running database migrations. Only use this if you know what you are doing. [JsonPropertyName("force")] public bool? Force { get; init; } } public partial record HomeassistantSetAreaAliasesParameters { ///The ID of the area to set the aliases for. [JsonPropertyName("area_id")] public string? AreaId { get; init; } ///The aliases to set for the area. [JsonPropertyName("aliases")] public object? Aliases { get; init; } } public partial record HomeassistantSetFloorAliasesParameters { ///The ID of the floor to set the aliases for. [JsonPropertyName("floor_id")] public object? FloorId { get; init; } ///The aliases to set for the floor. [JsonPropertyName("aliases")] public object? Aliases { get; init; } } public partial record HomeassistantSetLocationParameters { /// eg: 32.87336 [JsonPropertyName("latitude")] public double? Latitude { get; init; } /// eg: 117.22743 [JsonPropertyName("longitude")] public double? Longitude { get; init; } /// eg: 120 [JsonPropertyName("elevation")] public double? Elevation { get; init; } } public partial record HomeassistantUnhideEntityParameters { ///The entity/entities to unhide. [JsonPropertyName("entity_id")] public IEnumerable? EntityId { get; init; } } public partial record HomeassistantUpdateEntityParameters { [JsonPropertyName("entity_id")] public IEnumerable? EntityId { get; init; } } public partial record HomeassistantUpdateEntityIdParameters { ///The entity/entities to update. [JsonPropertyName("entity_id")] public string? EntityId { get; init; } ///The new ID for the entity [JsonPropertyName("new_entity_id")] public string? NewEntityId { get; init; } } public partial class HumidifierServices { private readonly IHaContext _haContext; public HumidifierServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void SetHumidity(ServiceTarget target, HumidifierSetHumidityParameters data) { _haContext.CallService("humidifier", "set_humidity", target, data); } /// public void SetHumidity(ServiceTarget target, long humidity) { _haContext.CallService("humidifier", "set_humidity", target, new HumidifierSetHumidityParameters { Humidity = humidity }); } ///The target for this service call public void SetMode(ServiceTarget target, HumidifierSetModeParameters data) { _haContext.CallService("humidifier", "set_mode", target, data); } /// eg: away public void SetMode(ServiceTarget target, string mode) { _haContext.CallService("humidifier", "set_mode", target, new HumidifierSetModeParameters { Mode = mode }); } ///The target for this service call public void Toggle(ServiceTarget target, object? data = null) { _haContext.CallService("humidifier", "toggle", target, data); } ///The target for this service call public void TurnOff(ServiceTarget target, object? data = null) { _haContext.CallService("humidifier", "turn_off", target, data); } ///The target for this service call public void TurnOn(ServiceTarget target, object? data = null) { _haContext.CallService("humidifier", "turn_on", target, data); } } public partial record HumidifierSetHumidityParameters { [JsonPropertyName("humidity")] public long? Humidity { get; init; } } public partial record HumidifierSetModeParameters { /// eg: away [JsonPropertyName("mode")] public string? Mode { get; init; } } public partial class InputBooleanServices { private readonly IHaContext _haContext; public InputBooleanServices(IHaContext haContext) { _haContext = haContext; } public void Reload(object? data = null) { _haContext.CallService("input_boolean", "reload", null, data); } ///The target for this service call public void Toggle(ServiceTarget target, object? data = null) { _haContext.CallService("input_boolean", "toggle", target, data); } ///The target for this service call public void TurnOff(ServiceTarget target, object? data = null) { _haContext.CallService("input_boolean", "turn_off", target, data); } ///The target for this service call public void TurnOn(ServiceTarget target, object? data = null) { _haContext.CallService("input_boolean", "turn_on", target, data); } } public partial class InputButtonServices { private readonly IHaContext _haContext; public InputButtonServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void Press(ServiceTarget target, object? data = null) { _haContext.CallService("input_button", "press", target, data); } public void Reload(object? data = null) { _haContext.CallService("input_button", "reload", null, data); } } public partial class InputDatetimeServices { private readonly IHaContext _haContext; public InputDatetimeServices(IHaContext haContext) { _haContext = haContext; } public void Reload(object? data = null) { _haContext.CallService("input_datetime", "reload", null, data); } ///The target for this service call public void SetDatetime(ServiceTarget target, InputDatetimeSetDatetimeParameters data) { _haContext.CallService("input_datetime", "set_datetime", target, data); } /// eg: "2019-04-20" /// eg: "05:04:20" /// eg: "2019-04-20 05:04:20" /// public void SetDatetime(ServiceTarget target, string? date = null, TimeOnly? time = null, string? datetime = null, long? timestamp = null) { _haContext.CallService("input_datetime", "set_datetime", target, new InputDatetimeSetDatetimeParameters { Date = date, Time = time, Datetime = datetime, Timestamp = timestamp }); } } public partial record InputDatetimeSetDatetimeParameters { /// eg: "2019-04-20" [JsonPropertyName("date")] public string? Date { get; init; } /// eg: "05:04:20" [JsonPropertyName("time")] public TimeOnly? Time { get; init; } /// eg: "2019-04-20 05:04:20" [JsonPropertyName("datetime")] public string? Datetime { get; init; } [JsonPropertyName("timestamp")] public long? Timestamp { get; init; } } public partial class InputNumberServices { private readonly IHaContext _haContext; public InputNumberServices(IHaContext haContext) { _haContext = haContext; } ///Decrease an input number entity value by a certain amount. ///The target for this service call public void Decrement(ServiceTarget target, InputNumberDecrementParameters data) { _haContext.CallService("input_number", "decrement", target, data); } ///Decrease an input number entity value by a certain amount. ///The amount to decrease the input number with. If not provided, the step of the number entity will be used. public void Decrement(ServiceTarget target, long? amount = null) { _haContext.CallService("input_number", "decrement", target, new InputNumberDecrementParameters { Amount = amount }); } ///Increase an input number entity value by a certain amount. ///The target for this service call public void Increment(ServiceTarget target, InputNumberIncrementParameters data) { _haContext.CallService("input_number", "increment", target, data); } ///Increase an input number entity value by a certain amount. ///The amount to increase the input number with. If not provided, the step of the number entity will be used. public void Increment(ServiceTarget target, long? amount = null) { _haContext.CallService("input_number", "increment", target, new InputNumberIncrementParameters { Amount = amount }); } ///Set an input number entity to its maximum value. ///The target for this service call public void Max(ServiceTarget target, object? data = null) { _haContext.CallService("input_number", "max", target, data); } ///Set an input number entity to its minimum value. ///The target for this service call public void Min(ServiceTarget target, object? data = null) { _haContext.CallService("input_number", "min", target, data); } public void Reload(object? data = null) { _haContext.CallService("input_number", "reload", null, data); } ///The target for this service call public void SetValue(ServiceTarget target, InputNumberSetValueParameters data) { _haContext.CallService("input_number", "set_value", target, data); } /// public void SetValue(ServiceTarget target, double value) { _haContext.CallService("input_number", "set_value", target, new InputNumberSetValueParameters { Value = value }); } } public partial record InputNumberDecrementParameters { ///The amount to decrease the input number with. If not provided, the step of the number entity will be used. [JsonPropertyName("amount")] public long? Amount { get; init; } } public partial record InputNumberIncrementParameters { ///The amount to increase the input number with. If not provided, the step of the number entity will be used. [JsonPropertyName("amount")] public long? Amount { get; init; } } public partial record InputNumberSetValueParameters { [JsonPropertyName("value")] public double? Value { get; init; } } public partial class InputSelectServices { private readonly IHaContext _haContext; public InputSelectServices(IHaContext haContext) { _haContext = haContext; } ///Select an random option for an input_select entity. ///The target for this service call public void Random(ServiceTarget target, InputSelectRandomParameters data) { _haContext.CallService("input_select", "random", target, data); } ///Select an random option for an input_select entity. ///Limits the options to select from. If not provided, all options will be considered. public void Random(ServiceTarget target, object? options = null) { _haContext.CallService("input_select", "random", target, new InputSelectRandomParameters { Options = options }); } public void Reload(object? data = null) { _haContext.CallService("input_select", "reload", null, data); } ///The target for this service call public void SelectFirst(ServiceTarget target, object? data = null) { _haContext.CallService("input_select", "select_first", target, data); } ///The target for this service call public void SelectLast(ServiceTarget target, object? data = null) { _haContext.CallService("input_select", "select_last", target, data); } ///The target for this service call public void SelectNext(ServiceTarget target, InputSelectSelectNextParameters data) { _haContext.CallService("input_select", "select_next", target, data); } /// public void SelectNext(ServiceTarget target, bool? cycle = null) { _haContext.CallService("input_select", "select_next", target, new InputSelectSelectNextParameters { Cycle = cycle }); } ///The target for this service call public void SelectOption(ServiceTarget target, InputSelectSelectOptionParameters data) { _haContext.CallService("input_select", "select_option", target, data); } /// eg: "Item A" public void SelectOption(ServiceTarget target, object option) { _haContext.CallService("input_select", "select_option", target, new InputSelectSelectOptionParameters { Option = option }); } ///The target for this service call public void SelectPrevious(ServiceTarget target, InputSelectSelectPreviousParameters data) { _haContext.CallService("input_select", "select_previous", target, data); } /// public void SelectPrevious(ServiceTarget target, bool? cycle = null) { _haContext.CallService("input_select", "select_previous", target, new InputSelectSelectPreviousParameters { Cycle = cycle }); } ///The target for this service call public void SetOptions(ServiceTarget target, InputSelectSetOptionsParameters data) { _haContext.CallService("input_select", "set_options", target, data); } /// eg: ["Item A", "Item B", "Item C"] public void SetOptions(ServiceTarget target, IEnumerable options) { _haContext.CallService("input_select", "set_options", target, new InputSelectSetOptionsParameters { Options = options }); } ///Shuffles the list of selectable options for an `input_select` entity. This is not persistent and will be undone once reloaded or Home Assistant restarts. ///The target for this service call public void Shuffle(ServiceTarget target, object? data = null) { _haContext.CallService("input_select", "shuffle", target, data); } ///Sorts the list of selectable options for an `input_select` entity. This is not persistent and will be undone once reloaded or Home Assistant restarts. ///The target for this service call public void Sort(ServiceTarget target, object? data = null) { _haContext.CallService("input_select", "sort", target, data); } } public partial record InputSelectRandomParameters { ///Limits the options to select from. If not provided, all options will be considered. [JsonPropertyName("options")] public object? Options { get; init; } } public partial record InputSelectSelectNextParameters { [JsonPropertyName("cycle")] public bool? Cycle { get; init; } } public partial record InputSelectSelectOptionParameters { /// eg: "Item A" [JsonPropertyName("option")] public object? Option { get; init; } } public partial record InputSelectSelectPreviousParameters { [JsonPropertyName("cycle")] public bool? Cycle { get; init; } } public partial record InputSelectSetOptionsParameters { /// eg: ["Item A", "Item B", "Item C"] [JsonPropertyName("options")] public IEnumerable? Options { get; init; } } public partial class InputTextServices { private readonly IHaContext _haContext; public InputTextServices(IHaContext haContext) { _haContext = haContext; } public void Reload(object? data = null) { _haContext.CallService("input_text", "reload", null, data); } ///The target for this service call public void SetValue(ServiceTarget target, InputTextSetValueParameters data) { _haContext.CallService("input_text", "set_value", target, data); } /// eg: This is an example text public void SetValue(ServiceTarget target, string value) { _haContext.CallService("input_text", "set_value", target, new InputTextSetValueParameters { Value = value }); } } public partial record InputTextSetValueParameters { /// eg: This is an example text [JsonPropertyName("value")] public string? Value { get; init; } } public partial class LightServices { private readonly IHaContext _haContext; public LightServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void Toggle(ServiceTarget target, LightToggleParameters data) { _haContext.CallService("light", "toggle", target, data); } /// /// eg: [255, 100, 100] /// /// /// /// eg: [255, 100, 100, 50] /// eg: [255, 100, 100, 50, 70] /// /// eg: [300, 70] /// eg: [0.52, 0.43] /// /// /// /// eg: relax /// public void Toggle(ServiceTarget target, long? transition = null, IReadOnlyCollection? rgbColor = null, object? colorTempKelvin = null, long? brightnessPct = null, string? effect = null, object? rgbwColor = null, object? rgbwwColor = null, object? colorName = null, object? hsColor = null, object? xyColor = null, object? colorTemp = null, long? brightness = null, object? white = null, string? profile = null, object? flash = null) { _haContext.CallService("light", "toggle", target, new LightToggleParameters { Transition = transition, RgbColor = rgbColor, ColorTempKelvin = colorTempKelvin, BrightnessPct = brightnessPct, Effect = effect, RgbwColor = rgbwColor, RgbwwColor = rgbwwColor, ColorName = colorName, HsColor = hsColor, XyColor = xyColor, ColorTemp = colorTemp, Brightness = brightness, White = white, Profile = profile, Flash = flash }); } ///The target for this service call public void TurnOff(ServiceTarget target, LightTurnOffParameters data) { _haContext.CallService("light", "turn_off", target, data); } /// /// public void TurnOff(ServiceTarget target, long? transition = null, object? flash = null) { _haContext.CallService("light", "turn_off", target, new LightTurnOffParameters { Transition = transition, Flash = flash }); } ///The target for this service call public void TurnOn(ServiceTarget target, LightTurnOnParameters data) { _haContext.CallService("light", "turn_on", target, data); } /// /// eg: [255, 100, 100] /// /// /// /// /// eg: [255, 100, 100, 50] /// eg: [255, 100, 100, 50, 70] /// /// eg: [300, 70] /// eg: [0.52, 0.43] /// /// /// /// /// eg: relax /// public void TurnOn(ServiceTarget target, long? transition = null, IReadOnlyCollection? rgbColor = null, object? colorTempKelvin = null, long? brightnessPct = null, long? brightnessStepPct = null, string? effect = null, object? rgbwColor = null, object? rgbwwColor = null, object? colorName = null, object? hsColor = null, object? xyColor = null, object? colorTemp = null, long? brightness = null, long? brightnessStep = null, object? white = null, string? profile = null, object? flash = null) { _haContext.CallService("light", "turn_on", target, new LightTurnOnParameters { Transition = transition, RgbColor = rgbColor, ColorTempKelvin = colorTempKelvin, BrightnessPct = brightnessPct, BrightnessStepPct = brightnessStepPct, Effect = effect, RgbwColor = rgbwColor, RgbwwColor = rgbwwColor, ColorName = colorName, HsColor = hsColor, XyColor = xyColor, ColorTemp = colorTemp, Brightness = brightness, BrightnessStep = brightnessStep, White = white, Profile = profile, Flash = flash }); } } public partial record LightToggleParameters { [JsonPropertyName("transition")] public long? Transition { get; init; } /// eg: [255, 100, 100] [JsonPropertyName("rgb_color")] public IReadOnlyCollection? RgbColor { get; init; } [JsonPropertyName("color_temp_kelvin")] public object? ColorTempKelvin { get; init; } [JsonPropertyName("brightness_pct")] public long? BrightnessPct { get; init; } [JsonPropertyName("effect")] public string? Effect { get; init; } /// eg: [255, 100, 100, 50] [JsonPropertyName("rgbw_color")] public object? RgbwColor { get; init; } /// eg: [255, 100, 100, 50, 70] [JsonPropertyName("rgbww_color")] public object? RgbwwColor { get; init; } [JsonPropertyName("color_name")] public object? ColorName { get; init; } /// eg: [300, 70] [JsonPropertyName("hs_color")] public object? HsColor { get; init; } /// eg: [0.52, 0.43] [JsonPropertyName("xy_color")] public object? XyColor { get; init; } [JsonPropertyName("color_temp")] public object? ColorTemp { get; init; } [JsonPropertyName("brightness")] public long? Brightness { get; init; } [JsonPropertyName("white")] public object? White { get; init; } /// eg: relax [JsonPropertyName("profile")] public string? Profile { get; init; } [JsonPropertyName("flash")] public object? Flash { get; init; } } public partial record LightTurnOffParameters { [JsonPropertyName("transition")] public long? Transition { get; init; } [JsonPropertyName("flash")] public object? Flash { get; init; } } public partial record LightTurnOnParameters { [JsonPropertyName("transition")] public long? Transition { get; init; } /// eg: [255, 100, 100] [JsonPropertyName("rgb_color")] public IReadOnlyCollection? RgbColor { get; init; } [JsonPropertyName("color_temp_kelvin")] public object? ColorTempKelvin { get; init; } [JsonPropertyName("brightness_pct")] public long? BrightnessPct { get; init; } [JsonPropertyName("brightness_step_pct")] public long? BrightnessStepPct { get; init; } [JsonPropertyName("effect")] public string? Effect { get; init; } /// eg: [255, 100, 100, 50] [JsonPropertyName("rgbw_color")] public object? RgbwColor { get; init; } /// eg: [255, 100, 100, 50, 70] [JsonPropertyName("rgbww_color")] public object? RgbwwColor { get; init; } [JsonPropertyName("color_name")] public object? ColorName { get; init; } /// eg: [300, 70] [JsonPropertyName("hs_color")] public object? HsColor { get; init; } /// eg: [0.52, 0.43] [JsonPropertyName("xy_color")] public object? XyColor { get; init; } [JsonPropertyName("color_temp")] public object? ColorTemp { get; init; } [JsonPropertyName("brightness")] public long? Brightness { get; init; } [JsonPropertyName("brightness_step")] public long? BrightnessStep { get; init; } [JsonPropertyName("white")] public object? White { get; init; } /// eg: relax [JsonPropertyName("profile")] public string? Profile { get; init; } [JsonPropertyName("flash")] public object? Flash { get; init; } } public partial class LockServices { private readonly IHaContext _haContext; public LockServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void Lock(ServiceTarget target, LockLockParameters data) { _haContext.CallService("lock", "lock", target, data); } /// eg: 1234 public void Lock(ServiceTarget target, string? code = null) { _haContext.CallService("lock", "lock", target, new LockLockParameters { Code = code }); } ///The target for this service call public void Open(ServiceTarget target, LockOpenParameters data) { _haContext.CallService("lock", "open", target, data); } /// eg: 1234 public void Open(ServiceTarget target, string? code = null) { _haContext.CallService("lock", "open", target, new LockOpenParameters { Code = code }); } ///The target for this service call public void Unlock(ServiceTarget target, LockUnlockParameters data) { _haContext.CallService("lock", "unlock", target, data); } /// eg: 1234 public void Unlock(ServiceTarget target, string? code = null) { _haContext.CallService("lock", "unlock", target, new LockUnlockParameters { Code = code }); } } public partial record LockLockParameters { /// eg: 1234 [JsonPropertyName("code")] public string? Code { get; init; } } public partial record LockOpenParameters { /// eg: 1234 [JsonPropertyName("code")] public string? Code { get; init; } } public partial record LockUnlockParameters { /// eg: 1234 [JsonPropertyName("code")] public string? Code { get; init; } } public partial class LogbookServices { private readonly IHaContext _haContext; public LogbookServices(IHaContext haContext) { _haContext = haContext; } public void Log(LogbookLogParameters data) { _haContext.CallService("logbook", "log", null, data); } /// eg: Kitchen /// eg: is being used /// /// eg: light public void Log(string name, string message, string? entityId = null, string? domain = null) { _haContext.CallService("logbook", "log", null, new LogbookLogParameters { Name = name, Message = message, EntityId = entityId, Domain = domain }); } } public partial record LogbookLogParameters { /// eg: Kitchen [JsonPropertyName("name")] public string? Name { get; init; } /// eg: is being used [JsonPropertyName("message")] public string? Message { get; init; } [JsonPropertyName("entity_id")] public string? EntityId { get; init; } /// eg: light [JsonPropertyName("domain")] public string? Domain { get; init; } } public partial class LoggerServices { private readonly IHaContext _haContext; public LoggerServices(IHaContext haContext) { _haContext = haContext; } public void SetDefaultLevel(LoggerSetDefaultLevelParameters data) { _haContext.CallService("logger", "set_default_level", null, data); } /// public void SetDefaultLevel(object? level = null) { _haContext.CallService("logger", "set_default_level", null, new LoggerSetDefaultLevelParameters { Level = level }); } public void SetLevel(object? data = null) { _haContext.CallService("logger", "set_level", null, data); } } public partial record LoggerSetDefaultLevelParameters { [JsonPropertyName("level")] public object? Level { get; init; } } public partial class MediaPlayerServices { private readonly IHaContext _haContext; public MediaPlayerServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void BrowseMedia(ServiceTarget target, MediaPlayerBrowseMediaParameters data) { _haContext.CallService("media_player", "browse_media", target, data); } /// eg: music /// eg: A:ALBUMARTIST/Beatles public void BrowseMedia(ServiceTarget target, string? mediaContentType = null, string? mediaContentId = null) { _haContext.CallService("media_player", "browse_media", target, new MediaPlayerBrowseMediaParameters { MediaContentType = mediaContentType, MediaContentId = mediaContentId }); } ///The target for this service call public Task BrowseMediaAsync(ServiceTarget target, MediaPlayerBrowseMediaParameters data) { return _haContext.CallServiceWithResponseAsync("media_player", "browse_media", target, data); } ///The target for this service call /// eg: music /// eg: A:ALBUMARTIST/Beatles public Task BrowseMediaAsync(ServiceTarget target, string? mediaContentType = null, string? mediaContentId = null) { return _haContext.CallServiceWithResponseAsync("media_player", "browse_media", target, new MediaPlayerBrowseMediaParameters { MediaContentType = mediaContentType, MediaContentId = mediaContentId }); } ///The target for this service call public void ClearPlaylist(ServiceTarget target, object? data = null) { _haContext.CallService("media_player", "clear_playlist", target, data); } ///The target for this service call public void Join(ServiceTarget target, MediaPlayerJoinParameters data) { _haContext.CallService("media_player", "join", target, data); } /// eg: - media_player.multiroom_player2 - media_player.multiroom_player3 public void Join(ServiceTarget target, IEnumerable groupMembers) { _haContext.CallService("media_player", "join", target, new MediaPlayerJoinParameters { GroupMembers = groupMembers }); } ///The target for this service call public void MediaNextTrack(ServiceTarget target, object? data = null) { _haContext.CallService("media_player", "media_next_track", target, data); } ///The target for this service call public void MediaPause(ServiceTarget target, object? data = null) { _haContext.CallService("media_player", "media_pause", target, data); } ///The target for this service call public void MediaPlay(ServiceTarget target, object? data = null) { _haContext.CallService("media_player", "media_play", target, data); } ///The target for this service call public void MediaPlayPause(ServiceTarget target, object? data = null) { _haContext.CallService("media_player", "media_play_pause", target, data); } ///The target for this service call public void MediaPreviousTrack(ServiceTarget target, object? data = null) { _haContext.CallService("media_player", "media_previous_track", target, data); } ///The target for this service call public void MediaSeek(ServiceTarget target, MediaPlayerMediaSeekParameters data) { _haContext.CallService("media_player", "media_seek", target, data); } /// public void MediaSeek(ServiceTarget target, double seekPosition) { _haContext.CallService("media_player", "media_seek", target, new MediaPlayerMediaSeekParameters { SeekPosition = seekPosition }); } ///The target for this service call public void MediaStop(ServiceTarget target, object? data = null) { _haContext.CallService("media_player", "media_stop", target, data); } ///The target for this service call public void PlayMedia(ServiceTarget target, MediaPlayerPlayMediaParameters data) { _haContext.CallService("media_player", "play_media", target, data); } /// eg: {"media_content_id": "https://home-assistant.io/images/cast/splash.png", "media_content_type": "music"} /// /// eg: true public void PlayMedia(ServiceTarget target, object media, object? enqueue = null, bool? announce = null) { _haContext.CallService("media_player", "play_media", target, new MediaPlayerPlayMediaParameters { Media = media, Enqueue = enqueue, Announce = announce }); } ///The target for this service call public void RepeatSet(ServiceTarget target, MediaPlayerRepeatSetParameters data) { _haContext.CallService("media_player", "repeat_set", target, data); } /// public void RepeatSet(ServiceTarget target, object repeat) { _haContext.CallService("media_player", "repeat_set", target, new MediaPlayerRepeatSetParameters { Repeat = repeat }); } ///The target for this service call public void SearchMedia(ServiceTarget target, MediaPlayerSearchMediaParameters data) { _haContext.CallService("media_player", "search_media", target, data); } /// eg: Beatles /// eg: music /// eg: A:ALBUMARTIST/Beatles /// eg: ["album","artist"] public void SearchMedia(ServiceTarget target, string searchQuery, string? mediaContentType = null, string? mediaContentId = null, IEnumerable? mediaFilterClasses = null) { _haContext.CallService("media_player", "search_media", target, new MediaPlayerSearchMediaParameters { SearchQuery = searchQuery, MediaContentType = mediaContentType, MediaContentId = mediaContentId, MediaFilterClasses = mediaFilterClasses }); } ///The target for this service call public Task SearchMediaAsync(ServiceTarget target, MediaPlayerSearchMediaParameters data) { return _haContext.CallServiceWithResponseAsync("media_player", "search_media", target, data); } ///The target for this service call /// eg: Beatles /// eg: music /// eg: A:ALBUMARTIST/Beatles /// eg: ["album","artist"] public Task SearchMediaAsync(ServiceTarget target, string searchQuery, string? mediaContentType = null, string? mediaContentId = null, IEnumerable? mediaFilterClasses = null) { return _haContext.CallServiceWithResponseAsync("media_player", "search_media", target, new MediaPlayerSearchMediaParameters { SearchQuery = searchQuery, MediaContentType = mediaContentType, MediaContentId = mediaContentId, MediaFilterClasses = mediaFilterClasses }); } ///The target for this service call public void SelectSoundMode(ServiceTarget target, MediaPlayerSelectSoundModeParameters data) { _haContext.CallService("media_player", "select_sound_mode", target, data); } /// eg: Music public void SelectSoundMode(ServiceTarget target, string? soundMode = null) { _haContext.CallService("media_player", "select_sound_mode", target, new MediaPlayerSelectSoundModeParameters { SoundMode = soundMode }); } ///The target for this service call public void SelectSource(ServiceTarget target, MediaPlayerSelectSourceParameters data) { _haContext.CallService("media_player", "select_source", target, data); } /// eg: video1 public void SelectSource(ServiceTarget target, string source) { _haContext.CallService("media_player", "select_source", target, new MediaPlayerSelectSourceParameters { Source = source }); } ///The target for this service call public void ShuffleSet(ServiceTarget target, MediaPlayerShuffleSetParameters data) { _haContext.CallService("media_player", "shuffle_set", target, data); } /// public void ShuffleSet(ServiceTarget target, bool shuffle) { _haContext.CallService("media_player", "shuffle_set", target, new MediaPlayerShuffleSetParameters { Shuffle = shuffle }); } ///The target for this service call public void Toggle(ServiceTarget target, object? data = null) { _haContext.CallService("media_player", "toggle", target, data); } ///The target for this service call public void TurnOff(ServiceTarget target, object? data = null) { _haContext.CallService("media_player", "turn_off", target, data); } ///The target for this service call public void TurnOn(ServiceTarget target, object? data = null) { _haContext.CallService("media_player", "turn_on", target, data); } ///The target for this service call public void Unjoin(ServiceTarget target, object? data = null) { _haContext.CallService("media_player", "unjoin", target, data); } ///The target for this service call public void VolumeDown(ServiceTarget target, object? data = null) { _haContext.CallService("media_player", "volume_down", target, data); } ///The target for this service call public void VolumeMute(ServiceTarget target, MediaPlayerVolumeMuteParameters data) { _haContext.CallService("media_player", "volume_mute", target, data); } /// public void VolumeMute(ServiceTarget target, bool isVolumeMuted) { _haContext.CallService("media_player", "volume_mute", target, new MediaPlayerVolumeMuteParameters { IsVolumeMuted = isVolumeMuted }); } ///The target for this service call public void VolumeSet(ServiceTarget target, MediaPlayerVolumeSetParameters data) { _haContext.CallService("media_player", "volume_set", target, data); } /// public void VolumeSet(ServiceTarget target, double volumeLevel) { _haContext.CallService("media_player", "volume_set", target, new MediaPlayerVolumeSetParameters { VolumeLevel = volumeLevel }); } ///The target for this service call public void VolumeUp(ServiceTarget target, object? data = null) { _haContext.CallService("media_player", "volume_up", target, data); } } public partial record MediaPlayerBrowseMediaParameters { /// eg: music [JsonPropertyName("media_content_type")] public string? MediaContentType { get; init; } /// eg: A:ALBUMARTIST/Beatles [JsonPropertyName("media_content_id")] public string? MediaContentId { get; init; } } public partial record MediaPlayerJoinParameters { /// eg: - media_player.multiroom_player2 - media_player.multiroom_player3 [JsonPropertyName("group_members")] public IEnumerable? GroupMembers { get; init; } } public partial record MediaPlayerMediaSeekParameters { [JsonPropertyName("seek_position")] public double? SeekPosition { get; init; } } public partial record MediaPlayerPlayMediaParameters { /// eg: {"media_content_id": "https://home-assistant.io/images/cast/splash.png", "media_content_type": "music"} [JsonPropertyName("media")] public object? Media { get; init; } [JsonPropertyName("enqueue")] public object? Enqueue { get; init; } /// eg: true [JsonPropertyName("announce")] public bool? Announce { get; init; } } public partial record MediaPlayerRepeatSetParameters { [JsonPropertyName("repeat")] public object? Repeat { get; init; } } public partial record MediaPlayerSearchMediaParameters { /// eg: Beatles [JsonPropertyName("search_query")] public string? SearchQuery { get; init; } /// eg: music [JsonPropertyName("media_content_type")] public string? MediaContentType { get; init; } /// eg: A:ALBUMARTIST/Beatles [JsonPropertyName("media_content_id")] public string? MediaContentId { get; init; } /// eg: ["album","artist"] [JsonPropertyName("media_filter_classes")] public IEnumerable? MediaFilterClasses { get; init; } } public partial record MediaPlayerSelectSoundModeParameters { /// eg: Music [JsonPropertyName("sound_mode")] public string? SoundMode { get; init; } } public partial record MediaPlayerSelectSourceParameters { /// eg: video1 [JsonPropertyName("source")] public string? Source { get; init; } } public partial record MediaPlayerShuffleSetParameters { [JsonPropertyName("shuffle")] public bool? Shuffle { get; init; } } public partial record MediaPlayerVolumeMuteParameters { [JsonPropertyName("is_volume_muted")] public bool? IsVolumeMuted { get; init; } } public partial record MediaPlayerVolumeSetParameters { [JsonPropertyName("volume_level")] public double? VolumeLevel { get; init; } } public partial class MqttServices { private readonly IHaContext _haContext; public MqttServices(IHaContext haContext) { _haContext = haContext; } public void Dump(MqttDumpParameters data) { _haContext.CallService("mqtt", "dump", null, data); } /// eg: OpenZWave/# /// public void Dump(string? topic = null, long? duration = null) { _haContext.CallService("mqtt", "dump", null, new MqttDumpParameters { Topic = topic, Duration = duration }); } public void Publish(MqttPublishParameters data) { _haContext.CallService("mqtt", "publish", null, data); } /// eg: /homeassistant/hello /// eg: The temperature is {{ states('sensor.temperature') }} /// /// /// public void Publish(string topic, object? payload = null, bool? evaluatePayload = null, object? qos = null, bool? retain = null) { _haContext.CallService("mqtt", "publish", null, new MqttPublishParameters { Topic = topic, Payload = payload, EvaluatePayload = evaluatePayload, Qos = qos, Retain = retain }); } public void Reload(object? data = null) { _haContext.CallService("mqtt", "reload", null, data); } } public partial record MqttDumpParameters { /// eg: OpenZWave/# [JsonPropertyName("topic")] public string? Topic { get; init; } [JsonPropertyName("duration")] public long? Duration { get; init; } } public partial record MqttPublishParameters { /// eg: /homeassistant/hello [JsonPropertyName("topic")] public string? Topic { get; init; } /// eg: The temperature is {{ states('sensor.temperature') }} [JsonPropertyName("payload")] public object? Payload { get; init; } [JsonPropertyName("evaluate_payload")] public bool? EvaluatePayload { get; init; } [JsonPropertyName("qos")] public object? Qos { get; init; } [JsonPropertyName("retain")] public bool? Retain { get; init; } } public partial class NordpoolServices { private readonly IHaContext _haContext; public NordpoolServices(IHaContext haContext) { _haContext = haContext; } public void GetPriceIndicesForDate(NordpoolGetPriceIndicesForDateParameters data) { _haContext.CallService("nordpool", "get_price_indices_for_date", null, data); } /// /// /// /// /// public void GetPriceIndicesForDate(object configEntry, DateOnly date, object? areas = null, object? currency = null, object? resolution = null) { _haContext.CallService("nordpool", "get_price_indices_for_date", null, new NordpoolGetPriceIndicesForDateParameters { ConfigEntry = configEntry, Date = date, Areas = areas, Currency = currency, Resolution = resolution }); } public Task GetPriceIndicesForDateAsync(NordpoolGetPriceIndicesForDateParameters data) { return _haContext.CallServiceWithResponseAsync("nordpool", "get_price_indices_for_date", null, data); } /// /// /// /// /// public Task GetPriceIndicesForDateAsync(object configEntry, DateOnly date, object? areas = null, object? currency = null, object? resolution = null) { return _haContext.CallServiceWithResponseAsync("nordpool", "get_price_indices_for_date", null, new NordpoolGetPriceIndicesForDateParameters { ConfigEntry = configEntry, Date = date, Areas = areas, Currency = currency, Resolution = resolution }); } public void GetPricesForDate(NordpoolGetPricesForDateParameters data) { _haContext.CallService("nordpool", "get_prices_for_date", null, data); } /// /// /// /// public void GetPricesForDate(object configEntry, DateOnly date, object? areas = null, object? currency = null) { _haContext.CallService("nordpool", "get_prices_for_date", null, new NordpoolGetPricesForDateParameters { ConfigEntry = configEntry, Date = date, Areas = areas, Currency = currency }); } public Task GetPricesForDateAsync(NordpoolGetPricesForDateParameters data) { return _haContext.CallServiceWithResponseAsync("nordpool", "get_prices_for_date", null, data); } /// /// /// /// public Task GetPricesForDateAsync(object configEntry, DateOnly date, object? areas = null, object? currency = null) { return _haContext.CallServiceWithResponseAsync("nordpool", "get_prices_for_date", null, new NordpoolGetPricesForDateParameters { ConfigEntry = configEntry, Date = date, Areas = areas, Currency = currency }); } } public partial record NordpoolGetPriceIndicesForDateParameters { [JsonPropertyName("config_entry")] public object? ConfigEntry { get; init; } [JsonPropertyName("date")] public DateOnly? Date { get; init; } [JsonPropertyName("areas")] public object? Areas { get; init; } [JsonPropertyName("currency")] public object? Currency { get; init; } [JsonPropertyName("resolution")] public object? Resolution { get; init; } } public partial record NordpoolGetPricesForDateParameters { [JsonPropertyName("config_entry")] public object? ConfigEntry { get; init; } [JsonPropertyName("date")] public DateOnly? Date { get; init; } [JsonPropertyName("areas")] public object? Areas { get; init; } [JsonPropertyName("currency")] public object? Currency { get; init; } } public partial class NotifyServices { private readonly IHaContext _haContext; public NotifyServices(IHaContext haContext) { _haContext = haContext; } ///Sends a notification message using the mobile_app_erika_s_iphone integration. public void MobileAppErikaSIphone(NotifyMobileAppErikaSIphoneParameters data) { _haContext.CallService("notify", "mobile_app_erika_s_iphone", null, data); } ///Sends a notification message using the mobile_app_erika_s_iphone integration. /// eg: The garage door has been open for 10 minutes. /// eg: Your Garage Door Friend /// eg: platform specific /// eg: platform specific public void MobileAppErikaSIphone(string message, string? title = null, object? target = null, object? data = null) { _haContext.CallService("notify", "mobile_app_erika_s_iphone", null, new NotifyMobileAppErikaSIphoneParameters { Message = message, Title = title, Target = target, Data = data }); } ///Sends a notification message using the mobile_app_home_phone integration. public void MobileAppHomePhone(NotifyMobileAppHomePhoneParameters data) { _haContext.CallService("notify", "mobile_app_home_phone", null, data); } ///Sends a notification message using the mobile_app_home_phone integration. /// eg: The garage door has been open for 10 minutes. /// eg: Your Garage Door Friend /// eg: platform specific /// eg: platform specific public void MobileAppHomePhone(string message, string? title = null, object? target = null, object? data = null) { _haContext.CallService("notify", "mobile_app_home_phone", null, new NotifyMobileAppHomePhoneParameters { Message = message, Title = title, Target = target, Data = data }); } ///Sends a notification message using the mobile_app_marius_phone integration. public void MobileAppMariusPhone(NotifyMobileAppMariusPhoneParameters data) { _haContext.CallService("notify", "mobile_app_marius_phone", null, data); } ///Sends a notification message using the mobile_app_marius_phone integration. /// eg: The garage door has been open for 10 minutes. /// eg: Your Garage Door Friend /// eg: platform specific /// eg: platform specific public void MobileAppMariusPhone(string message, string? title = null, object? target = null, object? data = null) { _haContext.CallService("notify", "mobile_app_marius_phone", null, new NotifyMobileAppMariusPhoneParameters { Message = message, Title = title, Target = target, Data = data }); } ///Sends a notification message using the mobile_app_marius_watch integration. public void MobileAppMariusWatch(NotifyMobileAppMariusWatchParameters data) { _haContext.CallService("notify", "mobile_app_marius_watch", null, data); } ///Sends a notification message using the mobile_app_marius_watch integration. /// eg: The garage door has been open for 10 minutes. /// eg: Your Garage Door Friend /// eg: platform specific /// eg: platform specific public void MobileAppMariusWatch(string message, string? title = null, object? target = null, object? data = null) { _haContext.CallService("notify", "mobile_app_marius_watch", null, new NotifyMobileAppMariusWatchParameters { Message = message, Title = title, Target = target, Data = data }); } ///Sends a notification message using the notify service. public void Notify(NotifyNotifyParameters data) { _haContext.CallService("notify", "notify", null, data); } ///Sends a notification message using the notify service. /// eg: The garage door has been open for 10 minutes. /// eg: Your Garage Door Friend /// eg: platform specific /// eg: platform specific public void Notify(string message, string? title = null, object? target = null, object? data = null) { _haContext.CallService("notify", "notify", null, new NotifyNotifyParameters { Message = message, Title = title, Target = target, Data = data }); } public void PersistentNotification(NotifyPersistentNotificationParameters data) { _haContext.CallService("notify", "persistent_notification", null, data); } /// eg: The garage door has been open for 10 minutes. /// eg: Your Garage Door Friend /// eg: platform specific public void PersistentNotification(string message, string? title = null, object? data = null) { _haContext.CallService("notify", "persistent_notification", null, new NotifyPersistentNotificationParameters { Message = message, Title = title, Data = data }); } ///The target for this service call public void SendMessage(ServiceTarget target, NotifySendMessageParameters data) { _haContext.CallService("notify", "send_message", target, data); } /// /// public void SendMessage(ServiceTarget target, string message, string? title = null) { _haContext.CallService("notify", "send_message", target, new NotifySendMessageParameters { Message = message, Title = title }); } } public partial record NotifyMobileAppErikaSIphoneParameters { /// eg: The garage door has been open for 10 minutes. [JsonPropertyName("message")] public string? Message { get; init; } /// eg: Your Garage Door Friend [JsonPropertyName("title")] public string? Title { get; init; } /// eg: platform specific [JsonPropertyName("target")] public object? Target { get; init; } /// eg: platform specific [JsonPropertyName("data")] public object? Data { get; init; } } public partial record NotifyMobileAppHomePhoneParameters { /// eg: The garage door has been open for 10 minutes. [JsonPropertyName("message")] public string? Message { get; init; } /// eg: Your Garage Door Friend [JsonPropertyName("title")] public string? Title { get; init; } /// eg: platform specific [JsonPropertyName("target")] public object? Target { get; init; } /// eg: platform specific [JsonPropertyName("data")] public object? Data { get; init; } } public partial record NotifyMobileAppMariusPhoneParameters { /// eg: The garage door has been open for 10 minutes. [JsonPropertyName("message")] public string? Message { get; init; } /// eg: Your Garage Door Friend [JsonPropertyName("title")] public string? Title { get; init; } /// eg: platform specific [JsonPropertyName("target")] public object? Target { get; init; } /// eg: platform specific [JsonPropertyName("data")] public object? Data { get; init; } } public partial record NotifyMobileAppMariusWatchParameters { /// eg: The garage door has been open for 10 minutes. [JsonPropertyName("message")] public string? Message { get; init; } /// eg: Your Garage Door Friend [JsonPropertyName("title")] public string? Title { get; init; } /// eg: platform specific [JsonPropertyName("target")] public object? Target { get; init; } /// eg: platform specific [JsonPropertyName("data")] public object? Data { get; init; } } public partial record NotifyNotifyParameters { /// eg: The garage door has been open for 10 minutes. [JsonPropertyName("message")] public string? Message { get; init; } /// eg: Your Garage Door Friend [JsonPropertyName("title")] public string? Title { get; init; } /// eg: platform specific [JsonPropertyName("target")] public object? Target { get; init; } /// eg: platform specific [JsonPropertyName("data")] public object? Data { get; init; } } public partial record NotifyPersistentNotificationParameters { /// eg: The garage door has been open for 10 minutes. [JsonPropertyName("message")] public string? Message { get; init; } /// eg: Your Garage Door Friend [JsonPropertyName("title")] public string? Title { get; init; } /// eg: platform specific [JsonPropertyName("data")] public object? Data { get; init; } } public partial record NotifySendMessageParameters { [JsonPropertyName("message")] public string? Message { get; init; } [JsonPropertyName("title")] public string? Title { get; init; } } public partial class NumberServices { private readonly IHaContext _haContext; public NumberServices(IHaContext haContext) { _haContext = haContext; } ///Decrease a number entity value by a certain amount. ///The target for this service call public void Decrement(ServiceTarget target, NumberDecrementParameters data) { _haContext.CallService("number", "decrement", target, data); } ///Decrease a number entity value by a certain amount. ///The amount to decrease the number with. If not provided, the step of the number entity will be used. public void Decrement(ServiceTarget target, long? amount = null) { _haContext.CallService("number", "decrement", target, new NumberDecrementParameters { Amount = amount }); } ///Increase a number entity value by a certain amount. ///The target for this service call public void Increment(ServiceTarget target, NumberIncrementParameters data) { _haContext.CallService("number", "increment", target, data); } ///Increase a number entity value by a certain amount. ///The amount to increase the number with. If not provided, the step of the number entity will be used. public void Increment(ServiceTarget target, long? amount = null) { _haContext.CallService("number", "increment", target, new NumberIncrementParameters { Amount = amount }); } ///Set a number entity to its maximum value. ///The target for this service call public void Max(ServiceTarget target, object? data = null) { _haContext.CallService("number", "max", target, data); } ///Set a number entity to its minimum value. ///The target for this service call public void Min(ServiceTarget target, object? data = null) { _haContext.CallService("number", "min", target, data); } ///The target for this service call public void SetValue(ServiceTarget target, NumberSetValueParameters data) { _haContext.CallService("number", "set_value", target, data); } /// eg: 42 public void SetValue(ServiceTarget target, string value) { _haContext.CallService("number", "set_value", target, new NumberSetValueParameters { Value = value }); } } public partial record NumberDecrementParameters { ///The amount to decrease the number with. If not provided, the step of the number entity will be used. [JsonPropertyName("amount")] public long? Amount { get; init; } } public partial record NumberIncrementParameters { ///The amount to increase the number with. If not provided, the step of the number entity will be used. [JsonPropertyName("amount")] public long? Amount { get; init; } } public partial record NumberSetValueParameters { /// eg: 42 [JsonPropertyName("value")] public string? Value { get; init; } } public partial class PersistentNotificationServices { private readonly IHaContext _haContext; public PersistentNotificationServices(IHaContext haContext) { _haContext = haContext; } public void Create(PersistentNotificationCreateParameters data) { _haContext.CallService("persistent_notification", "create", null, data); } /// eg: Please check your configuration.yaml. /// eg: Test notification /// eg: 1234 public void Create(string message, string? title = null, string? notificationId = null) { _haContext.CallService("persistent_notification", "create", null, new PersistentNotificationCreateParameters { Message = message, Title = title, NotificationId = notificationId }); } public void Dismiss(PersistentNotificationDismissParameters data) { _haContext.CallService("persistent_notification", "dismiss", null, data); } /// eg: 1234 public void Dismiss(string notificationId) { _haContext.CallService("persistent_notification", "dismiss", null, new PersistentNotificationDismissParameters { NotificationId = notificationId }); } public void DismissAll(object? data = null) { _haContext.CallService("persistent_notification", "dismiss_all", null, data); } } public partial record PersistentNotificationCreateParameters { /// eg: Please check your configuration.yaml. [JsonPropertyName("message")] public string? Message { get; init; } /// eg: Test notification [JsonPropertyName("title")] public string? Title { get; init; } /// eg: 1234 [JsonPropertyName("notification_id")] public string? NotificationId { get; init; } } public partial record PersistentNotificationDismissParameters { /// eg: 1234 [JsonPropertyName("notification_id")] public string? NotificationId { get; init; } } public partial class PersonServices { private readonly IHaContext _haContext; public PersonServices(IHaContext haContext) { _haContext = haContext; } ///Add a device tracker to a person. public void AddDeviceTracker(PersonAddDeviceTrackerParameters data) { _haContext.CallService("person", "add_device_tracker", null, data); } ///Add a device tracker to a person. ///The person entity ID to add the device tracker to. ///The device tracker entity ID to add to the person. public void AddDeviceTracker(string entityId, IEnumerable deviceTracker) { _haContext.CallService("person", "add_device_tracker", null, new PersonAddDeviceTrackerParameters { EntityId = entityId, DeviceTracker = deviceTracker }); } public void Reload(object? data = null) { _haContext.CallService("person", "reload", null, data); } ///Remove a device tracker from a person. public void RemoveDeviceTracker(PersonRemoveDeviceTrackerParameters data) { _haContext.CallService("person", "remove_device_tracker", null, data); } ///Remove a device tracker from a person. ///The person entity ID to remove the device tracker from. ///The device tracker entity ID to remove from the person. public void RemoveDeviceTracker(string entityId, IEnumerable deviceTracker) { _haContext.CallService("person", "remove_device_tracker", null, new PersonRemoveDeviceTrackerParameters { EntityId = entityId, DeviceTracker = deviceTracker }); } } public partial record PersonAddDeviceTrackerParameters { ///The person entity ID to add the device tracker to. [JsonPropertyName("entity_id")] public string? EntityId { get; init; } ///The device tracker entity ID to add to the person. [JsonPropertyName("device_tracker")] public IEnumerable? DeviceTracker { get; init; } } public partial record PersonRemoveDeviceTrackerParameters { ///The person entity ID to remove the device tracker from. [JsonPropertyName("entity_id")] public string? EntityId { get; init; } ///The device tracker entity ID to remove from the person. [JsonPropertyName("device_tracker")] public IEnumerable? DeviceTracker { get; init; } } public partial class RecorderServices { private readonly IHaContext _haContext; public RecorderServices(IHaContext haContext) { _haContext = haContext; } public void Disable(object? data = null) { _haContext.CallService("recorder", "disable", null, data); } public void Enable(object? data = null) { _haContext.CallService("recorder", "enable", null, data); } public void GetStatistics(RecorderGetStatisticsParameters data) { _haContext.CallService("recorder", "get_statistics", null, data); } /// eg: 2025-01-01 00:00:00 /// eg: 2025-01-02 00:00:00 /// eg: ["sensor.energy_consumption","sensor.temperature"] /// eg: hour /// eg: ["mean","sum"] /// eg: {"energy":"kWh","temperature":"°C"} public void GetStatistics(DateTime startTime, IEnumerable statisticIds, object period, IEnumerable types, DateTime? endTime = null, object? units = null) { _haContext.CallService("recorder", "get_statistics", null, new RecorderGetStatisticsParameters { StartTime = startTime, EndTime = endTime, StatisticIds = statisticIds, Period = period, Types = types, Units = units }); } public Task GetStatisticsAsync(RecorderGetStatisticsParameters data) { return _haContext.CallServiceWithResponseAsync("recorder", "get_statistics", null, data); } /// eg: 2025-01-01 00:00:00 /// eg: 2025-01-02 00:00:00 /// eg: ["sensor.energy_consumption","sensor.temperature"] /// eg: hour /// eg: ["mean","sum"] /// eg: {"energy":"kWh","temperature":"°C"} public Task GetStatisticsAsync(DateTime startTime, IEnumerable statisticIds, object period, IEnumerable types, DateTime? endTime = null, object? units = null) { return _haContext.CallServiceWithResponseAsync("recorder", "get_statistics", null, new RecorderGetStatisticsParameters { StartTime = startTime, EndTime = endTime, StatisticIds = statisticIds, Period = period, Types = types, Units = units }); } ///Import long-term statistics. public void ImportStatistics(RecorderImportStatisticsParameters data) { _haContext.CallService("recorder", "import_statistics", null, data); } ///Import long-term statistics. ///The statistics ID (entity ID) to import for. ///The name of the statistics. ///The source of the statistics data. ///The unit of measurement of the statistics. ///If the statistics has a mean value. ///If the statistics has a sum value. ///A list of mappings/dictionaries with statistics to import. The dictionaries must contain a "start" key with a datetime string other valid options are "mean", "sum", "min", "max", "last_reset", and "state". All of those are optional and either an integer or a float, except for "last_reset" which is a datetime string. public void ImportStatistics(string statisticId, string source, bool hasMean, bool hasSum, object stats, string? name = null, string? unitOfMeasurement = null) { _haContext.CallService("recorder", "import_statistics", null, new RecorderImportStatisticsParameters { StatisticId = statisticId, Name = name, Source = source, UnitOfMeasurement = unitOfMeasurement, HasMean = hasMean, HasSum = hasSum, Stats = stats }); } public void Purge(RecorderPurgeParameters data) { _haContext.CallService("recorder", "purge", null, data); } /// /// /// public void Purge(long? keepDays = null, bool? repack = null, bool? applyFilter = null) { _haContext.CallService("recorder", "purge", null, new RecorderPurgeParameters { KeepDays = keepDays, Repack = repack, ApplyFilter = applyFilter }); } public void PurgeEntities(RecorderPurgeEntitiesParameters data) { _haContext.CallService("recorder", "purge_entities", null, data); } /// /// eg: sun /// eg: domain*.object_id* /// public void PurgeEntities(IEnumerable? entityId = null, object? domains = null, object? entityGlobs = null, long? keepDays = null) { _haContext.CallService("recorder", "purge_entities", null, new RecorderPurgeEntitiesParameters { EntityId = entityId, Domains = domains, EntityGlobs = entityGlobs, KeepDays = keepDays }); } } public partial record RecorderGetStatisticsParameters { /// eg: 2025-01-01 00:00:00 [JsonPropertyName("start_time")] public DateTime? StartTime { get; init; } /// eg: 2025-01-02 00:00:00 [JsonPropertyName("end_time")] public DateTime? EndTime { get; init; } /// eg: ["sensor.energy_consumption","sensor.temperature"] [JsonPropertyName("statistic_ids")] public IEnumerable? StatisticIds { get; init; } /// eg: hour [JsonPropertyName("period")] public object? Period { get; init; } /// eg: ["mean","sum"] [JsonPropertyName("types")] public IEnumerable? Types { get; init; } /// eg: {"energy":"kWh","temperature":"°C"} [JsonPropertyName("units")] public object? Units { get; init; } } public partial record RecorderImportStatisticsParameters { ///The statistics ID (entity ID) to import for. [JsonPropertyName("statistic_id")] public string? StatisticId { get; init; } ///The name of the statistics. [JsonPropertyName("name")] public string? Name { get; init; } ///The source of the statistics data. [JsonPropertyName("source")] public string? Source { get; init; } ///The unit of measurement of the statistics. [JsonPropertyName("unit_of_measurement")] public string? UnitOfMeasurement { get; init; } ///If the statistics has a mean value. [JsonPropertyName("has_mean")] public bool? HasMean { get; init; } ///If the statistics has a sum value. [JsonPropertyName("has_sum")] public bool? HasSum { get; init; } ///A list of mappings/dictionaries with statistics to import. The dictionaries must contain a "start" key with a datetime string other valid options are "mean", "sum", "min", "max", "last_reset", and "state". All of those are optional and either an integer or a float, except for "last_reset" which is a datetime string. [JsonPropertyName("stats")] public object? Stats { get; init; } } public partial record RecorderPurgeParameters { [JsonPropertyName("keep_days")] public long? KeepDays { get; init; } [JsonPropertyName("repack")] public bool? Repack { get; init; } [JsonPropertyName("apply_filter")] public bool? ApplyFilter { get; init; } } public partial record RecorderPurgeEntitiesParameters { [JsonPropertyName("entity_id")] public IEnumerable? EntityId { get; init; } /// eg: sun [JsonPropertyName("domains")] public object? Domains { get; init; } /// eg: domain*.object_id* [JsonPropertyName("entity_globs")] public object? EntityGlobs { get; init; } [JsonPropertyName("keep_days")] public long? KeepDays { get; init; } } public partial class RemoteServices { private readonly IHaContext _haContext; public RemoteServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void DeleteCommand(ServiceTarget target, RemoteDeleteCommandParameters data) { _haContext.CallService("remote", "delete_command", target, data); } /// eg: television /// eg: Mute public void DeleteCommand(ServiceTarget target, object command, string? device = null) { _haContext.CallService("remote", "delete_command", target, new RemoteDeleteCommandParameters { Device = device, Command = command }); } ///The target for this service call public void LearnCommand(ServiceTarget target, RemoteLearnCommandParameters data) { _haContext.CallService("remote", "learn_command", target, data); } /// eg: television /// eg: Turn on /// /// /// public void LearnCommand(ServiceTarget target, string? device = null, object? command = null, object? commandType = null, bool? alternative = null, long? timeout = null) { _haContext.CallService("remote", "learn_command", target, new RemoteLearnCommandParameters { Device = device, Command = command, CommandType = commandType, Alternative = alternative, Timeout = timeout }); } ///The target for this service call public void SendCommand(ServiceTarget target, RemoteSendCommandParameters data) { _haContext.CallService("remote", "send_command", target, data); } /// eg: 32756745 /// eg: Play /// /// /// public void SendCommand(ServiceTarget target, object command, string? device = null, long? numRepeats = null, double? delaySecs = null, double? holdSecs = null) { _haContext.CallService("remote", "send_command", target, new RemoteSendCommandParameters { Device = device, Command = command, NumRepeats = numRepeats, DelaySecs = delaySecs, HoldSecs = holdSecs }); } ///The target for this service call public void Toggle(ServiceTarget target, object? data = null) { _haContext.CallService("remote", "toggle", target, data); } ///The target for this service call public void TurnOff(ServiceTarget target, object? data = null) { _haContext.CallService("remote", "turn_off", target, data); } ///The target for this service call public void TurnOn(ServiceTarget target, RemoteTurnOnParameters data) { _haContext.CallService("remote", "turn_on", target, data); } /// eg: BedroomTV public void TurnOn(ServiceTarget target, string? activity = null) { _haContext.CallService("remote", "turn_on", target, new RemoteTurnOnParameters { Activity = activity }); } } public partial record RemoteDeleteCommandParameters { /// eg: television [JsonPropertyName("device")] public string? Device { get; init; } /// eg: Mute [JsonPropertyName("command")] public object? Command { get; init; } } public partial record RemoteLearnCommandParameters { /// eg: television [JsonPropertyName("device")] public string? Device { get; init; } /// eg: Turn on [JsonPropertyName("command")] public object? Command { get; init; } [JsonPropertyName("command_type")] public object? CommandType { get; init; } [JsonPropertyName("alternative")] public bool? Alternative { get; init; } [JsonPropertyName("timeout")] public long? Timeout { get; init; } } public partial record RemoteSendCommandParameters { /// eg: 32756745 [JsonPropertyName("device")] public string? Device { get; init; } /// eg: Play [JsonPropertyName("command")] public object? Command { get; init; } [JsonPropertyName("num_repeats")] public long? NumRepeats { get; init; } [JsonPropertyName("delay_secs")] public double? DelaySecs { get; init; } [JsonPropertyName("hold_secs")] public double? HoldSecs { get; init; } } public partial record RemoteTurnOnParameters { /// eg: BedroomTV [JsonPropertyName("activity")] public string? Activity { get; init; } } public partial class RepairsServices { private readonly IHaContext _haContext; public RepairsServices(IHaContext haContext) { _haContext = haContext; } ///Manually create and raise a issue in Home Assistant repairs. public void Create(RepairsCreateParameters data) { _haContext.CallService("repairs", "create", null, data); } ///Manually create and raise a issue in Home Assistant repairs. ///The title of the issue. ///The description of the issue. Supports Markdown. ///The issue can have an identifier, which allows you to cancel it later with that ID if needed. It also prevent duplicate issues to be created. If not provided, a random ID will be generated. ///This field can be used to set the domain of the issue. For example, by default (if not set), it will use "spook". This causes Spook to be shown in the logo/image of the issue. If you set it to "homeassistant", the Home Assistant logo will be used, or use "hue", "zwave_js", "mqtt", etc. to use the logo of that integration. ///The severity of the issue. This will be used to determine the priority of the issue. If not set, "warning" will be used ///If the issue should be persistent, which means it will survive restarts of Home Assistant. By default, issues are not persistent. public void Create(string title, string description, string? issueId = null, string? domain = null, object? severity = null, bool? persistent = null) { _haContext.CallService("repairs", "create", null, new RepairsCreateParameters { Title = title, Description = description, IssueId = issueId, Domain = domain, Severity = severity, Persistent = persistent }); } ///Ignore all issues currently raised in Home Assistant Repairs. public void IgnoreAll(object? data = null) { _haContext.CallService("repairs", "ignore_all", null, data); } ///Removes a manually created Home Assistant repairs issue. This action can only remove issues created with the `repairs_create` action. public void Remove(RepairsRemoveParameters data) { _haContext.CallService("repairs", "remove", null, data); } ///Removes a manually created Home Assistant repairs issue. This action can only remove issues created with the `repairs_create` action. ///The issue ID to remove. public void Remove(string issueId) { _haContext.CallService("repairs", "remove", null, new RepairsRemoveParameters { IssueId = issueId }); } ///Unignore all issues currently raised in Home Assistant Repairs. public void UnignoreAll(object? data = null) { _haContext.CallService("repairs", "unignore_all", null, data); } } public partial record RepairsCreateParameters { ///The title of the issue. [JsonPropertyName("title")] public string? Title { get; init; } ///The description of the issue. Supports Markdown. [JsonPropertyName("description")] public string? Description { get; init; } ///The issue can have an identifier, which allows you to cancel it later with that ID if needed. It also prevent duplicate issues to be created. If not provided, a random ID will be generated. [JsonPropertyName("issue_id")] public string? IssueId { get; init; } ///This field can be used to set the domain of the issue. For example, by default (if not set), it will use "spook". This causes Spook to be shown in the logo/image of the issue. If you set it to "homeassistant", the Home Assistant logo will be used, or use "hue", "zwave_js", "mqtt", etc. to use the logo of that integration. [JsonPropertyName("domain")] public string? Domain { get; init; } ///The severity of the issue. This will be used to determine the priority of the issue. If not set, "warning" will be used [JsonPropertyName("severity")] public object? Severity { get; init; } ///If the issue should be persistent, which means it will survive restarts of Home Assistant. By default, issues are not persistent. [JsonPropertyName("persistent")] public bool? Persistent { get; init; } } public partial record RepairsRemoveParameters { ///The issue ID to remove. [JsonPropertyName("issue_id")] public string? IssueId { get; init; } } public partial class SceneServices { private readonly IHaContext _haContext; public SceneServices(IHaContext haContext) { _haContext = haContext; } public void Apply(SceneApplyParameters data) { _haContext.CallService("scene", "apply", null, data); } /// eg: light.kitchen: "on" light.ceiling: state: "on" brightness: 80 /// public void Apply(object entities, long? transition = null) { _haContext.CallService("scene", "apply", null, new SceneApplyParameters { Entities = entities, Transition = transition }); } public void Create(SceneCreateParameters data) { _haContext.CallService("scene", "create", null, data); } /// eg: all_lights /// eg: light.tv_back_light: "on" light.ceiling: state: "on" brightness: 200 /// eg: - light.ceiling - light.kitchen public void Create(string sceneId, object? entities = null, IEnumerable? snapshotEntities = null) { _haContext.CallService("scene", "create", null, new SceneCreateParameters { SceneId = sceneId, Entities = entities, SnapshotEntities = snapshotEntities }); } ///The target for this service call public void Delete(ServiceTarget target, object? data = null) { _haContext.CallService("scene", "delete", target, data); } public void Reload(object? data = null) { _haContext.CallService("scene", "reload", null, data); } ///The target for this service call public void TurnOn(ServiceTarget target, SceneTurnOnParameters data) { _haContext.CallService("scene", "turn_on", target, data); } /// public void TurnOn(ServiceTarget target, long? transition = null) { _haContext.CallService("scene", "turn_on", target, new SceneTurnOnParameters { Transition = transition }); } } public partial record SceneApplyParameters { /// eg: light.kitchen: "on" light.ceiling: state: "on" brightness: 80 [JsonPropertyName("entities")] public object? Entities { get; init; } [JsonPropertyName("transition")] public long? Transition { get; init; } } public partial record SceneCreateParameters { /// eg: all_lights [JsonPropertyName("scene_id")] public string? SceneId { get; init; } /// eg: light.tv_back_light: "on" light.ceiling: state: "on" brightness: 200 [JsonPropertyName("entities")] public object? Entities { get; init; } /// eg: - light.ceiling - light.kitchen [JsonPropertyName("snapshot_entities")] public IEnumerable? SnapshotEntities { get; init; } } public partial record SceneTurnOnParameters { [JsonPropertyName("transition")] public long? Transition { get; init; } } public partial class ScheduleServices { private readonly IHaContext _haContext; public ScheduleServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void GetSchedule(ServiceTarget target, object? data = null) { _haContext.CallService("schedule", "get_schedule", target, data); } ///The target for this service call public Task GetScheduleAsync(ServiceTarget target, object? data = null) { return _haContext.CallServiceWithResponseAsync("schedule", "get_schedule", target, data); } public void Reload(object? data = null) { _haContext.CallService("schedule", "reload", null, data); } } public partial class ScriptServices { private readonly IHaContext _haContext; public ScriptServices(IHaContext haContext) { _haContext = haContext; } public void Reload(object? data = null) { _haContext.CallService("script", "reload", null, data); } public void SystemPurgeDeviceHistory(ScriptSystemPurgeDeviceHistoryParameters data) { _haContext.CallService("script", "system_purge_device_history", null, data); } ///The device to purge all history from. public void SystemPurgeDeviceHistory(IEnumerable deviceId) { _haContext.CallService("script", "system_purge_device_history", null, new ScriptSystemPurgeDeviceHistoryParameters { DeviceId = deviceId }); } public Task SystemPurgeDeviceHistoryAsync(ScriptSystemPurgeDeviceHistoryParameters data) { return _haContext.CallServiceWithResponseAsync("script", "system_purge_device_history", null, data); } ///The device to purge all history from. public Task SystemPurgeDeviceHistoryAsync(IEnumerable deviceId) { return _haContext.CallServiceWithResponseAsync("script", "system_purge_device_history", null, new ScriptSystemPurgeDeviceHistoryParameters { DeviceId = deviceId }); } ///The target for this service call public void Toggle(ServiceTarget target, object? data = null) { _haContext.CallService("script", "toggle", target, data); } ///The target for this service call public void TurnOff(ServiceTarget target, object? data = null) { _haContext.CallService("script", "turn_off", target, data); } ///The target for this service call public void TurnOn(ServiceTarget target, object? data = null) { _haContext.CallService("script", "turn_on", target, data); } public void Updatenordpoolprices(object? data = null) { _haContext.CallService("script", "updatenordpoolprices", null, data); } public Task UpdatenordpoolpricesAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("script", "updatenordpoolprices", null, data); } } public partial record ScriptSystemPurgeDeviceHistoryParameters { ///The device to purge all history from. [JsonPropertyName("device_id")] public IEnumerable? DeviceId { get; init; } } public partial class SelectServices { private readonly IHaContext _haContext; public SelectServices(IHaContext haContext) { _haContext = haContext; } ///Select an random option for a select entity. ///The target for this service call public void Random(ServiceTarget target, SelectRandomParameters data) { _haContext.CallService("select", "random", target, data); } ///Select an random option for a select entity. ///Limits the options to select from. If not provided, all options will be considered. public void Random(ServiceTarget target, object? options = null) { _haContext.CallService("select", "random", target, new SelectRandomParameters { Options = options }); } ///The target for this service call public void SelectFirst(ServiceTarget target, object? data = null) { _haContext.CallService("select", "select_first", target, data); } ///The target for this service call public void SelectLast(ServiceTarget target, object? data = null) { _haContext.CallService("select", "select_last", target, data); } ///The target for this service call public void SelectNext(ServiceTarget target, SelectSelectNextParameters data) { _haContext.CallService("select", "select_next", target, data); } /// public void SelectNext(ServiceTarget target, bool? cycle = null) { _haContext.CallService("select", "select_next", target, new SelectSelectNextParameters { Cycle = cycle }); } ///The target for this service call public void SelectOption(ServiceTarget target, SelectSelectOptionParameters data) { _haContext.CallService("select", "select_option", target, data); } /// eg: "Item A" public void SelectOption(ServiceTarget target, object option) { _haContext.CallService("select", "select_option", target, new SelectSelectOptionParameters { Option = option }); } ///The target for this service call public void SelectPrevious(ServiceTarget target, SelectSelectPreviousParameters data) { _haContext.CallService("select", "select_previous", target, data); } /// public void SelectPrevious(ServiceTarget target, bool? cycle = null) { _haContext.CallService("select", "select_previous", target, new SelectSelectPreviousParameters { Cycle = cycle }); } } public partial record SelectRandomParameters { ///Limits the options to select from. If not provided, all options will be considered. [JsonPropertyName("options")] public object? Options { get; init; } } public partial record SelectSelectNextParameters { [JsonPropertyName("cycle")] public bool? Cycle { get; init; } } public partial record SelectSelectOptionParameters { /// eg: "Item A" [JsonPropertyName("option")] public object? Option { get; init; } } public partial record SelectSelectPreviousParameters { [JsonPropertyName("cycle")] public bool? Cycle { get; init; } } public partial class SirenServices { private readonly IHaContext _haContext; public SirenServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void Toggle(ServiceTarget target, object? data = null) { _haContext.CallService("siren", "toggle", target, data); } ///The target for this service call public void TurnOff(ServiceTarget target, object? data = null) { _haContext.CallService("siren", "turn_off", target, data); } ///The target for this service call public void TurnOn(ServiceTarget target, SirenTurnOnParameters data) { _haContext.CallService("siren", "turn_on", target, data); } /// eg: fire /// eg: 0.5 /// eg: 15 public void TurnOn(ServiceTarget target, string? tone = null, double? volumeLevel = null, string? duration = null) { _haContext.CallService("siren", "turn_on", target, new SirenTurnOnParameters { Tone = tone, VolumeLevel = volumeLevel, Duration = duration }); } } public partial record SirenTurnOnParameters { /// eg: fire [JsonPropertyName("tone")] public string? Tone { get; init; } /// eg: 0.5 [JsonPropertyName("volume_level")] public double? VolumeLevel { get; init; } /// eg: 15 [JsonPropertyName("duration")] public string? Duration { get; init; } } public partial class SystemLogServices { private readonly IHaContext _haContext; public SystemLogServices(IHaContext haContext) { _haContext = haContext; } public void Clear(object? data = null) { _haContext.CallService("system_log", "clear", null, data); } public void Write(SystemLogWriteParameters data) { _haContext.CallService("system_log", "write", null, data); } /// eg: Something went wrong /// /// eg: mycomponent.myplatform public void Write(string message, object? level = null, string? logger = null) { _haContext.CallService("system_log", "write", null, new SystemLogWriteParameters { Message = message, Level = level, Logger = logger }); } } public partial record SystemLogWriteParameters { /// eg: Something went wrong [JsonPropertyName("message")] public string? Message { get; init; } [JsonPropertyName("level")] public object? Level { get; init; } /// eg: mycomponent.myplatform [JsonPropertyName("logger")] public string? Logger { get; init; } } public partial class SonoffServices { private readonly IHaContext _haContext; public SonoffServices(IHaContext haContext) { _haContext = haContext; } ///Sends a command to a device. public void SendCommand(SonoffSendCommandParameters data) { _haContext.CallService("sonoff", "send_command", null, data); } ///Sends a command to a device. ///Device ID to send command to. eg: 1000123456 ///A single command to send. eg: switch public void SendCommand(object? device = null, object? cmd = null) { _haContext.CallService("sonoff", "send_command", null, new SonoffSendCommandParameters { Device = device, Cmd = cmd }); } } public partial record SonoffSendCommandParameters { ///Device ID to send command to. eg: 1000123456 [JsonPropertyName("device")] public object? Device { get; init; } ///A single command to send. eg: switch [JsonPropertyName("cmd")] public object? Cmd { get; init; } } public partial class SpookServices { private readonly IHaContext _haContext; public SpookServices(IHaContext haContext) { _haContext = haContext; } ///Calling this action spooks Home Assistant. Performing this action will always fail. public void Boo(object? data = null) { _haContext.CallService("spook", "boo", null, data); } ///Performing this action will randomly fail. public void RandomFail(object? data = null) { _haContext.CallService("spook", "random_fail", null, data); } } public partial class SwitchServices { private readonly IHaContext _haContext; public SwitchServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void Toggle(ServiceTarget target, object? data = null) { _haContext.CallService("switch", "toggle", target, data); } ///The target for this service call public void TurnOff(ServiceTarget target, object? data = null) { _haContext.CallService("switch", "turn_off", target, data); } ///The target for this service call public void TurnOn(ServiceTarget target, object? data = null) { _haContext.CallService("switch", "turn_on", target, data); } } public partial class TemplateServices { private readonly IHaContext _haContext; public TemplateServices(IHaContext haContext) { _haContext = haContext; } public void Reload(object? data = null) { _haContext.CallService("template", "reload", null, data); } } public partial class TimeServices { private readonly IHaContext _haContext; public TimeServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void SetValue(ServiceTarget target, TimeSetValueParameters data) { _haContext.CallService("time", "set_value", target, data); } /// eg: 22:15 public void SetValue(ServiceTarget target, TimeOnly time) { _haContext.CallService("time", "set_value", target, new TimeSetValueParameters { Time = time }); } } public partial record TimeSetValueParameters { /// eg: 22:15 [JsonPropertyName("time")] public TimeOnly? Time { get; init; } } public partial class TimerServices { private readonly IHaContext _haContext; public TimerServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void Cancel(ServiceTarget target, object? data = null) { _haContext.CallService("timer", "cancel", target, data); } ///The target for this service call public void Change(ServiceTarget target, TimerChangeParameters data) { _haContext.CallService("timer", "change", target, data); } /// eg: 00:01:00, 60 or -60 public void Change(ServiceTarget target, object duration) { _haContext.CallService("timer", "change", target, new TimerChangeParameters { Duration = duration }); } ///The target for this service call public void Finish(ServiceTarget target, object? data = null) { _haContext.CallService("timer", "finish", target, data); } ///The target for this service call public void Pause(ServiceTarget target, object? data = null) { _haContext.CallService("timer", "pause", target, data); } public void Reload(object? data = null) { _haContext.CallService("timer", "reload", null, data); } ///Set duration for an existing timer. ///The target for this service call public void SetDuration(ServiceTarget target, TimerSetDurationParameters data) { _haContext.CallService("timer", "set_duration", target, data); } ///Set duration for an existing timer. ///New duration for the timer, as a timedelta string. eg: 00:01:00, 60 public void SetDuration(ServiceTarget target, string duration) { _haContext.CallService("timer", "set_duration", target, new TimerSetDurationParameters { Duration = duration }); } ///The target for this service call public void Start(ServiceTarget target, TimerStartParameters data) { _haContext.CallService("timer", "start", target, data); } /// eg: 00:01:00 or 60 public void Start(ServiceTarget target, object? duration = null) { _haContext.CallService("timer", "start", target, new TimerStartParameters { Duration = duration }); } } public partial record TimerChangeParameters { /// eg: 00:01:00, 60 or -60 [JsonPropertyName("duration")] public object? Duration { get; init; } } public partial record TimerSetDurationParameters { ///New duration for the timer, as a timedelta string. eg: 00:01:00, 60 [JsonPropertyName("duration")] public string? Duration { get; init; } } public partial record TimerStartParameters { /// eg: 00:01:00 or 60 [JsonPropertyName("duration")] public object? Duration { get; init; } } public partial class TtsServices { private readonly IHaContext _haContext; public TtsServices(IHaContext haContext) { _haContext = haContext; } public void ClearCache(object? data = null) { _haContext.CallService("tts", "clear_cache", null, data); } ///Say something using text-to-speech on a media player with cloud. public void CloudSay(TtsCloudSayParameters data) { _haContext.CallService("tts", "cloud_say", null, data); } ///Say something using text-to-speech on a media player with cloud. /// /// eg: My name is hanna /// /// eg: ru /// eg: platform specific public void CloudSay(string entityId, string message, bool? cache = null, string? language = null, object? options = null) { _haContext.CallService("tts", "cloud_say", null, new TtsCloudSayParameters { EntityId = entityId, Message = message, Cache = cache, Language = language, Options = options }); } ///The target for this service call public void Speak(ServiceTarget target, TtsSpeakParameters data) { _haContext.CallService("tts", "speak", target, data); } /// /// eg: My name is hanna /// /// eg: ru /// eg: platform specific public void Speak(ServiceTarget target, string mediaPlayerEntityId, string message, bool? cache = null, string? language = null, object? options = null) { _haContext.CallService("tts", "speak", target, new TtsSpeakParameters { MediaPlayerEntityId = mediaPlayerEntityId, Message = message, Cache = cache, Language = language, Options = options }); } } public partial record TtsCloudSayParameters { [JsonPropertyName("entity_id")] public string? EntityId { get; init; } /// eg: My name is hanna [JsonPropertyName("message")] public string? Message { get; init; } [JsonPropertyName("cache")] public bool? Cache { get; init; } /// eg: ru [JsonPropertyName("language")] public string? Language { get; init; } /// eg: platform specific [JsonPropertyName("options")] public object? Options { get; init; } } public partial record TtsSpeakParameters { [JsonPropertyName("media_player_entity_id")] public string? MediaPlayerEntityId { get; init; } /// eg: My name is hanna [JsonPropertyName("message")] public string? Message { get; init; } [JsonPropertyName("cache")] public bool? Cache { get; init; } /// eg: ru [JsonPropertyName("language")] public string? Language { get; init; } /// eg: platform specific [JsonPropertyName("options")] public object? Options { get; init; } } public partial class UpdateServices { private readonly IHaContext _haContext; public UpdateServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void ClearSkipped(ServiceTarget target, object? data = null) { _haContext.CallService("update", "clear_skipped", target, data); } ///The target for this service call public void Install(ServiceTarget target, UpdateInstallParameters data) { _haContext.CallService("update", "install", target, data); } /// eg: 1.0.0 /// public void Install(ServiceTarget target, string? version = null, bool? backup = null) { _haContext.CallService("update", "install", target, new UpdateInstallParameters { Version = version, Backup = backup }); } ///The target for this service call public void Skip(ServiceTarget target, object? data = null) { _haContext.CallService("update", "skip", target, data); } } public partial record UpdateInstallParameters { /// eg: 1.0.0 [JsonPropertyName("version")] public string? Version { get; init; } [JsonPropertyName("backup")] public bool? Backup { get; init; } } public partial class UtilityMeterServices { private readonly IHaContext _haContext; public UtilityMeterServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void Calibrate(ServiceTarget target, UtilityMeterCalibrateParameters data) { _haContext.CallService("utility_meter", "calibrate", target, data); } /// eg: 100 public void Calibrate(ServiceTarget target, string value) { _haContext.CallService("utility_meter", "calibrate", target, new UtilityMeterCalibrateParameters { Value = value }); } ///The target for this service call public void Reset(ServiceTarget target, object? data = null) { _haContext.CallService("utility_meter", "reset", target, data); } } public partial record UtilityMeterCalibrateParameters { /// eg: 100 [JsonPropertyName("value")] public string? Value { get; init; } } public partial class VacuumServices { private readonly IHaContext _haContext; public VacuumServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void CleanSpot(ServiceTarget target, object? data = null) { _haContext.CallService("vacuum", "clean_spot", target, data); } ///The target for this service call public void Locate(ServiceTarget target, object? data = null) { _haContext.CallService("vacuum", "locate", target, data); } ///The target for this service call public void Pause(ServiceTarget target, object? data = null) { _haContext.CallService("vacuum", "pause", target, data); } ///The target for this service call public void ReturnToBase(ServiceTarget target, object? data = null) { _haContext.CallService("vacuum", "return_to_base", target, data); } ///The target for this service call public void SendCommand(ServiceTarget target, VacuumSendCommandParameters data) { _haContext.CallService("vacuum", "send_command", target, data); } /// eg: set_dnd_timer /// eg: { "key": "value" } public void SendCommand(ServiceTarget target, string command, object? @params = null) { _haContext.CallService("vacuum", "send_command", target, new VacuumSendCommandParameters { Command = command, Params = @params }); } ///The target for this service call public void SetFanSpeed(ServiceTarget target, VacuumSetFanSpeedParameters data) { _haContext.CallService("vacuum", "set_fan_speed", target, data); } /// eg: low public void SetFanSpeed(ServiceTarget target, string fanSpeed) { _haContext.CallService("vacuum", "set_fan_speed", target, new VacuumSetFanSpeedParameters { FanSpeed = fanSpeed }); } ///The target for this service call public void Start(ServiceTarget target, object? data = null) { _haContext.CallService("vacuum", "start", target, data); } ///The target for this service call public void Stop(ServiceTarget target, object? data = null) { _haContext.CallService("vacuum", "stop", target, data); } } public partial record VacuumSendCommandParameters { /// eg: set_dnd_timer [JsonPropertyName("command")] public string? Command { get; init; } /// eg: { "key": "value" } [JsonPropertyName("params")] public object? Params { get; init; } } public partial record VacuumSetFanSpeedParameters { /// eg: low [JsonPropertyName("fan_speed")] public string? FanSpeed { get; init; } } public partial class ValveServices { private readonly IHaContext _haContext; public ValveServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void CloseValve(ServiceTarget target, object? data = null) { _haContext.CallService("valve", "close_valve", target, data); } ///The target for this service call public void OpenValve(ServiceTarget target, object? data = null) { _haContext.CallService("valve", "open_valve", target, data); } ///The target for this service call public void SetValvePosition(ServiceTarget target, ValveSetValvePositionParameters data) { _haContext.CallService("valve", "set_valve_position", target, data); } /// public void SetValvePosition(ServiceTarget target, long position) { _haContext.CallService("valve", "set_valve_position", target, new ValveSetValvePositionParameters { Position = position }); } ///The target for this service call public void StopValve(ServiceTarget target, object? data = null) { _haContext.CallService("valve", "stop_valve", target, data); } ///The target for this service call public void Toggle(ServiceTarget target, object? data = null) { _haContext.CallService("valve", "toggle", target, data); } } public partial record ValveSetValvePositionParameters { [JsonPropertyName("position")] public long? Position { get; init; } } public partial class WeatherServices { private readonly IHaContext _haContext; public WeatherServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void GetForecasts(ServiceTarget target, WeatherGetForecastsParameters data) { _haContext.CallService("weather", "get_forecasts", target, data); } /// public void GetForecasts(ServiceTarget target, object @type) { _haContext.CallService("weather", "get_forecasts", target, new WeatherGetForecastsParameters { Type = @type }); } ///The target for this service call public Task GetForecastsAsync(ServiceTarget target, WeatherGetForecastsParameters data) { return _haContext.CallServiceWithResponseAsync("weather", "get_forecasts", target, data); } ///The target for this service call /// public Task GetForecastsAsync(ServiceTarget target, object @type) { return _haContext.CallServiceWithResponseAsync("weather", "get_forecasts", target, new WeatherGetForecastsParameters { Type = @type }); } } public partial record WeatherGetForecastsParameters { [JsonPropertyName("type")] public object? Type { get; init; } } public partial class ZhaServices { private readonly IHaContext _haContext; public ZhaServices(IHaContext haContext) { _haContext = haContext; } ///The target for this service call public void ClearLockUserCode(ServiceTarget target, ZhaClearLockUserCodeParameters data) { _haContext.CallService("zha", "clear_lock_user_code", target, data); } /// eg: 1 public void ClearLockUserCode(ServiceTarget target, string codeSlot) { _haContext.CallService("zha", "clear_lock_user_code", target, new ZhaClearLockUserCodeParameters { CodeSlot = codeSlot }); } ///The target for this service call public void DisableLockUserCode(ServiceTarget target, ZhaDisableLockUserCodeParameters data) { _haContext.CallService("zha", "disable_lock_user_code", target, data); } /// eg: 1 public void DisableLockUserCode(ServiceTarget target, string codeSlot) { _haContext.CallService("zha", "disable_lock_user_code", target, new ZhaDisableLockUserCodeParameters { CodeSlot = codeSlot }); } ///The target for this service call public void EnableLockUserCode(ServiceTarget target, ZhaEnableLockUserCodeParameters data) { _haContext.CallService("zha", "enable_lock_user_code", target, data); } /// eg: 1 public void EnableLockUserCode(ServiceTarget target, string codeSlot) { _haContext.CallService("zha", "enable_lock_user_code", target, new ZhaEnableLockUserCodeParameters { CodeSlot = codeSlot }); } public void IssueZigbeeClusterCommand(ZhaIssueZigbeeClusterCommandParameters data) { _haContext.CallService("zha", "issue_zigbee_cluster_command", null, data); } /// eg: 00:0d:6f:00:05:7d:2d:34 /// /// /// /// /// /// eg: [arg1, arg2, argN] /// /// eg: 252 public void IssueZigbeeClusterCommand(string ieee, long endpointId, long clusterId, long command, object commandType, object? clusterType = null, object? args = null, object? @params = null, string? manufacturer = null) { _haContext.CallService("zha", "issue_zigbee_cluster_command", null, new ZhaIssueZigbeeClusterCommandParameters { Ieee = ieee, EndpointId = endpointId, ClusterId = clusterId, ClusterType = clusterType, Command = command, CommandType = commandType, Args = args, Params = @params, Manufacturer = manufacturer }); } public void IssueZigbeeGroupCommand(ZhaIssueZigbeeGroupCommandParameters data) { _haContext.CallService("zha", "issue_zigbee_group_command", null, data); } /// eg: 546 /// /// /// /// eg: [arg1, arg2, argN] /// eg: 252 public void IssueZigbeeGroupCommand(string @group, long clusterId, long command, object? clusterType = null, object? args = null, string? manufacturer = null) { _haContext.CallService("zha", "issue_zigbee_group_command", null, new ZhaIssueZigbeeGroupCommandParameters { Group = @group, ClusterId = clusterId, ClusterType = clusterType, Command = command, Args = args, Manufacturer = manufacturer }); } public void Permit(ZhaPermitParameters data) { _haContext.CallService("zha", "permit", null, data); } /// /// eg: 00:0d:6f:00:05:7d:2d:34 /// eg: 00:0a:bf:00:01:10:23:35 /// eg: 1234-5678-1234-5678-AABB-CCDD-AABB-CCDD-EEFF /// eg: Z:000D6FFFFED4163B$I:52797BF4A5084DAA8E1712B61741CA024051 public void Permit(long? duration = null, string? ieee = null, string? sourceIeee = null, string? installCode = null, string? qrCode = null) { _haContext.CallService("zha", "permit", null, new ZhaPermitParameters { Duration = duration, Ieee = ieee, SourceIeee = sourceIeee, InstallCode = installCode, QrCode = qrCode }); } public void Remove(ZhaRemoveParameters data) { _haContext.CallService("zha", "remove", null, data); } /// eg: 00:0d:6f:00:05:7d:2d:34 public void Remove(string ieee) { _haContext.CallService("zha", "remove", null, new ZhaRemoveParameters { Ieee = ieee }); } ///The target for this service call public void SetLockUserCode(ServiceTarget target, ZhaSetLockUserCodeParameters data) { _haContext.CallService("zha", "set_lock_user_code", target, data); } /// eg: 1 /// eg: 1234 public void SetLockUserCode(ServiceTarget target, string codeSlot, string userCode) { _haContext.CallService("zha", "set_lock_user_code", target, new ZhaSetLockUserCodeParameters { CodeSlot = codeSlot, UserCode = userCode }); } public void SetZigbeeClusterAttribute(ZhaSetZigbeeClusterAttributeParameters data) { _haContext.CallService("zha", "set_zigbee_cluster_attribute", null, data); } /// eg: 00:0d:6f:00:05:7d:2d:34 /// /// /// /// eg: 0 /// eg: 1 /// eg: 252 public void SetZigbeeClusterAttribute(string ieee, long endpointId, long clusterId, long attribute, string value, object? clusterType = null, string? manufacturer = null) { _haContext.CallService("zha", "set_zigbee_cluster_attribute", null, new ZhaSetZigbeeClusterAttributeParameters { Ieee = ieee, EndpointId = endpointId, ClusterId = clusterId, ClusterType = clusterType, Attribute = attribute, Value = value, Manufacturer = manufacturer }); } public void WarningDeviceSquawk(ZhaWarningDeviceSquawkParameters data) { _haContext.CallService("zha", "warning_device_squawk", null, data); } /// eg: 00:0d:6f:00:05:7d:2d:34 /// /// /// public void WarningDeviceSquawk(string ieee, long? mode = null, long? strobe = null, long? level = null) { _haContext.CallService("zha", "warning_device_squawk", null, new ZhaWarningDeviceSquawkParameters { Ieee = ieee, Mode = mode, Strobe = strobe, Level = level }); } public void WarningDeviceWarn(ZhaWarningDeviceWarnParameters data) { _haContext.CallService("zha", "warning_device_warn", null, data); } /// eg: 00:0d:6f:00:05:7d:2d:34 /// /// /// /// /// /// public void WarningDeviceWarn(string ieee, long? mode = null, long? strobe = null, long? level = null, long? duration = null, long? dutyCycle = null, long? intensity = null) { _haContext.CallService("zha", "warning_device_warn", null, new ZhaWarningDeviceWarnParameters { Ieee = ieee, Mode = mode, Strobe = strobe, Level = level, Duration = duration, DutyCycle = dutyCycle, Intensity = intensity }); } } public partial record ZhaClearLockUserCodeParameters { /// eg: 1 [JsonPropertyName("code_slot")] public string? CodeSlot { get; init; } } public partial record ZhaDisableLockUserCodeParameters { /// eg: 1 [JsonPropertyName("code_slot")] public string? CodeSlot { get; init; } } public partial record ZhaEnableLockUserCodeParameters { /// eg: 1 [JsonPropertyName("code_slot")] public string? CodeSlot { get; init; } } public partial record ZhaIssueZigbeeClusterCommandParameters { /// eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } [JsonPropertyName("endpoint_id")] public long? EndpointId { get; init; } [JsonPropertyName("cluster_id")] public long? ClusterId { get; init; } [JsonPropertyName("cluster_type")] public object? ClusterType { get; init; } [JsonPropertyName("command")] public long? Command { get; init; } [JsonPropertyName("command_type")] public object? CommandType { get; init; } /// eg: [arg1, arg2, argN] [JsonPropertyName("args")] public object? Args { get; init; } [JsonPropertyName("params")] public object? Params { get; init; } /// eg: 252 [JsonPropertyName("manufacturer")] public string? Manufacturer { get; init; } } public partial record ZhaIssueZigbeeGroupCommandParameters { /// eg: 546 [JsonPropertyName("group")] public string? Group { get; init; } [JsonPropertyName("cluster_id")] public long? ClusterId { get; init; } [JsonPropertyName("cluster_type")] public object? ClusterType { get; init; } [JsonPropertyName("command")] public long? Command { get; init; } /// eg: [arg1, arg2, argN] [JsonPropertyName("args")] public object? Args { get; init; } /// eg: 252 [JsonPropertyName("manufacturer")] public string? Manufacturer { get; init; } } public partial record ZhaPermitParameters { [JsonPropertyName("duration")] public long? Duration { get; init; } /// eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } /// eg: 00:0a:bf:00:01:10:23:35 [JsonPropertyName("source_ieee")] public string? SourceIeee { get; init; } /// eg: 1234-5678-1234-5678-AABB-CCDD-AABB-CCDD-EEFF [JsonPropertyName("install_code")] public string? InstallCode { get; init; } /// eg: Z:000D6FFFFED4163B$I:52797BF4A5084DAA8E1712B61741CA024051 [JsonPropertyName("qr_code")] public string? QrCode { get; init; } } public partial record ZhaRemoveParameters { /// eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } } public partial record ZhaSetLockUserCodeParameters { /// eg: 1 [JsonPropertyName("code_slot")] public string? CodeSlot { get; init; } /// eg: 1234 [JsonPropertyName("user_code")] public string? UserCode { get; init; } } public partial record ZhaSetZigbeeClusterAttributeParameters { /// eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } [JsonPropertyName("endpoint_id")] public long? EndpointId { get; init; } [JsonPropertyName("cluster_id")] public long? ClusterId { get; init; } [JsonPropertyName("cluster_type")] public object? ClusterType { get; init; } /// eg: 0 [JsonPropertyName("attribute")] public long? Attribute { get; init; } /// eg: 1 [JsonPropertyName("value")] public string? Value { get; init; } /// eg: 252 [JsonPropertyName("manufacturer")] public string? Manufacturer { get; init; } } public partial record ZhaWarningDeviceSquawkParameters { /// eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } [JsonPropertyName("mode")] public long? Mode { get; init; } [JsonPropertyName("strobe")] public long? Strobe { get; init; } [JsonPropertyName("level")] public long? Level { get; init; } } public partial record ZhaWarningDeviceWarnParameters { /// eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } [JsonPropertyName("mode")] public long? Mode { get; init; } [JsonPropertyName("strobe")] public long? Strobe { get; init; } [JsonPropertyName("level")] public long? Level { get; init; } [JsonPropertyName("duration")] public long? Duration { get; init; } [JsonPropertyName("duty_cycle")] public long? DutyCycle { get; init; } [JsonPropertyName("intensity")] public long? Intensity { get; init; } } public partial class ZhaToolkitServices { private readonly IHaContext _haContext; public ZhaToolkitServices(IHaContext haContext) { _haContext = haContext; } ///Add group to endpoint groups list of device. May be equivalent to `add_to_group` public void AddGroup(ZhaToolkitAddGroupParameters data) { _haContext.CallService("zha_toolkit", "add_group", null, data); } ///Add group to endpoint groups list of device. May be equivalent to `add_to_group` ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///endpoint to get information for (all endpoints when not set) ///Group id to add eg: 2 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public void AddGroup(string ieee, long commandData, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { _haContext.CallService("zha_toolkit", "add_group", null, new ZhaToolkitAddGroupParameters { Ieee = ieee, Endpoint = endpoint, CommandData = commandData, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Add group to endpoint groups list of device. May be equivalent to `add_to_group` public Task AddGroupAsync(ZhaToolkitAddGroupParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "add_group", null, data); } ///Add group to endpoint groups list of device. May be equivalent to `add_to_group` ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///endpoint to get information for (all endpoints when not set) ///Group id to add eg: 2 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public Task AddGroupAsync(string ieee, long commandData, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "add_group", null, new ZhaToolkitAddGroupParameters { Ieee = ieee, Endpoint = endpoint, CommandData = commandData, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Add device to group public void AddToGroup(ZhaToolkitAddToGroupParameters data) { _haContext.CallService("zha_toolkit", "add_to_group", null, data); } ///Add device to group ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///endpoint to remove group from (or all EP if not set) ///Group id to remove eg: 2 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public void AddToGroup(string ieee, long commandData, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { _haContext.CallService("zha_toolkit", "add_to_group", null, new ZhaToolkitAddToGroupParameters { Ieee = ieee, Endpoint = endpoint, CommandData = commandData, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Add device to group public Task AddToGroupAsync(ZhaToolkitAddToGroupParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "add_to_group", null, data); } ///Add device to group ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///endpoint to remove group from (or all EP if not set) ///Group id to remove eg: 2 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public Task AddToGroupAsync(string ieee, long commandData, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "add_to_group", null, new ZhaToolkitAddToGroupParameters { Ieee = ieee, Endpoint = endpoint, CommandData = commandData, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Scan for all routes and neighbours, results saved to config/scans/... public void AllRoutesAndNeighbours(ZhaToolkitAllRoutesAndNeighboursParameters data) { _haContext.CallService("zha_toolkit", "all_routes_and_neighbours", null, data); } ///Scan for all routes and neighbours, results saved to config/scans/... ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void AllRoutesAndNeighbours(string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "all_routes_and_neighbours", null, new ZhaToolkitAllRoutesAndNeighboursParameters { EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Scan for all routes and neighbours, results saved to config/scans/... public Task AllRoutesAndNeighboursAsync(ZhaToolkitAllRoutesAndNeighboursParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "all_routes_and_neighbours", null, data); } ///Scan for all routes and neighbours, results saved to config/scans/... ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task AllRoutesAndNeighboursAsync(string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "all_routes_and_neighbours", null, new ZhaToolkitAllRoutesAndNeighboursParameters { EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Read Attribute public void AttrRead(ZhaToolkitAttrReadParameters data) { _haContext.CallService("zha_toolkit", "attr_read", null, data); } ///Read Attribute ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) ///target endpoint ///target cluster ///target attribute id (or name, accepted in most cases) ///Number of times the zigbee packet should be attempted ///When defined, name of state to write the read attribute value to eg: sensor.example ///When defined, attribute in state_id to write the read attribute value to. Write to state value when missing (and state_id is defined) eg: other_attr ///When defined, the read attribute is converted using this template before writing it to the state. eg: value / 100 ///Force an update event when the state is written When not set or false, if the state value is unchanged, the update may not trigger an automation. eg: True ///Use zigpy attribute cache to get the value of an attribute. (Does not send a zigbee packet to read the attribute). Can also be 0, 1 or 2, where 2 has a special meaning where it falls back to an actual read when the value is not in cache. eg: True ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Allow state creation (given by state_id) if it does not exist ///Wait for/expect a reply (not used yet) ///Filename of CSV to write read data to. Written to 'csv' directory eg: ../web/mycsv.csv ///Label to use for read value (in CSV file) eg: SecretAttributeName public void AttrRead(string ieee, long cluster, long attribute, long? manf = null, long? endpoint = null, long? tries = null, string? stateId = null, string? stateAttr = null, string? stateValueTemplate = null, bool? forceUpdate = null, bool? useCache = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? allowCreate = null, bool? expectReply = null, string? csvout = null, string? csvlabel = null) { _haContext.CallService("zha_toolkit", "attr_read", null, new ZhaToolkitAttrReadParameters { Ieee = ieee, Manf = manf, Endpoint = endpoint, Cluster = cluster, Attribute = attribute, Tries = tries, StateId = stateId, StateAttr = stateAttr, StateValueTemplate = stateValueTemplate, ForceUpdate = forceUpdate, UseCache = useCache, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, AllowCreate = allowCreate, ExpectReply = expectReply, Csvout = csvout, Csvlabel = csvlabel }); } ///Read Attribute public Task AttrReadAsync(ZhaToolkitAttrReadParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "attr_read", null, data); } ///Read Attribute ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) ///target endpoint ///target cluster ///target attribute id (or name, accepted in most cases) ///Number of times the zigbee packet should be attempted ///When defined, name of state to write the read attribute value to eg: sensor.example ///When defined, attribute in state_id to write the read attribute value to. Write to state value when missing (and state_id is defined) eg: other_attr ///When defined, the read attribute is converted using this template before writing it to the state. eg: value / 100 ///Force an update event when the state is written When not set or false, if the state value is unchanged, the update may not trigger an automation. eg: True ///Use zigpy attribute cache to get the value of an attribute. (Does not send a zigbee packet to read the attribute). Can also be 0, 1 or 2, where 2 has a special meaning where it falls back to an actual read when the value is not in cache. eg: True ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Allow state creation (given by state_id) if it does not exist ///Wait for/expect a reply (not used yet) ///Filename of CSV to write read data to. Written to 'csv' directory eg: ../web/mycsv.csv ///Label to use for read value (in CSV file) eg: SecretAttributeName public Task AttrReadAsync(string ieee, long cluster, long attribute, long? manf = null, long? endpoint = null, long? tries = null, string? stateId = null, string? stateAttr = null, string? stateValueTemplate = null, bool? forceUpdate = null, bool? useCache = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? allowCreate = null, bool? expectReply = null, string? csvout = null, string? csvlabel = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "attr_read", null, new ZhaToolkitAttrReadParameters { Ieee = ieee, Manf = manf, Endpoint = endpoint, Cluster = cluster, Attribute = attribute, Tries = tries, StateId = stateId, StateAttr = stateAttr, StateValueTemplate = stateValueTemplate, ForceUpdate = forceUpdate, UseCache = useCache, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, AllowCreate = allowCreate, ExpectReply = expectReply, Csvout = csvout, Csvlabel = csvlabel }); } ///Write Attribute public void AttrWrite(ZhaToolkitAttrWriteParameters data) { _haContext.CallService("zha_toolkit", "attr_write", null, data); } ///Write Attribute ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) ///target endpoint ///target cluster ///target attribute id (or name, accepted in most cases) ///Attribute type (to write, ...) ///Attribute value to write ///Use zigpy attribute cache to get the value of an attribute. (Does not send a zigbee packet to read the attribute). Can also be 0, 1 or 2, where 2 has a special meaning where it falls back to an actual read (when reading before a write) when the value is not in cache. eg: True ///Number of times the zigbee packet should be attempted ///When defined, name of state to write the read attribute value to eg: sensor.example ///When defined, attribute in state_id to write the read attribute value to. Write to state value when missing (and state_id is defined) eg: other_attr ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Allow state creation (given by state_id) if it does not exist ///Read attribute before writing it (used with attr_write). When the read value matches the value to write, no write is done. Defaults to True. ///Read attribute after writing. Can be used to ensure the values match. Defaults to True ///Force writing the attribute even if the read attribute already matches. Defaults to False ///Wait for/expect a reply (not used yet) ///Filename of CSV to write read data to. Written to 'csv' directory eg: ../web/mycsv.csv ///Label to use for read value (in CSV file) eg: SecretAttributeName public void AttrWrite(string ieee, long cluster, long attribute, string attrVal, long? manf = null, long? endpoint = null, long? attrType = null, bool? useCache = null, long? tries = null, string? stateId = null, string? stateAttr = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? allowCreate = null, bool? readBeforeWrite = null, bool? readAfterWrite = null, bool? writeIfEqual = null, bool? expectReply = null, string? csvout = null, string? csvlabel = null) { _haContext.CallService("zha_toolkit", "attr_write", null, new ZhaToolkitAttrWriteParameters { Ieee = ieee, Manf = manf, Endpoint = endpoint, Cluster = cluster, Attribute = attribute, AttrType = attrType, AttrVal = attrVal, UseCache = useCache, Tries = tries, StateId = stateId, StateAttr = stateAttr, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, AllowCreate = allowCreate, ReadBeforeWrite = readBeforeWrite, ReadAfterWrite = readAfterWrite, WriteIfEqual = writeIfEqual, ExpectReply = expectReply, Csvout = csvout, Csvlabel = csvlabel }); } ///Write Attribute public Task AttrWriteAsync(ZhaToolkitAttrWriteParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "attr_write", null, data); } ///Write Attribute ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) ///target endpoint ///target cluster ///target attribute id (or name, accepted in most cases) ///Attribute type (to write, ...) ///Attribute value to write ///Use zigpy attribute cache to get the value of an attribute. (Does not send a zigbee packet to read the attribute). Can also be 0, 1 or 2, where 2 has a special meaning where it falls back to an actual read (when reading before a write) when the value is not in cache. eg: True ///Number of times the zigbee packet should be attempted ///When defined, name of state to write the read attribute value to eg: sensor.example ///When defined, attribute in state_id to write the read attribute value to. Write to state value when missing (and state_id is defined) eg: other_attr ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Allow state creation (given by state_id) if it does not exist ///Read attribute before writing it (used with attr_write). When the read value matches the value to write, no write is done. Defaults to True. ///Read attribute after writing. Can be used to ensure the values match. Defaults to True ///Force writing the attribute even if the read attribute already matches. Defaults to False ///Wait for/expect a reply (not used yet) ///Filename of CSV to write read data to. Written to 'csv' directory eg: ../web/mycsv.csv ///Label to use for read value (in CSV file) eg: SecretAttributeName public Task AttrWriteAsync(string ieee, long cluster, long attribute, string attrVal, long? manf = null, long? endpoint = null, long? attrType = null, bool? useCache = null, long? tries = null, string? stateId = null, string? stateAttr = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? allowCreate = null, bool? readBeforeWrite = null, bool? readAfterWrite = null, bool? writeIfEqual = null, bool? expectReply = null, string? csvout = null, string? csvlabel = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "attr_write", null, new ZhaToolkitAttrWriteParameters { Ieee = ieee, Manf = manf, Endpoint = endpoint, Cluster = cluster, Attribute = attribute, AttrType = attrType, AttrVal = attrVal, UseCache = useCache, Tries = tries, StateId = stateId, StateAttr = stateAttr, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, AllowCreate = allowCreate, ReadBeforeWrite = readBeforeWrite, ReadAfterWrite = readAfterWrite, WriteIfEqual = writeIfEqual, ExpectReply = expectReply, Csvout = csvout, Csvlabel = csvlabel }); } ///Backup coordinator data (znp, bellows/ezsp) public void Backup(ZhaToolkitBackupParameters data) { _haContext.CallService("zha_toolkit", "backup", null, data); } ///Backup coordinator data (znp, bellows/ezsp) ///Suffix for backup file eg: _bathroom_added ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void Backup(string? commandData = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "backup", null, new ZhaToolkitBackupParameters { CommandData = commandData, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Backup coordinator data (znp, bellows/ezsp) public Task BackupAsync(ZhaToolkitBackupParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "backup", null, data); } ///Backup coordinator data (znp, bellows/ezsp) ///Suffix for backup file eg: _bathroom_added ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task BackupAsync(string? commandData = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "backup", null, new ZhaToolkitBackupParameters { CommandData = commandData, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Bind clusters from ieee device to command_data device public void BindGroup(ZhaToolkitBindGroupParameters data) { _haContext.CallService("zha_toolkit", "bind_group", null, data); } ///Bind clusters from ieee device to command_data device ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Target group for binding eg: 00:0d:6f:00:05:7d:2d:34 ///Target endpoint (when missing: all endpoints) ///Target cluster (when missing: all internally defined cluster) ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void BindGroup(string ieee, long commandData, long? endpoint = null, long? cluster = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "bind_group", null, new ZhaToolkitBindGroupParameters { Ieee = ieee, CommandData = commandData, Endpoint = endpoint, Cluster = cluster, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Bind clusters from ieee device to command_data device public Task BindGroupAsync(ZhaToolkitBindGroupParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "bind_group", null, data); } ///Bind clusters from ieee device to command_data device ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Target group for binding eg: 00:0d:6f:00:05:7d:2d:34 ///Target endpoint (when missing: all endpoints) ///Target cluster (when missing: all internally defined cluster) ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task BindGroupAsync(string ieee, long commandData, long? endpoint = null, long? cluster = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "bind_group", null, new ZhaToolkitBindGroupParameters { Ieee = ieee, CommandData = commandData, Endpoint = endpoint, Cluster = cluster, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Bind clusters from ieee device to command_data device public void BindIeee(ZhaToolkitBindIeeeParameters data) { _haContext.CallService("zha_toolkit", "bind_ieee", null, data); } ///Bind clusters from ieee device to command_data device ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Binding target (Entity name, device name, or IEEE address of the node to execute command). By default: coordinator eg: 00:0d:6f:00:05:7d:2d:34 ///Target endpoint (when missing: all endpoints) ///Destination endpoint (when missing: first EP with matching cluster) ///Target cluster (or all internally defined ones) ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void BindIeee(string ieee, string? commandData = null, long? endpoint = null, long? dstEndpoint = null, long? cluster = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "bind_ieee", null, new ZhaToolkitBindIeeeParameters { Ieee = ieee, CommandData = commandData, Endpoint = endpoint, DstEndpoint = dstEndpoint, Cluster = cluster, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Bind clusters from ieee device to command_data device public Task BindIeeeAsync(ZhaToolkitBindIeeeParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "bind_ieee", null, data); } ///Bind clusters from ieee device to command_data device ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Binding target (Entity name, device name, or IEEE address of the node to execute command). By default: coordinator eg: 00:0d:6f:00:05:7d:2d:34 ///Target endpoint (when missing: all endpoints) ///Destination endpoint (when missing: first EP with matching cluster) ///Target cluster (or all internally defined ones) ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task BindIeeeAsync(string ieee, string? commandData = null, long? endpoint = null, long? dstEndpoint = null, long? cluster = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "bind_ieee", null, new ZhaToolkitBindIeeeParameters { Ieee = ieee, CommandData = commandData, Endpoint = endpoint, DstEndpoint = dstEndpoint, Cluster = cluster, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Get binding table from device. public void BindsGet(ZhaToolkitBindsGetParameters data) { _haContext.CallService("zha_toolkit", "binds_get", null, data); } ///Get binding table from device. ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void BindsGet(string ieee, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "binds_get", null, new ZhaToolkitBindsGetParameters { Ieee = ieee, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Get binding table from device. public Task BindsGetAsync(ZhaToolkitBindsGetParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "binds_get", null, data); } ///Get binding table from device. ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task BindsGetAsync(string ieee, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "binds_get", null, new ZhaToolkitBindsGetParameters { Ieee = ieee, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Remove (Unbind) all bindings from device public void BindsRemoveAll(ZhaToolkitBindsRemoveAllParameters data) { _haContext.CallService("zha_toolkit", "binds_remove_all", null, data); } ///Remove (Unbind) all bindings from device ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///When provided, remove only bindings towards this device (Entity name, device name, or IEEE address of the binding destination) eg: 00:0d:6f:00:05:7d:2d:34 ///When provided, remove only bindings for this endpoint or list of endpoints (single value or list. Example: 20 or [20, 30]) Otherwise: removes bindings for all endpoints ///When provided, remove only bindings for this cluster or list of clusters (single value or list. Example: 0x0200 or [0x200, 0x300]) Otherwise: removes bindings for all clusters ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void BindsRemoveAll(string ieee, string? commandData = null, long? endpoint = null, long? cluster = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "binds_remove_all", null, new ZhaToolkitBindsRemoveAllParameters { Ieee = ieee, CommandData = commandData, Endpoint = endpoint, Cluster = cluster, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Remove (Unbind) all bindings from device public Task BindsRemoveAllAsync(ZhaToolkitBindsRemoveAllParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "binds_remove_all", null, data); } ///Remove (Unbind) all bindings from device ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///When provided, remove only bindings towards this device (Entity name, device name, or IEEE address of the binding destination) eg: 00:0d:6f:00:05:7d:2d:34 ///When provided, remove only bindings for this endpoint or list of endpoints (single value or list. Example: 20 or [20, 30]) Otherwise: removes bindings for all endpoints ///When provided, remove only bindings for this cluster or list of clusters (single value or list. Example: 0x0200 or [0x200, 0x300]) Otherwise: removes bindings for all clusters ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task BindsRemoveAllAsync(string ieee, string? commandData = null, long? endpoint = null, long? cluster = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "binds_remove_all", null, new ZhaToolkitBindsRemoveAllParameters { Ieee = ieee, CommandData = commandData, Endpoint = endpoint, Cluster = cluster, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Configure attribute reporting. You can set a high value for tries (100 or more) for sleepy devices." public void ConfReport(ZhaToolkitConfReportParameters data) { _haContext.CallService("zha_toolkit", "conf_report", null, data); } ///Configure attribute reporting. You can set a high value for tries (100 or more) for sleepy devices." ///Entity name, device name, or IEEE address of the node to execute command" eg: 00:0d:6f:00:05:7d:2d:34 ///target endpoint ///target cluster ///target attribute id (or name, accepted in most cases) ///Minimum report interval (seconds) ///Maximum report interval (seconds) ///Minimum change before reporting ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void ConfReport(string ieee, long cluster, long attribute, long minInterval, long maxInterval, long reportableChange, long? endpoint = null, long? manf = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "conf_report", null, new ZhaToolkitConfReportParameters { Ieee = ieee, Endpoint = endpoint, Cluster = cluster, Attribute = attribute, MinInterval = minInterval, MaxInterval = maxInterval, ReportableChange = reportableChange, Manf = manf, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Configure attribute reporting. You can set a high value for tries (100 or more) for sleepy devices." public Task ConfReportAsync(ZhaToolkitConfReportParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "conf_report", null, data); } ///Configure attribute reporting. You can set a high value for tries (100 or more) for sleepy devices." ///Entity name, device name, or IEEE address of the node to execute command" eg: 00:0d:6f:00:05:7d:2d:34 ///target endpoint ///target cluster ///target attribute id (or name, accepted in most cases) ///Minimum report interval (seconds) ///Maximum report interval (seconds) ///Minimum change before reporting ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task ConfReportAsync(string ieee, long cluster, long attribute, long minInterval, long maxInterval, long reportableChange, long? endpoint = null, long? manf = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "conf_report", null, new ZhaToolkitConfReportParameters { Ieee = ieee, Endpoint = endpoint, Cluster = cluster, Attribute = attribute, MinInterval = minInterval, MaxInterval = maxInterval, ReportableChange = reportableChange, Manf = manf, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Read attribute report configuration You can set a high value for tries (100 or more) for sleepy devices." public void ConfReportRead(ZhaToolkitConfReportReadParameters data) { _haContext.CallService("zha_toolkit", "conf_report_read", null, data); } ///Read attribute report configuration You can set a high value for tries (100 or more) for sleepy devices." ///Entity name, device name, or IEEE address of the node to execute command" eg: 00:0d:6f:00:05:7d:2d:34 ///target endpoint ///target cluster ///target attribute id (or name, accepted in most cases), can be a list ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void ConfReportRead(string ieee, long cluster, long attribute, long? endpoint = null, long? manf = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "conf_report_read", null, new ZhaToolkitConfReportReadParameters { Ieee = ieee, Endpoint = endpoint, Cluster = cluster, Attribute = attribute, Manf = manf, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Read attribute report configuration You can set a high value for tries (100 or more) for sleepy devices." public Task ConfReportReadAsync(ZhaToolkitConfReportReadParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "conf_report_read", null, data); } ///Read attribute report configuration You can set a high value for tries (100 or more) for sleepy devices." ///Entity name, device name, or IEEE address of the node to execute command" eg: 00:0d:6f:00:05:7d:2d:34 ///target endpoint ///target cluster ///target attribute id (or name, accepted in most cases), can be a list ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task ConfReportReadAsync(string ieee, long cluster, long attribute, long? endpoint = null, long? manf = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "conf_report_read", null, new ZhaToolkitConfReportReadParameters { Ieee = ieee, Endpoint = endpoint, Cluster = cluster, Attribute = attribute, Manf = manf, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Execute ZHA Toolkit service (Examine the documentation or code to know which parameters are needed) public void Execute(ZhaToolkitExecuteParameters data) { _haContext.CallService("zha_toolkit", "execute", null, data); } ///Execute ZHA Toolkit service (Examine the documentation or code to know which parameters are needed) ///Command name eg: scan_device ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///data for the command (specific command. Example, second IEEE address for binding) eg: 00:0d:6f:00:05:7d:2d:34 ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) ///Command Id (zcl_cmd) ///target endpoint ///destination endpoint ///target cluster ///target attribute id (or name, accepted in most cases) ///Attribute type (to write, ...) ///Attribute value to write ///Minimum report interval (seconds) ///Maximum report interval (seconds) ///Minimum change before reporting ///Direction indicator, according to command ///Number of times the zigbee packet should be attempted ///When defined, name of state to write the read attribute value to eg: sensor.example ///When defined, attribute in state_id to write the read attribute value to. Write to state value when missing (and state_id is defined) eg: other_attr ///When defined, the read attribute is converted using this template before writing it to the state. eg: value / 100 ///Force an update event when the state is written When not set or false, if the state value is unchanged, the update may not trigger an automation. eg: True ///Use zigpy attribute cache to get the value of an attribute. (Does not send a zigbee packet to read the attribute). Can also be 0, 1 or 2, where 2 has a special meaning with attr_write where it falls back to an actual read when the value is not in cache. eg: True ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Allow state creation (given by state_id) if it does not exist ///Read attribute before writing it (used with attr_write). When the read value matches the value to write, no write is done. Defaults to True. ///Read attribute after writing. Can be used to ensure the values match. Defaults to True ///Force writing the attribute even if the read attribute already matches. Defaults to False ///Wait for/expect a reply (not used yet) ///Filename of CSV to write read data to. Written to 'csv' directory eg: ../web/mycsv.csv ///Label to use for read value (in CSV file) eg: SecretAttributeName public void Execute(object command, string? ieee = null, string? commandData = null, long? manf = null, long? cmd = null, long? endpoint = null, long? dstEndpoint = null, long? cluster = null, long? attribute = null, long? attrType = null, string? attrVal = null, long? minInterval = null, long? maxInterval = null, long? reportableChange = null, long? dir = null, long? tries = null, string? stateId = null, string? stateAttr = null, string? stateValueTemplate = null, bool? forceUpdate = null, bool? useCache = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? allowCreate = null, bool? readBeforeWrite = null, bool? readAfterWrite = null, bool? writeIfEqual = null, bool? expectReply = null, string? csvout = null, string? csvlabel = null) { _haContext.CallService("zha_toolkit", "execute", null, new ZhaToolkitExecuteParameters { Command = command, Ieee = ieee, CommandData = commandData, Manf = manf, Cmd = cmd, Endpoint = endpoint, DstEndpoint = dstEndpoint, Cluster = cluster, Attribute = attribute, AttrType = attrType, AttrVal = attrVal, MinInterval = minInterval, MaxInterval = maxInterval, ReportableChange = reportableChange, Dir = dir, Tries = tries, StateId = stateId, StateAttr = stateAttr, StateValueTemplate = stateValueTemplate, ForceUpdate = forceUpdate, UseCache = useCache, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, AllowCreate = allowCreate, ReadBeforeWrite = readBeforeWrite, ReadAfterWrite = readAfterWrite, WriteIfEqual = writeIfEqual, ExpectReply = expectReply, Csvout = csvout, Csvlabel = csvlabel }); } ///Execute ZHA Toolkit service (Examine the documentation or code to know which parameters are needed) public Task ExecuteAsync(ZhaToolkitExecuteParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "execute", null, data); } ///Execute ZHA Toolkit service (Examine the documentation or code to know which parameters are needed) ///Command name eg: scan_device ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///data for the command (specific command. Example, second IEEE address for binding) eg: 00:0d:6f:00:05:7d:2d:34 ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) ///Command Id (zcl_cmd) ///target endpoint ///destination endpoint ///target cluster ///target attribute id (or name, accepted in most cases) ///Attribute type (to write, ...) ///Attribute value to write ///Minimum report interval (seconds) ///Maximum report interval (seconds) ///Minimum change before reporting ///Direction indicator, according to command ///Number of times the zigbee packet should be attempted ///When defined, name of state to write the read attribute value to eg: sensor.example ///When defined, attribute in state_id to write the read attribute value to. Write to state value when missing (and state_id is defined) eg: other_attr ///When defined, the read attribute is converted using this template before writing it to the state. eg: value / 100 ///Force an update event when the state is written When not set or false, if the state value is unchanged, the update may not trigger an automation. eg: True ///Use zigpy attribute cache to get the value of an attribute. (Does not send a zigbee packet to read the attribute). Can also be 0, 1 or 2, where 2 has a special meaning with attr_write where it falls back to an actual read when the value is not in cache. eg: True ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Allow state creation (given by state_id) if it does not exist ///Read attribute before writing it (used with attr_write). When the read value matches the value to write, no write is done. Defaults to True. ///Read attribute after writing. Can be used to ensure the values match. Defaults to True ///Force writing the attribute even if the read attribute already matches. Defaults to False ///Wait for/expect a reply (not used yet) ///Filename of CSV to write read data to. Written to 'csv' directory eg: ../web/mycsv.csv ///Label to use for read value (in CSV file) eg: SecretAttributeName public Task ExecuteAsync(object command, string? ieee = null, string? commandData = null, long? manf = null, long? cmd = null, long? endpoint = null, long? dstEndpoint = null, long? cluster = null, long? attribute = null, long? attrType = null, string? attrVal = null, long? minInterval = null, long? maxInterval = null, long? reportableChange = null, long? dir = null, long? tries = null, string? stateId = null, string? stateAttr = null, string? stateValueTemplate = null, bool? forceUpdate = null, bool? useCache = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? allowCreate = null, bool? readBeforeWrite = null, bool? readAfterWrite = null, bool? writeIfEqual = null, bool? expectReply = null, string? csvout = null, string? csvlabel = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "execute", null, new ZhaToolkitExecuteParameters { Command = command, Ieee = ieee, CommandData = commandData, Manf = manf, Cmd = cmd, Endpoint = endpoint, DstEndpoint = dstEndpoint, Cluster = cluster, Attribute = attribute, AttrType = attrType, AttrVal = attrVal, MinInterval = minInterval, MaxInterval = maxInterval, ReportableChange = reportableChange, Dir = dir, Tries = tries, StateId = stateId, StateAttr = stateAttr, StateValueTemplate = stateValueTemplate, ForceUpdate = forceUpdate, UseCache = useCache, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, AllowCreate = allowCreate, ReadBeforeWrite = readBeforeWrite, ReadAfterWrite = readAfterWrite, WriteIfEqual = writeIfEqual, ExpectReply = expectReply, Csvout = csvout, Csvlabel = csvlabel }); } public void EzspAddKey(object? data = null) { _haContext.CallService("zha_toolkit", "ezsp_add_key", null, data); } public Task EzspAddKeyAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ezsp_add_key", null, data); } ///Backup coordinator data (bellows/ezsp) public void EzspBackup(ZhaToolkitEzspBackupParameters data) { _haContext.CallService("zha_toolkit", "ezsp_backup", null, data); } ///Backup coordinator data (bellows/ezsp) ///Suffix for backup file eg: _bathroom_added ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void EzspBackup(string? commandData = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "ezsp_backup", null, new ZhaToolkitEzspBackupParameters { CommandData = commandData, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Backup coordinator data (bellows/ezsp) public Task EzspBackupAsync(ZhaToolkitEzspBackupParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ezsp_backup", null, data); } ///Backup coordinator data (bellows/ezsp) ///Suffix for backup file eg: _bathroom_added ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task EzspBackupAsync(string? commandData = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ezsp_backup", null, new ZhaToolkitEzspBackupParameters { CommandData = commandData, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } public void EzspClearKeys(object? data = null) { _haContext.CallService("zha_toolkit", "ezsp_clear_keys", null, data); } public Task EzspClearKeysAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ezsp_clear_keys", null, data); } public void EzspGetConfigValue(object? data = null) { _haContext.CallService("zha_toolkit", "ezsp_get_config_value", null, data); } public Task EzspGetConfigValueAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ezsp_get_config_value", null, data); } public void EzspGetIeeeByNwk(object? data = null) { _haContext.CallService("zha_toolkit", "ezsp_get_ieee_by_nwk", null, data); } public Task EzspGetIeeeByNwkAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ezsp_get_ieee_by_nwk", null, data); } public void EzspGetKeys(object? data = null) { _haContext.CallService("zha_toolkit", "ezsp_get_keys", null, data); } public Task EzspGetKeysAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ezsp_get_keys", null, data); } public void EzspGetPolicy(object? data = null) { _haContext.CallService("zha_toolkit", "ezsp_get_policy", null, data); } public Task EzspGetPolicyAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ezsp_get_policy", null, data); } public void EzspGetToken(object? data = null) { _haContext.CallService("zha_toolkit", "ezsp_get_token", null, data); } public Task EzspGetTokenAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ezsp_get_token", null, data); } public void EzspGetValue(object? data = null) { _haContext.CallService("zha_toolkit", "ezsp_get_value", null, data); } public Task EzspGetValueAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ezsp_get_value", null, data); } public void EzspSetChannel(object? data = null) { _haContext.CallService("zha_toolkit", "ezsp_set_channel", null, data); } public Task EzspSetChannelAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ezsp_set_channel", null, data); } public void EzspStartMfg(object? data = null) { _haContext.CallService("zha_toolkit", "ezsp_start_mfg", null, data); } public Task EzspStartMfgAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ezsp_start_mfg", null, data); } ///Get groups set on the endpoints of the device public void GetGroups(ZhaToolkitGetGroupsParameters data) { _haContext.CallService("zha_toolkit", "get_groups", null, data); } ///Get groups set on the endpoints of the device ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///endpoint to get information for (all endpoints when not set) ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public void GetGroups(string ieee, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { _haContext.CallService("zha_toolkit", "get_groups", null, new ZhaToolkitGetGroupsParameters { Ieee = ieee, Endpoint = endpoint, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Get groups set on the endpoints of the device public Task GetGroupsAsync(ZhaToolkitGetGroupsParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "get_groups", null, data); } ///Get groups set on the endpoints of the device ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///endpoint to get information for (all endpoints when not set) ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public Task GetGroupsAsync(string ieee, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "get_groups", null, new ZhaToolkitGetGroupsParameters { Ieee = ieee, Endpoint = endpoint, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Scan for all routes and neighbours, results saved to config/scans/... public void GetRoutesAndNeighbours(ZhaToolkitGetRoutesAndNeighboursParameters data) { _haContext.CallService("zha_toolkit", "get_routes_and_neighbours", null, data); } ///Scan for all routes and neighbours, results saved to config/scans/... ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void GetRoutesAndNeighbours(string ieee, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "get_routes_and_neighbours", null, new ZhaToolkitGetRoutesAndNeighboursParameters { Ieee = ieee, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Scan for all routes and neighbours, results saved to config/scans/... public Task GetRoutesAndNeighboursAsync(ZhaToolkitGetRoutesAndNeighboursParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "get_routes_and_neighbours", null, data); } ///Scan for all routes and neighbours, results saved to config/scans/... ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task GetRoutesAndNeighboursAsync(string ieee, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "get_routes_and_neighbours", null, new ZhaToolkitGetRoutesAndNeighboursParameters { Ieee = ieee, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Get groups for zll_cluster (if present) public void GetZllGroups(ZhaToolkitGetZllGroupsParameters data) { _haContext.CallService("zha_toolkit", "get_zll_groups", null, data); } ///Get groups for zll_cluster (if present) ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public void GetZllGroups(string ieee, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { _haContext.CallService("zha_toolkit", "get_zll_groups", null, new ZhaToolkitGetZllGroupsParameters { Ieee = ieee, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Get groups for zll_cluster (if present) public Task GetZllGroupsAsync(ZhaToolkitGetZllGroupsParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "get_zll_groups", null, data); } ///Get groups for zll_cluster (if present) ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public Task GetZllGroupsAsync(string ieee, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "get_zll_groups", null, new ZhaToolkitGetZllGroupsParameters { Ieee = ieee, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Set/update a Home Assistant state public void HaSetState(ZhaToolkitHaSetStateParameters data) { _haContext.CallService("zha_toolkit", "ha_set_state", null, data); } ///Set/update a Home Assistant state ///value to write to the state (or use in the template) ///Number of times the zigbee packet should be attempted ///Name of state to write the read attribute value to eg: sensor.example ///When defined, attribute in state_id to write the read attribute value to. Write to state value when missing (and state_id is defined) eg: other_attr ///When defined, used as a template expression. For example "value + 10" will be internally interpreted as "{{ value + 10 }}" where 'value' is substituted with the value for 'attr_val' eg: value + 10 ///Allow state creation (given by state_id) if it does not exist ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Filename of CSV to write the update state information to. Written to 'csv' directory. eg: ../web/mystatecsv.csv ///Label to designate value written (in CSV file) eg: Updated from zha_toolkit.ha_set_state public void HaSetState(string attrVal, string stateId, long? tries = null, string? stateAttr = null, string? stateValueTemplate = null, bool? allowCreate = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, string? csvout = null, string? csvlabel = null) { _haContext.CallService("zha_toolkit", "ha_set_state", null, new ZhaToolkitHaSetStateParameters { AttrVal = attrVal, Tries = tries, StateId = stateId, StateAttr = stateAttr, StateValueTemplate = stateValueTemplate, AllowCreate = allowCreate, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, Csvout = csvout, Csvlabel = csvlabel }); } ///Set/update a Home Assistant state public Task HaSetStateAsync(ZhaToolkitHaSetStateParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ha_set_state", null, data); } ///Set/update a Home Assistant state ///value to write to the state (or use in the template) ///Number of times the zigbee packet should be attempted ///Name of state to write the read attribute value to eg: sensor.example ///When defined, attribute in state_id to write the read attribute value to. Write to state value when missing (and state_id is defined) eg: other_attr ///When defined, used as a template expression. For example "value + 10" will be internally interpreted as "{{ value + 10 }}" where 'value' is substituted with the value for 'attr_val' eg: value + 10 ///Allow state creation (given by state_id) if it does not exist ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Filename of CSV to write the update state information to. Written to 'csv' directory. eg: ../web/mystatecsv.csv ///Label to designate value written (in CSV file) eg: Updated from zha_toolkit.ha_set_state public Task HaSetStateAsync(string attrVal, string stateId, long? tries = null, string? stateAttr = null, string? stateValueTemplate = null, bool? allowCreate = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, string? csvout = null, string? csvlabel = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ha_set_state", null, new ZhaToolkitHaSetStateParameters { AttrVal = attrVal, Tries = tries, StateId = stateId, StateAttr = stateAttr, StateValueTemplate = stateValueTemplate, AllowCreate = allowCreate, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, Csvout = csvout, Csvlabel = csvlabel }); } ///Handle join (ZHA should re-interrogate the device as on new join) public void HandleJoin(ZhaToolkitHandleJoinParameters data) { _haContext.CallService("zha_toolkit", "handle_join", null, data); } ///Handle join (ZHA should re-interrogate the device as on new join) ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Short network address of the device (optional, if known in ZHA) public void HandleJoin(string ieee, long? commandData = null) { _haContext.CallService("zha_toolkit", "handle_join", null, new ZhaToolkitHandleJoinParameters { Ieee = ieee, CommandData = commandData }); } ///Handle join (ZHA should re-interrogate the device as on new join) public Task HandleJoinAsync(ZhaToolkitHandleJoinParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "handle_join", null, data); } ///Handle join (ZHA should re-interrogate the device as on new join) ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Short network address of the device (optional, if known in ZHA) public Task HandleJoinAsync(string ieee, long? commandData = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "handle_join", null, new ZhaToolkitHandleJoinParameters { Ieee = ieee, CommandData = commandData }); } ///Ping device public void IeeePing(ZhaToolkitIeeePingParameters data) { _haContext.CallService("zha_toolkit", "ieee_ping", null, data); } ///Ping device ///Ping: Requests IEEE address (using the known NWK Address) eg: 00:0d:6f:00:05:7d:2d:34 ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void IeeePing(string ieee, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "ieee_ping", null, new ZhaToolkitIeeePingParameters { Ieee = ieee, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Ping device public Task IeeePingAsync(ZhaToolkitIeeePingParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ieee_ping", null, data); } ///Ping device ///Ping: Requests IEEE address (using the known NWK Address) eg: 00:0d:6f:00:05:7d:2d:34 ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task IeeePingAsync(string ieee, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ieee_ping", null, new ZhaToolkitIeeePingParameters { Ieee = ieee, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Send a Leave request to the device public void Leave(ZhaToolkitLeaveParameters data) { _haContext.CallService("zha_toolkit", "leave", null, data); } ///Send a Leave request to the device ///Entity name, device name, or IEEE address of the node to leave the network eg: 00:0d:6f:00:05:7d:2d:34 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void Leave(string ieee, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "leave", null, new ZhaToolkitLeaveParameters { Ieee = ieee, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Send a Leave request to the device public Task LeaveAsync(ZhaToolkitLeaveParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "leave", null, data); } ///Send a Leave request to the device ///Entity name, device name, or IEEE address of the node to leave the network eg: 00:0d:6f:00:05:7d:2d:34 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task LeaveAsync(string ieee, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "leave", null, new ZhaToolkitLeaveParameters { Ieee = ieee, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Reinitialize device public void MiscReinitialize(ZhaToolkitMiscReinitializeParameters data) { _haContext.CallService("zha_toolkit", "misc_reinitialize", null, data); } ///Reinitialize device ///Entity name, device name, or IEEE address of the node to execute command" eg: 00:0d:6f:00:05:7d:2d:34 public void MiscReinitialize(string ieee) { _haContext.CallService("zha_toolkit", "misc_reinitialize", null, new ZhaToolkitMiscReinitializeParameters { Ieee = ieee }); } ///Reinitialize device public Task MiscReinitializeAsync(ZhaToolkitMiscReinitializeParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "misc_reinitialize", null, data); } ///Reinitialize device ///Entity name, device name, or IEEE address of the node to execute command" eg: 00:0d:6f:00:05:7d:2d:34 public Task MiscReinitializeAsync(string ieee) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "misc_reinitialize", null, new ZhaToolkitMiscReinitializeParameters { Ieee = ieee }); } ///Set Time Cluster attributes (Time, DST - except TimeStatus) public void MiscSettime(ZhaToolkitMiscSettimeParameters data) { _haContext.CallService("zha_toolkit", "misc_settime", null, data); } ///Set Time Cluster attributes (Time, DST - except TimeStatus) ///Entity name, device name, or IEEE address eg: 00:0d:6f:00:05:7d:2d:34 ///target endpoint ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Read attributes before writing them ///Read attribute after writing. Can be used to ensure the values match. Defaults to True ///Filename of CSV to write read data to. Written to 'csv' directory eg: ../web/mycsv.csv public void MiscSettime(string ieee, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? readBeforeWrite = null, bool? readAfterWrite = null, string? csvout = null) { _haContext.CallService("zha_toolkit", "misc_settime", null, new ZhaToolkitMiscSettimeParameters { Ieee = ieee, Endpoint = endpoint, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ReadBeforeWrite = readBeforeWrite, ReadAfterWrite = readAfterWrite, Csvout = csvout }); } ///Set Time Cluster attributes (Time, DST - except TimeStatus) public Task MiscSettimeAsync(ZhaToolkitMiscSettimeParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "misc_settime", null, data); } ///Set Time Cluster attributes (Time, DST - except TimeStatus) ///Entity name, device name, or IEEE address eg: 00:0d:6f:00:05:7d:2d:34 ///target endpoint ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Read attributes before writing them ///Read attribute after writing. Can be used to ensure the values match. Defaults to True ///Filename of CSV to write read data to. Written to 'csv' directory eg: ../web/mycsv.csv public Task MiscSettimeAsync(string ieee, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? readBeforeWrite = null, bool? readAfterWrite = null, string? csvout = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "misc_settime", null, new ZhaToolkitMiscSettimeParameters { Ieee = ieee, Endpoint = endpoint, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ReadBeforeWrite = readBeforeWrite, ReadAfterWrite = readAfterWrite, Csvout = csvout }); } ///Notify a device that an update is available, after triggering ota image providers to fetch new images. public void OtaNotify(ZhaToolkitOtaNotifyParameters data) { _haContext.CallService("zha_toolkit", "ota_notify", null, data); } ///Notify a device that an update is available, after triggering ota image providers to fetch new images. ///Entity name, device name, or IEEE address of the node to execute command eg: entity.name_of_zigbee_device ///When True, download FW from KKoenk's list that possibly matches devices. ///Path to write ota image(s) to (defaults to zha:zigpy_config:ota:otau_directory value or /config/zigpy_ota) ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: ota_notify_success ///Event name in case of failure eg: ota_notify_fail ///Event name when the images were updated and the device notified (either success or failure). eg: ota_notify_done ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void OtaNotify(string ieee, bool? download = null, string? path = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "ota_notify", null, new ZhaToolkitOtaNotifyParameters { Ieee = ieee, Download = download, Path = path, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Notify a device that an update is available, after triggering ota image providers to fetch new images. public Task OtaNotifyAsync(ZhaToolkitOtaNotifyParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ota_notify", null, data); } ///Notify a device that an update is available, after triggering ota image providers to fetch new images. ///Entity name, device name, or IEEE address of the node to execute command eg: entity.name_of_zigbee_device ///When True, download FW from KKoenk's list that possibly matches devices. ///Path to write ota image(s) to (defaults to zha:zigpy_config:ota:otau_directory value or /config/zigpy_ota) ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: ota_notify_success ///Event name in case of failure eg: ota_notify_fail ///Event name when the images were updated and the device notified (either success or failure). eg: ota_notify_done ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task OtaNotifyAsync(string ieee, bool? download = null, string? path = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "ota_notify", null, new ZhaToolkitOtaNotifyParameters { Ieee = ieee, Download = download, Path = path, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Reregister zha-toolkit services Useful during development when they are updated in __init__.py public void RegisterServices(object? data = null) { _haContext.CallService("zha_toolkit", "register_services", null, data); } ///Reregister zha-toolkit services Useful during development when they are updated in __init__.py public Task RegisterServicesAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "register_services", null, data); } ///Send a rejoin request to the device (=leave with rejoin) public void Rejoin(ZhaToolkitRejoinParameters data) { _haContext.CallService("zha_toolkit", "rejoin", null, data); } ///Send a rejoin request to the device (=leave with rejoin) ///Entity name, device name, or IEEE address of the node to request rejoin eg: 00:0d:6f:00:05:7d:2d:34 ///Node used to accept the rejoin (Entity name, device name, or IEEE address of the node) eg: 00:0d:6f:00:05:7d:2d:34 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void Rejoin(string ieee, string? commandData = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "rejoin", null, new ZhaToolkitRejoinParameters { Ieee = ieee, CommandData = commandData, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Send a rejoin request to the device (=leave with rejoin) public Task RejoinAsync(ZhaToolkitRejoinParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "rejoin", null, data); } ///Send a rejoin request to the device (=leave with rejoin) ///Entity name, device name, or IEEE address of the node to request rejoin eg: 00:0d:6f:00:05:7d:2d:34 ///Node used to accept the rejoin (Entity name, device name, or IEEE address of the node) eg: 00:0d:6f:00:05:7d:2d:34 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task RejoinAsync(string ieee, string? commandData = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "rejoin", null, new ZhaToolkitRejoinParameters { Ieee = ieee, CommandData = commandData, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Remove all groups from (selected) endpoints on device public void RemoveAllGroups(ZhaToolkitRemoveAllGroupsParameters data) { _haContext.CallService("zha_toolkit", "remove_all_groups", null, data); } ///Remove all groups from (selected) endpoints on device ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///endpoint to remove group from (all endpoints when not set) ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public void RemoveAllGroups(string ieee, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { _haContext.CallService("zha_toolkit", "remove_all_groups", null, new ZhaToolkitRemoveAllGroupsParameters { Ieee = ieee, Endpoint = endpoint, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Remove all groups from (selected) endpoints on device public Task RemoveAllGroupsAsync(ZhaToolkitRemoveAllGroupsParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "remove_all_groups", null, data); } ///Remove all groups from (selected) endpoints on device ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///endpoint to remove group from (all endpoints when not set) ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public Task RemoveAllGroupsAsync(string ieee, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "remove_all_groups", null, new ZhaToolkitRemoveAllGroupsParameters { Ieee = ieee, Endpoint = endpoint, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Remove device endpoints from group public void RemoveFromGroup(ZhaToolkitRemoveFromGroupParameters data) { _haContext.CallService("zha_toolkit", "remove_from_group", null, data); } ///Remove device endpoints from group ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///endpoint to remove group from (or all EP if not set) ///Group id to remove eg: 2 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public void RemoveFromGroup(string ieee, long commandData, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { _haContext.CallService("zha_toolkit", "remove_from_group", null, new ZhaToolkitRemoveFromGroupParameters { Ieee = ieee, Endpoint = endpoint, CommandData = commandData, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Remove device endpoints from group public Task RemoveFromGroupAsync(ZhaToolkitRemoveFromGroupParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "remove_from_group", null, data); } ///Remove device endpoints from group ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///endpoint to remove group from (or all EP if not set) ///Group id to remove eg: 2 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public Task RemoveFromGroupAsync(string ieee, long commandData, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "remove_from_group", null, new ZhaToolkitRemoveFromGroupParameters { Ieee = ieee, Endpoint = endpoint, CommandData = commandData, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Remove group from endpoint groups list of device. May be equivalent to `remove_from_group` public void RemoveGroup(ZhaToolkitRemoveGroupParameters data) { _haContext.CallService("zha_toolkit", "remove_group", null, data); } ///Remove group from endpoint groups list of device. May be equivalent to `remove_from_group` ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///endpoint to remove group from (or all EP if not set) ///Group id to remove eg: 2 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public void RemoveGroup(string ieee, long commandData, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { _haContext.CallService("zha_toolkit", "remove_group", null, new ZhaToolkitRemoveGroupParameters { Ieee = ieee, Endpoint = endpoint, CommandData = commandData, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Remove group from endpoint groups list of device. May be equivalent to `remove_from_group` public Task RemoveGroupAsync(ZhaToolkitRemoveGroupParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "remove_group", null, data); } ///Remove group from endpoint groups list of device. May be equivalent to `remove_from_group` ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 ///endpoint to remove group from (or all EP if not set) ///Group id to remove eg: 2 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public Task RemoveGroupAsync(string ieee, long commandData, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "remove_group", null, new ZhaToolkitRemoveGroupParameters { Ieee = ieee, Endpoint = endpoint, CommandData = commandData, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Scan device (result written to file in /config/scans) public void ScanDevice(ZhaToolkitScanDeviceParameters data) { _haContext.CallService("zha_toolkit", "scan_device", null, data); } ///Scan device (result written to file in /config/scans) ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Target endpoint, or list of endpoints eg: 1 ///Number of times a zigbee packet is repeated when no response ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void ScanDevice(string ieee, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "scan_device", null, new ZhaToolkitScanDeviceParameters { Ieee = ieee, Endpoint = endpoint, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Scan device (result written to file in /config/scans) public Task ScanDeviceAsync(ZhaToolkitScanDeviceParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "scan_device", null, data); } ///Scan device (result written to file in /config/scans) ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Target endpoint, or list of endpoints eg: 1 ///Number of times a zigbee packet is repeated when no response ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task ScanDeviceAsync(string ieee, long? endpoint = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "scan_device", null, new ZhaToolkitScanDeviceParameters { Ieee = ieee, Endpoint = endpoint, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Do Tuya magic spell (= make most Tuya devices work normally) public void TuyaMagic(ZhaToolkitTuyaMagicParameters data) { _haContext.CallService("zha_toolkit", "tuya_magic", null, data); } ///Do Tuya magic spell (= make most Tuya devices work normally) ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void TuyaMagic(string ieee, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "tuya_magic", null, new ZhaToolkitTuyaMagicParameters { Ieee = ieee, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Do Tuya magic spell (= make most Tuya devices work normally) public Task TuyaMagicAsync(ZhaToolkitTuyaMagicParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "tuya_magic", null, data); } ///Do Tuya magic spell (= make most Tuya devices work normally) ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task TuyaMagicAsync(string ieee, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "tuya_magic", null, new ZhaToolkitTuyaMagicParameters { Ieee = ieee, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Remove (Unbind) all bindings from device to the coordinator (your HA Instance) public void UnbindCoordinator(ZhaToolkitUnbindCoordinatorParameters data) { _haContext.CallService("zha_toolkit", "unbind_coordinator", null, data); } ///Remove (Unbind) all bindings from device to the coordinator (your HA Instance) ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///When provided, remove only bindings for this endpoint or list of endpoints (single value or list. Example: 20 or [20, 30]) Otherwise: removes bindings for all endpoints ///When provided, remove only bindings for this cluster or list of clusters (single value or list. Example: 0x0200 or [0x200, 0x300]) Otherwise: removes bindings for all clusters ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void UnbindCoordinator(string ieee, long? endpoint = null, long? cluster = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "unbind_coordinator", null, new ZhaToolkitUnbindCoordinatorParameters { Ieee = ieee, Endpoint = endpoint, Cluster = cluster, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Remove (Unbind) all bindings from device to the coordinator (your HA Instance) public Task UnbindCoordinatorAsync(ZhaToolkitUnbindCoordinatorParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "unbind_coordinator", null, data); } ///Remove (Unbind) all bindings from device to the coordinator (your HA Instance) ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 ///When provided, remove only bindings for this endpoint or list of endpoints (single value or list. Example: 20 or [20, 30]) Otherwise: removes bindings for all endpoints ///When provided, remove only bindings for this cluster or list of clusters (single value or list. Example: 0x0200 or [0x200, 0x300]) Otherwise: removes bindings for all clusters ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task UnbindCoordinatorAsync(string ieee, long? endpoint = null, long? cluster = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "unbind_coordinator", null, new ZhaToolkitUnbindCoordinatorParameters { Ieee = ieee, Endpoint = endpoint, Cluster = cluster, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } public void UnbindGroup(object? data = null) { _haContext.CallService("zha_toolkit", "unbind_group", null, data); } public Task UnbindGroupAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "unbind_group", null, data); } ///Send cluster command public void ZclCmd(ZhaToolkitZclCmdParameters data) { _haContext.CallService("zha_toolkit", "zcl_cmd", null, data); } ///Send cluster command ///Entity name, device name, or IEEE address of the node to send\ command to eg: 00:0d:6f:00:05:7d:2d:34 ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) ///target endpoint ///target cluster ///Command Id to execute ///Arguments for command when needed (as per zigpy's definition corresponding to Zigbee Library Cluster (ZCL) specification) eg: [1,"abcd",3] ///Keyword arguments for command eg: {"code":"cool_code"} ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void ZclCmd(string ieee, long cluster, long cmd, long? manf = null, long? endpoint = null, string? args = null, string? kwargs = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "zcl_cmd", null, new ZhaToolkitZclCmdParameters { Ieee = ieee, Manf = manf, Endpoint = endpoint, Cluster = cluster, Cmd = cmd, Args = args, Kwargs = kwargs, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Send cluster command public Task ZclCmdAsync(ZhaToolkitZclCmdParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "zcl_cmd", null, data); } ///Send cluster command ///Entity name, device name, or IEEE address of the node to send\ command to eg: 00:0d:6f:00:05:7d:2d:34 ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) ///target endpoint ///target cluster ///Command Id to execute ///Arguments for command when needed (as per zigpy's definition corresponding to Zigbee Library Cluster (ZCL) specification) eg: [1,"abcd",3] ///Keyword arguments for command eg: {"code":"cool_code"} ///Number of times the zigbee packet should be attempted ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task ZclCmdAsync(string ieee, long cluster, long cmd, long? manf = null, long? endpoint = null, string? args = null, string? kwargs = null, long? tries = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "zcl_cmd", null, new ZhaToolkitZclCmdParameters { Ieee = ieee, Manf = manf, Endpoint = endpoint, Cluster = cluster, Cmd = cmd, Args = args, Kwargs = kwargs, Tries = tries, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } public void ZdoFloodParentAnnce(object? data = null) { _haContext.CallService("zha_toolkit", "zdo_flood_parent_annce", null, data); } public Task ZdoFloodParentAnnceAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "zdo_flood_parent_annce", null, data); } ///Allow a device to join with a code (bellows radio type only) public void ZdoJoinWithCode(ZhaToolkitZdoJoinWithCodeParameters data) { _haContext.CallService("zha_toolkit", "zdo_join_with_code", null, data); } ///Allow a device to join with a code (bellows radio type only) ///Entity name, device name, or IEEE address of the node to request rejoin eg: 00:0d:6f:00:05:7d:2d:34 ///Node used to accept the rejoin (Entity name, device name, or IEEE address of the node) eg: 00:0d:6f:00:05:7d:2d:34 ///The code the device needs to present eg: 01234567 ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void ZdoJoinWithCode(string ieee, string code, string? commandData = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "zdo_join_with_code", null, new ZhaToolkitZdoJoinWithCodeParameters { Ieee = ieee, CommandData = commandData, Code = code, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Allow a device to join with a code (bellows radio type only) public Task ZdoJoinWithCodeAsync(ZhaToolkitZdoJoinWithCodeParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "zdo_join_with_code", null, data); } ///Allow a device to join with a code (bellows radio type only) ///Entity name, device name, or IEEE address of the node to request rejoin eg: 00:0d:6f:00:05:7d:2d:34 ///Node used to accept the rejoin (Entity name, device name, or IEEE address of the node) eg: 00:0d:6f:00:05:7d:2d:34 ///The code the device needs to present eg: 01234567 ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task ZdoJoinWithCodeAsync(string ieee, string code, string? commandData = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "zdo_join_with_code", null, new ZhaToolkitZdoJoinWithCodeParameters { Ieee = ieee, CommandData = commandData, Code = code, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } public void ZdoScanNow(object? data = null) { _haContext.CallService("zha_toolkit", "zdo_scan_now", null, data); } public Task ZdoScanNowAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "zdo_scan_now", null, data); } public void ZdoUpdateNwkId(object? data = null) { _haContext.CallService("zha_toolkit", "zdo_update_nwk_id", null, data); } public Task ZdoUpdateNwkIdAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "zdo_update_nwk_id", null, data); } ///Export device information (Response, CSV File, JSON File, Event) public void ZhaDevices(ZhaToolkitZhaDevicesParameters data) { _haContext.CallService("zha_toolkit", "zha_devices", null, data); } ///Export device information (Response, CSV File, JSON File, Event) ///Optional Entity name, device name, or IEEE address of the device to provide details for. Defaults to all devices eg: 00:0d:6f:00:05:7d:2d:34 ///Selected Fields eg: ["ieee","lqi","name"] ///Filename of CSV to write read data to. Written to 'csv' directory (can be relative as in example). eg: ../web/mycsv.csv ///Column to sort table by eg: lqi ///Filename of JSON to write read data to. Written to '/config/json' directory eg: zha_devices.json ///Add timestamp to Filename of JSON file. Defaults to False. eg: True ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public void ZhaDevices(string? ieee = null, string? commandData = null, string? csvout = null, object? csvlabel = null, string? jsonOut = null, bool? jsonTimestamp = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { _haContext.CallService("zha_toolkit", "zha_devices", null, new ZhaToolkitZhaDevicesParameters { Ieee = ieee, CommandData = commandData, Csvout = csvout, Csvlabel = csvlabel, JsonOut = jsonOut, JsonTimestamp = jsonTimestamp, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Export device information (Response, CSV File, JSON File, Event) public Task ZhaDevicesAsync(ZhaToolkitZhaDevicesParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "zha_devices", null, data); } ///Export device information (Response, CSV File, JSON File, Event) ///Optional Entity name, device name, or IEEE address of the device to provide details for. Defaults to all devices eg: 00:0d:6f:00:05:7d:2d:34 ///Selected Fields eg: ["ieee","lqi","name"] ///Filename of CSV to write read data to. Written to 'csv' directory (can be relative as in example). eg: ../web/mycsv.csv ///Column to sort table by eg: lqi ///Filename of JSON to write read data to. Written to '/config/json' directory eg: zha_devices.json ///Add timestamp to Filename of JSON file. Defaults to False. eg: True ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations public Task ZhaDevicesAsync(string? ieee = null, string? commandData = null, string? csvout = null, object? csvlabel = null, string? jsonOut = null, bool? jsonTimestamp = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "zha_devices", null, new ZhaToolkitZhaDevicesParameters { Ieee = ieee, CommandData = commandData, Csvout = csvout, Csvlabel = csvlabel, JsonOut = jsonOut, JsonTimestamp = jsonTimestamp, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException }); } ///Backup coordinator data (znp, bellows/ezsp) public void ZnpBackup(ZhaToolkitZnpBackupParameters data) { _haContext.CallService("zha_toolkit", "znp_backup", null, data); } ///Backup coordinator data (znp, bellows/ezsp) ///Suffix for backup file eg: _bathroom_added ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public void ZnpBackup(string? commandData = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { _haContext.CallService("zha_toolkit", "znp_backup", null, new ZhaToolkitZnpBackupParameters { CommandData = commandData, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } ///Backup coordinator data (znp, bellows/ezsp) public Task ZnpBackupAsync(ZhaToolkitZnpBackupParameters data) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "znp_backup", null, data); } ///Backup coordinator data (znp, bellows/ezsp) ///Suffix for backup file eg: _bathroom_added ///Event name in case of success eg: my_read_success_trigger_event ///Event name in case of failure eg: my_read_fail_trigger_event ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event ///Throw exception when success==False, useful to stop scripts, automations ///Wait for/expect a reply (not used yet) public Task ZnpBackupAsync(string? commandData = null, string? eventSuccess = null, string? eventFail = null, string? eventDone = null, bool? failException = null, bool? expectReply = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "znp_backup", null, new ZhaToolkitZnpBackupParameters { CommandData = commandData, EventSuccess = eventSuccess, EventFail = eventFail, EventDone = eventDone, FailException = failException, ExpectReply = expectReply }); } public void ZnpNvramBackup(object? data = null) { _haContext.CallService("zha_toolkit", "znp_nvram_backup", null, data); } public Task ZnpNvramBackupAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "znp_nvram_backup", null, data); } public void ZnpNvramReset(object? data = null) { _haContext.CallService("zha_toolkit", "znp_nvram_reset", null, data); } public Task ZnpNvramResetAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "znp_nvram_reset", null, data); } public void ZnpNvramRestore(object? data = null) { _haContext.CallService("zha_toolkit", "znp_nvram_restore", null, data); } public Task ZnpNvramRestoreAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "znp_nvram_restore", null, data); } public void ZnpRestore(object? data = null) { _haContext.CallService("zha_toolkit", "znp_restore", null, data); } public Task ZnpRestoreAsync(object? data = null) { return _haContext.CallServiceWithResponseAsync("zha_toolkit", "znp_restore", null, data); } } public partial record ZhaToolkitAddGroupParameters { ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///endpoint to get information for (all endpoints when not set) [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///Group id to add eg: 2 [JsonPropertyName("command_data")] public long? CommandData { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } } public partial record ZhaToolkitAddToGroupParameters { ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///endpoint to remove group from (or all EP if not set) [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///Group id to remove eg: 2 [JsonPropertyName("command_data")] public long? CommandData { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } } public partial record ZhaToolkitAllRoutesAndNeighboursParameters { ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitAttrReadParameters { ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) [JsonPropertyName("manf")] public long? Manf { get; init; } ///target endpoint [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///target cluster [JsonPropertyName("cluster")] public long? Cluster { get; init; } ///target attribute id (or name, accepted in most cases) [JsonPropertyName("attribute")] public long? Attribute { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///When defined, name of state to write the read attribute value to eg: sensor.example [JsonPropertyName("state_id")] public string? StateId { get; init; } ///When defined, attribute in state_id to write the read attribute value to. Write to state value when missing (and state_id is defined) eg: other_attr [JsonPropertyName("state_attr")] public string? StateAttr { get; init; } ///When defined, the read attribute is converted using this template before writing it to the state. eg: value / 100 [JsonPropertyName("state_value_template")] public string? StateValueTemplate { get; init; } ///Force an update event when the state is written When not set or false, if the state value is unchanged, the update may not trigger an automation. eg: True [JsonPropertyName("force_update")] public bool? ForceUpdate { get; init; } ///Use zigpy attribute cache to get the value of an attribute. (Does not send a zigbee packet to read the attribute). Can also be 0, 1 or 2, where 2 has a special meaning where it falls back to an actual read when the value is not in cache. eg: True [JsonPropertyName("use_cache")] public bool? UseCache { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Allow state creation (given by state_id) if it does not exist [JsonPropertyName("allow_create")] public bool? AllowCreate { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } ///Filename of CSV to write read data to. Written to 'csv' directory eg: ../web/mycsv.csv [JsonPropertyName("csvout")] public string? Csvout { get; init; } ///Label to use for read value (in CSV file) eg: SecretAttributeName [JsonPropertyName("csvlabel")] public string? Csvlabel { get; init; } } public partial record ZhaToolkitAttrWriteParameters { ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) [JsonPropertyName("manf")] public long? Manf { get; init; } ///target endpoint [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///target cluster [JsonPropertyName("cluster")] public long? Cluster { get; init; } ///target attribute id (or name, accepted in most cases) [JsonPropertyName("attribute")] public long? Attribute { get; init; } ///Attribute type (to write, ...) [JsonPropertyName("attr_type")] public long? AttrType { get; init; } ///Attribute value to write [JsonPropertyName("attr_val")] public string? AttrVal { get; init; } ///Use zigpy attribute cache to get the value of an attribute. (Does not send a zigbee packet to read the attribute). Can also be 0, 1 or 2, where 2 has a special meaning where it falls back to an actual read (when reading before a write) when the value is not in cache. eg: True [JsonPropertyName("use_cache")] public bool? UseCache { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///When defined, name of state to write the read attribute value to eg: sensor.example [JsonPropertyName("state_id")] public string? StateId { get; init; } ///When defined, attribute in state_id to write the read attribute value to. Write to state value when missing (and state_id is defined) eg: other_attr [JsonPropertyName("state_attr")] public string? StateAttr { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Allow state creation (given by state_id) if it does not exist [JsonPropertyName("allow_create")] public bool? AllowCreate { get; init; } ///Read attribute before writing it (used with attr_write). When the read value matches the value to write, no write is done. Defaults to True. [JsonPropertyName("read_before_write")] public bool? ReadBeforeWrite { get; init; } ///Read attribute after writing. Can be used to ensure the values match. Defaults to True [JsonPropertyName("read_after_write")] public bool? ReadAfterWrite { get; init; } ///Force writing the attribute even if the read attribute already matches. Defaults to False [JsonPropertyName("write_if_equal")] public bool? WriteIfEqual { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } ///Filename of CSV to write read data to. Written to 'csv' directory eg: ../web/mycsv.csv [JsonPropertyName("csvout")] public string? Csvout { get; init; } ///Label to use for read value (in CSV file) eg: SecretAttributeName [JsonPropertyName("csvlabel")] public string? Csvlabel { get; init; } } public partial record ZhaToolkitBackupParameters { ///Suffix for backup file eg: _bathroom_added [JsonPropertyName("command_data")] public string? CommandData { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitBindGroupParameters { ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Target group for binding eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("command_data")] public long? CommandData { get; init; } ///Target endpoint (when missing: all endpoints) [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///Target cluster (when missing: all internally defined cluster) [JsonPropertyName("cluster")] public long? Cluster { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitBindIeeeParameters { ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Binding target (Entity name, device name, or IEEE address of the node to execute command). By default: coordinator eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("command_data")] public string? CommandData { get; init; } ///Target endpoint (when missing: all endpoints) [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///Destination endpoint (when missing: first EP with matching cluster) [JsonPropertyName("dst_endpoint")] public long? DstEndpoint { get; init; } ///Target cluster (or all internally defined ones) [JsonPropertyName("cluster")] public long? Cluster { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitBindsGetParameters { ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitBindsRemoveAllParameters { ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///When provided, remove only bindings towards this device (Entity name, device name, or IEEE address of the binding destination) eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("command_data")] public string? CommandData { get; init; } ///When provided, remove only bindings for this endpoint or list of endpoints (single value or list. Example: 20 or [20, 30]) Otherwise: removes bindings for all endpoints [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///When provided, remove only bindings for this cluster or list of clusters (single value or list. Example: 0x0200 or [0x200, 0x300]) Otherwise: removes bindings for all clusters [JsonPropertyName("cluster")] public long? Cluster { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitConfReportParameters { ///Entity name, device name, or IEEE address of the node to execute command" eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///target endpoint [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///target cluster [JsonPropertyName("cluster")] public long? Cluster { get; init; } ///target attribute id (or name, accepted in most cases) [JsonPropertyName("attribute")] public long? Attribute { get; init; } ///Minimum report interval (seconds) [JsonPropertyName("min_interval")] public long? MinInterval { get; init; } ///Maximum report interval (seconds) [JsonPropertyName("max_interval")] public long? MaxInterval { get; init; } ///Minimum change before reporting [JsonPropertyName("reportable_change")] public long? ReportableChange { get; init; } ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) [JsonPropertyName("manf")] public long? Manf { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitConfReportReadParameters { ///Entity name, device name, or IEEE address of the node to execute command" eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///target endpoint [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///target cluster [JsonPropertyName("cluster")] public long? Cluster { get; init; } ///target attribute id (or name, accepted in most cases), can be a list [JsonPropertyName("attribute")] public long? Attribute { get; init; } ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) [JsonPropertyName("manf")] public long? Manf { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitExecuteParameters { ///Command name eg: scan_device [JsonPropertyName("command")] public object? Command { get; init; } ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///data for the command (specific command. Example, second IEEE address for binding) eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("command_data")] public string? CommandData { get; init; } ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) [JsonPropertyName("manf")] public long? Manf { get; init; } ///Command Id (zcl_cmd) [JsonPropertyName("cmd")] public long? Cmd { get; init; } ///target endpoint [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///destination endpoint [JsonPropertyName("dst_endpoint")] public long? DstEndpoint { get; init; } ///target cluster [JsonPropertyName("cluster")] public long? Cluster { get; init; } ///target attribute id (or name, accepted in most cases) [JsonPropertyName("attribute")] public long? Attribute { get; init; } ///Attribute type (to write, ...) [JsonPropertyName("attr_type")] public long? AttrType { get; init; } ///Attribute value to write [JsonPropertyName("attr_val")] public string? AttrVal { get; init; } ///Minimum report interval (seconds) [JsonPropertyName("min_interval")] public long? MinInterval { get; init; } ///Maximum report interval (seconds) [JsonPropertyName("max_interval")] public long? MaxInterval { get; init; } ///Minimum change before reporting [JsonPropertyName("reportable_change")] public long? ReportableChange { get; init; } ///Direction indicator, according to command [JsonPropertyName("dir")] public long? Dir { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///When defined, name of state to write the read attribute value to eg: sensor.example [JsonPropertyName("state_id")] public string? StateId { get; init; } ///When defined, attribute in state_id to write the read attribute value to. Write to state value when missing (and state_id is defined) eg: other_attr [JsonPropertyName("state_attr")] public string? StateAttr { get; init; } ///When defined, the read attribute is converted using this template before writing it to the state. eg: value / 100 [JsonPropertyName("state_value_template")] public string? StateValueTemplate { get; init; } ///Force an update event when the state is written When not set or false, if the state value is unchanged, the update may not trigger an automation. eg: True [JsonPropertyName("force_update")] public bool? ForceUpdate { get; init; } ///Use zigpy attribute cache to get the value of an attribute. (Does not send a zigbee packet to read the attribute). Can also be 0, 1 or 2, where 2 has a special meaning with attr_write where it falls back to an actual read when the value is not in cache. eg: True [JsonPropertyName("use_cache")] public bool? UseCache { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Allow state creation (given by state_id) if it does not exist [JsonPropertyName("allow_create")] public bool? AllowCreate { get; init; } ///Read attribute before writing it (used with attr_write). When the read value matches the value to write, no write is done. Defaults to True. [JsonPropertyName("read_before_write")] public bool? ReadBeforeWrite { get; init; } ///Read attribute after writing. Can be used to ensure the values match. Defaults to True [JsonPropertyName("read_after_write")] public bool? ReadAfterWrite { get; init; } ///Force writing the attribute even if the read attribute already matches. Defaults to False [JsonPropertyName("write_if_equal")] public bool? WriteIfEqual { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } ///Filename of CSV to write read data to. Written to 'csv' directory eg: ../web/mycsv.csv [JsonPropertyName("csvout")] public string? Csvout { get; init; } ///Label to use for read value (in CSV file) eg: SecretAttributeName [JsonPropertyName("csvlabel")] public string? Csvlabel { get; init; } } public partial record ZhaToolkitEzspBackupParameters { ///Suffix for backup file eg: _bathroom_added [JsonPropertyName("command_data")] public string? CommandData { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitGetGroupsParameters { ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///endpoint to get information for (all endpoints when not set) [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } } public partial record ZhaToolkitGetRoutesAndNeighboursParameters { ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitGetZllGroupsParameters { ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } } public partial record ZhaToolkitHaSetStateParameters { ///value to write to the state (or use in the template) [JsonPropertyName("attr_val")] public string? AttrVal { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Name of state to write the read attribute value to eg: sensor.example [JsonPropertyName("state_id")] public string? StateId { get; init; } ///When defined, attribute in state_id to write the read attribute value to. Write to state value when missing (and state_id is defined) eg: other_attr [JsonPropertyName("state_attr")] public string? StateAttr { get; init; } ///When defined, used as a template expression. For example "value + 10" will be internally interpreted as "{{ value + 10 }}" where 'value' is substituted with the value for 'attr_val' eg: value + 10 [JsonPropertyName("state_value_template")] public string? StateValueTemplate { get; init; } ///Allow state creation (given by state_id) if it does not exist [JsonPropertyName("allow_create")] public bool? AllowCreate { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Filename of CSV to write the update state information to. Written to 'csv' directory. eg: ../web/mystatecsv.csv [JsonPropertyName("csvout")] public string? Csvout { get; init; } ///Label to designate value written (in CSV file) eg: Updated from zha_toolkit.ha_set_state [JsonPropertyName("csvlabel")] public string? Csvlabel { get; init; } } public partial record ZhaToolkitHandleJoinParameters { ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Short network address of the device (optional, if known in ZHA) [JsonPropertyName("command_data")] public long? CommandData { get; init; } } public partial record ZhaToolkitIeeePingParameters { ///Ping: Requests IEEE address (using the known NWK Address) eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitLeaveParameters { ///Entity name, device name, or IEEE address of the node to leave the network eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitMiscReinitializeParameters { ///Entity name, device name, or IEEE address of the node to execute command" eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } } public partial record ZhaToolkitMiscSettimeParameters { ///Entity name, device name, or IEEE address eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///target endpoint [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Read attributes before writing them [JsonPropertyName("read_before_write")] public bool? ReadBeforeWrite { get; init; } ///Read attribute after writing. Can be used to ensure the values match. Defaults to True [JsonPropertyName("read_after_write")] public bool? ReadAfterWrite { get; init; } ///Filename of CSV to write read data to. Written to 'csv' directory eg: ../web/mycsv.csv [JsonPropertyName("csvout")] public string? Csvout { get; init; } } public partial record ZhaToolkitOtaNotifyParameters { ///Entity name, device name, or IEEE address of the node to execute command eg: entity.name_of_zigbee_device [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///When True, download FW from KKoenk's list that possibly matches devices. [JsonPropertyName("download")] public bool? Download { get; init; } ///Path to write ota image(s) to (defaults to zha:zigpy_config:ota:otau_directory value or /config/zigpy_ota) [JsonPropertyName("path")] public string? Path { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: ota_notify_success [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: ota_notify_fail [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the images were updated and the device notified (either success or failure). eg: ota_notify_done [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitRejoinParameters { ///Entity name, device name, or IEEE address of the node to request rejoin eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Node used to accept the rejoin (Entity name, device name, or IEEE address of the node) eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("command_data")] public string? CommandData { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitRemoveAllGroupsParameters { ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///endpoint to remove group from (all endpoints when not set) [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } } public partial record ZhaToolkitRemoveFromGroupParameters { ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///endpoint to remove group from (or all EP if not set) [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///Group id to remove eg: 2 [JsonPropertyName("command_data")] public long? CommandData { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } } public partial record ZhaToolkitRemoveGroupParameters { ///Entity name, device name, or IEEE address of the node eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///endpoint to remove group from (or all EP if not set) [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///Group id to remove eg: 2 [JsonPropertyName("command_data")] public long? CommandData { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } } public partial record ZhaToolkitScanDeviceParameters { ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Target endpoint, or list of endpoints eg: 1 [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///Number of times a zigbee packet is repeated when no response [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitTuyaMagicParameters { ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitUnbindCoordinatorParameters { ///Entity name, device name, or IEEE address of the node to execute command eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///When provided, remove only bindings for this endpoint or list of endpoints (single value or list. Example: 20 or [20, 30]) Otherwise: removes bindings for all endpoints [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///When provided, remove only bindings for this cluster or list of clusters (single value or list. Example: 0x0200 or [0x200, 0x300]) Otherwise: removes bindings for all clusters [JsonPropertyName("cluster")] public long? Cluster { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitZclCmdParameters { ///Entity name, device name, or IEEE address of the node to send\ command to eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Manufacturer id (0 = No manufacturer id, empty=possibly automatic) [JsonPropertyName("manf")] public long? Manf { get; init; } ///target endpoint [JsonPropertyName("endpoint")] public long? Endpoint { get; init; } ///target cluster [JsonPropertyName("cluster")] public long? Cluster { get; init; } ///Command Id to execute [JsonPropertyName("cmd")] public long? Cmd { get; init; } ///Arguments for command when needed (as per zigpy's definition corresponding to Zigbee Library Cluster (ZCL) specification) eg: [1,"abcd",3] [JsonPropertyName("args")] public string? Args { get; init; } ///Keyword arguments for command eg: {"code":"cool_code"} [JsonPropertyName("kwargs")] public string? Kwargs { get; init; } ///Number of times the zigbee packet should be attempted [JsonPropertyName("tries")] public long? Tries { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitZdoJoinWithCodeParameters { ///Entity name, device name, or IEEE address of the node to request rejoin eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Node used to accept the rejoin (Entity name, device name, or IEEE address of the node) eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("command_data")] public string? CommandData { get; init; } ///The code the device needs to present eg: 01234567 [JsonPropertyName("code")] public string? Code { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial record ZhaToolkitZhaDevicesParameters { ///Optional Entity name, device name, or IEEE address of the device to provide details for. Defaults to all devices eg: 00:0d:6f:00:05:7d:2d:34 [JsonPropertyName("ieee")] public string? Ieee { get; init; } ///Selected Fields eg: ["ieee","lqi","name"] [JsonPropertyName("command_data")] public string? CommandData { get; init; } ///Filename of CSV to write read data to. Written to 'csv' directory (can be relative as in example). eg: ../web/mycsv.csv [JsonPropertyName("csvout")] public string? Csvout { get; init; } ///Column to sort table by eg: lqi [JsonPropertyName("csvlabel")] public object? Csvlabel { get; init; } ///Filename of JSON to write read data to. Written to '/config/json' directory eg: zha_devices.json [JsonPropertyName("json_out")] public string? JsonOut { get; init; } ///Add timestamp to Filename of JSON file. Defaults to False. eg: True [JsonPropertyName("json_timestamp")] public bool? JsonTimestamp { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } } public partial record ZhaToolkitZnpBackupParameters { ///Suffix for backup file eg: _bathroom_added [JsonPropertyName("command_data")] public string? CommandData { get; init; } ///Event name in case of success eg: my_read_success_trigger_event [JsonPropertyName("event_success")] public string? EventSuccess { get; init; } ///Event name in case of failure eg: my_read_fail_trigger_event [JsonPropertyName("event_fail")] public string? EventFail { get; init; } ///Event name when the service call did all its work (either success or failure). Has event data with relevant attributes. eg: my_read_done_trigger_event [JsonPropertyName("event_done")] public string? EventDone { get; init; } ///Throw exception when success==False, useful to stop scripts, automations [JsonPropertyName("fail_exception")] public bool? FailException { get; init; } ///Wait for/expect a reply (not used yet) [JsonPropertyName("expect_reply")] public bool? ExpectReply { get; init; } } public partial class ZoneServices { private readonly IHaContext _haContext; public ZoneServices(IHaContext haContext) { _haContext = haContext; } ///Create a new zone in Home Assistant on the fly. public void Create(ZoneCreateParameters data) { _haContext.CallService("zone", "create", null, data); } ///Create a new zone in Home Assistant on the fly. ///Name of the zone ///Icon to use for the zone ///Latitude of the zone ///Longitude of the zone ///Radius of the zone public void Create(string name, double latitude, double longitude, object? icon = null, long? radius = null) { _haContext.CallService("zone", "create", null, new ZoneCreateParameters { Name = name, Icon = icon, Latitude = latitude, Longitude = longitude, Radius = radius }); } ///Delete a zone. This works only with zones created and managed via the UI. Zones created and managed in YAML cannot be managed by Spook. public void Delete(ZoneDeleteParameters data) { _haContext.CallService("zone", "delete", null, data); } ///Delete a zone. This works only with zones created and managed via the UI. Zones created and managed in YAML cannot be managed by Spook. ///The ID of the entity (or entities) to remove. public void Delete(IEnumerable entityId) { _haContext.CallService("zone", "delete", null, new ZoneDeleteParameters { EntityId = entityId }); } public void Reload(object? data = null) { _haContext.CallService("zone", "reload", null, data); } ///Update properties of a zone on the fly. public void Update(ZoneUpdateParameters data) { _haContext.CallService("zone", "update", null, data); } ///Update properties of a zone on the fly. ///The ID of the entity (or entities) to update. ///Name of the zone ///Icon to use for the zone ///Latitude of the zone ///Longitude of the zone ///Radius of the zone public void Update(string entityId, string? name = null, object? icon = null, double? latitude = null, double? longitude = null, double? radius = null) { _haContext.CallService("zone", "update", null, new ZoneUpdateParameters { EntityId = entityId, Name = name, Icon = icon, Latitude = latitude, Longitude = longitude, Radius = radius }); } } public partial record ZoneCreateParameters { ///Name of the zone [JsonPropertyName("name")] public string? Name { get; init; } ///Icon to use for the zone [JsonPropertyName("icon")] public object? Icon { get; init; } ///Latitude of the zone [JsonPropertyName("latitude")] public double? Latitude { get; init; } ///Longitude of the zone [JsonPropertyName("longitude")] public double? Longitude { get; init; } ///Radius of the zone [JsonPropertyName("radius")] public long? Radius { get; init; } } public partial record ZoneDeleteParameters { ///The ID of the entity (or entities) to remove. [JsonPropertyName("entity_id")] public IEnumerable? EntityId { get; init; } } public partial record ZoneUpdateParameters { ///The ID of the entity (or entities) to update. [JsonPropertyName("entity_id")] public string? EntityId { get; init; } ///Name of the zone [JsonPropertyName("name")] public string? Name { get; init; } ///Icon to use for the zone [JsonPropertyName("icon")] public object? Icon { get; init; } ///Latitude of the zone [JsonPropertyName("latitude")] public double? Latitude { get; init; } ///Longitude of the zone [JsonPropertyName("longitude")] public double? Longitude { get; init; } ///Radius of the zone [JsonPropertyName("radius")] public double? Radius { get; init; } } public static class AutomationEntityExtensionMethods { public static void Toggle(this IAutomationEntityCore target, object? data = null) { target.CallService("toggle", data); } public static void Toggle(this IEnumerable target, object? data = null) { target.CallService("toggle", data); } public static void Trigger(this IAutomationEntityCore target, AutomationTriggerParameters data) { target.CallService("trigger", data); } public static void Trigger(this IEnumerable target, AutomationTriggerParameters data) { target.CallService("trigger", data); } ///The IAutomationEntityCore to call this service for /// public static void Trigger(this IAutomationEntityCore target, bool? skipCondition = null) { target.CallService("trigger", new AutomationTriggerParameters { SkipCondition = skipCondition }); } ///The IEnumerable<IAutomationEntityCore> to call this service for /// public static void Trigger(this IEnumerable target, bool? skipCondition = null) { target.CallService("trigger", new AutomationTriggerParameters { SkipCondition = skipCondition }); } public static void TurnOff(this IAutomationEntityCore target, AutomationTurnOffParameters data) { target.CallService("turn_off", data); } public static void TurnOff(this IEnumerable target, AutomationTurnOffParameters data) { target.CallService("turn_off", data); } ///The IAutomationEntityCore to call this service for /// public static void TurnOff(this IAutomationEntityCore target, bool? stopActions = null) { target.CallService("turn_off", new AutomationTurnOffParameters { StopActions = stopActions }); } ///The IEnumerable<IAutomationEntityCore> to call this service for /// public static void TurnOff(this IEnumerable target, bool? stopActions = null) { target.CallService("turn_off", new AutomationTurnOffParameters { StopActions = stopActions }); } public static void TurnOn(this IAutomationEntityCore target, object? data = null) { target.CallService("turn_on", data); } public static void TurnOn(this IEnumerable target, object? data = null) { target.CallService("turn_on", data); } } public static class ButtonEntityExtensionMethods { public static void Press(this IButtonEntityCore target, object? data = null) { target.CallService("press", data); } public static void Press(this IEnumerable target, object? data = null) { target.CallService("press", data); } } public static class ClimateEntityExtensionMethods { public static void SetFanMode(this IClimateEntityCore target, ClimateSetFanModeParameters data) { target.CallService("set_fan_mode", data); } public static void SetFanMode(this IEnumerable target, ClimateSetFanModeParameters data) { target.CallService("set_fan_mode", data); } ///The IClimateEntityCore to call this service for /// eg: low public static void SetFanMode(this IClimateEntityCore target, string fanMode) { target.CallService("set_fan_mode", new ClimateSetFanModeParameters { FanMode = fanMode }); } ///The IEnumerable<IClimateEntityCore> to call this service for /// eg: low public static void SetFanMode(this IEnumerable target, string fanMode) { target.CallService("set_fan_mode", new ClimateSetFanModeParameters { FanMode = fanMode }); } public static void SetHumidity(this IClimateEntityCore target, ClimateSetHumidityParameters data) { target.CallService("set_humidity", data); } public static void SetHumidity(this IEnumerable target, ClimateSetHumidityParameters data) { target.CallService("set_humidity", data); } ///The IClimateEntityCore to call this service for /// public static void SetHumidity(this IClimateEntityCore target, long humidity) { target.CallService("set_humidity", new ClimateSetHumidityParameters { Humidity = humidity }); } ///The IEnumerable<IClimateEntityCore> to call this service for /// public static void SetHumidity(this IEnumerable target, long humidity) { target.CallService("set_humidity", new ClimateSetHumidityParameters { Humidity = humidity }); } public static void SetHvacMode(this IClimateEntityCore target, ClimateSetHvacModeParameters data) { target.CallService("set_hvac_mode", data); } public static void SetHvacMode(this IEnumerable target, ClimateSetHvacModeParameters data) { target.CallService("set_hvac_mode", data); } ///The IClimateEntityCore to call this service for /// public static void SetHvacMode(this IClimateEntityCore target, object? hvacMode = null) { target.CallService("set_hvac_mode", new ClimateSetHvacModeParameters { HvacMode = hvacMode }); } ///The IEnumerable<IClimateEntityCore> to call this service for /// public static void SetHvacMode(this IEnumerable target, object? hvacMode = null) { target.CallService("set_hvac_mode", new ClimateSetHvacModeParameters { HvacMode = hvacMode }); } public static void SetPresetMode(this IClimateEntityCore target, ClimateSetPresetModeParameters data) { target.CallService("set_preset_mode", data); } public static void SetPresetMode(this IEnumerable target, ClimateSetPresetModeParameters data) { target.CallService("set_preset_mode", data); } ///The IClimateEntityCore to call this service for /// eg: away public static void SetPresetMode(this IClimateEntityCore target, string presetMode) { target.CallService("set_preset_mode", new ClimateSetPresetModeParameters { PresetMode = presetMode }); } ///The IEnumerable<IClimateEntityCore> to call this service for /// eg: away public static void SetPresetMode(this IEnumerable target, string presetMode) { target.CallService("set_preset_mode", new ClimateSetPresetModeParameters { PresetMode = presetMode }); } public static void SetSwingHorizontalMode(this IClimateEntityCore target, ClimateSetSwingHorizontalModeParameters data) { target.CallService("set_swing_horizontal_mode", data); } public static void SetSwingHorizontalMode(this IEnumerable target, ClimateSetSwingHorizontalModeParameters data) { target.CallService("set_swing_horizontal_mode", data); } ///The IClimateEntityCore to call this service for /// eg: on public static void SetSwingHorizontalMode(this IClimateEntityCore target, string swingHorizontalMode) { target.CallService("set_swing_horizontal_mode", new ClimateSetSwingHorizontalModeParameters { SwingHorizontalMode = swingHorizontalMode }); } ///The IEnumerable<IClimateEntityCore> to call this service for /// eg: on public static void SetSwingHorizontalMode(this IEnumerable target, string swingHorizontalMode) { target.CallService("set_swing_horizontal_mode", new ClimateSetSwingHorizontalModeParameters { SwingHorizontalMode = swingHorizontalMode }); } public static void SetSwingMode(this IClimateEntityCore target, ClimateSetSwingModeParameters data) { target.CallService("set_swing_mode", data); } public static void SetSwingMode(this IEnumerable target, ClimateSetSwingModeParameters data) { target.CallService("set_swing_mode", data); } ///The IClimateEntityCore to call this service for /// eg: on public static void SetSwingMode(this IClimateEntityCore target, string swingMode) { target.CallService("set_swing_mode", new ClimateSetSwingModeParameters { SwingMode = swingMode }); } ///The IEnumerable<IClimateEntityCore> to call this service for /// eg: on public static void SetSwingMode(this IEnumerable target, string swingMode) { target.CallService("set_swing_mode", new ClimateSetSwingModeParameters { SwingMode = swingMode }); } public static void SetTemperature(this IClimateEntityCore target, ClimateSetTemperatureParameters data) { target.CallService("set_temperature", data); } public static void SetTemperature(this IEnumerable target, ClimateSetTemperatureParameters data) { target.CallService("set_temperature", data); } ///The IClimateEntityCore to call this service for /// /// /// /// public static void SetTemperature(this IClimateEntityCore target, double? temperature = null, double? targetTempHigh = null, double? targetTempLow = null, object? hvacMode = null) { target.CallService("set_temperature", new ClimateSetTemperatureParameters { Temperature = temperature, TargetTempHigh = targetTempHigh, TargetTempLow = targetTempLow, HvacMode = hvacMode }); } ///The IEnumerable<IClimateEntityCore> to call this service for /// /// /// /// public static void SetTemperature(this IEnumerable target, double? temperature = null, double? targetTempHigh = null, double? targetTempLow = null, object? hvacMode = null) { target.CallService("set_temperature", new ClimateSetTemperatureParameters { Temperature = temperature, TargetTempHigh = targetTempHigh, TargetTempLow = targetTempLow, HvacMode = hvacMode }); } public static void Toggle(this IClimateEntityCore target, object? data = null) { target.CallService("toggle", data); } public static void Toggle(this IEnumerable target, object? data = null) { target.CallService("toggle", data); } public static void TurnOff(this IClimateEntityCore target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOff(this IEnumerable target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOn(this IClimateEntityCore target, object? data = null) { target.CallService("turn_on", data); } public static void TurnOn(this IEnumerable target, object? data = null) { target.CallService("turn_on", data); } } public static class CounterEntityExtensionMethods { public static void Decrement(this CounterEntity target, object? data = null) { target.CallService("decrement", data); } public static void Decrement(this IEnumerable target, object? data = null) { target.CallService("decrement", data); } public static void Increment(this CounterEntity target, object? data = null) { target.CallService("increment", data); } public static void Increment(this IEnumerable target, object? data = null) { target.CallService("increment", data); } public static void Reset(this CounterEntity target, object? data = null) { target.CallService("reset", data); } public static void Reset(this IEnumerable target, object? data = null) { target.CallService("reset", data); } public static void SetValue(this CounterEntity target, CounterSetValueParameters data) { target.CallService("set_value", data); } public static void SetValue(this IEnumerable target, CounterSetValueParameters data) { target.CallService("set_value", data); } ///The CounterEntity to call this service for /// public static void SetValue(this CounterEntity target, long value) { target.CallService("set_value", new CounterSetValueParameters { Value = value }); } ///The IEnumerable<CounterEntity> to call this service for /// public static void SetValue(this IEnumerable target, long value) { target.CallService("set_value", new CounterSetValueParameters { Value = value }); } } public static class FanEntityExtensionMethods { public static void DecreaseSpeed(this FanEntity target, FanDecreaseSpeedParameters data) { target.CallService("decrease_speed", data); } public static void DecreaseSpeed(this IEnumerable target, FanDecreaseSpeedParameters data) { target.CallService("decrease_speed", data); } ///The FanEntity to call this service for /// public static void DecreaseSpeed(this FanEntity target, long? percentageStep = null) { target.CallService("decrease_speed", new FanDecreaseSpeedParameters { PercentageStep = percentageStep }); } ///The IEnumerable<FanEntity> to call this service for /// public static void DecreaseSpeed(this IEnumerable target, long? percentageStep = null) { target.CallService("decrease_speed", new FanDecreaseSpeedParameters { PercentageStep = percentageStep }); } public static void IncreaseSpeed(this FanEntity target, FanIncreaseSpeedParameters data) { target.CallService("increase_speed", data); } public static void IncreaseSpeed(this IEnumerable target, FanIncreaseSpeedParameters data) { target.CallService("increase_speed", data); } ///The FanEntity to call this service for /// public static void IncreaseSpeed(this FanEntity target, long? percentageStep = null) { target.CallService("increase_speed", new FanIncreaseSpeedParameters { PercentageStep = percentageStep }); } ///The IEnumerable<FanEntity> to call this service for /// public static void IncreaseSpeed(this IEnumerable target, long? percentageStep = null) { target.CallService("increase_speed", new FanIncreaseSpeedParameters { PercentageStep = percentageStep }); } public static void Oscillate(this FanEntity target, FanOscillateParameters data) { target.CallService("oscillate", data); } public static void Oscillate(this IEnumerable target, FanOscillateParameters data) { target.CallService("oscillate", data); } ///The FanEntity to call this service for /// public static void Oscillate(this FanEntity target, bool oscillating) { target.CallService("oscillate", new FanOscillateParameters { Oscillating = oscillating }); } ///The IEnumerable<FanEntity> to call this service for /// public static void Oscillate(this IEnumerable target, bool oscillating) { target.CallService("oscillate", new FanOscillateParameters { Oscillating = oscillating }); } public static void SetDirection(this FanEntity target, FanSetDirectionParameters data) { target.CallService("set_direction", data); } public static void SetDirection(this IEnumerable target, FanSetDirectionParameters data) { target.CallService("set_direction", data); } ///The FanEntity to call this service for /// public static void SetDirection(this FanEntity target, object direction) { target.CallService("set_direction", new FanSetDirectionParameters { Direction = direction }); } ///The IEnumerable<FanEntity> to call this service for /// public static void SetDirection(this IEnumerable target, object direction) { target.CallService("set_direction", new FanSetDirectionParameters { Direction = direction }); } public static void SetPercentage(this FanEntity target, FanSetPercentageParameters data) { target.CallService("set_percentage", data); } public static void SetPercentage(this IEnumerable target, FanSetPercentageParameters data) { target.CallService("set_percentage", data); } ///The FanEntity to call this service for /// public static void SetPercentage(this FanEntity target, long percentage) { target.CallService("set_percentage", new FanSetPercentageParameters { Percentage = percentage }); } ///The IEnumerable<FanEntity> to call this service for /// public static void SetPercentage(this IEnumerable target, long percentage) { target.CallService("set_percentage", new FanSetPercentageParameters { Percentage = percentage }); } public static void SetPresetMode(this FanEntity target, FanSetPresetModeParameters data) { target.CallService("set_preset_mode", data); } public static void SetPresetMode(this IEnumerable target, FanSetPresetModeParameters data) { target.CallService("set_preset_mode", data); } ///The FanEntity to call this service for /// eg: auto public static void SetPresetMode(this FanEntity target, string presetMode) { target.CallService("set_preset_mode", new FanSetPresetModeParameters { PresetMode = presetMode }); } ///The IEnumerable<FanEntity> to call this service for /// eg: auto public static void SetPresetMode(this IEnumerable target, string presetMode) { target.CallService("set_preset_mode", new FanSetPresetModeParameters { PresetMode = presetMode }); } public static void Toggle(this FanEntity target, object? data = null) { target.CallService("toggle", data); } public static void Toggle(this IEnumerable target, object? data = null) { target.CallService("toggle", data); } public static void TurnOff(this FanEntity target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOff(this IEnumerable target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOn(this FanEntity target, FanTurnOnParameters data) { target.CallService("turn_on", data); } public static void TurnOn(this IEnumerable target, FanTurnOnParameters data) { target.CallService("turn_on", data); } ///The FanEntity to call this service for /// /// eg: auto public static void TurnOn(this FanEntity target, long? percentage = null, string? presetMode = null) { target.CallService("turn_on", new FanTurnOnParameters { Percentage = percentage, PresetMode = presetMode }); } ///The IEnumerable<FanEntity> to call this service for /// /// eg: auto public static void TurnOn(this IEnumerable target, long? percentage = null, string? presetMode = null) { target.CallService("turn_on", new FanTurnOnParameters { Percentage = percentage, PresetMode = presetMode }); } } public static class HumidifierEntityExtensionMethods { public static void SetHumidity(this HumidifierEntity target, HumidifierSetHumidityParameters data) { target.CallService("set_humidity", data); } public static void SetHumidity(this IEnumerable target, HumidifierSetHumidityParameters data) { target.CallService("set_humidity", data); } ///The HumidifierEntity to call this service for /// public static void SetHumidity(this HumidifierEntity target, long humidity) { target.CallService("set_humidity", new HumidifierSetHumidityParameters { Humidity = humidity }); } ///The IEnumerable<HumidifierEntity> to call this service for /// public static void SetHumidity(this IEnumerable target, long humidity) { target.CallService("set_humidity", new HumidifierSetHumidityParameters { Humidity = humidity }); } public static void SetMode(this HumidifierEntity target, HumidifierSetModeParameters data) { target.CallService("set_mode", data); } public static void SetMode(this IEnumerable target, HumidifierSetModeParameters data) { target.CallService("set_mode", data); } ///The HumidifierEntity to call this service for /// eg: away public static void SetMode(this HumidifierEntity target, string mode) { target.CallService("set_mode", new HumidifierSetModeParameters { Mode = mode }); } ///The IEnumerable<HumidifierEntity> to call this service for /// eg: away public static void SetMode(this IEnumerable target, string mode) { target.CallService("set_mode", new HumidifierSetModeParameters { Mode = mode }); } public static void Toggle(this HumidifierEntity target, object? data = null) { target.CallService("toggle", data); } public static void Toggle(this IEnumerable target, object? data = null) { target.CallService("toggle", data); } public static void TurnOff(this HumidifierEntity target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOff(this IEnumerable target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOn(this HumidifierEntity target, object? data = null) { target.CallService("turn_on", data); } public static void TurnOn(this IEnumerable target, object? data = null) { target.CallService("turn_on", data); } } public static class InputBooleanEntityExtensionMethods { public static void Toggle(this IInputBooleanEntityCore target, object? data = null) { target.CallService("toggle", data); } public static void Toggle(this IEnumerable target, object? data = null) { target.CallService("toggle", data); } public static void TurnOff(this IInputBooleanEntityCore target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOff(this IEnumerable target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOn(this IInputBooleanEntityCore target, object? data = null) { target.CallService("turn_on", data); } public static void TurnOn(this IEnumerable target, object? data = null) { target.CallService("turn_on", data); } } public static class InputDatetimeEntityExtensionMethods { public static void SetDatetime(this IInputDatetimeEntityCore target, InputDatetimeSetDatetimeParameters data) { target.CallService("set_datetime", data); } public static void SetDatetime(this IEnumerable target, InputDatetimeSetDatetimeParameters data) { target.CallService("set_datetime", data); } ///The IInputDatetimeEntityCore to call this service for /// eg: "2019-04-20" /// eg: "05:04:20" /// eg: "2019-04-20 05:04:20" /// public static void SetDatetime(this IInputDatetimeEntityCore target, string? date = null, TimeOnly? time = null, string? datetime = null, long? timestamp = null) { target.CallService("set_datetime", new InputDatetimeSetDatetimeParameters { Date = date, Time = time, Datetime = datetime, Timestamp = timestamp }); } ///The IEnumerable<IInputDatetimeEntityCore> to call this service for /// eg: "2019-04-20" /// eg: "05:04:20" /// eg: "2019-04-20 05:04:20" /// public static void SetDatetime(this IEnumerable target, string? date = null, TimeOnly? time = null, string? datetime = null, long? timestamp = null) { target.CallService("set_datetime", new InputDatetimeSetDatetimeParameters { Date = date, Time = time, Datetime = datetime, Timestamp = timestamp }); } } public static class InputNumberEntityExtensionMethods { ///Decrease an input number entity value by a certain amount. public static void Decrement(this IInputNumberEntityCore target, InputNumberDecrementParameters data) { target.CallService("decrement", data); } ///Decrease an input number entity value by a certain amount. public static void Decrement(this IEnumerable target, InputNumberDecrementParameters data) { target.CallService("decrement", data); } ///Decrease an input number entity value by a certain amount. ///The IInputNumberEntityCore to call this service for ///The amount to decrease the input number with. If not provided, the step of the number entity will be used. public static void Decrement(this IInputNumberEntityCore target, long? amount = null) { target.CallService("decrement", new InputNumberDecrementParameters { Amount = amount }); } ///Decrease an input number entity value by a certain amount. ///The IEnumerable<IInputNumberEntityCore> to call this service for ///The amount to decrease the input number with. If not provided, the step of the number entity will be used. public static void Decrement(this IEnumerable target, long? amount = null) { target.CallService("decrement", new InputNumberDecrementParameters { Amount = amount }); } ///Increase an input number entity value by a certain amount. public static void Increment(this IInputNumberEntityCore target, InputNumberIncrementParameters data) { target.CallService("increment", data); } ///Increase an input number entity value by a certain amount. public static void Increment(this IEnumerable target, InputNumberIncrementParameters data) { target.CallService("increment", data); } ///Increase an input number entity value by a certain amount. ///The IInputNumberEntityCore to call this service for ///The amount to increase the input number with. If not provided, the step of the number entity will be used. public static void Increment(this IInputNumberEntityCore target, long? amount = null) { target.CallService("increment", new InputNumberIncrementParameters { Amount = amount }); } ///Increase an input number entity value by a certain amount. ///The IEnumerable<IInputNumberEntityCore> to call this service for ///The amount to increase the input number with. If not provided, the step of the number entity will be used. public static void Increment(this IEnumerable target, long? amount = null) { target.CallService("increment", new InputNumberIncrementParameters { Amount = amount }); } ///Set an input number entity to its maximum value. public static void Max(this IInputNumberEntityCore target, object? data = null) { target.CallService("max", data); } ///Set an input number entity to its maximum value. public static void Max(this IEnumerable target, object? data = null) { target.CallService("max", data); } ///Set an input number entity to its minimum value. public static void Min(this IInputNumberEntityCore target, object? data = null) { target.CallService("min", data); } ///Set an input number entity to its minimum value. public static void Min(this IEnumerable target, object? data = null) { target.CallService("min", data); } public static void SetValue(this IInputNumberEntityCore target, InputNumberSetValueParameters data) { target.CallService("set_value", data); } public static void SetValue(this IEnumerable target, InputNumberSetValueParameters data) { target.CallService("set_value", data); } ///The IInputNumberEntityCore to call this service for /// public static void SetValue(this IInputNumberEntityCore target, double value) { target.CallService("set_value", new InputNumberSetValueParameters { Value = value }); } ///The IEnumerable<IInputNumberEntityCore> to call this service for /// public static void SetValue(this IEnumerable target, double value) { target.CallService("set_value", new InputNumberSetValueParameters { Value = value }); } } public static class LightEntityExtensionMethods { public static void Toggle(this ILightEntityCore target, LightToggleParameters data) { target.CallService("toggle", data); } public static void Toggle(this IEnumerable target, LightToggleParameters data) { target.CallService("toggle", data); } ///The ILightEntityCore to call this service for /// /// eg: [255, 100, 100] /// /// /// /// eg: [255, 100, 100, 50] /// eg: [255, 100, 100, 50, 70] /// /// eg: [300, 70] /// eg: [0.52, 0.43] /// /// /// /// eg: relax /// public static void Toggle(this ILightEntityCore target, long? transition = null, IReadOnlyCollection? rgbColor = null, object? colorTempKelvin = null, long? brightnessPct = null, string? effect = null, object? rgbwColor = null, object? rgbwwColor = null, object? colorName = null, object? hsColor = null, object? xyColor = null, object? colorTemp = null, long? brightness = null, object? white = null, string? profile = null, object? flash = null) { target.CallService("toggle", new LightToggleParameters { Transition = transition, RgbColor = rgbColor, ColorTempKelvin = colorTempKelvin, BrightnessPct = brightnessPct, Effect = effect, RgbwColor = rgbwColor, RgbwwColor = rgbwwColor, ColorName = colorName, HsColor = hsColor, XyColor = xyColor, ColorTemp = colorTemp, Brightness = brightness, White = white, Profile = profile, Flash = flash }); } ///The IEnumerable<ILightEntityCore> to call this service for /// /// eg: [255, 100, 100] /// /// /// /// eg: [255, 100, 100, 50] /// eg: [255, 100, 100, 50, 70] /// /// eg: [300, 70] /// eg: [0.52, 0.43] /// /// /// /// eg: relax /// public static void Toggle(this IEnumerable target, long? transition = null, IReadOnlyCollection? rgbColor = null, object? colorTempKelvin = null, long? brightnessPct = null, string? effect = null, object? rgbwColor = null, object? rgbwwColor = null, object? colorName = null, object? hsColor = null, object? xyColor = null, object? colorTemp = null, long? brightness = null, object? white = null, string? profile = null, object? flash = null) { target.CallService("toggle", new LightToggleParameters { Transition = transition, RgbColor = rgbColor, ColorTempKelvin = colorTempKelvin, BrightnessPct = brightnessPct, Effect = effect, RgbwColor = rgbwColor, RgbwwColor = rgbwwColor, ColorName = colorName, HsColor = hsColor, XyColor = xyColor, ColorTemp = colorTemp, Brightness = brightness, White = white, Profile = profile, Flash = flash }); } public static void TurnOff(this ILightEntityCore target, LightTurnOffParameters data) { target.CallService("turn_off", data); } public static void TurnOff(this IEnumerable target, LightTurnOffParameters data) { target.CallService("turn_off", data); } ///The ILightEntityCore to call this service for /// /// public static void TurnOff(this ILightEntityCore target, long? transition = null, object? flash = null) { target.CallService("turn_off", new LightTurnOffParameters { Transition = transition, Flash = flash }); } ///The IEnumerable<ILightEntityCore> to call this service for /// /// public static void TurnOff(this IEnumerable target, long? transition = null, object? flash = null) { target.CallService("turn_off", new LightTurnOffParameters { Transition = transition, Flash = flash }); } public static void TurnOn(this ILightEntityCore target, LightTurnOnParameters data) { target.CallService("turn_on", data); } public static void TurnOn(this IEnumerable target, LightTurnOnParameters data) { target.CallService("turn_on", data); } ///The ILightEntityCore to call this service for /// /// eg: [255, 100, 100] /// /// /// /// /// eg: [255, 100, 100, 50] /// eg: [255, 100, 100, 50, 70] /// /// eg: [300, 70] /// eg: [0.52, 0.43] /// /// /// /// /// eg: relax /// public static void TurnOn(this ILightEntityCore target, long? transition = null, IReadOnlyCollection? rgbColor = null, object? colorTempKelvin = null, long? brightnessPct = null, long? brightnessStepPct = null, string? effect = null, object? rgbwColor = null, object? rgbwwColor = null, object? colorName = null, object? hsColor = null, object? xyColor = null, object? colorTemp = null, long? brightness = null, long? brightnessStep = null, object? white = null, string? profile = null, object? flash = null) { target.CallService("turn_on", new LightTurnOnParameters { Transition = transition, RgbColor = rgbColor, ColorTempKelvin = colorTempKelvin, BrightnessPct = brightnessPct, BrightnessStepPct = brightnessStepPct, Effect = effect, RgbwColor = rgbwColor, RgbwwColor = rgbwwColor, ColorName = colorName, HsColor = hsColor, XyColor = xyColor, ColorTemp = colorTemp, Brightness = brightness, BrightnessStep = brightnessStep, White = white, Profile = profile, Flash = flash }); } ///The IEnumerable<ILightEntityCore> to call this service for /// /// eg: [255, 100, 100] /// /// /// /// /// eg: [255, 100, 100, 50] /// eg: [255, 100, 100, 50, 70] /// /// eg: [300, 70] /// eg: [0.52, 0.43] /// /// /// /// /// eg: relax /// public static void TurnOn(this IEnumerable target, long? transition = null, IReadOnlyCollection? rgbColor = null, object? colorTempKelvin = null, long? brightnessPct = null, long? brightnessStepPct = null, string? effect = null, object? rgbwColor = null, object? rgbwwColor = null, object? colorName = null, object? hsColor = null, object? xyColor = null, object? colorTemp = null, long? brightness = null, long? brightnessStep = null, object? white = null, string? profile = null, object? flash = null) { target.CallService("turn_on", new LightTurnOnParameters { Transition = transition, RgbColor = rgbColor, ColorTempKelvin = colorTempKelvin, BrightnessPct = brightnessPct, BrightnessStepPct = brightnessStepPct, Effect = effect, RgbwColor = rgbwColor, RgbwwColor = rgbwwColor, ColorName = colorName, HsColor = hsColor, XyColor = xyColor, ColorTemp = colorTemp, Brightness = brightness, BrightnessStep = brightnessStep, White = white, Profile = profile, Flash = flash }); } } public static class MediaPlayerEntityExtensionMethods { public static Task BrowseMediaAsync(this IMediaPlayerEntityCore target, MediaPlayerBrowseMediaParameters data) { return target.CallServiceWithResponseAsync("browse_media", data); } ///The IMediaPlayerEntityCore to call this service for /// eg: music /// eg: A:ALBUMARTIST/Beatles public static Task BrowseMediaAsync(this IMediaPlayerEntityCore target, string? mediaContentType = null, string? mediaContentId = null) { return target.CallServiceWithResponseAsync("browse_media", new MediaPlayerBrowseMediaParameters { MediaContentType = mediaContentType, MediaContentId = mediaContentId }); } public static void BrowseMedia(this IMediaPlayerEntityCore target, MediaPlayerBrowseMediaParameters data) { target.CallService("browse_media", data); } public static void BrowseMedia(this IEnumerable target, MediaPlayerBrowseMediaParameters data) { target.CallService("browse_media", data); } ///The IMediaPlayerEntityCore to call this service for /// eg: music /// eg: A:ALBUMARTIST/Beatles public static void BrowseMedia(this IMediaPlayerEntityCore target, string? mediaContentType = null, string? mediaContentId = null) { target.CallService("browse_media", new MediaPlayerBrowseMediaParameters { MediaContentType = mediaContentType, MediaContentId = mediaContentId }); } ///The IEnumerable<IMediaPlayerEntityCore> to call this service for /// eg: music /// eg: A:ALBUMARTIST/Beatles public static void BrowseMedia(this IEnumerable target, string? mediaContentType = null, string? mediaContentId = null) { target.CallService("browse_media", new MediaPlayerBrowseMediaParameters { MediaContentType = mediaContentType, MediaContentId = mediaContentId }); } public static void ClearPlaylist(this IMediaPlayerEntityCore target, object? data = null) { target.CallService("clear_playlist", data); } public static void ClearPlaylist(this IEnumerable target, object? data = null) { target.CallService("clear_playlist", data); } public static void Join(this IMediaPlayerEntityCore target, MediaPlayerJoinParameters data) { target.CallService("join", data); } public static void Join(this IEnumerable target, MediaPlayerJoinParameters data) { target.CallService("join", data); } ///The IMediaPlayerEntityCore to call this service for /// eg: - media_player.multiroom_player2 - media_player.multiroom_player3 public static void Join(this IMediaPlayerEntityCore target, IEnumerable groupMembers) { target.CallService("join", new MediaPlayerJoinParameters { GroupMembers = groupMembers }); } ///The IEnumerable<IMediaPlayerEntityCore> to call this service for /// eg: - media_player.multiroom_player2 - media_player.multiroom_player3 public static void Join(this IEnumerable target, IEnumerable groupMembers) { target.CallService("join", new MediaPlayerJoinParameters { GroupMembers = groupMembers }); } public static void MediaNextTrack(this IMediaPlayerEntityCore target, object? data = null) { target.CallService("media_next_track", data); } public static void MediaNextTrack(this IEnumerable target, object? data = null) { target.CallService("media_next_track", data); } public static void MediaPause(this IMediaPlayerEntityCore target, object? data = null) { target.CallService("media_pause", data); } public static void MediaPause(this IEnumerable target, object? data = null) { target.CallService("media_pause", data); } public static void MediaPlay(this IMediaPlayerEntityCore target, object? data = null) { target.CallService("media_play", data); } public static void MediaPlay(this IEnumerable target, object? data = null) { target.CallService("media_play", data); } public static void MediaPlayPause(this IMediaPlayerEntityCore target, object? data = null) { target.CallService("media_play_pause", data); } public static void MediaPlayPause(this IEnumerable target, object? data = null) { target.CallService("media_play_pause", data); } public static void MediaPreviousTrack(this IMediaPlayerEntityCore target, object? data = null) { target.CallService("media_previous_track", data); } public static void MediaPreviousTrack(this IEnumerable target, object? data = null) { target.CallService("media_previous_track", data); } public static void MediaSeek(this IMediaPlayerEntityCore target, MediaPlayerMediaSeekParameters data) { target.CallService("media_seek", data); } public static void MediaSeek(this IEnumerable target, MediaPlayerMediaSeekParameters data) { target.CallService("media_seek", data); } ///The IMediaPlayerEntityCore to call this service for /// public static void MediaSeek(this IMediaPlayerEntityCore target, double seekPosition) { target.CallService("media_seek", new MediaPlayerMediaSeekParameters { SeekPosition = seekPosition }); } ///The IEnumerable<IMediaPlayerEntityCore> to call this service for /// public static void MediaSeek(this IEnumerable target, double seekPosition) { target.CallService("media_seek", new MediaPlayerMediaSeekParameters { SeekPosition = seekPosition }); } public static void MediaStop(this IMediaPlayerEntityCore target, object? data = null) { target.CallService("media_stop", data); } public static void MediaStop(this IEnumerable target, object? data = null) { target.CallService("media_stop", data); } public static void PlayMedia(this IMediaPlayerEntityCore target, MediaPlayerPlayMediaParameters data) { target.CallService("play_media", data); } public static void PlayMedia(this IEnumerable target, MediaPlayerPlayMediaParameters data) { target.CallService("play_media", data); } ///The IMediaPlayerEntityCore to call this service for /// eg: {"media_content_id": "https://home-assistant.io/images/cast/splash.png", "media_content_type": "music"} /// /// eg: true public static void PlayMedia(this IMediaPlayerEntityCore target, object media, object? enqueue = null, bool? announce = null) { target.CallService("play_media", new MediaPlayerPlayMediaParameters { Media = media, Enqueue = enqueue, Announce = announce }); } ///The IEnumerable<IMediaPlayerEntityCore> to call this service for /// eg: {"media_content_id": "https://home-assistant.io/images/cast/splash.png", "media_content_type": "music"} /// /// eg: true public static void PlayMedia(this IEnumerable target, object media, object? enqueue = null, bool? announce = null) { target.CallService("play_media", new MediaPlayerPlayMediaParameters { Media = media, Enqueue = enqueue, Announce = announce }); } public static void RepeatSet(this IMediaPlayerEntityCore target, MediaPlayerRepeatSetParameters data) { target.CallService("repeat_set", data); } public static void RepeatSet(this IEnumerable target, MediaPlayerRepeatSetParameters data) { target.CallService("repeat_set", data); } ///The IMediaPlayerEntityCore to call this service for /// public static void RepeatSet(this IMediaPlayerEntityCore target, object repeat) { target.CallService("repeat_set", new MediaPlayerRepeatSetParameters { Repeat = repeat }); } ///The IEnumerable<IMediaPlayerEntityCore> to call this service for /// public static void RepeatSet(this IEnumerable target, object repeat) { target.CallService("repeat_set", new MediaPlayerRepeatSetParameters { Repeat = repeat }); } public static Task SearchMediaAsync(this IMediaPlayerEntityCore target, MediaPlayerSearchMediaParameters data) { return target.CallServiceWithResponseAsync("search_media", data); } ///The IMediaPlayerEntityCore to call this service for /// eg: Beatles /// eg: music /// eg: A:ALBUMARTIST/Beatles /// eg: ["album","artist"] public static Task SearchMediaAsync(this IMediaPlayerEntityCore target, string searchQuery, string? mediaContentType = null, string? mediaContentId = null, IEnumerable? mediaFilterClasses = null) { return target.CallServiceWithResponseAsync("search_media", new MediaPlayerSearchMediaParameters { SearchQuery = searchQuery, MediaContentType = mediaContentType, MediaContentId = mediaContentId, MediaFilterClasses = mediaFilterClasses }); } public static void SearchMedia(this IMediaPlayerEntityCore target, MediaPlayerSearchMediaParameters data) { target.CallService("search_media", data); } public static void SearchMedia(this IEnumerable target, MediaPlayerSearchMediaParameters data) { target.CallService("search_media", data); } ///The IMediaPlayerEntityCore to call this service for /// eg: Beatles /// eg: music /// eg: A:ALBUMARTIST/Beatles /// eg: ["album","artist"] public static void SearchMedia(this IMediaPlayerEntityCore target, string searchQuery, string? mediaContentType = null, string? mediaContentId = null, IEnumerable? mediaFilterClasses = null) { target.CallService("search_media", new MediaPlayerSearchMediaParameters { SearchQuery = searchQuery, MediaContentType = mediaContentType, MediaContentId = mediaContentId, MediaFilterClasses = mediaFilterClasses }); } ///The IEnumerable<IMediaPlayerEntityCore> to call this service for /// eg: Beatles /// eg: music /// eg: A:ALBUMARTIST/Beatles /// eg: ["album","artist"] public static void SearchMedia(this IEnumerable target, string searchQuery, string? mediaContentType = null, string? mediaContentId = null, IEnumerable? mediaFilterClasses = null) { target.CallService("search_media", new MediaPlayerSearchMediaParameters { SearchQuery = searchQuery, MediaContentType = mediaContentType, MediaContentId = mediaContentId, MediaFilterClasses = mediaFilterClasses }); } public static void SelectSoundMode(this IMediaPlayerEntityCore target, MediaPlayerSelectSoundModeParameters data) { target.CallService("select_sound_mode", data); } public static void SelectSoundMode(this IEnumerable target, MediaPlayerSelectSoundModeParameters data) { target.CallService("select_sound_mode", data); } ///The IMediaPlayerEntityCore to call this service for /// eg: Music public static void SelectSoundMode(this IMediaPlayerEntityCore target, string? soundMode = null) { target.CallService("select_sound_mode", new MediaPlayerSelectSoundModeParameters { SoundMode = soundMode }); } ///The IEnumerable<IMediaPlayerEntityCore> to call this service for /// eg: Music public static void SelectSoundMode(this IEnumerable target, string? soundMode = null) { target.CallService("select_sound_mode", new MediaPlayerSelectSoundModeParameters { SoundMode = soundMode }); } public static void SelectSource(this IMediaPlayerEntityCore target, MediaPlayerSelectSourceParameters data) { target.CallService("select_source", data); } public static void SelectSource(this IEnumerable target, MediaPlayerSelectSourceParameters data) { target.CallService("select_source", data); } ///The IMediaPlayerEntityCore to call this service for /// eg: video1 public static void SelectSource(this IMediaPlayerEntityCore target, string source) { target.CallService("select_source", new MediaPlayerSelectSourceParameters { Source = source }); } ///The IEnumerable<IMediaPlayerEntityCore> to call this service for /// eg: video1 public static void SelectSource(this IEnumerable target, string source) { target.CallService("select_source", new MediaPlayerSelectSourceParameters { Source = source }); } public static void ShuffleSet(this IMediaPlayerEntityCore target, MediaPlayerShuffleSetParameters data) { target.CallService("shuffle_set", data); } public static void ShuffleSet(this IEnumerable target, MediaPlayerShuffleSetParameters data) { target.CallService("shuffle_set", data); } ///The IMediaPlayerEntityCore to call this service for /// public static void ShuffleSet(this IMediaPlayerEntityCore target, bool shuffle) { target.CallService("shuffle_set", new MediaPlayerShuffleSetParameters { Shuffle = shuffle }); } ///The IEnumerable<IMediaPlayerEntityCore> to call this service for /// public static void ShuffleSet(this IEnumerable target, bool shuffle) { target.CallService("shuffle_set", new MediaPlayerShuffleSetParameters { Shuffle = shuffle }); } public static void Toggle(this IMediaPlayerEntityCore target, object? data = null) { target.CallService("toggle", data); } public static void Toggle(this IEnumerable target, object? data = null) { target.CallService("toggle", data); } public static void TurnOff(this IMediaPlayerEntityCore target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOff(this IEnumerable target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOn(this IMediaPlayerEntityCore target, object? data = null) { target.CallService("turn_on", data); } public static void TurnOn(this IEnumerable target, object? data = null) { target.CallService("turn_on", data); } public static void Unjoin(this IMediaPlayerEntityCore target, object? data = null) { target.CallService("unjoin", data); } public static void Unjoin(this IEnumerable target, object? data = null) { target.CallService("unjoin", data); } public static void VolumeDown(this IMediaPlayerEntityCore target, object? data = null) { target.CallService("volume_down", data); } public static void VolumeDown(this IEnumerable target, object? data = null) { target.CallService("volume_down", data); } public static void VolumeMute(this IMediaPlayerEntityCore target, MediaPlayerVolumeMuteParameters data) { target.CallService("volume_mute", data); } public static void VolumeMute(this IEnumerable target, MediaPlayerVolumeMuteParameters data) { target.CallService("volume_mute", data); } ///The IMediaPlayerEntityCore to call this service for /// public static void VolumeMute(this IMediaPlayerEntityCore target, bool isVolumeMuted) { target.CallService("volume_mute", new MediaPlayerVolumeMuteParameters { IsVolumeMuted = isVolumeMuted }); } ///The IEnumerable<IMediaPlayerEntityCore> to call this service for /// public static void VolumeMute(this IEnumerable target, bool isVolumeMuted) { target.CallService("volume_mute", new MediaPlayerVolumeMuteParameters { IsVolumeMuted = isVolumeMuted }); } public static void VolumeSet(this IMediaPlayerEntityCore target, MediaPlayerVolumeSetParameters data) { target.CallService("volume_set", data); } public static void VolumeSet(this IEnumerable target, MediaPlayerVolumeSetParameters data) { target.CallService("volume_set", data); } ///The IMediaPlayerEntityCore to call this service for /// public static void VolumeSet(this IMediaPlayerEntityCore target, double volumeLevel) { target.CallService("volume_set", new MediaPlayerVolumeSetParameters { VolumeLevel = volumeLevel }); } ///The IEnumerable<IMediaPlayerEntityCore> to call this service for /// public static void VolumeSet(this IEnumerable target, double volumeLevel) { target.CallService("volume_set", new MediaPlayerVolumeSetParameters { VolumeLevel = volumeLevel }); } public static void VolumeUp(this IMediaPlayerEntityCore target, object? data = null) { target.CallService("volume_up", data); } public static void VolumeUp(this IEnumerable target, object? data = null) { target.CallService("volume_up", data); } } public static class NumberEntityExtensionMethods { ///Decrease a number entity value by a certain amount. public static void Decrement(this INumberEntityCore target, NumberDecrementParameters data) { target.CallService("decrement", data); } ///Decrease a number entity value by a certain amount. public static void Decrement(this IEnumerable target, NumberDecrementParameters data) { target.CallService("decrement", data); } ///Decrease a number entity value by a certain amount. ///The INumberEntityCore to call this service for ///The amount to decrease the number with. If not provided, the step of the number entity will be used. public static void Decrement(this INumberEntityCore target, long? amount = null) { target.CallService("decrement", new NumberDecrementParameters { Amount = amount }); } ///Decrease a number entity value by a certain amount. ///The IEnumerable<INumberEntityCore> to call this service for ///The amount to decrease the number with. If not provided, the step of the number entity will be used. public static void Decrement(this IEnumerable target, long? amount = null) { target.CallService("decrement", new NumberDecrementParameters { Amount = amount }); } ///Increase a number entity value by a certain amount. public static void Increment(this INumberEntityCore target, NumberIncrementParameters data) { target.CallService("increment", data); } ///Increase a number entity value by a certain amount. public static void Increment(this IEnumerable target, NumberIncrementParameters data) { target.CallService("increment", data); } ///Increase a number entity value by a certain amount. ///The INumberEntityCore to call this service for ///The amount to increase the number with. If not provided, the step of the number entity will be used. public static void Increment(this INumberEntityCore target, long? amount = null) { target.CallService("increment", new NumberIncrementParameters { Amount = amount }); } ///Increase a number entity value by a certain amount. ///The IEnumerable<INumberEntityCore> to call this service for ///The amount to increase the number with. If not provided, the step of the number entity will be used. public static void Increment(this IEnumerable target, long? amount = null) { target.CallService("increment", new NumberIncrementParameters { Amount = amount }); } ///Set a number entity to its maximum value. public static void Max(this INumberEntityCore target, object? data = null) { target.CallService("max", data); } ///Set a number entity to its maximum value. public static void Max(this IEnumerable target, object? data = null) { target.CallService("max", data); } ///Set a number entity to its minimum value. public static void Min(this INumberEntityCore target, object? data = null) { target.CallService("min", data); } ///Set a number entity to its minimum value. public static void Min(this IEnumerable target, object? data = null) { target.CallService("min", data); } public static void SetValue(this INumberEntityCore target, NumberSetValueParameters data) { target.CallService("set_value", data); } public static void SetValue(this IEnumerable target, NumberSetValueParameters data) { target.CallService("set_value", data); } ///The INumberEntityCore to call this service for /// eg: 42 public static void SetValue(this INumberEntityCore target, string value) { target.CallService("set_value", new NumberSetValueParameters { Value = value }); } ///The IEnumerable<INumberEntityCore> to call this service for /// eg: 42 public static void SetValue(this IEnumerable target, string value) { target.CallService("set_value", new NumberSetValueParameters { Value = value }); } } public static class RemoteEntityExtensionMethods { public static void DeleteCommand(this IRemoteEntityCore target, RemoteDeleteCommandParameters data) { target.CallService("delete_command", data); } public static void DeleteCommand(this IEnumerable target, RemoteDeleteCommandParameters data) { target.CallService("delete_command", data); } ///The IRemoteEntityCore to call this service for /// eg: television /// eg: Mute public static void DeleteCommand(this IRemoteEntityCore target, object command, string? device = null) { target.CallService("delete_command", new RemoteDeleteCommandParameters { Device = device, Command = command }); } ///The IEnumerable<IRemoteEntityCore> to call this service for /// eg: television /// eg: Mute public static void DeleteCommand(this IEnumerable target, object command, string? device = null) { target.CallService("delete_command", new RemoteDeleteCommandParameters { Device = device, Command = command }); } public static void LearnCommand(this IRemoteEntityCore target, RemoteLearnCommandParameters data) { target.CallService("learn_command", data); } public static void LearnCommand(this IEnumerable target, RemoteLearnCommandParameters data) { target.CallService("learn_command", data); } ///The IRemoteEntityCore to call this service for /// eg: television /// eg: Turn on /// /// /// public static void LearnCommand(this IRemoteEntityCore target, string? device = null, object? command = null, object? commandType = null, bool? alternative = null, long? timeout = null) { target.CallService("learn_command", new RemoteLearnCommandParameters { Device = device, Command = command, CommandType = commandType, Alternative = alternative, Timeout = timeout }); } ///The IEnumerable<IRemoteEntityCore> to call this service for /// eg: television /// eg: Turn on /// /// /// public static void LearnCommand(this IEnumerable target, string? device = null, object? command = null, object? commandType = null, bool? alternative = null, long? timeout = null) { target.CallService("learn_command", new RemoteLearnCommandParameters { Device = device, Command = command, CommandType = commandType, Alternative = alternative, Timeout = timeout }); } public static void SendCommand(this IRemoteEntityCore target, RemoteSendCommandParameters data) { target.CallService("send_command", data); } public static void SendCommand(this IEnumerable target, RemoteSendCommandParameters data) { target.CallService("send_command", data); } ///The IRemoteEntityCore to call this service for /// eg: 32756745 /// eg: Play /// /// /// public static void SendCommand(this IRemoteEntityCore target, object command, string? device = null, long? numRepeats = null, double? delaySecs = null, double? holdSecs = null) { target.CallService("send_command", new RemoteSendCommandParameters { Device = device, Command = command, NumRepeats = numRepeats, DelaySecs = delaySecs, HoldSecs = holdSecs }); } ///The IEnumerable<IRemoteEntityCore> to call this service for /// eg: 32756745 /// eg: Play /// /// /// public static void SendCommand(this IEnumerable target, object command, string? device = null, long? numRepeats = null, double? delaySecs = null, double? holdSecs = null) { target.CallService("send_command", new RemoteSendCommandParameters { Device = device, Command = command, NumRepeats = numRepeats, DelaySecs = delaySecs, HoldSecs = holdSecs }); } public static void Toggle(this IRemoteEntityCore target, object? data = null) { target.CallService("toggle", data); } public static void Toggle(this IEnumerable target, object? data = null) { target.CallService("toggle", data); } public static void TurnOff(this IRemoteEntityCore target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOff(this IEnumerable target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOn(this IRemoteEntityCore target, RemoteTurnOnParameters data) { target.CallService("turn_on", data); } public static void TurnOn(this IEnumerable target, RemoteTurnOnParameters data) { target.CallService("turn_on", data); } ///The IRemoteEntityCore to call this service for /// eg: BedroomTV public static void TurnOn(this IRemoteEntityCore target, string? activity = null) { target.CallService("turn_on", new RemoteTurnOnParameters { Activity = activity }); } ///The IEnumerable<IRemoteEntityCore> to call this service for /// eg: BedroomTV public static void TurnOn(this IEnumerable target, string? activity = null) { target.CallService("turn_on", new RemoteTurnOnParameters { Activity = activity }); } } public static class ScriptEntityExtensionMethods { public static void Toggle(this IScriptEntityCore target, object? data = null) { target.CallService("toggle", data); } public static void Toggle(this IEnumerable target, object? data = null) { target.CallService("toggle", data); } public static void TurnOff(this IScriptEntityCore target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOff(this IEnumerable target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOn(this IScriptEntityCore target, object? data = null) { target.CallService("turn_on", data); } public static void TurnOn(this IEnumerable target, object? data = null) { target.CallService("turn_on", data); } } public static class SelectEntityExtensionMethods { ///Select an random option for a select entity. public static void Random(this ISelectEntityCore target, SelectRandomParameters data) { target.CallService("random", data); } ///Select an random option for a select entity. public static void Random(this IEnumerable target, SelectRandomParameters data) { target.CallService("random", data); } ///Select an random option for a select entity. ///The ISelectEntityCore to call this service for ///Limits the options to select from. If not provided, all options will be considered. public static void Random(this ISelectEntityCore target, object? options = null) { target.CallService("random", new SelectRandomParameters { Options = options }); } ///Select an random option for a select entity. ///The IEnumerable<ISelectEntityCore> to call this service for ///Limits the options to select from. If not provided, all options will be considered. public static void Random(this IEnumerable target, object? options = null) { target.CallService("random", new SelectRandomParameters { Options = options }); } public static void SelectFirst(this ISelectEntityCore target, object? data = null) { target.CallService("select_first", data); } public static void SelectFirst(this IEnumerable target, object? data = null) { target.CallService("select_first", data); } public static void SelectLast(this ISelectEntityCore target, object? data = null) { target.CallService("select_last", data); } public static void SelectLast(this IEnumerable target, object? data = null) { target.CallService("select_last", data); } public static void SelectNext(this ISelectEntityCore target, SelectSelectNextParameters data) { target.CallService("select_next", data); } public static void SelectNext(this IEnumerable target, SelectSelectNextParameters data) { target.CallService("select_next", data); } ///The ISelectEntityCore to call this service for /// public static void SelectNext(this ISelectEntityCore target, bool? cycle = null) { target.CallService("select_next", new SelectSelectNextParameters { Cycle = cycle }); } ///The IEnumerable<ISelectEntityCore> to call this service for /// public static void SelectNext(this IEnumerable target, bool? cycle = null) { target.CallService("select_next", new SelectSelectNextParameters { Cycle = cycle }); } public static void SelectOption(this ISelectEntityCore target, SelectSelectOptionParameters data) { target.CallService("select_option", data); } public static void SelectOption(this IEnumerable target, SelectSelectOptionParameters data) { target.CallService("select_option", data); } ///The ISelectEntityCore to call this service for /// eg: "Item A" public static void SelectOption(this ISelectEntityCore target, object option) { target.CallService("select_option", new SelectSelectOptionParameters { Option = option }); } ///The IEnumerable<ISelectEntityCore> to call this service for /// eg: "Item A" public static void SelectOption(this IEnumerable target, object option) { target.CallService("select_option", new SelectSelectOptionParameters { Option = option }); } public static void SelectPrevious(this ISelectEntityCore target, SelectSelectPreviousParameters data) { target.CallService("select_previous", data); } public static void SelectPrevious(this IEnumerable target, SelectSelectPreviousParameters data) { target.CallService("select_previous", data); } ///The ISelectEntityCore to call this service for /// public static void SelectPrevious(this ISelectEntityCore target, bool? cycle = null) { target.CallService("select_previous", new SelectSelectPreviousParameters { Cycle = cycle }); } ///The IEnumerable<ISelectEntityCore> to call this service for /// public static void SelectPrevious(this IEnumerable target, bool? cycle = null) { target.CallService("select_previous", new SelectSelectPreviousParameters { Cycle = cycle }); } } public static class SwitchEntityExtensionMethods { public static void Toggle(this ISwitchEntityCore target, object? data = null) { target.CallService("toggle", data); } public static void Toggle(this IEnumerable target, object? data = null) { target.CallService("toggle", data); } public static void TurnOff(this ISwitchEntityCore target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOff(this IEnumerable target, object? data = null) { target.CallService("turn_off", data); } public static void TurnOn(this ISwitchEntityCore target, object? data = null) { target.CallService("turn_on", data); } public static void TurnOn(this IEnumerable target, object? data = null) { target.CallService("turn_on", data); } } public static class TtsEntityExtensionMethods { public static void Speak(this TtsEntity target, TtsSpeakParameters data) { target.CallService("speak", data); } public static void Speak(this IEnumerable target, TtsSpeakParameters data) { target.CallService("speak", data); } ///The TtsEntity to call this service for /// /// eg: My name is hanna /// /// eg: ru /// eg: platform specific public static void Speak(this TtsEntity target, string mediaPlayerEntityId, string message, bool? cache = null, string? language = null, object? options = null) { target.CallService("speak", new TtsSpeakParameters { MediaPlayerEntityId = mediaPlayerEntityId, Message = message, Cache = cache, Language = language, Options = options }); } ///The IEnumerable<TtsEntity> to call this service for /// /// eg: My name is hanna /// /// eg: ru /// eg: platform specific public static void Speak(this IEnumerable target, string mediaPlayerEntityId, string message, bool? cache = null, string? language = null, object? options = null) { target.CallService("speak", new TtsSpeakParameters { MediaPlayerEntityId = mediaPlayerEntityId, Message = message, Cache = cache, Language = language, Options = options }); } } public static class UpdateEntityExtensionMethods { public static void ClearSkipped(this IUpdateEntityCore target, object? data = null) { target.CallService("clear_skipped", data); } public static void ClearSkipped(this IEnumerable target, object? data = null) { target.CallService("clear_skipped", data); } public static void Install(this IUpdateEntityCore target, UpdateInstallParameters data) { target.CallService("install", data); } public static void Install(this IEnumerable target, UpdateInstallParameters data) { target.CallService("install", data); } ///The IUpdateEntityCore to call this service for /// eg: 1.0.0 /// public static void Install(this IUpdateEntityCore target, string? version = null, bool? backup = null) { target.CallService("install", new UpdateInstallParameters { Version = version, Backup = backup }); } ///The IEnumerable<IUpdateEntityCore> to call this service for /// eg: 1.0.0 /// public static void Install(this IEnumerable target, string? version = null, bool? backup = null) { target.CallService("install", new UpdateInstallParameters { Version = version, Backup = backup }); } public static void Skip(this IUpdateEntityCore target, object? data = null) { target.CallService("skip", data); } public static void Skip(this IEnumerable target, object? data = null) { target.CallService("skip", data); } } public static class UtilityMeterEntityExtensionMethods { public static void Calibrate(this ISensorEntityCore target, UtilityMeterCalibrateParameters data) { target.CallService("calibrate", data); } public static void Calibrate(this IEnumerable target, UtilityMeterCalibrateParameters data) { target.CallService("calibrate", data); } ///The ISensorEntityCore to call this service for /// eg: 100 public static void Calibrate(this ISensorEntityCore target, string value) { target.CallService("calibrate", new UtilityMeterCalibrateParameters { Value = value }); } ///The IEnumerable<ISensorEntityCore> to call this service for /// eg: 100 public static void Calibrate(this IEnumerable target, string value) { target.CallService("calibrate", new UtilityMeterCalibrateParameters { Value = value }); } public static void Reset(this ISelectEntityCore target, object? data = null) { target.CallService("reset", data); } public static void Reset(this IEnumerable target, object? data = null) { target.CallService("reset", data); } } public static class WeatherEntityExtensionMethods { public static Task GetForecastsAsync(this IWeatherEntityCore target, WeatherGetForecastsParameters data) { return target.CallServiceWithResponseAsync("get_forecasts", data); } ///The IWeatherEntityCore to call this service for /// public static Task GetForecastsAsync(this IWeatherEntityCore target, object @type) { return target.CallServiceWithResponseAsync("get_forecasts", new WeatherGetForecastsParameters { Type = @type }); } public static void GetForecasts(this IWeatherEntityCore target, WeatherGetForecastsParameters data) { target.CallService("get_forecasts", data); } public static void GetForecasts(this IEnumerable target, WeatherGetForecastsParameters data) { target.CallService("get_forecasts", data); } ///The IWeatherEntityCore to call this service for /// public static void GetForecasts(this IWeatherEntityCore target, object @type) { target.CallService("get_forecasts", new WeatherGetForecastsParameters { Type = @type }); } ///The IEnumerable<IWeatherEntityCore> to call this service for /// public static void GetForecasts(this IEnumerable target, object @type) { target.CallService("get_forecasts", new WeatherGetForecastsParameters { Type = @type }); } }