@@ -38,46 +38,49 @@ export class KnxSyncStateSelectorRow extends LitElement {
38
38
}
39
39
40
40
protected render ( ) : TemplateResult {
41
- return html ` <div class= "inline" >
42
- <ha- selector- select
43
- .hass = ${ this . hass }
44
- .label = ${ "Strategy" }
45
- .selector = ${ {
46
- select : {
47
- multiple : false ,
48
- custom_value : false ,
49
- mode : "dropdown" ,
50
- options : [
51
- { value : true , label : "Default" } ,
52
- ...( this . noneValid ? [ { value : false , label : "Never" } ] : [ ] ) ,
53
- { value : "init" , label : "Once when connection established" } ,
54
- { value : "expire" , label : "Expire after last value update" } ,
55
- { value : "every" , label : "Scheduled every" } ,
56
- ] ,
57
- } ,
58
- } }
59
- .key = ${ "strategy" }
60
- .value = ${ this . _strategy }
61
- @value-changed = ${ this . _handleChange }
62
- >
63
- </ ha- selector- select>
64
- <ha- selector- number
65
- .hass = ${ this . hass }
66
- .disabled = ${ ! this . _hasMinutes ( this . _strategy ) }
67
- .selector = ${ {
68
- number : {
69
- min : 2 ,
70
- max : 1440 ,
71
- step : 1 ,
72
- unit_of_measurement : "minutes" ,
73
- } ,
74
- } }
75
- .key = ${ "minutes" }
76
- .value = ${ this . _minutes }
77
- @value-changed = ${ this . _handleChange }
78
- >
79
- </ ha- selector- number>
80
- </ div> ` ;
41
+ return html ` <p class= "description" >
42
+ Actively request state updates from KNX bus for state addresses .
43
+ </ p>
44
+ <div class= "inline" >
45
+ <ha- selector- select
46
+ .hass = ${ this . hass }
47
+ .label = ${ "Strategy" }
48
+ .selector = ${ {
49
+ select : {
50
+ multiple : false ,
51
+ custom_value : false ,
52
+ mode : "dropdown" ,
53
+ options : [
54
+ { value : true , label : "Default" } ,
55
+ ...( this . noneValid ? [ { value : false , label : "Never" } ] : [ ] ) ,
56
+ { value : "init" , label : "Once when connection established" } ,
57
+ { value : "expire" , label : "Expire after last value update" } ,
58
+ { value : "every" , label : "Scheduled every" } ,
59
+ ] ,
60
+ } ,
61
+ } }
62
+ .key = ${ "strategy" }
63
+ .value = ${ this . _strategy }
64
+ @value-changed = ${ this . _handleChange }
65
+ >
66
+ </ ha- selector- select>
67
+ <ha- selector- number
68
+ .hass = ${ this . hass }
69
+ .disabled = ${ ! this . _hasMinutes ( this . _strategy ) }
70
+ .selector = ${ {
71
+ number : {
72
+ min : 2 ,
73
+ max : 1440 ,
74
+ step : 1 ,
75
+ unit_of_measurement : "minutes" ,
76
+ } ,
77
+ } }
78
+ .key = ${ "minutes" }
79
+ .value = ${ this . _minutes }
80
+ @value-changed = ${ this . _handleChange }
81
+ >
82
+ </ ha- selector- number>
83
+ </ div> ` ;
81
84
}
82
85
83
86
private _handleChange ( ev ) {
@@ -97,14 +100,28 @@ export class KnxSyncStateSelectorRow extends LitElement {
97
100
98
101
static get styles ( ) {
99
102
return css `
103
+ .description {
104
+ margin : 0 ;
105
+ display : block;
106
+ padding-top : 4px ;
107
+ padding-bottom : 8px ;
108
+ font-family : var (
109
+ --mdc-typography-body2-font-family ,
110
+ var (--mdc-typography-font-family , Roboto, sans-serif)
111
+ );
112
+ -webkit-font-smoothing : antialiased;
113
+ font-size : var (--mdc-typography-body2-font-size , 0.875rem );
114
+ font-weight : var (--mdc-typography-body2-font-weight , 400 );
115
+ line-height : normal;
116
+ color : var (--secondary-text-color );
117
+ }
100
118
.inline {
101
119
width : 100% ;
102
120
display : inline-flex;
103
121
flex-flow : row wrap;
104
122
gap : 16px ;
105
123
justify-content : space-between;
106
124
}
107
-
108
125
.inline > * {
109
126
flex : 1 ;
110
127
width : 100% ; /* to not overflow when wrapped */
0 commit comments