fix unavailable entities
This commit is contained in:
@ -7,6 +7,7 @@ class Entity < ApplicationRecord
|
|||||||
|
|
||||||
def value
|
def value
|
||||||
@data = Entity.response("/" + ha_id)
|
@data = Entity.response("/" + ha_id)
|
||||||
|
return "" if @data.is_a? Array
|
||||||
@data["state"]
|
@data["state"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user