Skip to content

Commit

Permalink
Removed requirement to set entity id on LightTurnOnModel
Browse files Browse the repository at this point in the history
  • Loading branch information
leosperry committed Oct 27, 2024
1 parent 9a9e8cc commit 30e1af6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/HaKafkaNet/Models/HaApiModels/LightTurnOnModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace HaKafkaNet;
public record LightTurnOnModel
{
[JsonPropertyName("entity_id")]
public required IEnumerable<string> EntityId { get; set; }
public IEnumerable<string> EntityId { get; set; } = Enumerable.Empty<string>();

/// <summary>
/// Number that represents the time (in seconds) the light should take to transition to the new state.
Expand Down
5 changes: 2 additions & 3 deletions src/HaKafkaNet/PublicInterfaces/IAutomationRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ public interface IAutomationRegistry
public interface IRegistrar
{
void Register(params IAutomation[] automations);

void RegisterDelayed(params IDelayableAutomation[] automations);
bool TryRegister(params IAutomationBase[] automations);
bool TryRegister(params Func<IAutomationBase>[] activators);

void Register<Tstate, Tatt>(params IAutomation<Tstate,Tatt>[] automations);

Expand All @@ -26,8 +27,6 @@ void RegisterWithDelayEvaluator<T>(T automation, DelayEvaluator<T> delayEvaluato
void RegisterMultipleWithDelayEvaluator<T>(IEnumerable<T> automations, DelayEvaluator<T> delayEvaluator)
where T : IDelayableAutomation;

bool TryRegister(params IAutomationBase[] automations);
bool TryRegister(params Func<IAutomationBase>[] activators);



Expand Down

0 comments on commit 30e1af6

Please sign in to comment.