This repository has been archived on 2023-11-18. You can view files and clone it, but cannot push or open issues or pull requests.
ha_client/lib/entity_class/lock_entity.class.dart

21 lines
434 B
Dart
Raw Normal View History

2018-11-23 19:18:17 +02:00
part of '../main.dart';
class LockEntity extends Entity {
2019-03-19 23:07:40 +02:00
LockEntity(Map rawData, String webHost) : super(rawData, webHost);
2018-11-23 19:18:17 +02:00
bool get isLocked => state == "locked";
@override
Widget _buildStatePart(BuildContext context) {
return LockStateWidget(
assumedState: false,
);
}
@override
Widget _buildStatePartForPage(BuildContext context) {
return LockStateWidget(
assumedState: true,
);
2018-11-23 19:18:17 +02:00
}
}