This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set options = state_attr('select.h3_work_mode', "options") %} | |
{% set opt_self_use = options[0] %} | |
{% set opt_feed_in = options[1] %} | |
{# default to self-use #} | |
{% set recommended_work_mode = opt_self_use %} | |
{% set pv_power = states('sensor.pv_power_h3') | float(0) %} | |
{% set pv_energy_expected = states('sensor.solcast_pv_forecast_prognose_verbleibende_leistung_heute') | float(0) %} | |
{# require at least some current and expected PV power #} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:ffi'; | |
import 'dart:isolate'; | |
import 'dart:io'; | |
import 'package:ffi/ffi.dart'; | |
void newIsolate(SendPort sendPort) { | |
final ptr = calloc.allocate<Int>(100); | |
ptr[0] = 42; | |
sendPort.send(ptr.address); | |
sleep(const Duration(seconds: 1)); |