ha-frontend/src/state-summary/state-card-scene.html

56 lines
1.2 KiB
HTML
Raw Normal View History

2015-07-13 01:57:15 +02:00
<link rel="import" href="../../bower_components/polymer/polymer.html">
2016-08-02 18:06:22 +02:00
<link rel="import" href="../../bower_components/iron-flex-layout/iron-flex-layout-classes.html">
2016-04-08 09:10:39 +02:00
<link rel="import" href="../../bower_components/paper-button/paper-button.html">
2015-07-13 01:57:15 +02:00
2016-07-20 08:33:03 +02:00
<link rel="import" href="../components/entity/state-info.html">
2015-07-13 01:57:15 +02:00
<dom-module id="state-card-scene">
<template>
2016-07-19 10:19:44 +02:00
<style is="custom-style" include="iron-flex iron-flex-alignment"></style>
<style>
paper-button {
color: var(--default-primary-color);
font-weight: 500;
top: 3px;
height: 37px;
margin-right: -.57em;
2016-07-19 10:19:44 +02:00
}
</style>
2015-10-13 08:38:29 +02:00
<div class='horizontal justified layout'>
2016-04-08 09:10:39 +02:00
<state-info state-obj="[[stateObj]]" in-dialog='[[inDialog]]'></state-info>
<paper-button on-tap='activateScene'>ACTIVATE</paper-button>
2015-10-13 08:38:29 +02:00
</div>
2015-07-13 01:57:15 +02:00
</template>
</dom-module>
2016-06-10 08:25:38 +02:00
<script>
Polymer({
is: 'state-card-scene',
properties: {
hass: {
type: Object,
},
inDialog: {
type: Boolean,
value: false,
},
stateObj: {
type: Object,
},
},
activateScene: function (ev) {
ev.stopPropagation();
this.hass.callService(
'scene', 'turn_on',
{ entity_id: this.stateObj.entity_id });
2016-06-10 08:25:38 +02:00
},
});
</script>