mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-11-21 16:18:14 +00:00
Compare commits
3 Commits
Picker-for
...
3a7676f4bf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a7676f4bf | ||
|
|
f19eb7c276 | ||
|
|
c617d2cad6 |
@@ -177,13 +177,11 @@ class HomeAssistantNumericMenuItem extends HomeAssistantMenuItem {
|
||||
//
|
||||
function getNumericTemplate() as Lang.String? {
|
||||
var entity_id = mData["entity_id"];
|
||||
var attribute = mPicker["attribute"] as Lang.String;
|
||||
var attribute = mPicker["attribute"] as Lang.String?;
|
||||
if (entity_id == null) {
|
||||
return null;
|
||||
} else {
|
||||
if (attribute == null) {
|
||||
// Compiler says: "Statement is not reachable."
|
||||
// This is wrong because a break point on the following line proves it is executed!
|
||||
return "{{states('" + entity_id.toString() + "')}}";
|
||||
} else {
|
||||
return "{{state_attr('" + entity_id.toString() + "','" + attribute + "')}}";
|
||||
|
||||
Reference in New Issue
Block a user