mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 21:36:36 +00:00
Rollershutter UI tweaks
This commit is contained in:
parent
758560ad05
commit
41dbd6abc3
@ -20,9 +20,11 @@
|
||||
<div class='horizontal justified layout'>
|
||||
<state-info state-obj="[[stateObj]]"></state-info>
|
||||
<div class='state'>
|
||||
<paper-icon-button icon="mdi:arrow-up" on-tap='onMoveUpTap'></paper-icon-button>
|
||||
<paper-icon-button icon="mdi:arrow-down" on-tap='onMoveDownTap'></paper-icon-button>
|
||||
<paper-icon-button icon="mdi:arrow-up" on-tap='onMoveUpTap'
|
||||
disabled='[[computeIsFullyClosed(stateObj)]]'></paper-icon-button>
|
||||
<paper-icon-button icon="mdi:stop" on-tap='onStopTap'></paper-icon-button>
|
||||
<paper-icon-button icon="mdi:arrow-down" on-tap='onMoveDownTap'
|
||||
disabled='[[computeIsFullyOpen(stateObj)]]'></paper-icon-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -13,6 +13,14 @@ export default new Polymer({
|
||||
},
|
||||
},
|
||||
|
||||
computeIsFullyOpen(stateObj) {
|
||||
return stateObj.attributes.current_position === 100;
|
||||
},
|
||||
|
||||
computeIsFullyClosed(stateObj) {
|
||||
return stateObj.attributes.current_position === 0;
|
||||
},
|
||||
|
||||
onMoveUpTap() {
|
||||
serviceActions.callService('rollershutter', 'move_up',
|
||||
{entity_id: this.stateObj.entityId});
|
||||
|
@ -47,7 +47,7 @@ export default function domainIcon(domain, state) {
|
||||
return 'mdi:cloud-upload';
|
||||
|
||||
case 'rollershutter':
|
||||
return 'mdi:blinds';
|
||||
return state && state === 'open' ? 'mdi:window-open' : 'mdi:window-closed';
|
||||
|
||||
case 'scene':
|
||||
return 'mdi:google-pages';
|
||||
|
Loading…
x
Reference in New Issue
Block a user