• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

net-daemon / netdaemon / 6682312374

29 Oct 2023 08:42AM UTC coverage: 79.419% (-1.3%) from 80.706%
6682312374

Pull #958

github

web-flow
Refactors (#979)

* Primary ctrs and some warnings fixed

* Adding timeout
Pull Request #958: .NET 8 version 4 release

802 of 1143 branches covered (0.0%)

Branch coverage included in aggregate %.

108 of 108 new or added lines in 17 files covered. (100.0%)

2891 of 3507 relevant lines covered (82.44%)

50.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

69.23
/src/HassModel/NetDeamon.HassModel/Entities/NumericEntityState.cs
1
namespace NetDaemon.HassModel.Entities;
2

3
/// <summary>
4
/// State for a Numeric Entity
5
/// </summary>
6
public record NumericEntityState : EntityState
×
7
{
8
    /// <summary>Copy constructor from base class</summary>
9
    public NumericEntityState(EntityState source) : base(source) { }
54✔
10

11
    /// <summary>The state converted to double if possible, null if it is not</summary>
12
    public new double? State => FormatHelpers.ParseAsDouble(base.State);
30✔
13
}
14

15
/// <summary>
16
/// State for a Numeric Entity with specific types of Attributes
17
/// </summary>
18
public record NumericEntityState<TAttributes> : EntityState<TAttributes>
×
19
    where TAttributes : class
20
{
21
    /// <summary>Copy constructor from base class</summary>
22
    public NumericEntityState(EntityState source) : base(source)
57✔
23
    { }
57✔
24

25
    /// <summary>The state converted to double if possible, null if it is not</summary>
26
    public new double? State => FormatHelpers.ParseAsDouble(base.State);
21✔
27
}
28
    
29
/// <summary>
30
/// Represents a state change event for a strong typed entity and state 
31
/// </summary>
32
public record NumericStateChange : StateChange<NumericEntity, NumericEntityState> 
×
33
{
34
    internal NumericStateChange(NumericEntity entity, NumericEntityState? old, NumericEntityState? @new) : base(entity, old, @new)
9✔
35
    { }
9✔
36
}
37
    
38
/// <summary>
39
/// Represents a state change event for a strong typed entity and state 
40
/// </summary>
41
public record NumericStateChange<TEntity, TEntityState> : StateChange<TEntity, TEntityState> 
×
42
    where TEntity : Entity
43
    where TEntityState : EntityState
44
{
45
    internal NumericStateChange(TEntity entity, TEntityState? old, TEntityState? @new) : base(entity, old, @new)
4✔
46
    { }
4✔
47
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc