mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-20 07:46:37 +00:00
Fix ES2015 syntax in cover-model
This commit is contained in:
parent
dce362c4af
commit
cf6bddd7a9
@ -75,41 +75,41 @@
|
||||
/* eslint-enable no-bitwise */
|
||||
|
||||
Object.assign(window.CoverEntity.prototype, {
|
||||
openCover() {
|
||||
openCover: function () {
|
||||
this.callService('open_cover');
|
||||
},
|
||||
|
||||
closeCover() {
|
||||
closeCover: function () {
|
||||
this.callService('close_cover');
|
||||
},
|
||||
|
||||
stopCover() {
|
||||
stopCover: function () {
|
||||
this.callService('stop_cover');
|
||||
},
|
||||
|
||||
openCoverTilt() {
|
||||
openCoverTilt: function () {
|
||||
this.callService('open_cover_tilt');
|
||||
},
|
||||
|
||||
closeCoverTilt() {
|
||||
closeCoverTilt: function () {
|
||||
this.callService('close_cover_tilt');
|
||||
},
|
||||
|
||||
stopCoverTilt() {
|
||||
stopCoverTilt: function () {
|
||||
this.callService('stop_cover_tilt');
|
||||
},
|
||||
|
||||
setCoverPosition(position) {
|
||||
setCoverPosition: function (position) {
|
||||
this.callService('set_cover_position', { position: position });
|
||||
},
|
||||
|
||||
setCoverTiltPosition(tiltPosition) {
|
||||
setCoverTiltPosition: function (tiltPosition) {
|
||||
this.callService('set_cover_tilt_position', { tilt_position: tiltPosition });
|
||||
},
|
||||
|
||||
// helper method
|
||||
|
||||
callService(service, data) {
|
||||
callService: function (service, data) {
|
||||
var serviceData = data || {};
|
||||
serviceData.entity_id = this.stateObj.entity_id;
|
||||
this.hass.callService('cover', service, serviceData);
|
||||
|
Loading…
x
Reference in New Issue
Block a user