30 lines
666 B
Markdown
30 lines
666 B
Markdown
# FarawayOrbAgg.js — isFarawayDusman() (satır 55)
|
||
|
||
[← FarawayOrbAgg.js](index.md) · [← Master](../../wiki.md)
|
||
|
||
```javascript
|
||
function isFarawayDusman(entity)
|
||
{
|
||
var states = entity.getStates();
|
||
|
||
if (states == null || !states.has("FarawayDusman"))
|
||
{
|
||
return false;
|
||
}
|
||
|
||
var text = String(states.getString("FarawayDusman")).toLowerCase();
|
||
|
||
if (text == "true" || text == "1" || text == "yes" || text == "evet")
|
||
{
|
||
return true;
|
||
}
|
||
|
||
if (states.getNumber("FarawayDusman") == 1)
|
||
{
|
||
return true;
|
||
}
|
||
|
||
return text == "" || text == "null" || text == "undefined";
|
||
}
|
||
```
|