//------------------------------------------------------------------------------
//
// Generated using NetDaemon CodeGenerator nd-codegen v24.43.0.0
// At: 2024-10-31T10:48:03.3647423-04:00
//
// *** Make sure the version of the codegen tool and your nugets NetDaemon.* have the same version.***
// You can use following command to keep it up to date with the latest version:
// dotnet tool update NetDaemon.HassModel.CodeGen
//
// To update this file with latest entities run this command in your project directory:
// dotnet tool run nd-codegen
//
// In the template projects we provided a convenience powershell script that will update
// the codegen and nugets to latest versions update_all_dependencies.ps1.
//
// For more information: https://netdaemon.xyz/docs/user/hass_model/hass_model_codegen
// For more information about NetDaemon: https://netdaemon.xyz/
//
//------------------------------------------------------------------------------
#nullable enable
using System;
using System.Linq;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using System.Text.Json;
using System.Text.Json.Serialization;
using NetDaemon.HassModel;
using NetDaemon.HassModel.Entities;
using NetDaemon.HassModel.Entities.Core;
namespace HomeAssistantGenerated;
public static class GeneratedExtensions
{
///Registers all injectable generated types in the serviceCollection
public static IServiceCollection AddHomeAssistantGenerated(this IServiceCollection serviceCollection)
{
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
serviceCollection.AddTransient();
return serviceCollection;
}
}
///
/// Allows HassModel to instantiate the correct generated Entity types
///
public class GeneratedEntityFactory : IEntityFactory
{
public Entity CreateEntity(IHaContext haContext, string entityId)
{
var dot = entityId.IndexOf('.', StringComparison.Ordinal);
var domain = dot < 0 ? entityId.AsSpan() : entityId[..dot];
return domain switch
{
"automation" => new AutomationEntity(haContext, entityId),
"binary_sensor" => new BinarySensorEntity(haContext, entityId),
"button" => new ButtonEntity(haContext, entityId),
"calendar" => new CalendarEntity(haContext, entityId),
"conversation" => new ConversationEntity(haContext, entityId),
"device_tracker" => new DeviceTrackerEntity(haContext, entityId),
"input_boolean" => new InputBooleanEntity(haContext, entityId),
"input_text" => new InputTextEntity(haContext, entityId),
"light" => new LightEntity(haContext, entityId),
"lock" => new LockEntity(haContext, entityId),
"media_player" => new MediaPlayerEntity(haContext, entityId),
"number" => new NumberEntity(haContext, entityId),
"person" => new PersonEntity(haContext, entityId),
"remote" => new RemoteEntity(haContext, entityId),
"script" => new ScriptEntity(haContext, entityId),
"select" => new SelectEntity(haContext, entityId),
"sensor" when IsNumeric() => new NumericSensorEntity(haContext, entityId),
"sensor" => new SensorEntity(haContext, entityId),
"stt" => new SttEntity(haContext, entityId),
"sun" => new SunEntity(haContext, entityId),
"switch" => new SwitchEntity(haContext, entityId),
"timer" => new TimerEntity(haContext, entityId),
"todo" => new TodoEntity(haContext, entityId),
"tts" => new TtsEntity(haContext, entityId),
"wake_word" => new WakeWordEntity(haContext, entityId),
"weather" => new WeatherEntity(haContext, entityId),
"zone" => new ZoneEntity(haContext, entityId),
_ => new Entity(haContext, entityId)};
bool IsNumeric() => haContext.GetState(entityId)?.AttributesJson?.TryGetProperty("unit_of_measurement", out _) ?? false;
}
}
public interface IEntities
{
LightEntities Light { get; }
MediaPlayerEntities MediaPlayer { get; }
AutomationEntities Automation { get; }
BinarySensorEntities BinarySensor { get; }
ButtonEntities Button { get; }
CalendarEntities Calendar { get; }
ConversationEntities Conversation { get; }
DeviceTrackerEntities DeviceTracker { get; }
InputBooleanEntities InputBoolean { get; }
InputTextEntities InputText { get; }
LockEntities Lock { get; }
NumberEntities Number { get; }
PersonEntities Person { get; }
RemoteEntities Remote { get; }
ScriptEntities Script { get; }
SelectEntities Select { get; }
SensorEntities Sensor { get; }
SttEntities Stt { get; }
SunEntities Sun { get; }
SwitchEntities Switch { get; }
TimerEntities Timer { get; }
TodoEntities Todo { get; }
TtsEntities Tts { get; }
WakeWordEntities WakeWord { get; }
WeatherEntities Weather { get; }
ZoneEntities Zone { get; }
}
public partial class Entities : IEntities
{
private readonly IHaContext _haContext;
public Entities(IHaContext haContext)
{
_haContext = haContext;
}
public LightEntities Light => new(_haContext);
public MediaPlayerEntities MediaPlayer => new(_haContext);
public AutomationEntities Automation => new(_haContext);
public BinarySensorEntities BinarySensor => new(_haContext);
public ButtonEntities Button => new(_haContext);
public CalendarEntities Calendar => new(_haContext);
public ConversationEntities Conversation => new(_haContext);
public DeviceTrackerEntities DeviceTracker => new(_haContext);
public InputBooleanEntities InputBoolean => new(_haContext);
public InputTextEntities InputText => new(_haContext);
public LockEntities Lock => new(_haContext);
public NumberEntities Number => new(_haContext);
public PersonEntities Person => new(_haContext);
public RemoteEntities Remote => new(_haContext);
public ScriptEntities Script => new(_haContext);
public SelectEntities Select => new(_haContext);
public SensorEntities Sensor => new(_haContext);
public SttEntities Stt => new(_haContext);
public SunEntities Sun => new(_haContext);
public SwitchEntities Switch => new(_haContext);
public TimerEntities Timer => new(_haContext);
public TodoEntities Todo => new(_haContext);
public TtsEntities Tts => new(_haContext);
public WakeWordEntities WakeWord => new(_haContext);
public WeatherEntities Weather => new(_haContext);
public ZoneEntities Zone => new(_haContext);
}
public partial class LightEntities
{
private readonly IHaContext _haContext;
public LightEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all light entities currently registered (at runtime) in Home Assistant as LightEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("light.")).Select(e => new LightEntity(e));
///M5Stack Atom Echo 31196c
public LightEntity M5stackAtomEcho31196cM5stackAtomEcho31196c => new(_haContext, "light.m5stack_atom_echo_31196c_m5stack_atom_echo_31196c");
}
public partial class MediaPlayerEntities
{
private readonly IHaContext _haContext;
public MediaPlayerEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all media_player entities currently registered (at runtime) in Home Assistant as MediaPlayerEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("media_player.")).Select(e => new MediaPlayerEntity(e));
public MediaPlayerEntity AndroidTv1921680106 => new(_haContext, "media_player.android_tv_192_168_0_106");
///YAS_209
public MediaPlayerEntity LivingRoomSpeaker => new(_haContext, "media_player.living_room_speaker");
///UE Boom 2
public MediaPlayerEntity MusicPlayerDaemon => new(_haContext, "media_player.music_player_daemon");
public MediaPlayerEntity Onn4kStreamingBox => new(_haContext, "media_player.onn_4k_streaming_box");
public MediaPlayerEntity Onn4kStreamingBox2 => new(_haContext, "media_player.onn_4k_streaming_box_2");
///Spotify matt
public MediaPlayerEntity SpotifyMatt => new(_haContext, "media_player.spotify_matt");
///SpotifyPlus matt
public MediaPlayerEntity Spotifyplus => new(_haContext, "media_player.spotifyplus");
}
public partial class AutomationEntities
{
private readonly IHaContext _haContext;
public AutomationEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all automation entities currently registered (at runtime) in Home Assistant as AutomationEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("automation.")).Select(e => new AutomationEntity(e));
///Assist - TimerFinished
public AutomationEntity AssistTimerfinished => new(_haContext, "automation.assist_timerfinished");
///Assist - TimerReached
public AutomationEntity AssistTimerreached => new(_haContext, "automation.assist_timerreached");
///Turn On UE
public AutomationEntity TurnOnUe => new(_haContext, "automation.turn_on_ue");
}
public partial class BinarySensorEntities
{
private readonly IHaContext _haContext;
public BinarySensorEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all binary_sensor entities currently registered (at runtime) in Home Assistant as BinarySensorEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("binary_sensor.")).Select(e => new BinarySensorEntity(e));
///CODA-4680-FIZ WAN status
public BinarySensorEntity Coda4680FizWanStatus => new(_haContext, "binary_sensor.coda_4680_fiz_wan_status");
///M5Stack Atom Echo 31196c Button
public BinarySensorEntity M5stackAtomEcho131196cButton => new(_haContext, "binary_sensor.m5stack_atom_echo_1_31196c_button");
///Pixel 8 Bluetooth state
public BinarySensorEntity Pixel8BluetoothState => new(_haContext, "binary_sensor.pixel_8_bluetooth_state");
///Pixel 8 Headphones
public BinarySensorEntity Pixel8Headphones => new(_haContext, "binary_sensor.pixel_8_headphones");
///Pixel 8 Hotspot state
public BinarySensorEntity Pixel8HotspotState => new(_haContext, "binary_sensor.pixel_8_hotspot_state");
///Pixel 8 Is charging
public BinarySensorEntity Pixel8IsCharging => new(_haContext, "binary_sensor.pixel_8_is_charging");
///Pixel 8 Mic muted
public BinarySensorEntity Pixel8MicMuted => new(_haContext, "binary_sensor.pixel_8_mic_muted");
///Pixel 8 Mobile data
public BinarySensorEntity Pixel8MobileData => new(_haContext, "binary_sensor.pixel_8_mobile_data");
///Pixel 8 Mobile data roaming
public BinarySensorEntity Pixel8MobileDataRoaming => new(_haContext, "binary_sensor.pixel_8_mobile_data_roaming");
///Pixel 8 Music active
public BinarySensorEntity Pixel8MusicActive => new(_haContext, "binary_sensor.pixel_8_music_active");
///Pixel 8 NFC state
public BinarySensorEntity Pixel8NfcState => new(_haContext, "binary_sensor.pixel_8_nfc_state");
///Pixel 8 Speakerphone
public BinarySensorEntity Pixel8Speakerphone => new(_haContext, "binary_sensor.pixel_8_speakerphone");
///Pixel 8 WiFi state
public BinarySensorEntity Pixel8WifiState => new(_haContext, "binary_sensor.pixel_8_wifi_state");
}
public partial class ButtonEntities
{
private readonly IHaContext _haContext;
public ButtonEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all button entities currently registered (at runtime) in Home Assistant as ButtonEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("button.")).Select(e => new ButtonEntity(e));
///M5Stack Atom Echo 31196c Factory reset
public ButtonEntity M5stackAtomEcho131196cFactoryReset => new(_haContext, "button.m5stack_atom_echo_1_31196c_factory_reset");
///M5Stack Atom Echo 31196c Safe Mode Boot
public ButtonEntity M5stackAtomEcho31196cSafeModeBoot => new(_haContext, "button.m5stack_atom_echo_31196c_safe_mode_boot");
}
public partial class CalendarEntities
{
private readonly IHaContext _haContext;
public CalendarEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all calendar entities currently registered (at runtime) in Home Assistant as CalendarEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("calendar.")).Select(e => new CalendarEntity(e));
///Canada, QC
public CalendarEntity CanadaQc => new(_haContext, "calendar.canada_qc");
///Contact birthdays
public CalendarEntity ContactBirthdays => new(_haContext, "calendar.contact_birthdays");
///Personal
public CalendarEntity Personal => new(_haContext, "calendar.personal");
}
public partial class ConversationEntities
{
private readonly IHaContext _haContext;
public ConversationEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all conversation entities currently registered (at runtime) in Home Assistant as ConversationEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("conversation.")).Select(e => new ConversationEntity(e));
///Fallback Conversation Agent
public ConversationEntity FallbackConversationAgent => new(_haContext, "conversation.fallback_conversation_agent");
///Home Assistant
public ConversationEntity HomeAssistant => new(_haContext, "conversation.home_assistant");
}
public partial class DeviceTrackerEntities
{
private readonly IHaContext _haContext;
public DeviceTrackerEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all device_tracker entities currently registered (at runtime) in Home Assistant as DeviceTrackerEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("device_tracker.")).Select(e => new DeviceTrackerEntity(e));
///Pixel 8
public DeviceTrackerEntity Pixel8 => new(_haContext, "device_tracker.pixel_8");
///Z Flip 6
public DeviceTrackerEntity SmF741w => new(_haContext, "device_tracker.sm_f741w");
}
public partial class InputBooleanEntities
{
private readonly IHaContext _haContext;
public InputBooleanEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all input_boolean entities currently registered (at runtime) in Home Assistant as InputBooleanEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("input_boolean.")).Select(e => new InputBooleanEntity(e));
///netdaemon_spotify_play_album
public InputBooleanEntity NetdaemonSpotifyPlayAlbum => new(_haContext, "input_boolean.netdaemon_spotify_play_album");
///netdaemon_spotify_play_artist
public InputBooleanEntity NetdaemonSpotifyPlayArtist => new(_haContext, "input_boolean.netdaemon_spotify_play_artist");
///netdaemon_spotify_play_playlist
public InputBooleanEntity NetdaemonSpotifyPlayPlaylist => new(_haContext, "input_boolean.netdaemon_spotify_play_playlist");
///netdaemon_spotify_play_song
public InputBooleanEntity NetdaemonSpotifyPlaySong => new(_haContext, "input_boolean.netdaemon_spotify_play_song");
}
public partial class InputTextEntities
{
private readonly IHaContext _haContext;
public InputTextEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all input_text entities currently registered (at runtime) in Home Assistant as InputTextEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("input_text.")).Select(e => new InputTextEntity(e));
///Assist - Timer 1 Location
public InputTextEntity AssistTimer1Location => new(_haContext, "input_text.assist_timer1_location");
///Assist - Timer 2 Location
public InputTextEntity AssistTimer2Location => new(_haContext, "input_text.assist_timer2_location");
///Assist - Timer 3 Location
public InputTextEntity AssistTimer3Location => new(_haContext, "input_text.assist_timer3_location");
}
public partial class LockEntities
{
private readonly IHaContext _haContext;
public LockEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all lock entities currently registered (at runtime) in Home Assistant as LockEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("lock.")).Select(e => new LockEntity(e));
///Smartplug1 Child lock
public LockEntity Smartplug1ChildLock => new(_haContext, "lock.smartplug_1_child_lock");
///Smartplug2 Child lock
public LockEntity Smartplug2ChildLock => new(_haContext, "lock.smartplug2_child_lock");
///Smartplug3 Child lock
public LockEntity Smartplug3ChildLock => new(_haContext, "lock.smartplug3_child_lock");
}
public partial class NumberEntities
{
private readonly IHaContext _haContext;
public NumberEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all number entities currently registered (at runtime) in Home Assistant as NumberEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("number.")).Select(e => new NumberEntity(e));
///Smartplug1 Timer
public NumberEntity Smartplug1Timer => new(_haContext, "number.smartplug_1_timer");
///Smartplug2 Timer
public NumberEntity Smartplug2Timer => new(_haContext, "number.smartplug2_timer");
///Smartplug3 Timer
public NumberEntity Smartplug3Timer => new(_haContext, "number.smartplug3_timer");
}
public partial class PersonEntities
{
private readonly IHaContext _haContext;
public PersonEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all person entities currently registered (at runtime) in Home Assistant as PersonEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("person.")).Select(e => new PersonEntity(e));
///Matt
public PersonEntity Matt => new(_haContext, "person.matt");
///Wifey <3
public PersonEntity Wifey => new(_haContext, "person.wifey");
}
public partial class RemoteEntities
{
private readonly IHaContext _haContext;
public RemoteEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all remote entities currently registered (at runtime) in Home Assistant as RemoteEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("remote.")).Select(e => new RemoteEntity(e));
public RemoteEntity AndroidTv1921680106 => new(_haContext, "remote.android_tv_192_168_0_106");
public RemoteEntity Onn4kStreamingBox => new(_haContext, "remote.onn_4k_streaming_box");
}
public partial class ScriptEntities
{
private readonly IHaContext _haContext;
public ScriptEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all script entities currently registered (at runtime) in Home Assistant as ScriptEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("script.")).Select(e => new ScriptEntity(e));
///Assist - TimerPause
public ScriptEntity AssistTimerpause => new(_haContext, "script.assist_timerpause");
///Assist - TimerStart
public ScriptEntity AssistTimerstart => new(_haContext, "script.assist_timerstart");
///Assist - TimerStop
public ScriptEntity AssistTimerstop => new(_haContext, "script.assist_timerstop");
///Music - TurnOnUE
public ScriptEntity TurnOnUe => new(_haContext, "script.turn_on_ue");
}
public partial class SelectEntities
{
private readonly IHaContext _haContext;
public SelectEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all select entities currently registered (at runtime) in Home Assistant as SelectEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("select.")).Select(e => new SelectEntity(e));
///M5Stack Atom Echo 31196c Assistant
public SelectEntity M5stackAtomEcho131196cAssistPipeline => new(_haContext, "select.m5stack_atom_echo_1_31196c_assist_pipeline");
///M5Stack Atom Echo 31196c Finished speaking detection
public SelectEntity M5stackAtomEcho131196cFinishedSpeakingDetection => new(_haContext, "select.m5stack_atom_echo_1_31196c_finished_speaking_detection");
///M5Stack Atom Echo 31196c Wake word engine location
public SelectEntity M5stackAtomEcho131196cWakeWordEngineLocation => new(_haContext, "select.m5stack_atom_echo_1_31196c_wake_word_engine_location");
///Smartplug1 Initial state
public SelectEntity Smartplug1InitialState => new(_haContext, "select.smartplug_1_initial_state");
///Smartplug1 Light mode
public SelectEntity Smartplug1LightMode => new(_haContext, "select.smartplug_1_light_mode");
///Smartplug2 Initial state
public SelectEntity Smartplug2InitialState => new(_haContext, "select.smartplug2_initial_state");
///Smartplug2 Light mode
public SelectEntity Smartplug2LightMode => new(_haContext, "select.smartplug2_light_mode");
///Smartplug3 Initial state
public SelectEntity Smartplug3InitialState => new(_haContext, "select.smartplug3_initial_state");
///Smartplug3 Light mode
public SelectEntity Smartplug3LightMode => new(_haContext, "select.smartplug3_light_mode");
}
public partial class SensorEntities
{
private readonly IHaContext _haContext;
public SensorEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all sensor entities currently registered (at runtime) in Home Assistant as SensorEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("sensor.")).Select(e => new SensorEntity(e));
/// Enumerates all non-numeric sensor entities currently registered (at runtime) in Home Assistant as SensorEntity
public IEnumerable EnumerateAllNonNumeric() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("sensor.") && !(e.EntityState?.AttributesJson?.TryGetProperty("unit_of_measurement", out _) ?? false)).Select(e => new SensorEntity(e));
/// Enumerates all numeric sensor entities currently registered (at runtime) in Home Assistant as NumericSensorEntity
public IEnumerable EnumerateAllNumeric() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("sensor.") && (e.EntityState?.AttributesJson?.TryGetProperty("unit_of_measurement", out _) ?? false)).Select(e => new NumericSensorEntity(e));
///CODA-4680-FIZ External IP
public SensorEntity Coda4680FizExternalIp => new(_haContext, "sensor.coda_4680_fiz_external_ip");
///Material Rounded Base Color Matt
public SensorEntity MaterialRoundedBaseColorMatt => new(_haContext, "sensor.material_rounded_base_color_matt");
///Pixel 8 Accent color
public SensorEntity Pixel8AccentColor => new(_haContext, "sensor.pixel_8_accent_color");
///Pixel 8 Audio mode
public SensorEntity Pixel8AudioMode => new(_haContext, "sensor.pixel_8_audio_mode");
///Pixel 8 Battery health
public SensorEntity Pixel8BatteryHealth => new(_haContext, "sensor.pixel_8_battery_health");
///Pixel 8 Battery state
public SensorEntity Pixel8BatteryState => new(_haContext, "sensor.pixel_8_battery_state");
///Pixel 8 Beacon monitor
public SensorEntity Pixel8BeaconMonitor => new(_haContext, "sensor.pixel_8_beacon_monitor");
///Pixel 8 BLE transmitter
public SensorEntity Pixel8BleTransmitter => new(_haContext, "sensor.pixel_8_ble_transmitter");
///Pixel 8 Charger type
public SensorEntity Pixel8ChargerType => new(_haContext, "sensor.pixel_8_charger_type");
///Pixel 8 Current version
public SensorEntity Pixel8CurrentVersion => new(_haContext, "sensor.pixel_8_current_version");
///Pixel 8 Do Not Disturb sensor
public SensorEntity Pixel8DoNotDisturbSensor => new(_haContext, "sensor.pixel_8_do_not_disturb_sensor");
///Pixel 8 Last notification
public SensorEntity Pixel8LastNotification => new(_haContext, "sensor.pixel_8_last_notification");
///Pixel 8 Last reboot
public SensorEntity Pixel8LastReboot => new(_haContext, "sensor.pixel_8_last_reboot");
///Pixel 8 Last removed notification
public SensorEntity Pixel8LastRemovedNotification => new(_haContext, "sensor.pixel_8_last_removed_notification");
///Pixel 8 Last update trigger
public SensorEntity Pixel8LastUpdateTrigger => new(_haContext, "sensor.pixel_8_last_update_trigger");
///Pixel 8 Last used app
public SensorEntity Pixel8LastUsedApp => new(_haContext, "sensor.pixel_8_last_used_app");
///Pixel 8 Media session
public SensorEntity Pixel8MediaSession => new(_haContext, "sensor.pixel_8_media_session");
///Pixel 8 Network type
public SensorEntity Pixel8NetworkType => new(_haContext, "sensor.pixel_8_network_type");
///Pixel 8 Next alarm
public SensorEntity Pixel8NextAlarm => new(_haContext, "sensor.pixel_8_next_alarm");
///Pixel 8 OS version
public SensorEntity Pixel8OsVersion => new(_haContext, "sensor.pixel_8_os_version");
///Pixel 8 Public IP address
public SensorEntity Pixel8PublicIpAddress => new(_haContext, "sensor.pixel_8_public_ip_address");
///Pixel 8 Ringer mode
public SensorEntity Pixel8RingerMode => new(_haContext, "sensor.pixel_8_ringer_mode");
///Pixel 8 Screen brightness
public SensorEntity Pixel8ScreenBrightness => new(_haContext, "sensor.pixel_8_screen_brightness");
///Pixel 8 Volume level accessibility
public SensorEntity Pixel8VolumeLevelAccessibility => new(_haContext, "sensor.pixel_8_volume_level_accessibility");
///Pixel 8 Volume level alarm
public SensorEntity Pixel8VolumeLevelAlarm => new(_haContext, "sensor.pixel_8_volume_level_alarm");
///Pixel 8 Volume level call
public SensorEntity Pixel8VolumeLevelCall => new(_haContext, "sensor.pixel_8_volume_level_call");
///Pixel 8 Volume level DTMF
public SensorEntity Pixel8VolumeLevelDtmf => new(_haContext, "sensor.pixel_8_volume_level_dtmf");
///Pixel 8 Volume level music
public SensorEntity Pixel8VolumeLevelMusic => new(_haContext, "sensor.pixel_8_volume_level_music");
///Pixel 8 Volume level notification
public SensorEntity Pixel8VolumeLevelNotification => new(_haContext, "sensor.pixel_8_volume_level_notification");
///Pixel 8 Volume level ringer
public SensorEntity Pixel8VolumeLevelRinger => new(_haContext, "sensor.pixel_8_volume_level_ringer");
///Pixel 8 Volume level system
public SensorEntity Pixel8VolumeLevelSystem => new(_haContext, "sensor.pixel_8_volume_level_system");
///Pixel 8 WiFi BSSID
public SensorEntity Pixel8WifiBssid => new(_haContext, "sensor.pixel_8_wifi_bssid");
///Pixel 8 WiFi connection
public SensorEntity Pixel8WifiConnection => new(_haContext, "sensor.pixel_8_wifi_connection");
///Pixel 8 WiFi IP address
public SensorEntity Pixel8WifiIpAddress => new(_haContext, "sensor.pixel_8_wifi_ip_address");
///Z Flip 6 Battery state
public SensorEntity SmF741wBatteryState => new(_haContext, "sensor.sm_f741w_battery_state");
///Z Flip 6 Charger type
public SensorEntity SmF741wChargerType => new(_haContext, "sensor.sm_f741w_charger_type");
///Sun Next dawn
public SensorEntity SunNextDawn => new(_haContext, "sensor.sun_next_dawn");
///Sun Next dusk
public SensorEntity SunNextDusk => new(_haContext, "sensor.sun_next_dusk");
///Sun Next midnight
public SensorEntity SunNextMidnight => new(_haContext, "sensor.sun_next_midnight");
///Sun Next noon
public SensorEntity SunNextNoon => new(_haContext, "sensor.sun_next_noon");
///Sun Next rising
public SensorEntity SunNextRising => new(_haContext, "sensor.sun_next_rising");
///Sun Next setting
public SensorEntity SunNextSetting => new(_haContext, "sensor.sun_next_setting");
///CODA-4680-FIZ Data received
public NumericSensorEntity Coda4680FizDataReceived => new(_haContext, "sensor.coda_4680_fiz_data_received");
///CODA-4680-FIZ Data sent
public NumericSensorEntity Coda4680FizDataSent => new(_haContext, "sensor.coda_4680_fiz_data_sent");
///CODA-4680-FIZ Download speed
public NumericSensorEntity Coda4680FizDownloadSpeed => new(_haContext, "sensor.coda_4680_fiz_download_speed");
///CODA-4680-FIZ Upload speed
public NumericSensorEntity Coda4680FizUploadSpeed => new(_haContext, "sensor.coda_4680_fiz_upload_speed");
///Pixel 8 Battery level
public NumericSensorEntity Pixel8BatteryLevel => new(_haContext, "sensor.pixel_8_battery_level");
///Pixel 8 Battery power
public NumericSensorEntity Pixel8BatteryPower => new(_haContext, "sensor.pixel_8_battery_power");
///Pixel 8 Battery temperature
public NumericSensorEntity Pixel8BatteryTemperature => new(_haContext, "sensor.pixel_8_battery_temperature");
///Pixel 8 Bluetooth connection
public NumericSensorEntity Pixel8BluetoothConnection => new(_haContext, "sensor.pixel_8_bluetooth_connection");
///Pixel 8 IPv6 addresses
public NumericSensorEntity Pixel8Ipv6Addresses => new(_haContext, "sensor.pixel_8_ipv6_addresses");
///Pixel 8 Light sensor
public NumericSensorEntity Pixel8LightSensor => new(_haContext, "sensor.pixel_8_light_sensor");
///Pixel 8 Remaining charge time
public NumericSensorEntity Pixel8RemainingChargeTime => new(_haContext, "sensor.pixel_8_remaining_charge_time");
///Pixel 8 WiFi frequency
public NumericSensorEntity Pixel8WifiFrequency => new(_haContext, "sensor.pixel_8_wifi_frequency");
///Pixel 8 WiFi link speed
public NumericSensorEntity Pixel8WifiLinkSpeed => new(_haContext, "sensor.pixel_8_wifi_link_speed");
///Pixel 8 WiFi signal strength
public NumericSensorEntity Pixel8WifiSignalStrength => new(_haContext, "sensor.pixel_8_wifi_signal_strength");
///Z Flip 6 Battery level
public NumericSensorEntity SmF741wBatteryLevel => new(_haContext, "sensor.sm_f741w_battery_level");
}
public partial class SttEntities
{
private readonly IHaContext _haContext;
public SttEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all stt entities currently registered (at runtime) in Home Assistant as SttEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("stt.")).Select(e => new SttEntity(e));
///faster-whisper
public SttEntity FasterWhisper => new(_haContext, "stt.faster_whisper");
}
public partial class SunEntities
{
private readonly IHaContext _haContext;
public SunEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all sun entities currently registered (at runtime) in Home Assistant as SunEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("sun.")).Select(e => new SunEntity(e));
///Sun
public SunEntity Sun => new(_haContext, "sun.sun");
}
public partial class SwitchEntities
{
private readonly IHaContext _haContext;
public SwitchEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all switch entities currently registered (at runtime) in Home Assistant as SwitchEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("switch.")).Select(e => new SwitchEntity(e));
///M5Stack Atom Echo 31196c Use listen light
public SwitchEntity M5stackAtomEcho131196cUseListenLight => new(_haContext, "switch.m5stack_atom_echo_1_31196c_use_listen_light");
///M5Stack Atom Echo 31196c Use wake word
public SwitchEntity M5stackAtomEcho31196cUseWakeWord => new(_haContext, "switch.m5stack_atom_echo_31196c_use_wake_word");
///Salon Lamp
public SwitchEntity Smartplug1 => new(_haContext, "switch.smartplug1");
///Smartplug2 None
public SwitchEntity Smartplug2 => new(_haContext, "switch.smartplug2");
///Office Lamp
public SwitchEntity Smartplug3 => new(_haContext, "switch.smartplug3");
}
public partial class TimerEntities
{
private readonly IHaContext _haContext;
public TimerEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all timer entities currently registered (at runtime) in Home Assistant as TimerEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("timer.")).Select(e => new TimerEntity(e));
///Assist - Timer 1
public TimerEntity AssistTimer1 => new(_haContext, "timer.assist_timer1");
///Assist - Timer 2
public TimerEntity AssistTimer2 => new(_haContext, "timer.assist_timer2");
///Assist - Timer 3
public TimerEntity AssistTimer3 => new(_haContext, "timer.assist_timer3");
}
public partial class TodoEntities
{
private readonly IHaContext _haContext;
public TodoEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all todo entities currently registered (at runtime) in Home Assistant as TodoEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("todo.")).Select(e => new TodoEntity(e));
///Shopping List
public TodoEntity ShoppingList => new(_haContext, "todo.shopping_list");
}
public partial class TtsEntities
{
private readonly IHaContext _haContext;
public TtsEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all tts entities currently registered (at runtime) in Home Assistant as TtsEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("tts.")).Select(e => new TtsEntity(e));
///piper
public TtsEntity Piper => new(_haContext, "tts.piper");
}
public partial class WakeWordEntities
{
private readonly IHaContext _haContext;
public WakeWordEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all wake_word entities currently registered (at runtime) in Home Assistant as WakeWordEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("wake_word.")).Select(e => new WakeWordEntity(e));
///openwakeword
public WakeWordEntity Openwakeword => new(_haContext, "wake_word.openwakeword");
}
public partial class WeatherEntities
{
private readonly IHaContext _haContext;
public WeatherEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all weather entities currently registered (at runtime) in Home Assistant as WeatherEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("weather.")).Select(e => new WeatherEntity(e));
///Forecast Home
public WeatherEntity ForecastHome => new(_haContext, "weather.forecast_home");
}
public partial class ZoneEntities
{
private readonly IHaContext _haContext;
public ZoneEntities(IHaContext haContext)
{
_haContext = haContext;
}
/// Enumerates all zone entities currently registered (at runtime) in Home Assistant as ZoneEntity
public IEnumerable EnumerateAll() => _haContext.GetAllEntities().Where(e => e.EntityId.StartsWith("zone.")).Select(e => new ZoneEntity(e));
///Home
public ZoneEntity Home => new(_haContext, "zone.home");
}
public partial record LightEntity : Entity, LightAttributes>, ILightEntityCore
{
public LightEntity(IHaContext haContext, string entityId) : base(haContext, entityId)
{
}
public LightEntity(IEntityCore entity) : base(entity)
{
}
}
public partial record LightAttributes
{
[JsonPropertyName("supported_color_modes")]
public IReadOnlyList? SupportedColorModes { get; init; }
[JsonPropertyName("supported_features")]
public double? SupportedFeatures { get; init; }
[JsonPropertyName("color_mode")]
public string? ColorMode { get; init; }
[JsonPropertyName("min_color_temp_kelvin")]
public double? MinColorTempKelvin { get; init; }
[JsonPropertyName("max_color_temp_kelvin")]
public double? MaxColorTempKelvin { get; init; }
[JsonPropertyName("min_mireds")]
public double? MinMireds { get; init; }
[JsonPropertyName("max_mireds")]
public double? MaxMireds { get; init; }
[JsonPropertyName("brightness")]
public double? Brightness { get; init; }
[JsonPropertyName("color_temp_kelvin")]
public double? ColorTempKelvin { get; init; }
[JsonPropertyName("color_temp")]
public double? ColorTemp { get; init; }
[JsonPropertyName("hs_color")]
public IReadOnlyList? HsColor { get; init; }
[JsonPropertyName("rgb_color")]
public IReadOnlyList? RgbColor { get; init; }
[JsonPropertyName("xy_color")]
public IReadOnlyList? XyColor { get; init; }
[JsonPropertyName("entity_id")]
public IReadOnlyList? EntityId { get; init; }
[JsonPropertyName("effect_list")]
public IReadOnlyList? EffectList { get; init; }
[JsonPropertyName("color")]
public object? Color { get; init; }
[JsonPropertyName("friendly_name")]
public string? FriendlyName { get; init; }
}
public partial record MediaPlayerEntity : Entity, MediaPlayerAttributes>, IMediaPlayerEntityCore
{
public MediaPlayerEntity(IHaContext haContext, string entityId) : base(haContext, entityId)
{
}
public MediaPlayerEntity(IEntityCore entity) : base(entity)
{
}
}
public partial record MediaPlayerAttributes
{
[JsonPropertyName("app_id")]
public string? AppId { get; init; }
[JsonPropertyName("app_name")]
public string? AppName { get; init; }
[JsonPropertyName("device_class")]
public string? DeviceClass { get; init; }
[JsonPropertyName("entity_picture_local")]
public string? EntityPictureLocal { get; init; }
[JsonPropertyName("entity_picture")]
public string? EntityPicture { get; init; }
[JsonPropertyName("icon")]
public string? Icon { get; init; }
[JsonPropertyName("friendly_name")]
public string? FriendlyName { get; init; }
[JsonPropertyName("supported_features")]
public double? SupportedFeatures { get; init; }
[JsonPropertyName("volume_level")]
public double? VolumeLevel { get; init; }
[JsonPropertyName("is_volume_muted")]
public bool? IsVolumeMuted { get; init; }
[JsonPropertyName("media_content_id")]
public string? MediaContentId { get; init; }
[JsonPropertyName("media_content_type")]
public string? MediaContentType { get; init; }
[JsonPropertyName("media_duration")]
public double? MediaDuration { get; init; }
[JsonPropertyName("media_position")]
public double? MediaPosition { get; init; }
[JsonPropertyName("media_position_updated_at")]
public string? MediaPositionUpdatedAt { get; init; }
[JsonPropertyName("media_title")]
public string? MediaTitle { get; init; }
[JsonPropertyName("media_album_name")]
public string? MediaAlbumName { get; init; }
[JsonPropertyName("media_image_url")]
public string? MediaImageUrl { get; init; }
[JsonPropertyName("media_artist")]
public string? MediaArtist { get; init; }
[JsonPropertyName("sound_mode_list")]
public IReadOnlyList? SoundModeList { get; init; }
[JsonPropertyName("media_track")]
public object? MediaTrack { get; init; }
[JsonPropertyName("shuffle")]
public bool? Shuffle { get; init; }
[JsonPropertyName("repeat")]
public string? Repeat { get; init; }
[JsonPropertyName("source_list")]
public IReadOnlyList? SourceList { get; init; }
[JsonPropertyName("source")]
public string? Source { get; init; }
[JsonPropertyName("adb_response")]
public object? AdbResponse { get; init; }
[JsonPropertyName("hdmi_input")]
public object? HdmiInput { get; init; }
[JsonPropertyName("sound_mode")]
public string? SoundMode { get; init; }
[JsonPropertyName("sound_mode_raw")]
public string? SoundModeRaw { get; init; }
[JsonPropertyName("assumed_state")]
public bool? AssumedState { get; init; }
[JsonPropertyName("sp_device_id")]
public object? SpDeviceId { get; init; }
[JsonPropertyName("sp_device_name")]
public object? SpDeviceName { get; init; }
[JsonPropertyName("sp_device_is_brand_sonos")]
public bool? SpDeviceIsBrandSonos { get; init; }
[JsonPropertyName("sp_item_type")]
public string? SpItemType { get; init; }
[JsonPropertyName("sp_user_country")]
public string? SpUserCountry { get; init; }
[JsonPropertyName("sp_user_display_name")]
public string? SpUserDisplayName { get; init; }
[JsonPropertyName("sp_user_email")]
public string? SpUserEmail { get; init; }
[JsonPropertyName("sp_user_id")]
public string? SpUserId { get; init; }
[JsonPropertyName("sp_user_product")]
public string? SpUserProduct { get; init; }
[JsonPropertyName("sp_user_uri")]
public string? SpUserUri { get; init; }
[JsonPropertyName("media_playlist")]
public string? MediaPlaylist { get; init; }
[JsonPropertyName("group_members")]
public object? GroupMembers { get; init; }
[JsonPropertyName("master")]
public bool? Master { get; init; }
[JsonPropertyName("uuid")]
public string? Uuid { get; init; }
[JsonPropertyName("tts_active")]
public bool? TtsActive { get; init; }
[JsonPropertyName("snapshot_active")]
public bool? SnapshotActive { get; init; }
[JsonPropertyName("snapshot_spotify")]
public bool? SnapshotSpotify { get; init; }
[JsonPropertyName("media_position_mass")]
public double? MediaPositionMass { get; init; }
[JsonPropertyName("debug_info")]
public string? DebugInfo { get; init; }
[JsonPropertyName("firmware")]
public string? Firmware { get; init; }
[JsonPropertyName("sp_track_is_explicit")]
public bool? SpTrackIsExplicit { get; init; }
[JsonPropertyName("restored")]
public bool? Restored { get; init; }
}
public partial record AutomationEntity : Entity, AutomationAttributes>, IAutomationEntityCore
{
public AutomationEntity(IHaContext haContext, string entityId) : base(haContext, entityId)
{
}
public AutomationEntity(IEntityCore entity) : base(entity)
{
}
}
public partial record AutomationAttributes
{
[JsonPropertyName("last_triggered")]
public string? LastTriggered { get; init; }
[JsonPropertyName("mode")]
public string? Mode { get; init; }
[JsonPropertyName("current")]
public double? Current { get; init; }
[JsonPropertyName("friendly_name")]
public string? FriendlyName { get; init; }
[JsonPropertyName("id")]
public string? Id { get; init; }
[JsonPropertyName("max")]
public double? Max { get; init; }
}
public partial record BinarySensorEntity : Entity, BinarySensorAttributes>, IBinarySensorEntityCore
{
public BinarySensorEntity(IHaContext haContext, string entityId) : base(haContext, entityId)
{
}
public BinarySensorEntity(IEntityCore entity) : base(entity)
{
}
}
public partial record BinarySensorAttributes
{
[JsonPropertyName("device_class")]
public string? DeviceClass { get; init; }
[JsonPropertyName("friendly_name")]
public string? FriendlyName { get; init; }
[JsonPropertyName("icon")]
public string? Icon { get; init; }
}
public partial record ButtonEntity : Entity, ButtonAttributes>, IButtonEntityCore
{
public ButtonEntity(IHaContext haContext, string entityId) : base(haContext, entityId)
{
}
public ButtonEntity(IEntityCore entity) : base(entity)
{
}
}
public partial record ButtonAttributes
{
[JsonPropertyName("device_class")]
public string? DeviceClass { get; init; }
[JsonPropertyName("icon")]
public string? Icon { get; init; }
[JsonPropertyName("friendly_name")]
public string? FriendlyName { get; init; }
}
public partial record CalendarEntity : Entity, CalendarAttributes>, ICalendarEntityCore
{
public CalendarEntity(IHaContext haContext, string entityId) : base(haContext, entityId)
{
}
public CalendarEntity(IEntityCore entity) : base(entity)
{
}
}
public partial record CalendarAttributes
{
[JsonPropertyName("message")]
public string? Message { get; init; }
[JsonPropertyName("all_day")]
public bool? AllDay { get; init; }
[JsonPropertyName("start_time")]
public string? StartTime { get; init; }
[JsonPropertyName("end_time")]
public string? EndTime { get; init; }
[JsonPropertyName("location")]
public string? Location { get; init; }
[JsonPropertyName("description")]
public string? Description { get; init; }
[JsonPropertyName("friendly_name")]
public string? FriendlyName { get; init; }
}
public partial record ConversationEntity : Entity, ConversationAttributes>
{
public ConversationEntity(IHaContext haContext, string entityId) : base(haContext, entityId)
{
}
public ConversationEntity(IEntityCore entity) : base(entity)
{
}
}
public partial record ConversationAttributes
{
[JsonPropertyName("friendly_name")]
public string? FriendlyName { get; init; }
[JsonPropertyName("supported_features")]
public double? SupportedFeatures { get; init; }
}
public partial record DeviceTrackerEntity : Entity, DeviceTrackerAttributes>, IDeviceTrackerEntityCore
{
public DeviceTrackerEntity(IHaContext haContext, string entityId) : base(haContext, entityId)
{
}
public DeviceTrackerEntity(IEntityCore entity) : base(entity)
{
}
}
public partial record DeviceTrackerAttributes
{
[JsonPropertyName("source_type")]
public string? SourceType { get; init; }
[JsonPropertyName("friendly_name")]
public string? FriendlyName { get; init; }
[JsonPropertyName("latitude")]
public double? Latitude { get; init; }
[JsonPropertyName("longitude")]
public double? Longitude { get; init; }
[JsonPropertyName("gps_accuracy")]
public double? GpsAccuracy { get; init; }
[JsonPropertyName("altitude")]
public double? Altitude { get; init; }
[JsonPropertyName("course")]
public double? Course { get; init; }
[JsonPropertyName("speed")]
public double? Speed { get; init; }
[JsonPropertyName("vertical_accuracy")]
public double? VerticalAccuracy { get; init; }
}
public partial record InputBooleanEntity : Entity, InputBooleanAttributes>, IInputBooleanEntityCore
{
public InputBooleanEntity(IHaContext haContext, string entityId) : base(haContext, entityId)
{
}
public InputBooleanEntity(IEntityCore entity) : base(entity)
{
}
}
public partial record InputBooleanAttributes
{
[JsonPropertyName("editable")]
public bool? Editable { get; init; }
[JsonPropertyName("friendly_name")]
public string? FriendlyName { get; init; }
}
public partial record InputTextEntity : Entity, InputTextAttributes>, IInputTextEntityCore
{
public InputTextEntity(IHaContext haContext, string entityId) : base(haContext, entityId)
{
}
public InputTextEntity(IEntityCore entity) : base(entity)
{
}
}
public partial record InputTextAttributes
{
[JsonPropertyName("editable")]
public bool? Editable { get; init; }
[JsonPropertyName("min")]
public double? Min { get; init; }
[JsonPropertyName("max")]
public double? Max { get; init; }
[JsonPropertyName("pattern")]
public object? Pattern { get; init; }
[JsonPropertyName("mode")]
public string? Mode { get; init; }
[JsonPropertyName("icon")]
public string? Icon { get; init; }
[JsonPropertyName("friendly_name")]
public string? FriendlyName { get; init; }
}
public partial record LockEntity : Entity, LockAttributes>, ILockEntityCore
{
public LockEntity(IHaContext haContext, string entityId) : base(haContext, entityId)
{
}
public LockEntity(IEntityCore entity) : base(entity)
{
}
}
public partial record LockAttributes
{
[JsonPropertyName("friendly_name")]
public string? FriendlyName { get; init; }
[JsonPropertyName("supported_features")]
public double? SupportedFeatures { get; init; }
}
public partial record NumberEntity : NumericEntity, NumberAttributes>, INumberEntityCore
{
public NumberEntity(IHaContext haContext, string entityId) : base(haContext, entityId)
{
}
public NumberEntity(IEntityCore entity) : base(entity)
{
}
}
public partial record NumberAttributes
{
[JsonPropertyName("min")]
public double? Min { get; init; }
[JsonPropertyName("max")]
public double? Max { get; init; }
[JsonPropertyName("step")]
public double? Step { get; init; }
[JsonPropertyName("mode")]
public string? Mode { get; init; }
[JsonPropertyName("unit_of_measurement")]
public string? UnitOfMeasurement { get; init; }
[JsonPropertyName("friendly_name")]
public string? FriendlyName { get; init; }
}
public partial record PersonEntity : Entity, PersonAttributes>, IPersonEntityCore
{
public PersonEntity(IHaContext haContext, string entityId) : base(haContext, entityId)
{
}
public PersonEntity(IEntityCore entity) : base(entity)
{
}
}
public partial record PersonAttributes
{
[JsonPropertyName("editable")]
public bool? Editable { get; init; }
[JsonPropertyName("id")]
public string? Id { get; init; }
[JsonPropertyName("device_trackers")]
public IReadOnlyList? DeviceTrackers { get; init; }
[JsonPropertyName("user_id")]
public string? UserId { get; init; }
[JsonPropertyName("icon")]
public string? Icon { get; init; }
[JsonPropertyName("friendly_name")]
public string? FriendlyName { get; init; }
[JsonPropertyName("latitude")]
public double? Latitude { get; init; }
[JsonPropertyName("longitude")]
public double? Longitude { get; init; }
[JsonPropertyName("gps_accuracy")]
public double? GpsAccuracy { get; init; }
[JsonPropertyName("source")]
public string? Source { get; init; }
}
public partial record RemoteEntity : Entity, RemoteAttributes>, IRemoteEntityCore
{
public RemoteEntity(IHaContext haContext, string entityId) : base(haContext, entityId)
{
}
public RemoteEntity(IEntityCore entity) : base(entity)
{
}
}
public partial record RemoteAttributes
{
[JsonPropertyName("activity_list")]
public IReadOnlyList