Resolves #171
This commit is contained in:
@ -56,6 +56,10 @@ class Entity {
|
|||||||
domain = rawData["entity_id"].split(".")[0];
|
domain = rawData["entity_id"].split(".")[0];
|
||||||
entityId = rawData["entity_id"];
|
entityId = rawData["entity_id"];
|
||||||
state = rawData["state"];
|
state = rawData["state"];
|
||||||
|
if (domain == "sun") {
|
||||||
|
state = "iuwfhiwushf iwuwfhiuwefh dsjhfkjsdfnksdj nfksdjfn ksdjfn kdsjfndskj sdk fhksbsk jvfk jvsfkj sfkjvsfkvdsjk bvsfk svfjk";
|
||||||
|
attributes["friendly_name"] = "Black hole sun, wan't you come, wan't you come";
|
||||||
|
}
|
||||||
assumedState = state;
|
assumedState = state;
|
||||||
_lastUpdated = DateTime.tryParse(rawData["last_updated"]);
|
_lastUpdated = DateTime.tryParse(rawData["last_updated"]);
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,8 @@ class DefaultEntityContainer extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return SizedBox(
|
return Row(
|
||||||
child: Row(
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
EntityIcon(),
|
EntityIcon(),
|
||||||
Expanded(
|
Expanded(
|
||||||
@ -19,7 +19,6 @@ class DefaultEntityContainer extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
state
|
state
|
||||||
],
|
],
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,6 +15,9 @@ class SimpleEntityState extends StatelessWidget {
|
|||||||
child: Text(
|
child: Text(
|
||||||
"${entityModel.entity.state}${entityModel.entity.unitOfMeasurement}",
|
"${entityModel.entity.state}${entityModel.entity.unitOfMeasurement}",
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
|
maxLines: 4,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
softWrap: true,
|
||||||
style: new TextStyle(
|
style: new TextStyle(
|
||||||
fontSize: Sizes.stateFontSize,
|
fontSize: Sizes.stateFontSize,
|
||||||
)),
|
)),
|
||||||
@ -24,8 +27,9 @@ class SimpleEntityState extends StatelessWidget {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
if (expanded) {
|
if (expanded) {
|
||||||
return Expanded(
|
return SizedBox(
|
||||||
child: result
|
width: MediaQuery.of(context).size.width * 0.3,
|
||||||
|
child: result,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return result;
|
return result;
|
||||||
|
Reference in New Issue
Block a user