feat: Update assets and improve code comments across multiple components
- Updated favicon and various image assets. - Enhanced comments. - Adjusted styles and functionality in several components for improved user experience. - Updated package-lock.json to reflect dependency updates.
This commit is contained in:
@@ -4,6 +4,7 @@ import React from 'react';
|
||||
import { Text, TouchableOpacity, View } from 'react-native';
|
||||
|
||||
const DeviceCard = ({ device, onToggle }: { device: HaEntity; onToggle: (entityId: string) => void; }) => {
|
||||
// Icon mapping based on entity domain
|
||||
const getIcon = () => {
|
||||
const domain = device.entity_id.split('.')[0];
|
||||
|
||||
@@ -30,6 +31,7 @@ const DeviceCard = ({ device, onToggle }: { device: HaEntity; onToggle: (entityI
|
||||
const isToggleable = ['light', 'switch', 'fan', 'input_boolean'].includes(device.entity_id.split('.')[0]);
|
||||
const isOn = device.state === 'on';
|
||||
|
||||
// State mapping
|
||||
const getDeviceState = (state: string) => {
|
||||
switch (state) {
|
||||
case 'on':
|
||||
|
||||
Reference in New Issue
Block a user