I feel like I am missing a very basic piece of information, but is it possible to create a String item that is simply a static value, initialized in the .items file?
You can create a static variable in your rules-file: val mac = "EF:0D:55:64:66:4F"
and access it later directly.
Just declare it on the very top directly after your imports and before the first rule.
rule "Started"
when
System started
then
BLE_mac_address.postUpdate("EF:0D:55:64:66:4F")
end
If you have persistence setup with restoreOnStartup, you only need this rule the first time the Item gets set.
I strongly believe it is better to put even static values like this in Items rather than as vals in the Rules, though @Spaceman_Spiff’s approach is equally as valid. I just like the idea that these states get saved to Persistence, are available across my rules files, it standardizes how values are accessed, and if you name them right and put them in groups you can look them up by name (for example, construct the name of a parameter based on the name of another Item that triggered a rule) which allows for consolidation of rules.