Set a boolean (single on/off checkbox) value while creating a node I am creating a node (in Drupal 8) with the following code. 

use \Drupal\node\Entity\Node;

$node = Node::create([
            'type' =&gt; 'calendar_data',
            'title' =&gt; 'testing finaly 1111111111111111111111111 ',
            'field_current_month' =&gt; date('Y-m-d'),
            'field_date_type_value' =&gt; '1',
        ]);
$node-&gt;save();


The value of field_date_type_value is set to 0, not the expected value (1) I am using in the code.
Sorry for late response, but I had the same problem few days ago. What worked for me was first of all creating the node and then setting the boolean value:

$node = Node::create([
        'type' =&gt; 'calendar_data',
        'title' =&gt; 'testing finaly 1111111111111111111111111 ',
        'field_current_month' =&gt; date('Y-m-d'),
    ]);
$node-&gt;field_date_type_value-&gt;value = true,

$node-&gt;save();


The 'inline' field setting didn't work neither for some other fields for me. But the explicit version is working very well.