Spyke

Replies

Comment on

Reblog if youre american

Reply in thread

The health benefits are overblown and the evidence is largely from flawed studies. While not as debilitating as clitoris circumcision, it's still genital mutilation and it's regularly done in the US for no good reason beyond cultural pressure.

Comment on

Design Ideas

Reply in thread

In God We Trust is also an objectively less cool motto than e pluribus unum which translates to out of many, one. We traded the original ideal of a people united by difference into a boringly generic religious proclamation just to try to stick it to the commies.

memes

Comment on

Deregulation will surely help the housing crisis 🤡

Reply in thread

Yeah the main lesson I've taken away from the last decade of cryptocurrency instability, NFTs, and things like algorithmically generated judicial sentencing guidelines that perpetuated the existing racial biases while making them seem more legitimate because "the computer can't be wrong" is that we should run our whole society with them.

Comment on

Steam Deck gets a Battery Charge Limit control in the latest Beta

Reply in thread

The logic isn't flawed, your priors are. You're assuming that people are constantly on a cycle of charging their battery to the limit, running it down low, and then charging it again. If you mostly play docked or with a charger plugged in then capping the battery at around 80% prolongs the battery runtime for when you do turn the limit off and want to use the full battery.

If you mostly play fully charged and stationary, then lowering the charge limit means you have more future opportunities to experience the fully battery runtime when you disable the setting.

Comment on

Horse boy

Reply in thread

You cannot build up an immunity to cyanide. The mechanism of action for it to act as a poison is that it directly limits aerobic respiration on a molecular level. To put that more simply, it stops oxygen from getting where it needs to go and effectively stops your cells from "breathing", ultimately stopping your mitochondria from functioning. To put that in a more complex way, it binds to part of an enzyme called cytochrome c oxidase that is essential to ATP synthethis and prevents the reaction from occurring.

Horrifyingly, cyanide poisoning cannot be fixed by simply giving the body higher concentrations of oxygen to breathe in. It doesn't prevent your repository system from uptaking oxygen. Instead it prevents your individual cells from using the available oxygen.

While it is sort of technically possible in the case of cyanide for the liver to produce more rhodanese (an enzyme that specifically reduces the toxic effects of cyanide in the body) the reaction is dependent on sulfur. Perhaps if you ate foods like eggs in very large quantities and also regularly ate larger amounts of cyanide you could maintain a state of immunity to doses larger than what would normally kill a person but I can't find any evidence of someone stupid enough to test that. Regardless this immunity is in the form of getting your liver to simply clear the cyanide from your system faster and does nothing to stop the underlying cellular asphyxiation.

As an aside Arsenic which was also mentioned earlier interrupts mitochondrial function as well, but in this case it takes the place of Phosphorus (The P in ATP) and the resulting molecule is not able to react correctly. While not a perfect comparison you can think of cyanide as starving your cells of oxygen while arsenic starves them of useful fuel. Neither of these are something you can build an immunity to.

Comment on

Thought-provoking

Reply in thread

He tried to kill people and ended up helping feed the world, then he tried to feed people and ended up helping the Holocaust. The guy is a fascinating historical figure but definitely a was a monster.

Comment on

[Solved] Trying to count a bunch of lights and switches

I'm trying to word this kindly yet directly, but the whole chain of additions you've done is messed up.

If you just want working code then try the examples in this post but note that you can edit template sensors in the GUI now so directly editing the config file isn't needed. https://community.home-assistant.io/t/trying-to-show-how-many-lights-are-on/527089/12

For an actual explanation of what's going wrong with your code I'll start with this bit, which will not work as written and when fixed doesn't do what you currently are intending it to do.

I highly suggest reading through this page of documentation while looking over this as it will clarify a lot better than I can.

{{ (states.switch | rejectattr('attributes.light.lamp_left', 'defined') | selectattr('state', 'eq', 'on') | list | count) }}

I'd like to work through this backwards:

count is, as the name implies, counting. It'll take an input and then spit out a number. In this case, it's going to count the members of a list piped into it from...

list takes an input object and converts it to a list. In this case it's creating a list from the output of...

selectattr() is a way to filter an input object based on some criteria. For this we're filtering the input for only objects with an attribute named state whose value is equal to on. The result should be a group of entities that have a state listed as on. The input it's filtering from is...

rejectattr() is basically the same as selectattr(), except it removes based on the filtering criteria and outputs everything that didn't match. This is where your code is failing, and it's actually not even necessary for this single line to work. I'm assuming you saw example code that used attributes.entity_id and then you replaced the entity_id portion with your targeted entity. This is failing because the rejectattr() filter is looking for the name of what attribute to filter on and its state. This portion is actually doing absolutely nothing even if it's working, as far as I can tell, because as originally written it would just remove any object with an entity_id named defined. That all said, it's filtering input from...

states.switch, which is a way to reference and get the state result of every entity in the switch domain. There's a whole section in the HA documentation I linked about states and how to get them for templates that is very relevant to what you're doing. In this case, unless your lights are set up as switches, you'd actually want to use states.light.

The end result if you follow this advice will instead give you a single line that counts all lights currently turned on, so no need for adding them all together like your original code. If you only want to know the states of a specific group of your lights then see the forum link from the top of my post that shows how to manually write a group into the template, or alternatively create a helper group in the GUI and reference that.