From 59c06e1f1acc1236d5c8c35ffee9c87348974e65 Mon Sep 17 00:00:00 2001 From: frozenwizard <172203+frozenwizard@users.noreply.github.com> Date: Sun, 13 Feb 2022 13:42:01 -0600 Subject: [PATCH 1/2] Renaming call service and cleaning that up. --- only-lock-lock-row.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/only-lock-lock-row.js b/only-lock-lock-row.js index 2906d7d..0c2efeb 100644 --- a/only-lock-lock-row.js +++ b/only-lock-lock-row.js @@ -17,8 +17,7 @@ class OnlyLockLockRow extends Polymer.Element { state-obj="[[stateObj]]" > Lock @@ -59,13 +58,12 @@ class OnlyLockLockRow extends Polymer.Element { } - _callService(ev) { + _callLockService(ev) { ev.stopPropagation(); - const service = ev.target.dataset.service; const data = { entity_id: this._config.entity, }; - this.hass.callService("lock", service, data); + this.hass.callService("lock", "lock", data); } } From f2ea550b05a2058007a34ec2cff81c5041af7b4a Mon Sep 17 00:00:00 2001 From: frozenwizard <172203+frozenwizard@users.noreply.github.com> Date: Sun, 13 Feb 2022 13:45:06 -0600 Subject: [PATCH 2/2] Cleanup of html. --- only-lock-lock-row.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/only-lock-lock-row.js b/only-lock-lock-row.js index 0c2efeb..9413527 100644 --- a/only-lock-lock-row.js +++ b/only-lock-lock-row.js @@ -9,19 +9,12 @@ class OnlyLockLockRow extends Polymer.Element { margin-right: -0.57em; } - - - Lock + + + Lock - + ` }