feat(netd): standardize version of netdaemon in project
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
81227e34c8
commit
9dda3c5bd2
8 changed files with 51 additions and 48 deletions
1
devices/homie/modules/home-assistant/netdaemon/.version
Normal file
1
devices/homie/modules/home-assistant/netdaemon/.version
Normal file
|
@ -0,0 +1 @@
|
|||
24.37.1
|
|
@ -1,7 +1,7 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Generated using NetDaemon CodeGenerator nd-codegen v24.37.1.0
|
||||
// At: 2024-10-08T21:14:58.2735702-04:00
|
||||
// At: 2024-10-10T12:06:21.5284008-04:00
|
||||
//
|
||||
// *** Make sure the version of the codegen tool and your nugets Joysoftware.NetDaemon.* have the same version.***
|
||||
// You can use following command to keep it up to date with the latest version:
|
||||
|
@ -379,6 +379,10 @@ public partial class InputBooleanEntities
|
|||
public InputBooleanEntity NetdaemonSpotifyPlayAlbum => new(_haContext, "input_boolean.netdaemon_spotify_play_album");
|
||||
///<summary>netdaemon_spotify_play_artist</summary>
|
||||
public InputBooleanEntity NetdaemonSpotifyPlayArtist => new(_haContext, "input_boolean.netdaemon_spotify_play_artist");
|
||||
///<summary>netdaemon_spotify_play_playlist</summary>
|
||||
public InputBooleanEntity NetdaemonSpotifyPlayPlaylist => new(_haContext, "input_boolean.netdaemon_spotify_play_playlist");
|
||||
///<summary>netdaemon_spotify_play_song</summary>
|
||||
public InputBooleanEntity NetdaemonSpotifyPlaySong => new(_haContext, "input_boolean.netdaemon_spotify_play_song");
|
||||
}
|
||||
|
||||
public partial class InputTextEntities
|
||||
|
@ -597,9 +601,9 @@ public partial class SensorEntities
|
|||
public SensorEntity Pixel8WifiConnection => new(_haContext, "sensor.pixel_8_wifi_connection");
|
||||
///<summary>Pixel 8 WiFi IP address</summary>
|
||||
public SensorEntity Pixel8WifiIpAddress => new(_haContext, "sensor.pixel_8_wifi_ip_address");
|
||||
///<summary>SM-F741W Battery state</summary>
|
||||
///<summary>Z Flip 6 Battery state</summary>
|
||||
public SensorEntity SmF741wBatteryState => new(_haContext, "sensor.sm_f741w_battery_state");
|
||||
///<summary>SM-F741W Charger type</summary>
|
||||
///<summary>Z Flip 6 Charger type</summary>
|
||||
public SensorEntity SmF741wChargerType => new(_haContext, "sensor.sm_f741w_charger_type");
|
||||
///<summary>Sun Next dawn</summary>
|
||||
public SensorEntity SunNextDawn => new(_haContext, "sensor.sun_next_dawn");
|
||||
|
@ -641,7 +645,7 @@ public partial class SensorEntities
|
|||
public NumericSensorEntity Pixel8WifiLinkSpeed => new(_haContext, "sensor.pixel_8_wifi_link_speed");
|
||||
///<summary>Pixel 8 WiFi signal strength</summary>
|
||||
public NumericSensorEntity Pixel8WifiSignalStrength => new(_haContext, "sensor.pixel_8_wifi_signal_strength");
|
||||
///<summary>SM-F741W Battery level</summary>
|
||||
///<summary>Z Flip 6 Battery level</summary>
|
||||
public NumericSensorEntity SmF741wBatteryLevel => new(_haContext, "sensor.sm_f741w_battery_level");
|
||||
}
|
||||
|
||||
|
@ -1518,7 +1522,7 @@ public partial record NumericSensorAttributes
|
|||
public IReadOnlyList<string>? PairedDevices { get; init; }
|
||||
|
||||
[JsonPropertyName("ip6_addresses")]
|
||||
public IReadOnlyList<string>? Ip6Addresses { get; init; }
|
||||
public object? Ip6Addresses { get; init; }
|
||||
}
|
||||
|
||||
public partial record SttEntity : Entity<SttEntity, EntityState<SttAttributes>, SttAttributes>
|
||||
|
@ -4007,6 +4011,16 @@ public partial class NetdaemonServices
|
|||
{
|
||||
_haContext.CallService("netdaemon", "spotify_play_artist", null, data);
|
||||
}
|
||||
|
||||
public void SpotifyPlayPlaylist(object? data = null)
|
||||
{
|
||||
_haContext.CallService("netdaemon", "spotify_play_playlist", null, data);
|
||||
}
|
||||
|
||||
public void SpotifyPlaySong(object? data = null)
|
||||
{
|
||||
_haContext.CallService("netdaemon", "spotify_play_song", null, data);
|
||||
}
|
||||
}
|
||||
|
||||
public partial record NetdaemonEntityCreateParameters
|
||||
|
|
|
@ -48,7 +48,7 @@ in {
|
|||
];
|
||||
text = ''
|
||||
# Install codegen
|
||||
dotnet tool install --create-manifest-if-needed NetDaemon.HassModel.CodeGen
|
||||
dotnet tool install --create-manifest-if-needed NetDaemon.HassModel.CodeGen --version "$(cat ./.version)"
|
||||
|
||||
# Run it
|
||||
dotnet tool run nd-codegen -token "$(sed 's/HomeAssistant__Token=//' ${secrets.netdaemon.path})"
|
||||
|
@ -71,6 +71,9 @@ in {
|
|||
$(nix build --no-link --print-out-paths --impure --expr "let self = builtins.getFlake (\"$FLAKE\"); inherit (self.nixosConfigurations.homie) pkgs; in (pkgs.callPackage $FLAKE/devices/homie/modules/home-assistant/netdaemon/package.nix {}).fetch-deps") .
|
||||
alejandra .
|
||||
rm -r "$FLAKE/.config"
|
||||
|
||||
sed -i "s/finalImageTag = .*/finalImageTag = \"$(cat ./.version)\";/" ./images/netdaemon.nix
|
||||
updateImages .
|
||||
'';
|
||||
})
|
||||
];
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<LangVersion>12.0</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>netdaemon</RootNamespace>
|
||||
<Version>$([System.IO.File]::ReadAllText(".version"))</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
{
|
||||
lib,
|
||||
buildDotnetModule,
|
||||
dotnetCorePackages,
|
||||
nix-gitignore,
|
||||
}: let
|
||||
inherit (lib) any hasInfix hasSuffix removeSuffix;
|
||||
|
||||
srcDirs = ["apps"];
|
||||
srcPatterns = [".cs" ".csproj" ".json" ".version"];
|
||||
|
||||
pname = "netdaemon-config";
|
||||
in
|
||||
buildDotnetModule {
|
||||
inherit pname;
|
||||
version = "0.0.0";
|
||||
version = removeSuffix "\n" (builtins.readFile ./.version);
|
||||
|
||||
src =
|
||||
nix-gitignore.gitignoreSource [
|
||||
"*.nix"
|
||||
".direnv"
|
||||
".envrc"
|
||||
"images"
|
||||
]
|
||||
./.;
|
||||
src = builtins.path {
|
||||
name = "netdaemon-src";
|
||||
path = ./.;
|
||||
filter = file: type:
|
||||
(type == "directory" && any (s: hasInfix s file) srcDirs)
|
||||
|| any (s: hasSuffix s file) srcPatterns;
|
||||
};
|
||||
|
||||
projectFile = "netdaemon.csproj";
|
||||
nugetDeps = ./deps.nix;
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) all any attrValues findSingle length mapAttrs mkIf mkOption types;
|
||||
inherit (builtins) filter hasAttr listToAttrs removeAttrs;
|
||||
inherit (lib) mkIf mkOption types;
|
||||
inherit (lib.lists) all any filter findSingle length;
|
||||
inherit (lib.attrsets) attrValues hasAttr listToAttrs mapAttrs removeAttrs;
|
||||
|
||||
inherit (config.sops) secrets;
|
||||
inherit (config.vars) hostName;
|
||||
|
|
|
@ -4,22 +4,11 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
concatMapStringsSep
|
||||
converge
|
||||
elem
|
||||
filterAttrsRecursive
|
||||
getExe
|
||||
mapAttrsToList
|
||||
mkForce
|
||||
mkIf
|
||||
mkOption
|
||||
optionalAttrs
|
||||
optionals
|
||||
optionalString
|
||||
types
|
||||
;
|
||||
inherit (lib) converge getExe mkOption types;
|
||||
inherit (lib.modules) mkForce mkIf;
|
||||
inherit (lib.lists) elem optionals;
|
||||
inherit (lib.strings) concatMapStringsSep optionalString;
|
||||
inherit (lib.attrsets) mapAttrsToList filterAttrsRecursive optionalAttrs;
|
||||
|
||||
cfg = config.services.esphome;
|
||||
|
||||
|
|
|
@ -4,20 +4,10 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
attrNames
|
||||
concatMapStringsSep
|
||||
concatStringsSep
|
||||
filterAttrs
|
||||
listToAttrs
|
||||
map
|
||||
mkForce
|
||||
mkIf
|
||||
mkOverride
|
||||
nameValuePair
|
||||
optionalString
|
||||
;
|
||||
inherit (lib.lists) map;
|
||||
inherit (lib.modules) mkForce mkIf mkOverride;
|
||||
inherit (lib.strings) concatMapStringsSep concatStringsSep optionalString;
|
||||
inherit (lib.attrsets) attrNames nameValuePair filterAttrs listToAttrs;
|
||||
|
||||
cfg = config.services.wyoming;
|
||||
in {
|
||||
|
|
Loading…
Reference in a new issue