1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Add fan direction feature in gallery (#26499)

This commit is contained in:
pcan08
2025-08-11 19:40:32 +02:00
committed by GitHub
parent 8eff913845
commit 5267c6fdfc

View File

@@ -11,6 +11,7 @@ import { provideHass } from "../../../../src/fake_data/provide_hass";
import "../../components/demo-cards";
import { mockIcons } from "../../../../demo/src/stubs/icons";
import { ClimateEntityFeature } from "../../../../src/data/climate";
import { FanEntityFeature } from "../../../../src/data/fan";
const ENTITIES = [
getEntity("switch", "tv_outlet", "on", {
@@ -100,6 +101,12 @@ const ENTITIES = [
ClimateEntityFeature.FAN_MODE +
ClimateEntityFeature.TARGET_TEMPERATURE_RANGE,
}),
getEntity("fan", "fan_direction", "on", {
friendly_name: "Ceiling fan",
device_class: "fan",
direction: "reverse",
supported_features: [FanEntityFeature.DIRECTION],
}),
];
const CONFIGS = [
@@ -261,6 +268,15 @@ const CONFIGS = [
- type: target-temperature
`,
},
{
heading: "Fan direction feature",
config: `
- type: tile
entity: fan.fan_direction
features:
- type: fan-direction
`,
},
];
@customElement("demo-lovelace-tile-card")