Skip to content

Commit

Permalink
make generated classes partial
Browse files Browse the repository at this point in the history
  • Loading branch information
helto4real committed Feb 23, 2021
1 parent 5b5c6f0 commit c1cdabe
Show file tree
Hide file tree
Showing 25 changed files with 62 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class AlarmControlPanelEntity : RxEntityBase
public partial class AlarmControlPanelEntity : RxEntityBase
{
/// <inheritdoc />
public AlarmControlPanelEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
Expand All @@ -27,7 +27,7 @@ public void AlarmArmHome(dynamic? data = null)
{
CallService("alarm_control_panel", "alarm_arm_home", data, true);
}

/// <summary>
/// Arms the alarm for away
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class AutomationEntity : RxEntityBase
public partial class AutomationEntity : RxEntityBase
{
/// <inheritdoc />
public AutomationEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds): base(daemon, entityIds)
public AutomationEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
{
}

Expand All @@ -16,7 +16,7 @@ public AutomationEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds):
/// <param name="data">Additional data to pass to the service call.</param>
public void Trigger(dynamic? data = null)
{
CallService("automation", "trigger", data,true);
CallService("automation", "trigger", data, true);

}

Expand All @@ -26,7 +26,7 @@ public void Trigger(dynamic? data = null)
/// <param name="data">Additional data to pass to the service call.</param>
public void Reload(dynamic? data = null)
{
CallService("automation", "reload", data,false);
CallService("automation", "reload", data, false);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class BinarySensorEntity : RxEntityBase
public partial class BinarySensorEntity : RxEntityBase
{
/// <inheritdoc />
public BinarySensorEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds): base(daemon, entityIds)
public BinarySensorEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class CameraEntity : RxEntityBase
public partial class CameraEntity : RxEntityBase
{
/// <inheritdoc />
public CameraEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
Expand Down Expand Up @@ -52,7 +52,7 @@ public void PlayStream(dynamic? data = null)
/// <param name="data">Additional data to pass to the service call.</param>
public void Record(dynamic? data = null)
{
CallService("camera", "record", true);
CallService("camera", "record", data, true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class ClimateEntity : RxEntityBase
public partial class ClimateEntity : RxEntityBase
{
/// <inheritdoc />
public ClimateEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
{
}

/// <summary>
/// Sets Hvac mode for climate entity
/// </summary>
/// <param name="data">Data provided</param>
public void SetHvacMode(dynamic? data = null)
{
CallService("climate", "set_hvac_mode", data, true);
Expand Down Expand Up @@ -42,7 +46,7 @@ public void SetFanMode(dynamic? data = null)

public void SetSwingMode(dynamic? data = null)
{
CallService("climate", "set_swing_mode", true);
CallService("climate", "set_swing_mode", data, true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace NetDaemon.Common.Reactive.Services
/// <summary>
///
/// </summary>
public class CoverEntity : RxEntityBase
public partial class CoverEntity : RxEntityBase
{
/// <inheritdoc />
public CoverEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class DeviceTrackerEntity : RxEntityBase
public partial class DeviceTrackerEntity : RxEntityBase
{
/// <inheritdoc />
public DeviceTrackerEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds): base(daemon, entityIds)
public DeviceTrackerEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
{
}

public void See(dynamic? data = null)
{
CallService("device_tracker", "see", data,false);
CallService("device_tracker", "see", data, false);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class GroupEntity : RxEntityBase
public partial class GroupEntity : RxEntityBase
{
/// <inheritdoc />
public GroupEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class ImageProcessingEntity : RxEntityBase
public partial class ImageProcessingEntity : RxEntityBase
{
/// <inheritdoc />
public ImageProcessingEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds): base(daemon, entityIds)
public ImageProcessingEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
{
}

public void Scan(dynamic? data = null)
{
CallService("image_processing", "scan", data,true);
CallService("image_processing", "scan", data, true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class InputBooleanEntity : RxEntityBase
public partial class InputBooleanEntity : RxEntityBase
{
/// <inheritdoc />
public InputBooleanEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds): base(daemon, entityIds)
public InputBooleanEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
{
}

public void Reload(dynamic? data = null)
{
CallService("input_boolean", "reload", data,false);
CallService("input_boolean", "reload", data, false);
}
}
}
4 changes: 2 additions & 2 deletions src/App/NetDaemon.App/Common/Reactive/Services/LightEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class LightEntity : RxEntityBase
public partial class LightEntity : RxEntityBase
{
/// <inheritdoc />
public LightEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds): base(daemon, entityIds)
public LightEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class LockEntity : RxEntityBase
public partial class LockEntity : RxEntityBase
{
/// <inheritdoc />
public LockEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class MediaPlayerEntity : RxEntityBase
public partial class MediaPlayerEntity : RxEntityBase
{
/// <inheritdoc />
public MediaPlayerEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class PersistentNotificationEntity : RxEntityBase
public partial class PersistentNotificationEntity : RxEntityBase
{
/// <inheritdoc />
public PersistentNotificationEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class PersonEntity : RxEntityBase
public partial class PersonEntity : RxEntityBase
{
/// <inheritdoc />
public PersonEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class SceneEntity : RxEntityBase
public partial class SceneEntity : RxEntityBase
{
/// <inheritdoc />
public SceneEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class ScriptEntity : RxEntityBase
public partial class ScriptEntity : RxEntityBase
{
/// <inheritdoc />
public ScriptEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class SensorEntity : RxEntityBase
public partial class SensorEntity : RxEntityBase
{
/// <inheritdoc />
public SensorEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds): base(daemon, entityIds)
public SensorEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
{
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/App/NetDaemon.App/Common/Reactive/Services/SunEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class SunEntity : RxEntityBase
public partial class SunEntity : RxEntityBase
{
/// <inheritdoc />
public SunEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds): base(daemon, entityIds)
public SunEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class SwitchEntity : RxEntityBase
public partial class SwitchEntity : RxEntityBase
{
/// <inheritdoc />
public SwitchEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds): base(daemon, entityIds)
public SwitchEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
{
}
}
Expand Down
22 changes: 11 additions & 11 deletions src/App/NetDaemon.App/Common/Reactive/Services/VacuumEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,56 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class VacuumEntity : RxEntityBase
public partial class VacuumEntity : RxEntityBase
{
/// <inheritdoc />
public VacuumEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds): base(daemon, entityIds)
public VacuumEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
{
}

public void StartPause(dynamic? data = null)
{
CallService("vacuum", "start_pause", data,true);
CallService("vacuum", "start_pause", data, true);
}

public void Start(dynamic? data = null)
{
CallService("vacuum", "start", data,true);
CallService("vacuum", "start", data, true);
}

public void Pause(dynamic? data = null)
{
CallService("vacuum", "pause", data,true);
CallService("vacuum", "pause", data, true);
}

public void ReturnToBase(dynamic? data = null)
{
CallService("vacuum", "return_to_base", true);
CallService("vacuum", "return_to_base", true);
}

public void CleanSpot(dynamic? data = null)
{
CallService("vacuum", "clean_spot", data,true);
CallService("vacuum", "clean_spot", data, true);
}

public void Locate(dynamic? data = null)
{
CallService("vacuum", "locate", data,true);
CallService("vacuum", "locate", data, true);
}

public void Stop(dynamic? data = null)
{
CallService("vacuum", "stop", data,true);
CallService("vacuum", "stop", data, true);
}

public void SetFanSpeed(dynamic? data = null)
{
CallService("vacuum", "set_fan_speed", data,true);
CallService("vacuum", "set_fan_speed", data, true);
}

public void SendCommand(dynamic? data = null)
{
CallService("vacuum", "send_command", data,true);
CallService("vacuum", "send_command", data, true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class WeatherEntity : RxEntityBase
public partial class WeatherEntity : RxEntityBase
{
/// <inheritdoc />
public WeatherEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds): base(daemon, entityIds)
public WeatherEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace NetDaemon.Common.Reactive.Services
{
/// <inheritdoc />
public class ZoneEntity : RxEntityBase
public partial class ZoneEntity : RxEntityBase
{
/// <inheritdoc />
public ZoneEntity(INetDaemonRxApp daemon, IEnumerable<string> entityIds) : base(daemon, entityIds)
Expand Down
Loading

0 comments on commit c1cdabe

Please sign in to comment.