Make cover positions integers

This commit is contained in:
Thomas Lovén 2019-01-20 21:27:59 +01:00
parent d6da7578c7
commit bf9cd55d4c

View File

@ -125,7 +125,7 @@ class SliderEntityRow extends Polymer.Element {
this._hass.callService('cover', 'close_cover', { entity_id: stateObj.entity_id });
},
get: (stateObj) => {
return (stateObj.state === 'open')?stateObj.attributes.current_position:0;
return (stateObj.state === 'open')?Math.ceil(stateObj.attributes.current_position):0;
},
supported: (stateObj) => {
if('current_position' in stateObj.attributes) return true;