ha-frontend-cdce8p/src/state-summary/state-card-script.html
2016-02-27 23:12:57 -08:00

29 lines
983 B
HTML

<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../../bower_components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="../components/state-info.html">
<link rel="import" href="../components/entity/ha-entity-toggle.html">
<dom-module id="state-card-script">
<style>
paper-icon-button {
border: 1px solid;
border-radius: 50%;
color: var(--default-primary-color);
line-height: 24px;
}
</style>
<template>
<div class='horizontal justified layout'>
<state-info state-obj="[[stateObj]]"></state-info>
<template is='dom-if' if='[[stateObj.attributes.can_cancel]]'>
<ha-entity-toggle state-obj='[[stateObj]]'></ha-entity-toggle>
</template>
<template is='dom-if' if='[[!stateObj.attributes.can_cancel]]'>
<paper-icon-button on-tap='fireScript' icon='mdi:play'></paper-icon-button>
</template>
</div>
</template>
</dom-module>