Make cover positions integers
This commit is contained in:
parent
d6da7578c7
commit
bf9cd55d4c
@ -125,7 +125,7 @@ class SliderEntityRow extends Polymer.Element {
|
|||||||
this._hass.callService('cover', 'close_cover', { entity_id: stateObj.entity_id });
|
this._hass.callService('cover', 'close_cover', { entity_id: stateObj.entity_id });
|
||||||
},
|
},
|
||||||
get: (stateObj) => {
|
get: (stateObj) => {
|
||||||
return (stateObj.state === 'open')?stateObj.attributes.current_position:0;
|
return (stateObj.state === 'open')?Math.ceil(stateObj.attributes.current_position):0;
|
||||||
},
|
},
|
||||||
supported: (stateObj) => {
|
supported: (stateObj) => {
|
||||||
if('current_position' in stateObj.attributes) return true;
|
if('current_position' in stateObj.attributes) return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user