UNPKG

@hakit/components

Version:
42 lines 2.43 kB
import { ReactNode, ReactElement } from 'react'; import { FilterByDomain, ModernForecastType, EntityName } from '@hakit/core'; import { IconProps } from '@iconify/react'; import { WeatherCardDetail, CardBaseProps } from '../..'; type OmitProperties = "as" | "entity"; export interface WeatherCardProps extends Omit<CardBaseProps<"div", FilterByDomain<EntityName, "weather">>, OmitProperties> { /** The name of your entity */ entity: FilterByDomain<EntityName, "weather">; /** override the icon displayed before the title */ icon?: string; /** the props for the icon, which includes styles for the icon */ iconProps?: Omit<IconProps, "icon">; /** override the temperature suffix that's pulled from the entity, will retrieve the temperature_unit from entity by default" */ temperatureSuffix?: ReactNode; /** include a title showing the forecast name @default true */ includeTitle?: boolean; /** include the forecast @default true */ includeForecast?: boolean; /** include the current forecast row, @default true */ includeCurrent?: boolean; /** any related entities/sensors you want to include in the details section @default [] */ details?: ReactElement<typeof WeatherCardDetail>[]; /** include time value under day name @default true */ includeTime?: boolean; /** include day name in forecast @default true */ includeDay?: boolean; /** property on the weather entity attributes that returns the "feels like" temperature or "apparent temperature" @default "apparent_temperature" */ apparentTemperatureAttribute?: string; /** the forecast type to display @default "daily" */ forecastType?: ModernForecastType; /** The number of rows to display forecast information, @default 1 */ forecastRows?: number; /** Whether to allow the user to toggle the forecast type. @default true */ allowForecastToggle?: boolean; } /** This will pull information from the weather entity provided to display the forecast provided by home assistant, this card will display exactly what the weather card in lovelace displays. * * It will render more information depending on the size of the card, the smaller the card, the less "hourly / daily" forecast items will be displayed. */ export declare function WeatherCard(props: WeatherCardProps): import("@emotion/react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=index.d.ts.map