53 lines
1.3 KiB
HTML
53 lines
1.3 KiB
HTML
<link rel="import" href="../../bower_components/polymer/polymer.html">
|
|
|
|
<link rel="import" href="state-card-climate.html">
|
|
<link rel="import" href="state-card-configurator.html">
|
|
<link rel="import" href="state-card-cover.html">
|
|
<link rel="import" href="state-card-display.html">
|
|
<link rel="import" href="state-card-input_select.html">
|
|
<link rel="import" href="state-card-input_slider.html">
|
|
<link rel="import" href="state-card-media_player.html">
|
|
<link rel="import" href="state-card-scene.html">
|
|
<link rel="import" href="state-card-script.html">
|
|
<link rel="import" href="state-card-toggle.html">
|
|
<link rel="import" href="state-card-weblink.html">
|
|
|
|
<script>
|
|
Polymer({
|
|
is: 'state-card-content',
|
|
|
|
properties: {
|
|
hass: {
|
|
type: Object,
|
|
},
|
|
|
|
inDialog: {
|
|
type: Boolean,
|
|
value: false,
|
|
},
|
|
|
|
stateObj: {
|
|
type: Object,
|
|
},
|
|
},
|
|
|
|
observers: [
|
|
'inputChanged(hass, inDialog, stateObj)',
|
|
],
|
|
|
|
inputChanged: function (hass, inDialog, stateObj) {
|
|
if (!stateObj || !hass) return;
|
|
|
|
window.hassUtil.dynamicContentUpdater(
|
|
this,
|
|
('STATE-CARD-' +
|
|
window.hassUtil.stateCardType(hass, stateObj).toUpperCase()),
|
|
{
|
|
hass: hass,
|
|
stateObj: stateObj,
|
|
inDialog: inDialog,
|
|
});
|
|
},
|
|
});
|
|
</script>
|