Initial fixes

This commit is contained in:
Philip Abbey
2024-03-07 21:59:33 +00:00
parent 181335bfd7
commit 92d3fbee57
5 changed files with 26 additions and 4 deletions

View File

@ -122,9 +122,12 @@ class HomeAssistantService {
// System.println("HomeAssistantService call() URL=" + url);
// System.println("HomeAssistantService call() service=" + service);
var entity_id = data.get("entity_id");
if (entity_id == null) {
entity_id = "";
var entity_id = "";
if (data != null) {
entity_id = data.get("entity_id");
if (entity_id == null) {
entity_id = "";
}
}
Communications.makeWebRequest(
@ -141,7 +144,7 @@ class HomeAssistantService {
},
method(:onReturnCall)
);
if (mHasVibrate) {
if (mHasVibrate and Settings.getVibrate()) {
Attention.vibrate([
new Attention.VibeProfile(50, 100), // On for 100ms
new Attention.VibeProfile( 0, 100), // Off for 100ms