import { toFixed } from 'common/math'; import { Fragment } from 'inferno'; import { useBackend } from '../backend'; import { Box, Button, Grid, LabeledList, NumberInput, ProgressBar, Section } from '../components'; export const SolarControl = props => { const { act, data } = useBackend(props); const { generated, generated_ratio, azimuth_current, azimuth_rate, max_rotation_rate, tracking_state, connected_panels, connected_tracker, } = data; return (
act('refresh')} /> )}> {connected_tracker ? 'OK' : 'N/A'} 0 ? 'good' : 'bad'}> {connected_panels}
); };