Resolves #171
This commit is contained in:
@ -56,6 +56,10 @@ class Entity {
|
||||
domain = rawData["entity_id"].split(".")[0];
|
||||
entityId = rawData["entity_id"];
|
||||
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;
|
||||
_lastUpdated = DateTime.tryParse(rawData["last_updated"]);
|
||||
}
|
||||
|
@ -10,16 +10,15 @@ class DefaultEntityContainer extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
EntityIcon(),
|
||||
Expanded(
|
||||
child: EntityName(),
|
||||
),
|
||||
state
|
||||
],
|
||||
),
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
EntityIcon(),
|
||||
Expanded(
|
||||
child: EntityName(),
|
||||
),
|
||||
state
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
@ -15,6 +15,9 @@ class SimpleEntityState extends StatelessWidget {
|
||||
child: Text(
|
||||
"${entityModel.entity.state}${entityModel.entity.unitOfMeasurement}",
|
||||
textAlign: TextAlign.right,
|
||||
maxLines: 4,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
softWrap: true,
|
||||
style: new TextStyle(
|
||||
fontSize: Sizes.stateFontSize,
|
||||
)),
|
||||
@ -24,8 +27,9 @@ class SimpleEntityState extends StatelessWidget {
|
||||
)
|
||||
);
|
||||
if (expanded) {
|
||||
return Expanded(
|
||||
child: result
|
||||
return SizedBox(
|
||||
width: MediaQuery.of(context).size.width * 0.3,
|
||||
child: result,
|
||||
);
|
||||
} else {
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user