diff --git a/dist/index.html b/dist/index.html
index f91e5d8..ab8e4a1 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -68,7 +68,6 @@
temperature_unit: 'C',
printer_type: 'I3',
round_temperature: false,
- vertical: true,
use_24hr: true,
light_entity: 'switch.light',
camera_entity: "camera.test",
diff --git a/src/Components/Card/index.tsx b/src/Components/Card/index.tsx
index 020225d..90eea09 100644
--- a/src/Components/Card/index.tsx
+++ b/src/Components/Card/index.tsx
@@ -139,22 +139,23 @@ const Card = ({ }) => {
animate={{ height: hidden ? 0.0 : 'auto', opacity: hidden ? 0.0 : 1.0, scale: hidden ? 0.0 : 1.0 }}
transition={{ ease: "easeInOut", duration: 0.25 }}
>
-
+
{
vertical ? (
-
{round ? Math.round(percent) : percent}%
+
{round ? Math.round(percent) : percent}%
) : null
}
{
+const PrinterView = ({ toggleVideo, hasCamera, style }) => {
const {
hass,
@@ -45,6 +45,7 @@ const PrinterView = ({ toggleVideo, hasCamera }) => {
ref={ref}
style={{
...styles.PrinterView,
+ ...style,
cursor: hasCamera ? 'pointer' : 'default'
}}
>
diff --git a/src/Components/PrinterView/styles.ts b/src/Components/PrinterView/styles.ts
index b8d277b..bc81b43 100644
--- a/src/Components/PrinterView/styles.ts
+++ b/src/Components/PrinterView/styles.ts
@@ -1,6 +1,5 @@
const styles = {
PrinterView: {
- width: '100%',
height: '100%',
boxSizing: 'border-box'
}
diff --git a/src/Components/Stats/TimeStat.tsx b/src/Components/Stats/TimeStat.tsx
index b326141..9b84351 100644
--- a/src/Components/Stats/TimeStat.tsx
+++ b/src/Components/Stats/TimeStat.tsx
@@ -55,10 +55,10 @@ type TimeStatProps = {
const TimeStat: React.FC = ({timeEntity, condition, config, direction}) => {
- const [ time, setTime ] = useState( timeEntity.state || 0);
+ const [ time, setTime ] = useState( parseInt(timeEntity.state) || 0);
const [ lastIntervalId, setLastIntervalId ] = useState(-1);
- const incTime = () => setTime( time => time + direction );
+ const incTime = () => setTime( time => (parseInt(time) + parseInt(direction)) );
useEffect(() => {